/* Стилі для темплейту FAQ (template-faq.php) */

.faq-page .container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* Hero */

.faq-hero {
  position: relative;
  background: linear-gradient(180deg, #2c2417 0%, #504635 100%);
  padding: 120px 0;
}

.faq-hero.has-bg-image {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.faq-hero.has-bg-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color:#11316899;
}

.faq-hero .container {
  position: relative;
  z-index: 1;
}

.faq-hero__title {
  margin: 0 0 20px;
  font-family: "DM Serif Display", Sans-serif!important;
  font-size: 4em;
  font-weight: 500;
  color: #ffffff;
}

.faq-hero__text {
  margin: 0 0 30px;
  max-width: 700px;
  color: #ffffff;
  font-size: 18px;
}

/*.faq-hero__button {
  display: inline-block;
  background-color: #ffffff;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 500;
  text-transform: uppercase;
  fill: #2c2417;
  color: #2c2417;
  border-radius: 10px;
  padding: 15px 30px;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.faq-hero__button:hover,
.faq-hero__button:focus {
  background-color: #2c2417;
  color: #ffffff;
}
*/
a.faq-hero__button {
	background-color: #113168;
	color: #ffffff;
}
.faq-hero__button:hover {
	color: #113168;
	background: #ffffff;
}
.faq-hero__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    background-color: #113168;

    font-family: "DM Sans", sans-serif;
    font-weight: 300;

    border-style: solid;
    border-width: 1px;
    border-radius: 40px;

    padding: 5px 0 5px 20px;
}

.faq-hero__button::after {
    content: "↗";

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    flex-shrink: 0;

    border: 1px solid currentColor;
    border-radius: 50%;
    margin-right: 5px;

    font-size: 24px;
    transition: all 0.3s ease;

    background: #ffffff;
    color: #3565A0;
}

.faq-hero__button:hover::after {
    background: #3565A0;
    color: #ffffff;
}
@media (max-width: 767px) {
  .faq-hero {
    padding: 60px 0;
  }
  .faq-hero__text {
    font-size: 16px;
    margin: 0 0 20px;
  }
  .faq-hero__title {
    font-size: 2.8em;
  }
  .faq-hero__button {
    font-size: 16px;
    font-weight: 500;
  }
}

/* Question / Answer */

.faq-content {
  padding: 80px 0;
}

.faq-content__grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  /*
   * align-items залишається "stretch" (за замовчуванням), щоб .faq-toc
   * розтягнувся на всю висоту рядка — інакше sticky-блоку всередині
   * нього нема куди "їхати", і він поводиться як звичайний static.
   */
}

/* Table of Contents */

.faq-toc__inner {
  position: sticky;
  top: 100px;
  background-color: #ffffff;
  border: 1px solid #e6e2dc;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(44, 36, 23, 0.06);
}

.faq-toc__title {
  margin: 0 0 12px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  color: #113168;
}

.faq-toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.faq-toc__link {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 7px 0;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  color: #113168;
  font-weight:400;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition:
    color 0.25s ease,
    border-color 0.25s ease;
}

.faq-toc__link:hover,
.faq-toc__link:focus {
  color: #3565a0;
  border-left-color: #3565a0;
}

/* Accordion */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background-color: #ffffff;
  border: 1px solid #e6e2dc;
  border-radius: 16px;
  padding: 4px 20px;
  box-shadow: 0 6px 20px rgba(44, 36, 23, 0.06);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 14px 32px rgba(44, 36, 23, 0.1);
  transform: translateY(-2px);
}

.faq-item.is-open {
  border-color: #3565a0;
  box-shadow: 0 14px 34px rgba(53, 101, 160, 0.16);
}

.faq-item__question {
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  padding: 18px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.faq-item__question-text {
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  color: #113168;
  transition: color 0.25s ease;
}

.faq-item__question:hover .faq-item__question-text {
  color: #3565a0;
}

.faq-item__icon {
  position: relative;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(53, 101, 160, 0.08);
  border: 1.5px solid rgba(53, 101, 160, 0.35);
  box-shadow: 0 2px 6px rgba(53, 101, 160, 0.12);
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: #3565a0;
  transition:
    transform 0.25s ease,
    background-color 0.25s ease;
}

.faq-item__icon::before {
  width: 12px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.faq-item__icon::after {
  width: 2px;
  height: 12px;
  transform: translate(-50%, -50%);
}

.faq-item__question:hover .faq-item__icon,
.faq-item.is-open .faq-item__icon {
  background-color: #3565a0;
  border-color: #3565a0;
  box-shadow: 0 6px 16px rgba(53, 101, 160, 0.35);
}

.faq-item__question:hover .faq-item__icon::before,
.faq-item__question:hover .faq-item__icon::after,
.faq-item.is-open .faq-item__icon::before,
.faq-item.is-open .faq-item__icon::after {
  background-color: #ffffff;
}

.faq-item.is-open .faq-item__icon::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.faq-item.is-open .faq-item__question-text {
  color: #3565a0;
}

.faq-item__answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.faq-item.is-open .faq-item__answer {
  grid-template-rows: 1fr;
}

.faq-item__answer-inner {
  overflow: hidden;
  min-height: 0;
}

.faq-item__answer-inner p {
  margin: 0 0 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #504635;
}

.faq-item__answer-inner p:last-child {
  margin-bottom: 24px;
}

@media (max-width: 991px) {
  .faq-content__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-toc__inner {
    position: static;
  }
}

@media (max-width: 767px) {
  .faq-content {
    padding: 50px 0;
  }

  .faq-item__question-text {
    font-size: 18px;
  }
}

/* Reviews */

.faq-reviews {
  background-color: #e9f3ff;
  padding: 80px 0;
}

.faq-reviews__head {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.faq-reviews__title {
  margin: 0 0 16px;
  font-family: "DM Serif Display", Sans-serif!important;
  font-size: 42px;
  font-weight: 600;
  color: #113168;
}

.faq-reviews__text {
  margin: 0;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #113168;
}

.faq-reviews__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.review-card {
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 6px 20px rgba(44, 36, 23, 0.06);
  transition:
    box-shadow 0.3s ease,
    transform 0.3s ease;
}


.review-card__quote {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 50%;
  background-color: #36659d26;
}

.review-card__quote svg {
  width: 16px;
  height: 16px;
  fill: #36659D;
}

.review-card__text {
  flex-grow: 1;
  margin-bottom: 20px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: #36659D;
}

.review-card__text p {
  margin: 0 0 12px;
}

.review-card__text p:last-child {
  margin-bottom: 0;
}

.review-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e6e2dc;
}

.review-card__author {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #113168;
}

.review-card__stars {
  display: inline-flex;
  gap: 2px;
  flex-shrink: 0;
}

.review-card__stars svg {
  width: 14px;
  height: 14px;
  fill: #c9a227;
}

@media (max-width: 767px) {
  .faq-reviews {
    padding: 50px 0;
  }

  .faq-reviews__title {
    font-size: 26px;
  }

  .faq-reviews__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Form */

.faq-form {
  padding: 80px 0;
}

.faq-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-items: stretch;
}

.faq-form__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: #edf1fa;
  border-radius: 16px;
  padding: 34px 18px;
}

.faq-form__title {
  margin: 0 0 16px;
  font-family: "Playfair Display", Sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #24365e;
}
.contact-form .wpcf7-not-valid-tip {
  position: absolute;
  font-size: 9px !important;
  bottom: 0;
  left: 10px;
}

.faq-form__form .wpcf7-response-output {
  position: absolute;
  font-size: 10px;
  margin: 0px !important;
}
.faq-form__text {
  margin: 0 0 20px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  color: #3a4d73;
}

.faq-form__text a {
  color: #3565a0;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(53, 101, 160, 0.4);
  text-underline-offset: 3px;
  transition:
    color 0.25s ease,
    text-decoration-color 0.25s ease;
}

.faq-form__text a:hover,
.faq-form__text a:focus {
  color: #24365e;
  text-decoration-color: #24365e;
}

.faq-form__map {
  border-radius: 16px;
  overflow: hidden;
  min-height: 360px;
}

.faq-form__map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 360px;
  border: 0;
}

/* CF7 markup provided by the client already contains .contact-form* wrappers */

.contact-form__row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.contact-form__col {
  flex: 1;
  min-width: 0;
}
.contact-form p {
  margin: 0px;
  width: 100%;
}
.contact-form .wpcf7-form-control-wrap {
  display: block;
}

.contact-form textarea.wpcf7-form-control {
  width: 100%;
  min-height: 130px;
  resize: vertical;
}

.contact-form input.wpcf7-form-control,
.contact-form textarea.wpcf7-form-control {
  width: 100%;
  padding: 11px 14px;
  background-color: #ffffff;
  border: 1px solid #d7ddec;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  color: #24365e;
  transition: border-color 0.25s ease;
}

.contact-form input.wpcf7-form-control::placeholder,
.contact-form textarea.wpcf7-form-control::placeholder {
  color: #7c88a3;
}

.contact-form input.wpcf7-form-control:focus,
.contact-form textarea.wpcf7-form-control:focus {
  outline: none;
  border-color: #3565a0;
}

.contact-form__submit {
  position: relative;
  margin-top: 4px;
  width: fit-content;
}
.contact-form__submit span.wpcf7-spinner {
  display: none;
}
.contact-form__submit input.wpcf7-form-control {
  display: inline-block;
  width: auto;
  background-color: #3565a0;
  border: none;
  border-radius: 50px;
  padding: 14px 62px 13px 28px;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form__submit input.wpcf7-form-control:hover {
  background-color: #24365e;
}

.contact-form__submit::after {
  content: "\2197";
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #ffffff;
  color: #3565a0;
  font-size: 15px;
  transform: translateY(-50%);
  pointer-events: none;
}

.contact-form .wpcf7-not-valid-tip {
  margin-top: 6px;
  font-size: 13px;
  color: #c0392b;
}

.contact-form .wpcf7-response-output {
  margin-top: 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}

@media (max-width: 991px) {
  .faq-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .faq-form__map {
    min-height: 320px;
  }
}

@media (max-width: 600px) {
  .faq-form__content {
    padding: 30px 24px;
  }

  .faq-form__title {
    font-size: 26px;
  }

  .contact-form__row {
    flex-direction: column;
    gap: 12px;
  }
}
