/* Betty 2.0: studieprojektets design af hjemmesiden. Samme farver og skrift som arbejdssiden (opgavesystemet),
   så hjemmesiden, Opgaverne og Årshjulet føles som ét sted. Orange betyder "gør noget", blå er links. */

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("../fonts/nunito-latin.woff2") format("woff2"); /* SIL Open Font License 1.1 */
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/lora-latin.woff2") format("woff2"); /* SIL Open Font License 1.1 */
}

:root {
  color-scheme: light;
  --marine: #34495e;
  --paa-marine: #ffffff;
  --orange: #f2994a;
  --orange-hover: #e8873a;
  --orange-kant: #b8661f;
  --paa-orange: #1b2633;
  --grund: #f1edeb;
  --maling: #ffffff;
  --kort-blaa: #c9e1f6;
  --mellem-blaa: #77b6ea;
  --hav: #2a6ba7;
  --hav-moerk: #163a5c;
  --blaek: #1b2633;
  --blaek-2: #4a5562;
  --kant: #ddd5cf;
  --skygge: 0 2px 6px rgb(27 38 51 / .12);
  /* Navnene fra PaperMod, som shortcodes (kalender, kontingent, tilmelding) bruger */
  --theme: var(--grund);
  --entry: var(--maling);
  --primary: var(--blaek);
  --secondary: var(--blaek-2);
  --content: var(--blaek);
  --border: var(--kant);
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --marine: #22303f;
    --paa-marine: #ece6dc;
    --orange: #f2994a;
    --orange-hover: #f5ad6c;
    --orange-kant: #f2994a;
    --paa-orange: #10161d;
    --grund: #151a20;
    --maling: #1e252e;
    --kort-blaa: #1f3347;
    --mellem-blaa: #2b4d6e;
    --hav: #6ca5da;
    --hav-moerk: #a5c8eb;
    --blaek: #ece6dc;
    --blaek-2: #c3bdb3;
    --kant: #333c47;
    --skygge: 0 2px 6px rgb(0 0 0 / .4);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--blaek);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 17px; line-height: 1.6;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
h1, h2, h3, h4 { font-family: "Lora", Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: 1.6em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.4em 0 .4em; }
a { color: var(--hav); }
a:hover { color: var(--hav-moerk); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
img { max-width: 100%; height: auto; }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bredde { width: 100%; max-width: 72rem; margin: 0 auto; padding-inline: 16px; }
.smal { max-width: 46rem; margin-inline: auto; } /* tekstspalte, centreret når der er plads */

/* --- Knapper: orange med mørk tekst --- */
.knap {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none;
  color: var(--paa-orange); background: var(--orange); border: 1.5px solid var(--orange-kant); border-radius: 10px;
}
.knap:hover { color: var(--paa-orange); background: var(--orange-hover); }
.knap.lille { min-height: 36px; padding: 0 14px; font-size: 15px; }

/* --- Toppen --- */
.top { background: var(--marine); color: var(--paa-marine); }
.top .bredde { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.top a { color: var(--paa-marine); text-decoration: none; }
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 40px; width: auto; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 22px; }
.menu a { font-family: "Lora", Georgia, serif; font-weight: 600; font-size: 16px; padding: 10px 0; }
.menu a:hover, .menu a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu a.knap { padding: 0 16px; color: var(--paa-orange); }
.menu a.knap:hover { text-decoration: none; }
.menu-smal { display: none; }
@media (max-width: 56em) {
  .top .bredde { flex-wrap: wrap; }
  .menu.bred { display: none; }
  .menu-smal { display: block; }
  .menu-smal[open] { width: 100%; order: 3; }
  .menu-smal[open] > summary { position: absolute; top: 16px; right: 16px; }
  .top .bredde { position: relative; }
  .menu-knap { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid rgb(255 255 255 / .6); border-radius: 10px; cursor: pointer; font-weight: 700; list-style: none; }
  .menu-knap::-webkit-details-marker { display: none; }
  .menu-smal ul { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 0 16px; }
  .menu-smal li a { display: block; padding: 12px 0; }
  .menu-smal li a.knap { display: inline-flex; margin-top: 8px; }
}

/* --- Forsiden --- */
.helt { position: relative; color: #ffffff; background: var(--marine); display: grid; }
.helt img { grid-area: 1 / 1; width: 100%; height: clamp(16rem, 42vw, 30rem); object-fit: cover; display: block; }
.helt .tekst { grid-area: 1 / 1; align-self: center; text-align: center; padding: 16px; background: linear-gradient(transparent, rgb(20 30 40 / .35) 30%, rgb(20 30 40 / .35) 70%, transparent); }
.helt h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0; text-shadow: 0 2px 12px rgb(0 0 0 / .45); }
.helt p { margin: .2em 0 0; font-family: "Lora", Georgia, serif; font-style: italic; font-size: clamp(1.1rem, 2.5vw, 1.5rem); text-shadow: 0 2px 10px rgb(0 0 0 / .5); }
.afsnit { padding-block: 48px; }
.to-spalter { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.to-spalter > * { min-width: 0; }
.to-spalter img { border-radius: 10px; box-shadow: var(--skygge); width: 100%; }
@media (max-width: 48em) { .to-spalter { grid-template-columns: 1fr; gap: 24px; } }
.boelge { background: var(--kort-blaa); position: relative; padding-block: 56px; text-align: center; }
.boelge::before, .boelge::after { content: ""; position: absolute; left: 0; right: 0; height: 32px; background: var(--kort-blaa);
  -webkit-mask: radial-gradient(40px 20px at 50% 100%, #000 98%, transparent) 0 0 / 80px 32px repeat-x;
          mask: radial-gradient(40px 20px at 50% 100%, #000 98%, transparent) 0 0 / 80px 32px repeat-x; }
.boelge::before { top: -31px; }
.boelge::after { bottom: -31px; transform: scaleY(-1); }
.boelge h2 { margin-top: 0; }
.boelge p { max-width: 46rem; margin-inline: auto; }

/* --- Kort --- */
.kort-gitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.kort { background: var(--kort-blaa); border-radius: 12px; padding: 22px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; box-shadow: var(--skygge); }
.kort h3 { margin: 0; font-size: 1.15rem; }
.kort p { margin: 0; flex: 1; }
.kort .ikon { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 3px solid var(--maling); }
.billedkort { position: relative; display: grid; border-radius: 12px; overflow: hidden; box-shadow: var(--skygge); color: #ffffff; text-decoration: none; min-height: 13rem; background: var(--marine); }
.billedkort img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.billedkort .tekst { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; background: rgb(27 38 51 / .62); }
.billedkort h2, .billedkort h3 { margin: 0; color: #ffffff; font-size: 1.5rem; }
.billedkort p { margin: .4em 0 0; }
.billedkort .mere { align-self: flex-end; font-weight: 700; }
a.billedkort:hover { color: #ffffff; }
a.billedkort:hover .tekst { background: rgb(27 38 51 / .5); }

/* --- Indholdssider --- */
.side { padding-block: 40px 56px; }
.krumme { font-size: 14px; color: var(--blaek-2); margin-bottom: 12px; }
.krumme a { color: var(--blaek-2); }
.meta { color: var(--blaek-2); font-size: 15px; margin: -0.4em 0 1.2em; }
.indhold > :first-child { margin-top: 0; }
.indhold img { border-radius: 8px; }
.indhold table { border-collapse: collapse; display: block; overflow-x: auto; }
.indhold th, .indhold td { border: 1px solid var(--kant); padding: 6px 10px; text-align: left; }
.indhold blockquote { margin: 1em 0; padding: 4px 16px; border-left: 4px solid var(--mellem-blaa); background: var(--maling); border-radius: 0 8px 8px 0; }
.indhold code { background: var(--maling); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.indhold pre { background: var(--maling); padding: 12px; border-radius: 8px; overflow-x: auto; }
.indhold hr { border: 0; border-top: 1px solid var(--kant); margin: 2em 0; }
.toc { background: var(--maling); border-radius: 10px; padding: 10px 16px; margin-bottom: 24px; box-shadow: var(--skygge); }
.toc summary { cursor: pointer; font-weight: 700; }
.toc ul { margin: .4em 0; padding-left: 1.2em; }
.forslag { margin-top: 40px; font-size: 15px; }
.cover { margin: 0 0 24px; }
.cover img { width: 100%; max-height: 24rem; object-fit: cover; border-radius: 10px; }

/* --- Fold-ud (referater og guides), som i designet --- */
.fold { display: grid; gap: 10px; }
.fold details { background: var(--maling); border-radius: 10px; box-shadow: var(--skygge); overflow: hidden; }
.fold summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--mellem-blaa); color: var(--paa-orange); font-weight: 700; cursor: pointer; list-style: none; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary::after { content: ""; border: 7px solid transparent; border-top: 9px solid currentColor; margin-top: 7px; transition: transform .15s; }
.fold details[open] summary::after { transform: rotate(180deg); margin-top: -7px; }
@media (prefers-color-scheme: dark) { .fold summary { color: var(--blaek); } }
.raekker { list-style: none; margin: 0; padding: 4px 16px 12px; }
.raekker li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--kant); }
.raekker li:last-child { border-bottom: 0; }
.raekker .titel { min-width: 0; }
.fold .intro { padding: 12px 16px 0; margin: 0; color: var(--blaek-2); }

/* --- Kontakt --- */
.kontakt-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.kontakt-liste li { display: flex; gap: 14px; align-items: flex-start; }
.kontakt-liste .ikon { flex: none; width: 28px; height: 28px; color: var(--marine); }
@media (prefers-color-scheme: dark) { .kontakt-liste .ikon { color: var(--hav); } }

/* --- Bunden --- */
.bund { background: var(--marine); color: var(--paa-marine); margin-top: 0; }
.bund .bredde { display: grid; grid-template-columns: auto 1fr 1fr 1fr; gap: 32px; padding-block: 40px; }
.bund h2 { font-size: 1.05rem; margin: 0 0 .6em; color: var(--paa-marine); }
.bund p, .bund ul { margin: 0; font-size: 15px; }
.bund ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.bund a { color: var(--paa-marine); }
.bund .tegning { width: 120px; background: #ffffff; border-radius: 50%; padding: 6px; }
@media (max-width: 48em) { .bund .bredde { grid-template-columns: 1fr 1fr; } .bund .tegning { width: 96px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Kalenderen (shortcode) i Bettys farver: dens grønne har for lav kontrast */
.calendar-widget .calendar-event { border-left-color: var(--mellem-blaa); background: var(--grund); }
.calendar-widget .calendar-event-title { color: var(--hav-moerk); }
