/* ========================================================================== 
   Frequently asked questions page
   ========================================================================== */

.page-faq {
  --faq-primary: #0098dc;
  --faq-accent: #fff03d;
  --faq-text: #4d4d4d;
  --faq-muted: #747474;
  --faq-border: #d8d8d8;
  --faq-panel: #f4f4f4;

  --page-breadcrumb-top-space: 21.4px;
  --page-breadcrumb-bottom-space: 42.24px;
}

.page-faq .faq-page {
  width: 100%;
  background: #ffffff;
}

/* Navigation path
   ========================================================================== */

.page-faq .faq-breadcrumb {
  width: 100%;
  background: #ffffff;
}

.page-faq .faq-breadcrumb__inner {
  display: flex;
  align-items: flex-start;
  padding-block:
    var(--page-breadcrumb-top-space)
    var(--page-breadcrumb-bottom-space);
}

.page-faq .faq-breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 0;
  list-style: none;

  font-family: var(--font-brand-medium);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.page-faq .faq-breadcrumb__home {
  color: #a6a6a6;
  transition: color 180ms ease;
}

.page-faq .faq-breadcrumb__home:hover,
.page-faq .faq-breadcrumb__home:focus-visible {
  color: var(--faq-primary);
}

.page-faq .faq-breadcrumb__home:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

.page-faq .faq-breadcrumb__separator {
  color: #404040;
}

.page-faq .faq-breadcrumb__current {
  color: var(--faq-primary);
}

/* Page title and main layout
   ========================================================================== */

.page-faq .faq {
  width: 100%;
  padding: 0 0 clamp(76px, 8vh, 96px);
  background: #ffffff;
}

.page-faq .faq__inner {
  display: flex;
  width: min(
    calc(100% - (var(--container-gutter) * 2)),
    var(--container-width)
  );
  flex-direction: column;
  margin-inline: auto;
}

.page-faq .faq__title {
  margin: 0;

  color: var(--faq-primary);
  font-family: var(--font-brand);
  font-size: clamp(40px, 2.64vw, 50px);
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.page-faq .faq__layout {
  display: grid;
  grid-template-columns: minmax(240px, 282px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: clamp(56px, 6.1vh, 66px);
}

/* Category navigation
   ========================================================================== */

.page-faq .faq__category-tabs {
  display: flex;
  overflow: hidden;
  flex-direction: column;

  border: 1px solid var(--faq-border);
  border-radius: 5px;
  background: #ffffff;
}

.page-faq .faq__category-tab {
  display: grid;
  width: 100%;
  min-height: 62px;
  box-sizing: border-box;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 14px;

  border: 0;
  border-bottom: 1px solid var(--faq-border);
  background: #ffffff;
  color: var(--faq-text);
  cursor: pointer;

  font-family: var(--font-brand);
  font-size: clamp(14.45px, 0.85vw, 16.15px);
  font-weight: 400;
  line-height: 1.25;
  text-align: left;

  transition:
    background-color 250ms ease,
    color 250ms ease;
}

.page-faq .faq__category-tab:last-child {
  border-bottom: 0;
}

.page-faq .faq__category-tab:hover:not(.is-active) {
  color: var(--faq-primary);
}

.page-faq .faq__category-tab.is-active {
  background: var(--faq-accent);
  color: var(--faq-primary);
}

.page-faq .faq__category-tab:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--faq-primary);
  outline-offset: -3px;
}

.page-faq .faq__category-icon {
  display: flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
}

.page-faq .faq__category-icon svg {
  display: block;
  width: 38px;
  height: 38px;

  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.page-faq .faq__category-label {
  min-width: 0;
}

/* Category details
   ========================================================================== */

.page-faq .faq__category-panels {
  min-width: 0;
}

.page-faq .faq__category-panel {
  box-sizing: border-box;
  padding: 18px 17px clamp(58px, 5vw, 72px);

  border-radius: 11px;
  background: var(--faq-panel);
}

.page-faq .faq__category-panel[hidden] {
  display: none;
}

.page-faq .faq__category-title {
  margin: 0 0 18px;

  color: var(--faq-primary);
  font-family: var(--font-brand);
  font-size: clamp(24px, 1.55vw, 29px);
  font-weight: 400;
  line-height: 1.2;
}

.page-faq .faq__questions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Question accordion
   ========================================================================== */

.page-faq .faq-item {
  overflow: hidden;

  border: 1px solid var(--faq-border);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 22px rgb(0 0 0 / 7%);

  transition: border-color 300ms ease;
}

.page-faq .faq-item.is-open {
  border-color: var(--faq-primary);
}

.page-faq .faq-item__heading {
  margin: 0;
}

.page-faq .faq-item__trigger {
  display: flex;
  width: 100%;
  min-height: 62px;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;

  border: 0;
  background: #ffffff;
  color: var(--faq-text);
  cursor: pointer;

  text-align: left;

  transition: color 300ms ease;
}

.page-faq .faq-item__trigger:hover {
  color: var(--faq-primary);
}

.page-faq .faq-item.is-open .faq-item__trigger {
  color: var(--faq-primary);
}

.page-faq .faq-item__trigger:focus-visible {
  position: relative;
  z-index: 2;
  outline: 3px solid var(--color-focus);
  outline-offset: -4px;
}

.page-faq .faq-item__question {
  min-width: 0;

  font-family: var(--font-brand);
  font-size: clamp(14.025px, 0.799vw, 15.3px);
  font-weight: 400;
  line-height: 1.3;
}

.page-faq .faq-item__toggle {
  position: relative;

  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;

  border: 1px solid #9c9c9c;
  border-radius: 50%;
  background: #ffffff;
  color: #747474;

  transition:
    border-color 300ms ease,
    background-color 300ms ease,
    color 300ms ease;
}

.page-faq .faq-item.is-open .faq-item__toggle {
  border-color: var(--faq-primary);
  background: var(--faq-primary);
  color: #ffffff;
}

.page-faq .faq-item__toggle-line {
  position: absolute;
  top: 50%;
  left: 50%;

  display: block;
  width: 14px;
  height: 1.3px;

  background: currentColor;

  transform: translate(-50%, -50%);
  transform-origin: center;
  transition: transform 300ms ease;
}

.page-faq .faq-item__toggle-line--vertical {
  transform: translate(-50%, -50%) rotate(90deg) scaleX(1);
}

.page-faq .faq-item.is-open
.faq-item__toggle-line--vertical {
  transform: translate(-50%, -50%) rotate(90deg) scaleX(0);
}

.page-faq .faq-item__answer {
  box-sizing: border-box;
  height: 0;
  overflow: hidden;
  opacity: 0;

  transition:
    height 300ms ease,
    opacity 300ms ease;
}

.page-faq .faq-item__answer[hidden] {
  display: none;
}

.page-faq .faq-item.is-open .faq-item__answer {
  opacity: 1;
}

.page-faq .faq-item__answer-inner {
  padding: 0 16px 20px;
}

/* Answer content
   ========================================================================== */

.page-faq .faq-answer {
  color: var(--faq-text);
  font-family: var(--font-text);
  font-size: clamp(13.804px, 0.81872vw, 15.708px);
  font-weight: 400;
  line-height: 1.55;
}

.page-faq .faq-answer p {
  margin: 0 0 10px;
}

.page-faq .faq-answer p:last-child {
  margin-bottom: 0;
}

.page-faq .faq-answer ul,
.page-faq .faq-answer ol {
  margin: 4px 0 12px;
  padding-left: 22px;
}

.page-faq .faq-answer li + li {
  margin-top: 3px;
}

.page-faq .faq-answer strong {
  font-family: var(--font-text-medium, var(--font-text));
  font-weight: 600;
}

.page-faq .faq-answer__link {
  color: var(--faq-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page-faq .faq-answer__link:hover {
  color: #0077b5;
}

.page-faq .faq-answer__link:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.page-faq .faq-answer__link.is-placeholder {
  cursor: default;
}

/* Responsive
   ========================================================================== */

/* Large desktop only: reduce answer text by exactly 7%.
   Other viewport ranges keep their existing values unchanged. */
@media (min-width: 1601px) {
  .page-faq .faq-answer {
    font-size: clamp(12.83772px, 0.7614096vw, 14.60844px);
  }
}

@media (max-width: 900px) {
  .page-faq .faq__layout {
    grid-template-columns: 1fr;
  }

  .page-faq .faq__category-tabs {
    width: 100%;
    overflow: hidden;
    flex-direction: column;
  }

  .page-faq .faq__category-tab {
    min-width: 0;
    grid-template-columns: 48px minmax(0, 1fr);
    flex: none;
    padding: 8px 14px;

    border-right: 0;
    border-bottom: 1px solid var(--faq-border);
  }

  .page-faq .faq__category-tab:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 600px) {
  .page-faq {
    --page-breadcrumb-top-space: 18px;
    --page-breadcrumb-bottom-space: 34px;
  }

  .page-faq .faq {
    padding-bottom: 68px;
  }

  .page-faq .faq__title {
    font-size: clamp(34px, 10vw, 42px);
  }

  .page-faq .faq__layout {
    gap: 14px;
    margin-top: 42px;
  }

  .page-faq .faq__category-tab {
    min-height: 56px;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
    padding: 7px 11px;
    font-size: 13.6px;
  }

  .page-faq .faq__category-icon {
    width: 36px;
    height: 36px;
  }

  .page-faq .faq__category-icon svg {
    width: 32px;
    height: 32px;
  }

  .page-faq .faq__category-panel {
    padding: 16px 12px 44px;
    border-radius: 8px;
  }

  .page-faq .faq__category-title {
    margin-bottom: 15px;
    font-size: 24px;
  }

  .page-faq .faq__questions {
    gap: 12px;
  }

  .page-faq .faq-item__trigger {
    min-height: 60px;
    gap: 12px;
    padding: 12px 13px;
  }

  .page-faq .faq-item__question {
    font-size: 13.6px;
  }

  .page-faq .faq-item__toggle {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
  }

  .page-faq .faq-item__answer-inner {
    padding: 0 13px 17px;
  }

  .page-faq .faq-answer {
    overflow-wrap: anywhere;
    font-size: 13.804px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-faq .faq__category-tab,
  .page-faq .faq-item,
  .page-faq .faq-item__trigger,
  .page-faq .faq-item__toggle,
  .page-faq .faq-item__toggle-line,
  .page-faq .faq-item__answer {
    transition: none;
  }
}
