/* FAQ archive. */

.wh-faq-archive {
  padding-bottom: clamp(2.75rem, 1.986rem + 3.2595vw, 5.25rem);
}

.wh-faq-archive__hero {
  margin: 0 auto clamp(1rem, 0.618rem + 1.6304vw, 2.25rem);
  max-width: 1320px;
  min-height: clamp(110px, 13vw, 168px);
  position: relative;
}

.wh-faq-archive__hero-image {
  display: block;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.wh-faq-archive__hero::after {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.28));
  content: "";
  inset: 0;
  position: absolute;
}

.wh-faq-archive__hero-title {
  color: #fff;
  font-size: clamp(2rem, 1.5038rem + 2.115vw, 3.625rem);
  font-weight: 300;
  left: 50%;
  line-height: 1.1;
  margin: 0;
  max-width: 90%;
  position: absolute;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.wh-faq-archive__layout {
  display: grid;
  gap: clamp(1rem, 0.541rem + 1.9565vw, 2.5rem);
  grid-template-columns: minmax(235px, 320px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1320px;
  align-items: start;
}

.wh-faq-archive__topics {
  align-self: start;
  background-color: #f1f0ec;
  border-color: #e4dfd1;
}

.wh-faq-archive__topics-title {
  margin: 0;
}

.wh-faq-archive__topics-toggle {
  appearance: none;
  background: #fff var(--wh-icon-down-caret) no-repeat right 1rem center / 0.82rem;
  border: 1px solid #b5a97a;
  border-radius: 999px;
  color: #303030;
  cursor: pointer;
  display: none;
  font: inherit;
  min-height: 52px;
  padding: 0.65rem 2.6rem 0.65rem 1.1rem;
  text-align: left;
  width: 100%;
}

.wh-faq-archive__topics-list {
  list-style: none;
  margin: 0;
  padding: 40px 18px;
  margin-top: 20px;
}

.wh-faq-archive__topics-item + .wh-faq-archive__topics-item {
  margin-top: 0.625rem;
}

.wh-faq-archive__topics-link {
  color: #191919;
  font-size: clamp(1rem, 0.9427rem + 0.2446vw, 1.188rem);
  line-height: 1.3;
  text-decoration: none;
}

.wh-faq-archive__topics-link:hover,
.wh-faq-archive__topics-link:focus-visible {
  color: var(--wh-color-brown);
  text-decoration: underline;
}

.wh-faq-archive__content {
  display: grid;
  gap: clamp(1rem, 0.541rem + 1.9565vw, 2.5rem);
}

.wh-faq-category {
  scroll-margin-top: 140px;
}

.wh-faq-category:focus {
  outline: none;
}

.wh-faq-category__title {
  color: var(--wh-color-brown);
  font-size: clamp(1.8rem, 1.5899rem + 0.8967vw, 2.488rem);
  font-weight: 300;
  line-height: 1.15;
  margin: 0;
}

.wh-faq-category__items {
  margin-top: 0.3rem;
}

.wh-faq-item {
  border-bottom: 1px solid #e2ddd2;
  margin: 0;
  padding: 0;
}

.wh-faq-item:first-child {
  border-top: 1px solid #e2ddd2;
}

.wh-faq-item__question {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: clamp(1.1rem, 0.9853rem + 0.4891vw, 1.475rem);
  font-weight: 400;
  gap: 1rem;
  justify-content: space-between;
  line-height: 1.22;
  list-style: none;
  margin: 0;
  min-height: 68px;
  padding: 1rem 0;
}

.wh-faq-item__question::-webkit-details-marker,
.wh-faq-item__question::marker {
  display: none;
}

.wh-faq-item__icon {
  border-bottom: 2px solid #1f1f1f;
  border-right: 2px solid #1f1f1f;
  flex-shrink: 0;
  height: 12px;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
  width: 12px;
}

.wh-faq-item[open] .wh-faq-item__icon {
  transform: rotate(-135deg);
}

.wh-faq-item__answer {
  color: #252525;
  font-size: clamp(1rem, 0.9618rem + 0.163vw, 1.125rem);
  line-height: 1.45;
  padding: 0 0 1rem;
}

.wh-faq-item__answer > * + * {
  margin-top: 0.7rem;
}

@media (min-width: 1001px) {
  .wh-faq-archive__topics {
    position: sticky;
    top: 128px;
  }
}

@media (max-width: 1000px) {
  .wh-faq-archive__hero {
    min-height: 116px;
  }

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

  .wh-faq-archive__topics {
    border-radius: 30px;
    padding: 0.875rem;
  }

  .wh-faq-archive__topics-title {
    display: none;
  }

  .wh-faq-archive__topics-toggle {
    display: block;
  }

  .wh-faq-archive__topics-list {
    display: none;
    margin-top: 0.625rem;
    max-height: min(54vh, 330px);
    overflow: auto;
    padding: 0.3rem 0;
  }

  .wh-faq-archive__topics.is-open .wh-faq-archive__topics-list {
    display: block;
  }

  .wh-faq-archive__topics.is-open .wh-faq-archive__topics-toggle {
    background-image: var(--wh-icon-down-caret);
  }

  .wh-faq-archive__topics-item + .wh-faq-archive__topics-item {
    margin-top: 0;
  }

  .wh-faq-archive__topics-link {
    border-bottom: 1px solid #e2ddd2;
    display: block;
    padding: 0.72rem 0.2rem;
  }

  .wh-faq-category {
    border-radius: 30px;
  }

  .wh-faq-item__question {
    min-height: 60px;
    padding: 0.82rem 0;
  }
}
