/* Tingskiftet Grundejerforeningen - fælles stylesheet */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/inter/inter-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/fonts/baskerville/libre-baskerville-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Libre Baskerville';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url('/fonts/baskerville/libre-baskerville-latin-700-normal.woff2') format('woff2');
}

/* Farver ---------------------------------------------------------------------
   --brand*   : faste brandfarver til flader med hvid tekst (hero, knapper, footer) - ens i alle temaer
   Resten skifter med tema (lyst/mørkt) og kontrast. */
:root {
  color-scheme: light;
  --brand: #16432f;
  --brand-hover: #1f5a40;
  --brand-deep: #0c2a1e;
  --brand-ink: #123827;
  --on-brand: #fff;
  --gold: #c8a45a;          /* dekoration og tekst på mørk baggrund */
  --gold-text: #8a6a1f;     /* guldtekst på lys baggrund (AA-kontrast) */

  --green-900: #123827;     /* overskrifter */
  --green-800: #16432f;
  --green-700: #1f5a40;     /* links og ikoner */
  --green-600: #2c7353;     /* accent, hover-kanter */
  --green-100: #e3eee7;
  --green-50: #f0f6f2;      /* tonede flader */
  --sand: #f7f4ec;          /* sidebaggrund */
  --white: #fff;            /* kort og felter */
  --surface-soft: rgb(255 255 255 / 0.5);
  --header-bg: rgb(255 255 255 / 0.9);
  --admin-bg: #f3f5f2;
  --ink: #1b2620;
  --ink-soft: #445349;
  --muted: #5d6b63;
  --line: #e2e6e0;
  --line-strong: #c9d3cb;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --danger-line: #f5c2bd;
  --success-bg: #e6f3eb;
  --success-fg: #16432f;
  --success-line: #c5e1cf;
  --info-bg: #fff8e6;
  --info-fg: #6b4f12;
  --info-line: #efdca8;
  --facebook: #166fe5; /* Facebooks mørkere blå - hvid tekst får AA-kontrast (4,7:1) */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgb(16 40 28 / 0.06), 0 1px 3px rgb(16 40 28 / 0.08);
  --shadow: 0 2px 4px rgb(16 40 28 / 0.04), 0 8px 24px rgb(16 40 28 / 0.08);
  --shadow-lg: 0 12px 40px rgb(16 40 28 / 0.16);
  --serif: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 72px;
}

/* Mørkt tema: følger systemet, medmindre brugeren har valgt lyst tema - eller vælges manuelt. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --gold-text: #dcbc72;
    --green-900: #e4efe8;
    --green-800: #cfe5d8;
    --green-700: #93d3b0;
    --green-600: #6dbb92;
    --green-100: #253b31;
    --green-50: #1b2b24;
    --sand: #101915;
    --white: #18231e;
    --surface-soft: rgb(255 255 255 / 0.03);
    --header-bg: rgb(16 25 21 / 0.88);
    --admin-bg: #0d1511;
    --ink: #e6ece8;
    --ink-soft: #c2cec7;
    --muted: #a0afa6;
    --line: #2a3832;
    --line-strong: #3d4f46;
    --danger: #ff8a80;
    --danger-bg: #3a1a18;
    --danger-line: #6b2b26;
    --success-bg: #173226;
    --success-fg: #b9e3cb;
    --success-line: #2c5641;
    --info-bg: #2f2713;
    --info-fg: #f0d89a;
    --info-line: #5a4a1f;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
    --shadow: 0 2px 4px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.5);
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --gold-text: #dcbc72;
  --green-900: #e4efe8;
  --green-800: #cfe5d8;
  --green-700: #93d3b0;
  --green-600: #6dbb92;
  --green-100: #253b31;
  --green-50: #1b2b24;
  --sand: #101915;
  --white: #18231e;
  --surface-soft: rgb(255 255 255 / 0.03);
  --header-bg: rgb(16 25 21 / 0.88);
  --admin-bg: #0d1511;
  --ink: #e6ece8;
  --ink-soft: #c2cec7;
  --muted: #a0afa6;
  --line: #2a3832;
  --line-strong: #3d4f46;
  --danger: #ff8a80;
  --danger-bg: #3a1a18;
  --danger-line: #6b2b26;
  --success-bg: #173226;
  --success-fg: #b9e3cb;
  --success-line: #2c5641;
  --info-bg: #2f2713;
  --info-fg: #f0d89a;
  --info-line: #5a4a1f;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  --shadow: 0 2px 4px rgb(0 0 0 / 0.25), 0 8px 24px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 12px 40px rgb(0 0 0 / 0.5);
}

/* Høj kontrast: kraftigere tekst og kanter, understregede links. */
:root[data-contrast='high'] {
  --ink: #000;
  --ink-soft: #1b2620;
  --muted: #2e3a33;
  --line: #7d8a82;
  --line-strong: #4d5a52;
  --green-700: #0f3d28;
  --gold-text: #5c4510;
}
@media (prefers-color-scheme: dark) {
  :root[data-contrast='high']:not([data-theme='light']) {
    --ink: #fff;
    --ink-soft: #eef3f0;
    --muted: #d6dfda;
    --line: #74857b;
    --line-strong: #9aaba1;
    --green-700: #b4ecc9;
    --gold-text: #f0d48a;
  }
}
:root[data-contrast='high'][data-theme='dark'] {
  --ink: #fff;
  --ink-soft: #eef3f0;
  --muted: #d6dfda;
  --line: #74857b;
  --line-strong: #9aaba1;
  --green-700: #b4ecc9;
  --gold-text: #f0d48a;
}
:root[data-contrast='high'] a:not(.btn):not(.quick-card):not(.album-card):not(.doc-item):not(.brand):not(.photo):not(.admin-album):not(.stat) { text-decoration: underline; text-decoration-thickness: 2px; }
:root[data-contrast='high'] :focus-visible { outline-width: 4px; outline-color: var(--gold-text); }
:root[data-contrast='high'] .card,
:root[data-contrast='high'] .quick-card,
:root[data-contrast='high'] .doc-item,
:root[data-contrast='high'] .album-card,
:root[data-contrast='high'] .member-card,
:root[data-contrast='high'] .contact-card,
:root[data-contrast='high'] .news-item,
:root[data-contrast='high'] .panel { border-width: 2px; }

/* Tekststørrelse (vælges i "Aa"-menuen). Alt tekst er i rem og skalerer med. */
:root[data-text='large'] { font-size: 112.5%; }
:root[data-text='xlarge'] { font-size: 125%; }

/* Logo i grøn eller hvid alt efter tema */
.logo-dark { display: none !important; }
:root[data-theme='dark'] .logo-light { display: none !important; }
:root[data-theme='dark'] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .logo-light { display: none !important; }
  :root:not([data-theme='light']) .logo-dark { display: block !important; }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-700); text-underline-offset: 3px; }
a:hover { color: var(--green-900); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--green-900); margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 2.5rem); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 0.6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.prewrap { white-space: pre-line; }
.muted { color: var(--muted); font-size: 0.95rem; }
.icon { flex: none; }

/* Knapper ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.3rem; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 0.98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-sm { padding: 0.5rem 0.95rem; font-size: 0.9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); box-shadow: var(--shadow); }
.btn-light { background: #fff; color: var(--brand-ink); }
.btn-light:hover { background: #f0ede4; color: var(--brand-ink); }
.btn-outline-light { border-color: rgb(255 255 255 / 0.55); color: #fff; }
.btn-outline-light:hover { background: rgb(255 255 255 / 0.1); border-color: #fff; color: #fff; }
.btn-facebook { background: var(--facebook); color: #fff; }
.btn-facebook:hover { background: #1360c8; color: #fff; box-shadow: var(--shadow); }
.link-arrow { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.link-arrow:hover .icon { transform: translateX(3px); }
.link-arrow .icon { transition: transform .15s; }

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.site-header > .container { width: min(1400px, 100% - 40px); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex: none; }
.brand img { width: 46px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
/* Headeren bruger px, så en større tekststørrelse ikke skubber menuen ud af linjen. */
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 21px; color: var(--green-900); }
.brand-sub { font-size: 10.5px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.main-nav ul a {
  display: block; padding: 8px 10px; border-radius: 8px;
  color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: 15px;
}
.main-nav ul a:hover { background: var(--green-50); color: var(--green-900); }
.main-nav ul a[aria-current='page'] { color: var(--green-900); background: var(--green-100); font-weight: 600; }
.main-nav .nav-facebook { display: none; }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .btn-sm { font-size: 14px; padding: 8px 15px; }

/* Visning og tilgængelighed */
.a11y-controls { display: none; align-items: center; gap: 4px; }
.js .a11y-controls { display: flex; }
.icon-toggle {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid transparent; background: none; color: var(--green-900); cursor: pointer;
  font: 700 17px/1 var(--serif);
}
.icon-toggle:hover, .icon-toggle[aria-expanded='true'] { background: var(--green-50); border-color: var(--line); }
.theme-icon-sun { display: none; }
:root[data-theme='dark'] .theme-icon-sun { display: inline; }
:root[data-theme='dark'] .theme-icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-icon-sun { display: inline; }
  :root:not([data-theme='light']) .theme-icon-moon { display: none; }
}
.a11y-panel {
  position: absolute; right: max(1.25rem, calc((100% - 1400px) / 2)); top: calc(var(--header-h) - 4px); z-index: 60;
  width: min(360px, calc(100vw - 2rem)); background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 18px 18px 14px;
  font-size: 16px;
}
.a11y-panel[hidden] { display: none; }
.a11y-panel h2 { font-family: var(--sans); font-size: 17px; margin: 0 0 12px; color: var(--ink); }
.a11y-group { border: 0; margin: 0 0 16px; padding: 0; }
.a11y-group legend { font-weight: 600; font-size: 14px; color: var(--ink-soft); margin-bottom: 6px; padding: 0; }
.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--sand); border: 1px solid var(--line); }
.segmented button {
  min-height: 44px; border: 0; border-radius: 9px; background: none; color: var(--ink); cursor: pointer;
  font: 500 15px/1.1 var(--sans); padding: 6px 8px;
}
.segmented button:hover { background: var(--green-50); }
.segmented button[aria-pressed='true'] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.segmented .size-1 { font-size: 15px; }
.segmented .size-2 { font-size: 18px; }
.segmented .size-3 { font-size: 21px; }
.a11y-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; width: 100%; border: 1px solid var(--line); background: var(--sand); color: var(--ink); border-radius: 12px; padding: 8px 12px; cursor: pointer; font: 500 15px var(--sans); text-align: left; }
.a11y-switch .track { flex: none; width: 46px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background-color .15s; }
.a11y-switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgb(0 0 0 / 0.3); }
.a11y-switch[aria-checked='true'] .track { background: var(--brand); }
.a11y-switch[aria-checked='true'] .track::after { transform: translateX(20px); }
.a11y-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; font-size: 14px; color: var(--muted); }
.a11y-foot button { background: none; border: 0; color: var(--green-700); font: 600 14px var(--sans); cursor: pointer; text-decoration: underline; padding: 8px 0; }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; color: var(--green-900); cursor: pointer; border-radius: 8px; }
.nav-toggle-close { display: none; }

.admin-strip { background: var(--gold); color: var(--brand-deep); font-size: 0.9rem; padding: 0.4rem 0; }
.admin-strip a { color: var(--brand-deep); font-weight: 700; }

@media (max-width: 1440px) {
  .header-facebook span { display: none; }
  .header-actions .header-facebook { padding: 0; width: 44px; height: 44px; }
}
@media (max-width: 1300px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; height: calc(100dvh - var(--header-h)); margin: 0;
    background: var(--white); padding: 1.25rem 1.25rem 2rem; overflow-y: auto;
    display: none; flex-direction: column; gap: 1.25rem;
  }
  .nav-open .main-nav { display: flex; }
  .nav-open .nav-toggle-open { display: none; }
  .nav-open .nav-toggle-close { display: inline; }
  .main-nav ul { flex-direction: column; gap: 0.25rem; }
  .main-nav ul a { font-size: 1.15rem; padding: 0.85rem 1rem; }
  .main-nav .nav-facebook { display: inline-flex; align-self: flex-start; }
  .main-nav .nav-search { display: block; }
  .main-nav .nav-search .search-form { max-width: none; }
  .header-actions { margin-left: auto; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
  .theme-quick { display: none; } /* temaet kan stadig vælges i Aa-menuen */
  .brand-text .brand-name { font-size: 19px; }
}
@media (max-width: 560px) {
  .header-facebook { display: none; } /* findes også i menuen, på forsiden og i bunden */
}
@media (max-width: 360px) {
  .header-inner { gap: 0.5rem; }
  .header-actions { gap: 0; }
  .icon-toggle { width: 40px; }
  .brand { gap: 8px; }
  .brand img { width: 38px; }
}
@media (max-width: 560px) {
  .btn { white-space: normal; text-align: center; }
  .hero-actions .btn { width: 100%; }
}

/* Forside-hero ------------------------------------------------------------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgb(200 164 90 / 0.22), transparent 60%),
    radial-gradient(900px 600px at -10% 120%, rgb(44 115 83 / 0.55), transparent 60%),
    linear-gradient(160deg, var(--brand) 0%, var(--brand-deep) 100%);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3rem; align-items: center; padding: clamp(3rem, 7vw, 6rem) 0 clamp(4.5rem, 9vw, 7.5rem); }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgb(255 255 255 / 0.85); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hero-logo { display: flex; justify-content: center; }
.hero-logo img { width: min(100%, 400px); filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.25)); }
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 60px; fill: var(--sand); }
.eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.78rem; font-weight: 600; color: var(--green-600); margin-bottom: 0.9rem; }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.eyebrow-light { color: var(--gold); }
@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; }
  .hero-logo { order: -1; }
  .hero-logo img { width: min(62%, 260px); }
  .hero-lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
}

/* Undersider --------------------------------------------------------------- */
.page-hero {
  background: linear-gradient(180deg, var(--green-50), var(--sand));
  border-bottom: 1px solid var(--line);
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}
.page-hero h1 { margin-bottom: 0.4rem; }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 44rem; margin: 0.5rem 0 0; }
.lead-meta { color: var(--muted); margin: 0; }

.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-tint { background: var(--white); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

/* Søgning ------------------------------------------------------------------ */
.search-form { position: relative; display: flex; gap: 8px; align-items: center; width: 100%; max-width: 640px; }
.search-form .search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.search-form input[type='search'] { flex: 1; min-width: 0; min-height: 48px; padding-left: 44px; border-radius: 999px; }
.search-form .btn { min-height: 48px; flex: none; }
.search-large { margin-top: 1.5rem; }
.search-hero { margin: 1.75rem 0 0; max-width: 520px; }
.search-hero input[type='search'] { background: rgb(255 255 255 / 0.96); border-color: transparent; color: #1b2620; }
.search-hero input[type='search']::placeholder { color: #5d6b63; }
.search-hero .search-icon { color: #5d6b63; }
.search-hero .btn-primary { background: var(--gold); color: var(--brand-deep); }
.search-hero .btn-primary:hover { background: #d6b46c; color: var(--brand-deep); }
.hero-search + .hero-actions { margin-top: 1.25rem; }
.search-link { color: var(--green-900); }
.search-link[aria-current='page'] { background: var(--green-100); }
.nav-search { display: none; }
.search-count { color: var(--ink-soft); margin-bottom: 1.25rem; }
.search-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.search-result { display: flex; gap: 1rem; align-items: flex-start; padding: 1rem 1.15rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.search-result:hover { border-color: var(--green-600); box-shadow: var(--shadow); color: var(--ink); }
.search-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.search-meta { font-size: 0.85rem; color: var(--muted); }
.search-type { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--gold-text); }
.search-title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--green-900); overflow-wrap: anywhere; }
.search-snippet { color: var(--ink-soft); font-size: 0.95rem; overflow-wrap: anywhere; }
mark { background: #fbe7a8; color: #1b2620; border-radius: 3px; padding: 0 2px; }
.search-tips { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.search-tips h2 { font-size: 1.2rem; }
.search-tips ul { margin: 0; padding-left: 1.2rem; color: var(--ink-soft); display: grid; gap: 0.4rem; }
@media (max-width: 480px) {
  .search-form .btn { padding-inline: 1rem; }
}

/* Nyheder ------------------------------------------------------------------ */
.news-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 960px) { .news-layout { grid-template-columns: 1fr; } }
.news-list { display: grid; gap: 1.1rem; }
.news-item { display: grid; grid-template-columns: 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-h) + 1rem); }
.news-item.has-image { grid-template-columns: 220px minmax(0, 1fr); }
.news-item:target { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(200 164 90 / 0.3); }
.news-image { display: block; background: var(--green-50); min-height: 100%; }
.news-image img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 1.3rem 1.5rem 1.4rem; min-width: 0; }
.news-date { display: block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 0.35rem; }
.news-title { font-size: 1.25rem; margin-bottom: 0.45rem; }
.news-text { color: var(--ink-soft); margin-bottom: 0.9rem; }
.news-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.news-links:empty { display: none; }
.news-links .link-arrow { margin-right: 0.3rem; }
.container.narrow .news-item.has-image { grid-template-columns: 260px minmax(0, 1fr); }
@media (max-width: 640px) {
  .news-item.has-image, .container.narrow .news-item.has-image { grid-template-columns: 1fr; }
  .news-image { aspect-ratio: 16 / 9; }
}
.news-aside .doc-item { padding: 0.8rem 0.95rem; }
.news-aside .doc-icon { width: 38px; height: 38px; }
.aside-more { margin: 0.9rem 0 0; }
.section-news { padding-top: clamp(2rem, 4vw, 3rem); }

/* Genveje ------------------------------------------------------------------ */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .quick-grid { grid-template-columns: 1fr; } }
.quick-card {
  position: relative; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: 0.2rem;
  padding: 1.35rem 3rem 1.35rem 1.35rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--green-100); color: var(--ink); }
.quick-icon { grid-row: span 2; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.quick-card:hover .quick-icon { background: var(--brand); color: var(--on-brand); }
.quick-title { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--green-900); }
.quick-text { color: var(--muted); font-size: 0.93rem; line-height: 1.45; }
.quick-arrow { position: absolute; right: 1.2rem; top: 1.45rem; color: var(--green-600); opacity: 0; transform: translateX(-4px); transition: opacity .18s, transform .18s; }
.quick-card:hover .quick-arrow { opacity: 1; transform: none; }

/* Dokumentlister ----------------------------------------------------------- */
.doc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.doc-item {
  display: flex; align-items: center; gap: 1rem; padding: 0.95rem 1.1rem;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s;
}
.doc-item:hover { border-color: var(--green-600); box-shadow: var(--shadow); color: var(--ink); transform: translateY(-1px); }
.doc-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); flex: none; }
.doc-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.doc-title { font-weight: 600; overflow-wrap: anywhere; }
.doc-meta { color: var(--muted); font-size: 0.88rem; }
.doc-open { color: var(--muted); }
.doc-item:hover .doc-open { color: var(--green-700); }
.section-tint .doc-item { background: var(--sand); }
.section-tint .doc-item:hover { background: var(--white); }
.year-group + .year-group { margin-top: 2.5rem; }
.year-heading { display: flex; align-items: center; gap: 1rem; font-size: 1.35rem; }
.year-heading::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.callout { display: flex; gap: 0.9rem; align-items: flex-start; margin-top: 1.5rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); background: var(--green-50); border: 1px solid var(--green-100); }
.callout-wide { margin: 0 0 2.5rem; }
.callout-icon { color: var(--green-700); padding-top: 2px; }

/* Galleri ------------------------------------------------------------------ */
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; }
.album-grid-compact { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.album-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.album-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.album-cover { position: relative; aspect-ratio: 4 / 3; background: var(--green-50); overflow: hidden; }
.album-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.album-card:hover .album-cover img { transform: scale(1.04); }
.album-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--green-600); }
.album-count { position: absolute; right: 0.6rem; bottom: 0.6rem; background: rgb(12 42 30 / 0.78); color: #fff; font-size: 0.78rem; font-weight: 600; padding: 0.25rem 0.6rem; border-radius: 999px; backdrop-filter: blur(4px); }
.album-info { display: flex; flex-direction: column; padding: 0.9rem 1.1rem 1.1rem; }
.album-title { font-family: var(--serif); font-weight: 700; color: var(--green-900); line-height: 1.3; }
.album-date { color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }

.photo-grid { columns: 4 240px; column-gap: 0.9rem; }
.photo { display: block; margin-bottom: 0.9rem; border-radius: var(--radius-sm); overflow: hidden; break-inside: avoid; background: var(--green-50); cursor: zoom-in; }
.photo img { width: 100%; transition: transform .35s, opacity .2s; }
.photo:hover img { transform: scale(1.03); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgb(8 20 14 / 0.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox-figure { margin: 0; max-width: calc(100vw - 8rem); max-height: calc(100vh - 6rem); display: flex; flex-direction: column; align-items: center; }
.lightbox-figure img { max-width: 100%; max-height: calc(100vh - 8rem); object-fit: contain; border-radius: 6px; box-shadow: var(--shadow-lg); }
.lightbox-figure figcaption { color: rgb(255 255 255 / 0.75); font-size: 0.9rem; margin-top: 0.8rem; }
.lightbox-btn { position: absolute; background: rgb(255 255 255 / 0.1); color: #fff; border: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.lightbox-btn:hover { background: rgb(255 255 255 / 0.22); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
  .lightbox-figure { max-width: 100vw; }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 1rem; transform: none; }
}

/* Bestyrelsen -------------------------------------------------------------- */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.member-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.member-photo { aspect-ratio: 1; overflow: hidden; background: linear-gradient(160deg, var(--brand-hover), var(--brand-deep)); display: grid; place-items: center; }
.member-photo img { width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; }
.member-initials { font-family: var(--serif); font-size: 3.5rem; color: rgb(255 255 255 / 0.9); }
.member-body { padding: 1.2rem 1.3rem 1.4rem; }
.member-title { margin: 0 0 0.2rem; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; font-weight: 700; color: var(--gold-text); }
.member-name { font-size: 1.3rem; margin-bottom: 0.7rem; }
.member-contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; font-size: 0.95rem; }
.member-contact a { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--ink-soft); overflow-wrap: anywhere; }
.member-contact a:hover { color: var(--green-700); text-decoration: underline; }
.member-contact .icon { color: var(--green-600); }

/* Kontakt ------------------------------------------------------------------ */
.group-heading { font-size: 1.3rem; margin: 2.2rem 0 1rem; }
.group-heading:first-of-type { margin-top: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.contact-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.3rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.contact-card h3 { margin-bottom: 0.2rem; }
.contact-desc { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.9rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: auto; }
.chip { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.8rem; border-radius: 999px; background: var(--sand); border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; font-weight: 500; overflow-wrap: anywhere; }
.chip:hover { border-color: var(--green-600); color: var(--green-700); }
.chip-strong { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 600; }
.chip-strong:hover { background: var(--brand-hover); color: var(--on-brand); }

/* Vedtægter ---------------------------------------------------------------- */
.laws-layout { display: grid; grid-template-columns: 260px 1fr; gap: 3rem; align-items: start; }
.laws-toc { position: sticky; top: calc(var(--header-h) + 1.5rem); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1rem; max-height: calc(100vh - var(--header-h) - 3rem); overflow-y: auto; }
.toc-title { font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.72rem; color: var(--muted); margin: 0 0 0.6rem 0.5rem; }
.laws-toc ol { list-style: none; margin: 0; padding: 0; }
.laws-toc a { display: block; padding: 0.4rem 0.5rem; border-radius: 6px; color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; line-height: 1.35; }
.laws-toc a:hover { background: var(--green-50); color: var(--green-900); }
.toc-num { font-weight: 700; color: var(--green-700); margin-right: 0.2rem; }
.laws-body { max-width: 46rem; }
.laws-intro { font-size: 1.1rem; color: var(--ink-soft); }
.law { padding: 1.6rem 0; border-bottom: 1px solid var(--line); }
.law:first-of-type { padding-top: 0; }
.law h2 { font-size: 1.35rem; }
.law-num { color: var(--gold-text); margin-right: 0.3rem; }
@media (max-width: 860px) {
  .laws-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .laws-toc { position: static; max-height: none; }
}

/* Formularer --------------------------------------------------------------- */
.form-card { padding: clamp(1.5rem, 4vw, 2.5rem); }
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: 0.4rem; }
.field-label { font-weight: 600; font-size: 0.95rem; }
.field-hint { font-size: 0.85rem; color: var(--muted); }
input[type='text'], input[type='search'], input[type='email'], input[type='password'], input[type='tel'], input[type='url'], input[type='date'], textarea, select {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 4px rgb(44 115 83 / 0.15); }
textarea { min-height: 7rem; resize: vertical; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.93rem; color: var(--ink-soft); }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--green-700); flex: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 0.85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-size: 0.95rem; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-line); }
.alert-success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-line); }
.success-state { text-align: center; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--green-100); color: var(--green-700); margin-bottom: 1rem; }

/* CTA ---------------------------------------------------------------------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: rgb(255 255 255 / 0.85);
}
.cta-band h2 { color: #fff; margin-bottom: 0.3rem; }
.cta-band p { margin: 0; max-width: 38rem; }
.cta-band .btn-primary { background: #fff; color: var(--brand-ink); }
.cta-band .btn-primary:hover { background: #f0ede4; color: var(--brand-ink); }

/* Tom tilstand, fejl og tekst ---------------------------------------------- */
.empty { color: var(--muted); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); background: var(--surface-soft); }
.empty-state .icon { color: var(--green-600); margin: 0 auto 0.75rem; }
.empty-state p { margin: 0; }
.error-page { text-align: center; }
.error-page img { margin: 0 auto 1.5rem; width: 140px; }
.error-page .lead { margin: 0 auto 1.75rem; }
.prose { font-size: 1.03rem; }
.prose h2 { margin-top: 2.2rem; font-size: 1.45rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4rem; font-family: var(--sans); font-size: 1.05rem; color: var(--ink); }

/* Footer ------------------------------------------------------------------- */
.site-footer { background: var(--brand-deep); color: rgb(255 255 255 / 0.72); margin-top: auto; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.3fr; gap: 2.5rem; padding: 3.5rem 0 2.5rem; }
.footer-brand img { width: 170px; opacity: 0.95; }
.footer-title { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: rgb(255 255 255 / 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .btn-facebook { color: #fff; }
.site-footer .btn-facebook:hover { text-decoration: none; }
.footer-text { margin-bottom: 1rem; }
.footer-mail { margin-top: 1rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding: 1.25rem 0 1.5rem; border-top: 1px solid rgb(255 255 255 / 0.1); font-size: 0.85rem; color: rgb(255 255 255 / 0.55); }
.footer-bottom a { color: rgb(255 255 255 / 0.7); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } .footer-brand img { width: 140px; } }
