.faq-section {
  /* Fixed header height (desktop Header.css 90px); sticky nav and anchor
     jumps sit just below it. Redefined for the mobile header below. */
  --faq-header-clear: 96px;
  width: 100%;
  padding: 128px 32px;
  background: #FDFDFC;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 64px;
}

.faq-container {
  width: 100%;
  max-width: 1440px;
  padding-left: 32px;
  padding-right: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
}

.faq-layout {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 128px;
}

.faq-left {
  flex: 1 1 0;
  max-width: 480px;
}

.faq-left__inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 32px;
}

/* /faq page: the left column (title, contact link, topic nav) stays in view
   while the questions scroll. It has to fill the row's height for the inner
   block to have room to stick. */
.faq-section--grouped .faq-left {
  align-self: stretch;
}

.faq-section--grouped .faq-left__inner {
  position: sticky;
  top: calc(var(--faq-header-clear) + 32px);
}

.faq-topics {
  align-self: stretch;
}

.faq-topics__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.faq-topics__link {
  display: block;
  padding: 10px 0 10px 16px;
  border-left: 2px solid rgba(0, 37, 66, 0.1);
  color: var(--Color-Marine-Dark, #002542);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.faq-topics__link:hover,
.faq-topics__link[aria-current] {
  opacity: 1;
}

.faq-topics__link[aria-current] {
  border-left-color: var(--Brand-Marine, #003764);
}

.faq-group {
  align-self: stretch;
  scroll-margin-top: calc(var(--faq-header-clear) + 24px);
}

.faq-group + .faq-group {
  padding-top: 64px;
}

.faq-group__title {
  margin: 0;
  padding: 0 0 8px 8px;
  color: var(--Color-Marine-Dark, #002542);
  font-family: 'Rufina', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

.faq-title {
  align-self: stretch;
  color: var(--Color-Marine-Dark, #002542);
  font-size: 68px;
  font-family: 'Rufina', serif;
  font-weight: 400;
  line-height: 61.2px;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
}

.faq-subtitle {
  align-self: stretch;
  /* Normal text flow, not flex: as flex items the spans lose the spaces at
     their edges, so "answer?" + "Contact" + "our support desk." ran together. */
  display: block;
}

.faq-subtitle span {
  color: var(--Color-Marine-Dark, #002542);
  font-size: 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  line-height: 28px;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
}

.faq-contact-link {
  color: var(--Color-Marine-Dark, #002542);
  font-size: 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  line-height: 28px;
  text-decoration: underline;
  cursor: pointer;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}

.faq-right {
  flex: 1 1 0;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0;
  width: 100%;
  padding-top: 24px;
}

.faq-item {
  align-self: stretch;
  scroll-margin-top: calc(var(--faq-header-clear) + 24px);
  padding-left: 8px;
  padding-right: 16px;
  border-bottom: 1px rgba(0, 37, 66, 0.1) solid;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.faq-item__heading {
  align-self: stretch;
  margin: 0;
  font: inherit;
}

.faq-item__header {
  align-self: stretch;
  width: 100%;
  padding-top: 28px;
  padding-bottom: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.faq-item__header:hover {
  opacity: 0.8;
}

.faq-item__content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.faq-item__question {
  align-self: stretch;
  justify-content: left;
  display: flex;
  /* Buttons centre their text: without this a question that wraps on
     mobile centres its lines. */
  text-align: left;
  color: var(--Color-Marine-Dark, #002542);
  font-size: 24px;
  font-family: 'Cronos Pro', serif;
  font-weight: 400;
  line-height: 24px;
  word-wrap: break-word;
  margin: 0;
  padding: 0;
}

.faq-item__icon {
  width: 16px;
  height: 16px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  color: var(--Brand-Marine, #003764);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.faq-item[data-expanded="true"] .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__answer {
  padding: 0 0 28px 0;
  align-self: stretch;
  width: 100%;
  color: var(--Color-Marine-Dark, #002542);
  font-size: 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  line-height: 28px;
  word-wrap: break-word;
}

.faq-item__answer p {
  margin: 0;
  padding: 0;
}

/* Closed answers stay in the DOM (hidden="until-found", set by
   FAQSection.jsx); the browser hides them but keeps them searchable. Drop
   the open-state padding, which `until-found` (content-visibility: hidden,
   not display: none) would otherwise still lay out. */
.faq-item__answer[hidden] {
  padding: 0;
}

.faq-see-all {
  margin-top: 32px;
  margin-left: 8px;
  color: var(--Color-Marine-Dark, #002542);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 28px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.faq-see-all:hover {
  opacity: 0.8;
}

/* Server-rendered mirror (template-parts/faq-section.php): native
   <details open> items, so answers show and toggle without JavaScript. */
.faq-section--seo .faq-item__header {
  list-style: none;
  cursor: default;
}

.faq-section--seo .faq-item__header::-webkit-details-marker {
  display: none;
}

/* Responsive */
@media (max-width: 1024px) {
  .faq-layout {
    gap: 96px;
  }

  .faq-left {
    max-width: 420px;
  }

  .faq-right {
    max-width: 700px;
  }

  .faq-title {
    font-size: 56px;
    line-height: 50.4px;
  }
}

@media (max-width: 768px) {
  .faq-section {
    --faq-header-clear: 64px; /* MobileHeader.css 60px */
    padding: 5%;
    gap: 48px;
  }

  /* /faq page on mobile: the topic nav is hidden (the questions are already
     grouped under their topic titles). `display: contents` flattens the left
     column into the layout so the title block does not stay sticky like it
     does on desktop. */
  .faq-section--grouped .faq-layout {
    gap: 24px;
  }

  .faq-section--grouped .faq-left,
  .faq-section--grouped .faq-left__inner {
    display: contents;
  }

  .faq-topics {
    display: none;
  }

  .faq-group + .faq-group {
    padding-top: 48px;
  }

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

  .faq-container {
    padding-left: 0;
    padding-right: 0;
  }

  .faq-layout {
    flex-direction: column;
    gap: 48px;
  }

  .faq-left {
    max-width: 100%;
  }

  .faq-right {
    max-width: 100%;
    padding-top: 0;
  }

  .faq-title {
    font-size: 48px;
    line-height: 43.2px;
  }

  .faq-subtitle {
    font-size: 14px;
    line-height: 24px;
  }

  .faq-subtitle span,
  .faq-contact-link {
    font-size: 14px;
    line-height: 24px;
  }

  .faq-item__question {
    font-size: 20px;
    line-height: 20px;
  }

  .faq-item__header {
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

@media (max-width: 480px) {
  .faq-section {
    padding: 5%;
    gap: 32px;
  }

  .faq-container {
    padding-left: 0;
    padding-right: 0;
  }

  .faq-title {
    font-size: 36px;
    line-height: 32.4px;
  }

  .faq-subtitle span,
  .faq-contact-link {
    font-size: 14px;
    line-height: 20px;
  }

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

  .faq-item__header {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .faq-item {
    padding-left: 4px;
    padding-right: 8px;
  }
}
