/* FAQ page. Header, footer, fonts and colours come from ../theme.css;
   this file only styles the question list. Same text column and type
   sizes as the Detaljer page. */

/* The landscape is wider than the other pages' illustrations */
.faq-illustration {
  width: calc(var(--fs) * 26);
}

.faq-list {
  max-width: 38.8em;
  margin: 2.6em auto 0;
  font-family: var(--font-serif);
  border-bottom: 1px solid rgba(144, 65, 77, 0.35);
}

.faq-item {
  border-top: 1px solid rgba(144, 65, 77, 0.35);
  /* Linked questions (e.g. #video) land below the fixed header */
  scroll-margin-top: max(10rem, calc(var(--u) * 13));
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 0.75em 0 0.7em;
  font-family: var(--font-garland);
  font-size: 1.333em;
  line-height: 1.2;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover .faq-icon {
  transform: rotate(90deg);
}

.faq-item[open] .faq-question:hover .faq-icon {
  transform: rotate(45deg);
}

.faq-question:focus-visible {
  outline: 2px solid var(--color-green);
  outline-offset: 4px;
}

/* Plus that turns into a cross when the answer is open */
.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 0.6em;
  height: 0.6em;
  transition: transform 0.25s ease;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1.5px;
  margin-top: -0.75px;
  background: currentColor;
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-width: 34em;
  margin: 0;
  padding: 0 0 1.4em;
  line-height: 1.25;
}

/* Save-the-date video (inside its FAQ answer) */
.faq-video {
  display: block;
  width: 100%;
  max-width: 34em;
  height: auto;
  margin: 0 0 1.6em;
  background: rgba(144, 65, 77, 0.12);
}
