/* stallbakken.no – farger og skrifter som den gamle WordPress-siden (Poppins/Open Sans, #437986/#8cc1ce) */
@font-face { font-family: "Poppins"; font-weight: 300; font-display: swap; src: url(/static/fonter/poppins-300.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(/static/fonter/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-display: swap; src: url(/static/fonter/poppins-800.woff2) format("woff2"); }
@font-face { font-family: "Open Sans"; font-weight: 300 800; font-display: swap; src: url(/static/fonter/open-sans.woff2) format("woff2"); }

:root {
  --teal: #437986;
  --teal-mork: #355f6a;
  --blaa: #8cc1ce;
  --mint: #c9eedb;
  --mint-mork: #a9e0c5;
  --tekst: #437986;
  --brodtekst: #3b5560;
  --linje: #e3ecef;
  --lys: #f6fafb;
  --hvit: #fff;
  --overskrift: "Poppins", system-ui, sans-serif;
  --brod: "Open Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--hvit); color: var(--tekst); font: 17px/1.75 var(--brod); }
img { max-width: 100%; height: auto; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-mork); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, .h1, .stor { font-family: var(--overskrift); font-weight: 800; line-height: 1.15; color: var(--teal); margin: 0 0 .5em; }
h1, .h1 { font-size: clamp(30px, 4.2vw, 40px); }
h2 { font-size: 26px; }
h3 { font-size: 18px; }
p { margin: 0 0 1em; }
.ramme { max-width: 1200px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 700px) { .ramme { padding-left: 40px; padding-right: 40px; } }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.liten { font-size: 14px; }
.hopp { position: absolute; left: -9999px; top: 0; background: var(--teal); color: #fff; padding: 8px 14px; z-index: 10; }
.hopp:focus { left: 8px; top: 8px; }

/* Knapper */
.knapp { display: inline-block; padding: 8px 22px; border-radius: 999px; text-decoration: none; font-family: var(--brod); font-size: 17px; line-height: 1.6; transition: background .15s; }
.knapp-mint { background: var(--mint); color: var(--teal); }
.knapp-mint:hover { background: var(--mint-mork); color: var(--teal-mork); }
.knapp-blaa { background: var(--blaa); color: #fff; }
.knapp-blaa:hover { background: var(--teal); color: #fff; }
.knapper { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* Topp */
.topplinje { text-align: right; padding: 6px 16px 0; }
.topplinje a { font-family: var(--overskrift); font-weight: 800; font-size: 12px; text-decoration: none; }
.hode { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 16px 18px; }
@media (min-width: 700px) { .hode { padding: 6px 28px 24px; } }
.logo { position: relative; display: block; }
.logo img { display: block; width: 200px; }
.logo .logo-hvit { position: absolute; inset: 0; opacity: 0; }
@media (min-width: 1000px) { .logo img { width: 272px; } }

/* Menylinjen blir liggende øverst. «Login Pasient»-linjen (30px) ruller bort. */
.topp { position: sticky; top: -30px; z-index: 20; background: var(--hvit); }
.topplinje { height: 30px; box-sizing: border-box; }

/* Når man ruller: linjen glir over til teal med hvit logo og hvite menypunkter (ren CSS, uten skript).
   Nettlesere uten støtte beholder den hvite linjen. */
@supports (animation-timeline: scroll()) {
  .topp, .hode, .logo img, .logo .logo-hvit, .meny a:not(.knapp), .mobilmeny summary, .mobilmeny summary span {
    animation-timeline: scroll(root); animation-range: 0 140px; animation-fill-mode: both; animation-timing-function: linear;
  }
  .topp { animation-name: topp-teal; }
  .hode { animation-name: hode-tett; }
  .logo .logo-farge { animation-name: ut; }
  .logo .logo-hvit { animation-name: inn; }
  .meny a:not(.knapp) { animation-name: hvit-tekst; }
  .meny a[aria-current="page"]:not(.knapp), .meny a:not(.knapp):hover { border-bottom-color: currentColor; }
  @keyframes topp-teal { 60% { background: var(--hvit); box-shadow: none; } to { background: var(--teal); box-shadow: 0 6px 20px rgba(0,0,0,.12); } }
  @keyframes hode-tett { to { padding-top: 10px; padding-bottom: 10px; } }
  @keyframes ut { 40% { opacity: 1; } to { opacity: 0; } }
  @keyframes inn { 40% { opacity: 0; } to { opacity: 1; } }
  @keyframes hvit-tekst { 40% { color: var(--teal); } to { color: #fff; } }
}

.meny { display: none; align-items: center; gap: 22px; font-family: var(--overskrift); font-weight: 300; font-size: 17px; }
.meny a:not(.knapp) { text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.meny a:not(.knapp):hover, .meny a[aria-current="page"]:not(.knapp) { border-bottom-color: var(--teal); }
.meny .knapp { font-family: var(--overskrift); font-weight: 800; padding: 9px 20px; }
@media (min-width: 1000px) { .meny { display: flex; } .mobilmeny { display: none; } }

.mobilmeny { position: relative; }
.mobilmeny summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border-radius: 50%; background: var(--mint); }
.mobilmeny summary::-webkit-details-marker { display: none; }
.mobilmeny summary span { display: block; width: 20px; height: 2px; background: var(--teal); border-radius: 2px; }
.mobilmeny nav { position: absolute; right: 0; top: 54px; z-index: 5; background: var(--teal); border-radius: 18px; padding: 12px 8px; min-width: 230px; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.mobilmeny nav a { display: block; color: #fff; text-decoration: none; font-family: var(--overskrift); font-size: 18px; padding: 10px 18px; border-radius: 10px; }
.mobilmeny nav a:hover { background: var(--teal-mork); }

/* Toppbilde */
.helt { display: grid; gap: 32px; align-items: center; padding-top: 24px; padding-bottom: 48px; }
.helt img { justify-self: center; width: 100%; max-width: 520px; }
.helt p { max-width: 34em; }
@media (min-width: 860px) {
  .helt { grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
  .helt-venstre > img { order: 0; }
}
@media (max-width: 859px) { .helt-venstre > img { order: 2; } }

/* Akutt time */
.akutt { display: grid; gap: 20px; padding-top: 24px; padding-bottom: 72px; max-width: 900px; }
.akutt .stor { font-size: 40px; }
@media (min-width: 760px) {
  .akutt { grid-template-columns: 260px 1fr; gap: 0; }
  .akutt > div { border-left: 2px solid var(--teal); padding-left: 40px; }
  .akutt .stor { padding-right: 40px; }
}

/* Åpningstider */
.tider { background: var(--blaa); color: #fff; padding: 64px 0; }
.tider .stor, .tider h3 { color: #fff; }
.tider .stor { font-size: 40px; }
.tider-rutenett { display: grid; gap: 32px; }
@media (min-width: 860px) { .tider-rutenett { grid-template-columns: 1fr 1.2fr 1.2fr; } }
.tider a { color: #fff; }
.tidstabell { border-collapse: collapse; margin-bottom: 18px; }
.tidstabell th { text-align: left; font-weight: 400; padding: 3px 36px 3px 0; vertical-align: top; }
.tidstabell td { padding: 3px 0; white-space: nowrap; }

/* Nyheter */
.nyheter-forside { background: var(--teal); padding: 64px 0 72px; }
.nyheter-forside .stor { color: #fff; font-size: 40px; }
.nyheter-forside .mer { color: #fff; margin-top: 28px; }
.nyheter-forside .mer a { color: #fff; font-weight: 600; }
.nyhetskort { display: grid; gap: 24px; margin-top: 12px; }
@media (min-width: 760px) { .nyhetskort { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
.kort { background: #fff; border-radius: 18px; padding: 26px 28px; box-shadow: 0 6px 24px rgba(67,121,134,.12); }
.kort h3 { font-size: 21px; margin-bottom: .4em; }
.kort h3 a { text-decoration: none; }
.kort h3 a:hover { text-decoration: underline; }
.kort p { color: var(--brodtekst); }
.dato { font-size: 14px; color: var(--teal); opacity: .85; margin-bottom: 6px; }
.les-mer { font-family: var(--overskrift); font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }

/* Tekstsider */
.tekst { max-width: 860px; padding-top: 24px; padding-bottom: 72px; }
.tekst h2 { font-size: 19px; text-transform: uppercase; letter-spacing: .01em; margin-top: 2.2em; }
.tekst h3 { font-size: 17px; }
.tekst p, .tekst li { color: var(--brodtekst); }
.tekst ul { padding-left: 22px; }
.obs { background: var(--lys); border-left: 4px solid var(--blaa); padding: 14px 18px; border-radius: 0 12px 12px 0; }
.innholdsliste { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.innholdsliste a { font-size: 14px; text-decoration: none; background: var(--lys); border: 1px solid var(--linje); border-radius: 999px; padding: 4px 14px; }
.innholdsliste a:hover { background: var(--mint); }
.nyhet h1 { font-size: clamp(30px, 4.5vw, 42px); }
.nyhet .dato { margin-bottom: 28px; }
.tilbake { font-size: 15px; }
.tilbake a { text-decoration: none; }

/* Ansatte */
.midt { text-align: center; padding-top: 48px; padding-bottom: 80px; }
.midt .knapper { justify-content: center; }
.ingress { font-size: 19px; margin-bottom: 36px; }
.ansatte { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ansatte .kort { display: flex; flex-direction: column; align-items: center; gap: 4px; border-radius: 6px; padding: 36px 20px 32px; }
.ansatte strong { font-family: var(--overskrift); font-weight: 800; font-size: 16px; margin-top: 18px; }
.ansatte span:not(.avatar) { font-size: 19px; }
.avatar { width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: var(--blaa); color: #fff; font-family: var(--overskrift); font-weight: 800; font-size: 34px; letter-spacing: .02em; }
.avatar-mint { background: var(--mint); color: var(--teal); }
.ansatte .merknad { font-size: 14px; font-style: normal; background: var(--lys); border: 1px solid var(--linje); border-radius: 999px; padding: 2px 12px; margin-top: 6px; }

/* Priser */
.prisblokk { display: grid; gap: 20px; padding: 48px 0 8px; }
.prisblokk:last-child { padding-bottom: 80px; }
.prisoverskrift p { font-family: var(--overskrift); font-weight: 800; font-size: 15px; line-height: 1.7; }
.prisoverskrift .merknad { font-weight: 400; }
@media (min-width: 860px) {
  .prisblokk { grid-template-columns: 1fr 2fr; gap: 0; }
  .prisoverskrift { border-right: 2px solid var(--teal); padding-right: 40px; margin-right: 70px; }
}
.pristabell { width: 100%; border-collapse: collapse; font-size: 16px; color: #2f3b40; align-self: start; }
.pristabell th { background: var(--teal); color: #fff; text-align: left; padding: 12px 10px; font-weight: 600; }
.pristabell td { padding: 11px 10px; border: 1px solid var(--linje); overflow-wrap: anywhere; hyphens: auto; }
.pristabell tbody tr:nth-child(odd) { background: #fafafa; }
.pristabell th:last-child, .pristabell td:last-child { text-align: right; white-space: nowrap; overflow-wrap: normal; }

/* Finn oss */
.finn-oss { display: grid; gap: 32px; padding-top: 32px; padding-bottom: 80px; }
@media (min-width: 860px) { .finn-oss { grid-template-columns: 1fr 1.6fr; gap: 56px; } }
.finn-oss h3 { margin: 1.2em 0 .2em; }
.kart iframe { width: 100%; height: 440px; border: 0; border-radius: 22px; background: var(--lys); display: block; }

/* Bunn */
.bunn { background: var(--blaa); color: #fff; border-radius: 48px 48px 0 0; padding: 56px 0 36px; }
.bunn h2 { color: #fff; font-size: 44px; margin-bottom: 8px; }
.bunn h3 { color: #fff; font-size: 18px; margin-bottom: 4px; }
.bunn a { color: #fff; text-decoration: none; }
.bunn a:hover { text-decoration: underline; }
.kolonner { display: grid; gap: 20px; }
@media (min-width: 700px) { .kolonner { grid-template-columns: repeat(3, minmax(0, 260px)); gap: 40px; } }
.kolofon { font-family: var(--overskrift); font-weight: 300; font-size: 13px; margin-top: 36px; }
.kolofon a { text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Snarveier, «Slik bestiller du» og fliser på forsiden */
.snarveier { display: grid; gap: 16px; margin-top: -16px; padding-bottom: 56px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.snarvei, .flis { display: flex; flex-direction: column; gap: 4px; text-decoration: none; padding: 22px 24px; transition: transform .15s, box-shadow .15s; }
.snarvei:hover, .flis:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(67,121,134,.2); }
.snarvei strong, .flis strong { font-family: var(--overskrift); font-weight: 800; font-size: 19px; color: var(--teal); }
.snarvei span:not(.ikon), .flis span:not(.ikon) { color: var(--brodtekst); font-size: 15px; }
.ikon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--mint); font-size: 22px; margin-bottom: 8px; }
.bestill { padding-bottom: 72px; }
.bestill-rutenett { display: grid; gap: 20px; margin-top: 20px; }
@media (min-width: 860px) { .bestill-rutenett { grid-template-columns: repeat(3, 1fr); } }
.bestill .kort { position: relative; }
.merke { position: absolute; top: -12px; right: 22px; background: var(--teal); color: #fff; border-radius: 999px; padding: 2px 12px; font-size: 13px; font-weight: 600; }
.fliser-seksjon { padding-top: 64px; padding-bottom: 72px; }
.fliser { display: grid; gap: 16px; margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* Hjelp og ressurser */
.ressurser { padding-bottom: 72px; }
.ressurser h2 { font-size: 19px; text-transform: uppercase; letter-spacing: .01em; margin: 1.6em 0 .6em; }
.ressurskort { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.ressurs { display: block; text-decoration: none; padding: 22px 24px; }
.ressurs:hover { box-shadow: 0 10px 30px rgba(67,121,134,.2); }
.ressurs h3 { font-size: 18px; margin-bottom: .2em; }
.ressurs .nummer { font-family: var(--overskrift); font-weight: 800; font-size: 26px; color: var(--teal); margin: 0 0 .2em; }
.akutt-kort { background: #fdecea; } .akutt-kort .nummer { color: #a12626; }

/* Trekkspill (vaksiner) og skjemaer */
.trekkspill, .skjemaboks { background: #fff; border: 1px solid var(--linje); border-radius: 14px; margin: 10px 0; }
.trekkspill summary, .skjemaboks summary { cursor: pointer; padding: 14px 18px; font-family: var(--overskrift); font-weight: 800; color: var(--teal); list-style-position: inside; }
.trekkspill p { padding: 0 18px 14px; margin: 0; }
.skjemaboks summary { display: grid; gap: 2px; }
.skjemabeskrivelse { font-family: var(--brod); font-weight: 400; font-size: 15px; color: var(--brodtekst); }
.skjema { padding: 0 18px 18px; }
.skjemaintro { font-weight: 600; }
.skjema fieldset { border: 0; border-top: 1px solid var(--linje); margin: 0; padding: 14px 0; }
.skjema legend { font-weight: 600; color: var(--brodtekst); padding: 0; margin-bottom: 8px; }
.skjema .nr { color: var(--teal); }
.valg { display: flex; flex-wrap: wrap; gap: 8px; }
.valg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--linje); border-radius: 999px; cursor: pointer; background: var(--lys); font-size: 15px; }
.valg label:has(input:checked) { background: var(--mint); border-color: var(--mint-mork); }
.valg label.mork { border-color: var(--blaa); background: #eaf4f7; }
.valg label.mork:has(input:checked) { background: var(--blaa); color: #fff; }
.poengtall { color: var(--teal); opacity: .7; font-size: 13px; }
.resultat { margin-top: 12px; padding: 16px 18px; border-radius: 12px; background: var(--lys); }
.resultat.ferdig { background: var(--mint); }
.resultat .poeng { font-family: var(--overskrift); font-weight: 800; font-size: 20px; color: var(--teal); margin: 0 0 .3em; }
.varsel { background: #fdecea; border-left: 4px solid #c0392b; padding: 12px 14px; border-radius: 0 10px 10px 0; color: #7a1f1f; }
.lenkeknapp { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.skjema button.knapp { border: 0; cursor: pointer; }
.kilde { font-size: 13px; color: var(--brodtekst); opacity: .8; margin-top: 10px; }
@media print {
  .topp, .bunn, .hopp, .ikke-utskrift, .knapper, .lenkeknapp, .obs, noscript { display: none !important; }
  .skjemaboks { border: 0; }
}
@media (max-width: 600px) {
  .snarveier, .fliser { grid-template-columns: 1fr 1fr; gap: 10px; }
  .snarvei, .flis { padding: 16px 14px; }
  .snarvei strong, .flis strong { font-size: 16px; }
  .snarvei span:not(.ikon), .flis span:not(.ikon) { font-size: 13px; }
  .ikon { width: 38px; height: 38px; font-size: 18px; }
}

/* Illustrasjoner av de ansatte: på «Ansatte» og som sidebilde på sider uten egen illustrasjon */
.ansatte .portrett { width: 100%; max-width: 240px; height: auto; }
.ansatte .kort { padding-top: 22px; }
.sidebilde { display: block; width: 72%; max-width: 300px; height: auto; margin: 0 auto 8px; }
@media (min-width: 760px) { .sidebilde { float: right; width: 300px; margin: 0 0 16px 28px; } }
.ressurser, .nyhetskort, .finn-oss .kart { clear: both; }
.prisbilde { display: block; width: 100%; max-width: 240px; height: auto; margin-top: 16px; }
.portrett-midt { display: block; width: 260px; height: auto; margin: 0 auto 8px; }
.nyheter-topp { padding-bottom: 24px; } .nyheter-topp .sidebilde { float: none; margin: 0 auto; }
