/**
 * FAQ page only (enqueued via is_page('faq')).
 * Do not move these rules into frontend.css — other pages use .faq / .faq-item too.
 */

/* Semantic h4 must match former h5 FAQ look (frontend.css only styles .faq-item h5/h6).
   Without this, global h4 / h4:first-child add extra bottom margin ("уступ"). */
.faq .faq-item h4.faq-item--question,
.faq .faq-item h4 {
  font-size: 18px;
  padding: 20px 0 20px 48px;
  margin: 0;
  position: relative;
  cursor: pointer;
}

.faq .faq-item h4.faq-item--question:before,
.faq .faq-item h4.faq-item--question:after,
.faq .faq-item h4:before,
.faq .faq-item h4:after {
  content: "";
  width: 14px;
  height: 2px;
  position: absolute;
  background: #4D618F;
}

.faq .faq-item h4.faq-item--question:before,
.faq .faq-item h4:before {
  top: 50%;
  left: 0;
}

.faq .faq-item h4.faq-item--question:after,
.faq .faq-item h4:after {
  top: 50%;
  left: 0;
  transform: rotate(90deg);
}

.faq .faq-item.opened h4.faq-item--question:after,
.faq .faq-item.opened h4:after {
  display: none;
}

@media (min-width: 1024px) {
  .faq .faq-item h4.faq-item--question,
  .faq .faq-item h4 {
    font-size: 18px;
  }
}

.faq-section {
  scroll-margin-top: 110px;
  margin: 0 0 4px;
}

.faq .faq-section:first-child {
  margin-top: 0;
}

/* Space between previous FAQ items and the next section chip. */
.faq .faq-section:not(:first-child) {
  margin-top: 64px;
}

.faq-section__title,
.faq .faq-section p.faq-section__title,
.faq .faq-section h2.faq-section__title {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  font-family: Raleway, "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #333333;
  margin: 0;
  padding: 16px 20px;
  background-color: #EDEFF1;
  border-radius: 16px;
}

.hero .faq-jump {
  margin-top: 28px;
  max-width: 100%;
}

.hero .faq-jump__label {
  font-family: "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #333333;
  margin: 0 0 10px;
}

/* Horizontal jump links with thin vertical dividers (Karrierehaus pattern). */
.hero .faq-jump ul.wp-block-list,
.hero .faq-jump ul {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.hero .faq-jump li {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  position: relative;
  white-space: nowrap;
}

.hero .faq-jump li:not(:last-child)::after {
  content: "";
  display: block;
  width: 2px;
  height: 16px;
  margin: 0 16px;
  border-left: 2px solid rgba(77, 97, 143, 0.35);
  box-sizing: border-box;
}

.hero .faq-jump a {
  color: #4D618F;
  text-decoration: none;
  font-family: "Open Sans", Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.3;
  padding: 8px 0;
}

.hero .faq-jump a:hover {
  color: #495B71;
  text-decoration: underline;
}

@media screen and (max-width: 1024px) {
  .hero .faq-jump ul.wp-block-list,
  .hero .faq-jump ul {
    flex-wrap: wrap;
  }

  .hero .faq-jump li {
    white-space: normal;
  }

  .hero .faq-jump li:not(:last-child)::after {
    margin: 0 12px;
  }
}

@media screen and (max-width: 767px) {
  .faq-section {
    scroll-margin-top: 80px;
  }

  .faq .faq-section:not(:first-child) {
    margin-top: 64px;
  }

  .faq-section__title,
  .faq .faq-section p.faq-section__title,
  .faq .faq-section h2.faq-section__title {
    font-size: 14px;
    padding: 12px 16px;
    border-radius: 12px;
  }

  .hero .faq-jump a {
    font-size: 15px;
  }
}

/* Line follows the 800px text. The item itself stays in the content column. */
.faq .faq-item {
  border-bottom: none;
}

.faq .faq-item::after {
  content: "";
  display: block;
  width: 100%;
  max-width: 800px;
  margin-left: 0;
  margin-right: auto;
  border-bottom: 1px solid rgba(77, 97, 143, 0.2);
}
