/* FAQ. Lastes av forsiden og /faq/. */

@layer seksjon {

  /* Forsiden: de tre første spørsmålene står som rader (v2.css). Overskriften lenker til FAQ-siden. */
  #faq h2 a { color: inherit; text-decoration: none;}
  #faq h2 a:hover { text-decoration: underline; text-decoration-color: var(--pen); text-decoration-thickness: 1.5px; text-underline-offset: 0.16em;}

  /* FAQ-siden: søk øverst, så tre temaer med spørsmål som åpnes ett og ett. Valgt 7.11 (forslag 1 og 2 kombinert). */
  #faq [hidden] { display: none !important;}

  .faq-sok { max-width: 560px; margin-top: 30px;}
  .faq-sok input { -webkit-appearance: none; appearance: none;}
  .faq-treff { margin-top: 10px; color: var(--ink-2); font-size: 15px;}
  .faq-treff:empty { margin-top: 0; }
  .faq-ingen { margin-top: 30px; color: var(--ink-2);}

  .faq-hopp { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px;}
  .faq-hopp a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--boks); color: var(--heading); font-size: 16px; font-weight: 500; text-decoration: none;}
  .faq-hopp a:hover { background: var(--boks-sterk);}

  .faq-gruppe { margin-top: 44px; scroll-margin-top: 90px;}
  .faq-gruppe h2 { margin-bottom: 10px; font-family: var(--serif); font-size: 30px; font-weight: 400; line-height: 1.15;}
  .faq-liste .faq-acc-item:last-child { border-bottom: 1px solid var(--line);}

  .faq-acc-item { border-top: 1px solid var(--line);}
  .faq-acc-item h3 { margin: 0; font: inherit; letter-spacing: inherit;}
  .faq-acc-trigger { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 56px; padding: 12px 0; color: var(--heading); font-size: 18px; font-weight: 600; text-align: left;}
  .faq-acc-icon { position: relative; flex: none; display: block; width: 24px; height: 26px; font-size: 0; transition: transform 0.5s var(--ease);}
  .faq-acc-icon::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 7px;
    width: 9px;
    height: 9px;
    border-right: 1.6px solid var(--ink-2);
    border-bottom: 1.6px solid var(--ink-2);
    transform: rotate(45deg);
  }
  .open > h3 .faq-acc-icon { transform: rotate(180deg);}
  .faq-acc-body { height: 0; overflow: hidden; visibility: hidden; transition: height 0.6s var(--ease), visibility 0.6s;}
  .open > .faq-acc-body { height: auto; visibility: visible;}
  .faq-acc-body p { max-width: 680px; color: var(--ink-2); font-size: 17px;}
  .faq-acc-body p + p { margin-top: 12px;}
  .faq-acc-body p:last-child { padding-bottom: 20px;}

  @media (min-width: 900px) {
    .faq-hopp { margin-top: 26px;}
    .faq-gruppe { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.6fr); column-gap: 64px; align-items: start; margin-top: 64px;}
    .faq-gruppe h2 { position: sticky; top: 100px; margin: 12px 0 0; font-size: 34px;}
  }
}
