/* =====================================================================
   DAGNÆSHUS – designsystem
   Mobile first. Tokens øverst – ret farver/afstande ét sted.
   ===================================================================== */

:root {
  /* Farver (v1.1: violet/lavendel-palette – afledt af kundens #C8B6FF,
     men mørknet til WCAG AA-kontrast; lavendel bruges kun som flade) */
  --color-primary: #6a55b0;        /* violet – links, primærknapper (5,6:1) */
  --color-primary-dark: #4c3a85;   /* overskrifter, hover, topbar, footer (8,8:1) */
  --color-lavendel: #c8b6ff;       /* kundens lavendel – KUN dekorativ flade, aldrig tekst/knap */
  --color-secondary: #5c7a4d;      /* afdæmpet grøn – ikoner, badges */
  --color-secondary-soft: #e9efe4; /* grøn flade */
  --color-bg: #faf8fd;             /* kølig hvid med anelse lilla – sidebaggrund */
  --color-flade: #efeafc;          /* lys lavendel – skiftende sektioner */
  --color-card: #ffffff;
  --color-text: #222222;
  --color-muted: #666666;
  --color-alert: #c4573a;          /* KUN "Ring nu"-bjælken på mobil */
  --color-alert-dark: #a84730;

  /* Form */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --shadow-soft: 0 12px 35px rgba(0,0,0,.08);
  --shadow-lift: 0 18px 45px rgba(0,0,0,.12);

  /* Typografi */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1200px;
  --space-1: 8px;  --space-2: 16px; --space-3: 24px; --space-4: 32px;
  --space-5: 48px; --space-6: 64px; --space-7: 96px; --space-8: 128px;
}

/* ---------- Base ---------- */
body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-primary-dark);
  line-height: 1.2;
  font-weight: 550;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: 1.25rem; }
a { color: var(--color-primary); }
img { border-radius: var(--radius-md); height: auto; max-width: 100%; }
.grid-container, .wp-block-group__inner-container { max-width: var(--container); }

/* Fuld bredde uden sidebar – widgets (Søg/Recent Posts) hører ikke hjemme her.
   PHP tvinger allerede no-sidebar; dette er sikkerhedsnet mod tema-opdateringer. */
.right-sidebar #right-sidebar, .left-sidebar #left-sidebar { display: none; }

/* Læsbarhed: brede sektioner, men brødtekst maks. ca. 70 tegn pr. linje.
   Kort, kolonner og bannere er smallere i forvejen og påvirkes ikke. */
.entry-content p, .entry-content ul, .entry-content ol { max-width: 70ch; }
.entry-content .has-text-align-center { margin-left: auto; margin-right: auto; }

/* Synlig fokusmarkering overalt (WCAG 2.4.7) */
:where(a, button, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--color-alert);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Topbar (telefon · mail · adresse) ---------- */
.dh-topbar { background: var(--color-primary-dark); color: #fff; font-size: .9rem; }
.dh-topbar-inner {
  align-items: center; display: flex; flex-wrap: wrap; gap: var(--space-2);
  justify-content: space-between; margin: 0 auto; max-width: var(--container);
  padding: 8px 20px;
}
.dh-topbar a { color: #fff; text-decoration: none; }
.dh-topbar-tel { font-weight: 700; white-space: nowrap; }
.dh-topbar-tel:hover { text-decoration: underline; }
.dh-topbar-info { opacity: .85; }
@media (max-width: 767px) { .dh-topbar-info { display: none; } }

/* ---------- Header / navigation (GeneratePress-tilpasninger) ---------- */
.site-header { background: var(--color-bg); }
.main-navigation a { font-weight: 600; }
/* Strammere menupunkter på desktop, så alle punkter + Kontakt-knappen
   kan stå på ÉN linje (knappen må aldrig ombrydes til en ny række). */
@media (min-width: 769px) {
  .main-navigation .main-nav ul li a { padding-left: 13px; padding-right: 13px; }
}
/* "Kontakt os" som knap: menupunktet har CSS-klassen nav-cta */
.main-navigation .nav-cta > a {
  background: var(--color-primary); border-radius: 999px; color: #fff !important;
  margin-left: 10px; padding-left: 22px !important; padding-right: 22px !important;
  white-space: nowrap;
}
.main-navigation .nav-cta > a:hover { background: var(--color-primary-dark); }

/* ---------- Knapper ---------- */
.wp-block-button__link, .dh-btn {
  border-radius: 999px !important;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 14px 30px; min-height: 44px;               /* touch-mål */
  background: var(--color-primary); color: #fff;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.wp-block-button__link:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.dh-btn-akut .wp-block-button__link { background: var(--color-alert); }
.dh-btn-akut .wp-block-button__link:hover { background: var(--color-alert-dark); }
.is-style-outline .wp-block-button__link, .dh-btn-outline .wp-block-button__link {
  background: transparent; border: 2px solid var(--color-primary); color: var(--color-primary);
}
.is-style-outline .wp-block-button__link:hover { background: var(--color-primary); color: #fff; }

/* ---------- Sektioner ---------- */
.dh-section { padding-bottom: var(--space-6); padding-top: var(--space-6); }
.dh-section-flade { background: var(--color-flade); }
@media (min-width: 768px) { .dh-section { padding-bottom: var(--space-7); padding-top: var(--space-7); } }
.dh-manchet { color: var(--color-muted); font-size: 1.15rem; max-width: 44em; }

/* ---------- Hero (cover-blok) ---------- */
.dh-hero { border-radius: 0; }
.dh-hero img { border-radius: 0; }
.dh-hero h1, .dh-hero p { color: #fff; }
.dh-hero p { font-size: 1.15rem; max-width: 36em; }
.dh-hero .wp-block-cover__inner-container { max-width: 800px; padding: var(--space-5) 20px; }

/* ---------- Kort (målgruppekort, relaterede sider) ---------- */
.dh-cardgrid { gap: var(--space-3); }
.dh-card {
  background: var(--color-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); padding: var(--space-4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.dh-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }
.dh-card img.dh-ikon { border-radius: 0; height: 56px; width: 56px; }
.dh-card h3 { margin-top: var(--space-2); }

/* ---------- Ikon-grid: Sådan hjælper vi ---------- */
.dh-icongrid { gap: var(--space-3); text-align: center; }
.dh-icongrid img { border-radius: 0; height: 64px; width: 64px; }
.dh-icongrid h3 { font-size: 1.1rem; }

/* ---------- FAQ (details/summary fra shortcode) ---------- */
.dh-faq details {
  background: var(--color-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); margin-bottom: var(--space-2);
  padding: var(--space-2) var(--space-3);
}
.dh-faq summary {
  cursor: pointer; font-family: var(--font-display); font-size: 1.1rem;
  font-weight: 600; color: var(--color-primary-dark); list-style: none;
  min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.dh-faq summary::-webkit-details-marker { display: none; }
.dh-faq summary::after { content: "+"; color: var(--color-secondary); font-size: 1.5rem; }
.dh-faq details[open] summary::after { content: "–"; }
.dh-faq details > div { padding: var(--space-1) 0 var(--space-2); }

/* ---------- Kontaktboks ---------- */
.dh-kontaktboks {
  background: var(--color-secondary-soft); border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
}
.dh-kontaktboks .dh-tel-stor a {
  color: var(--color-primary-dark); font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 600; text-decoration: none;
}
.dh-badge {
  background: var(--color-secondary); border-radius: 999px; color: #fff;
  display: inline-block; font-size: .85rem; font-weight: 700; padding: 6px 16px;
}

/* ---------- CTA-banner (alle siders afslutning) ---------- */
.dh-cta-banner {
  background: var(--color-primary); border-radius: var(--radius-lg);
  color: #fff; padding: var(--space-5) var(--space-4); text-align: center;
}
.dh-cta-banner h2, .dh-cta-banner p { color: #fff; }
.dh-cta-banner .wp-block-button__link { background: #fff; color: var(--color-primary-dark); }
.dh-cta-banner .wp-block-button__link:hover { background: var(--color-flade); }

/* ---------- Sponsorer ---------- */
.dh-sponsorkort {
  align-items: center; background: var(--color-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft); display: flex; flex-wrap: wrap;
  gap: var(--space-4); margin-bottom: var(--space-3); padding: var(--space-4);
  transition: transform .25s ease, box-shadow .25s ease;
}
.dh-sponsorkort:hover { box-shadow: var(--shadow-lift); transform: translateY(-3px); }
.dh-sponsorkort .dh-sponsor-logo { flex: 0 0 200px; }
.dh-sponsorkort .dh-sponsor-logo img { border-radius: 0; max-height: 90px; width: auto; }
.dh-sponsorkort .dh-sponsor-tekst { flex: 1 1 320px; }
.dh-sponsorkort h3 { margin: 0 0 6px; }

.dh-logogrid { display: grid; gap: var(--space-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px)  { .dh-logogrid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .dh-logogrid { grid-template-columns: repeat(5, 1fr); } }
.dh-logogrid a {
  align-items: center; background: var(--color-card); border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft); display: flex; justify-content: center;
  min-height: 110px; padding: var(--space-2);
  transition: transform .25s ease, filter .25s ease;
}
.dh-logogrid img { border-radius: 0; filter: grayscale(1); max-height: 60px; opacity: .8; }
.dh-logogrid a:hover { transform: translateY(-3px); }
.dh-logogrid a:hover img { filter: none; opacity: 1; }

/* ---------- Faktaboks (fagpersoner/praktisk) ---------- */
.dh-faktaboks {
  background: var(--color-flade); border-left: 6px solid var(--color-secondary);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
}

/* ---------- Kort/Maps – klik-for-at-indlæse (GDPR) ---------- */
.dh-map { background: var(--color-flade); border-radius: var(--radius-lg); min-height: 320px; overflow: hidden; position: relative; }
.dh-map iframe { border: 0; display: block; height: 420px; width: 100%; }
.dh-map button {
  background: var(--color-primary); border: 0; border-radius: 999px; color: #fff;
  cursor: pointer; font-weight: 700; left: 50%; padding: 14px 26px;
  position: absolute; top: 50%; transform: translate(-50%,-50%);
}

/* ---------- Facebook-feed – klik-for-at-indlæse (GDPR, som kortet) ---------- */
.dh-facebook {
  background: var(--color-flade); border-radius: var(--radius-lg);
  margin: 0 auto; max-width: 520px; min-height: 320px;
  overflow: hidden; position: relative; text-align: center;
}
.dh-facebook iframe { border: 0; display: block; height: 560px; margin: 0 auto; max-width: 500px; width: 100%; }
.dh-facebook.is-loaded { min-height: 0; }
.dh-facebook button {
  background: var(--color-primary); border: 0; border-radius: 999px; color: #fff;
  cursor: pointer; font-weight: 700; left: 50%; max-width: 90%; padding: 14px 26px;
  position: absolute; top: 42%; transform: translate(-50%,-50%);
}
.dh-facebook button:hover { background: var(--color-primary-dark); }
.dh-facebook .dh-facebook-note {
  bottom: var(--space-2); color: var(--color-muted); font-size: .9rem;
  left: 0; margin: 0; padding: 0 var(--space-3); position: absolute; right: 0;
}
.dh-facebook .dh-facebook-note a { color: var(--color-primary); }

/* ---------- Footer ---------- */
.site-footer, .site-info { background: var(--color-primary-dark); color: #e9e2f8; }
.site-footer a, .site-info a { color: #fff; }

/* ---------- Sticky "Ring nu" på mobil (eneste brug af coral-farven) ---------- */
.dh-ringbar {
  background: var(--color-alert); bottom: 0; color: #fff; display: block;
  font-weight: 700; left: 0; padding: 16px; position: fixed; right: 0;
  text-align: center; text-decoration: none; z-index: 999;
  box-shadow: 0 -6px 20px rgba(0,0,0,.15);
}
.dh-ringbar:hover, .dh-ringbar:focus { background: var(--color-alert-dark); color: #fff; }
@media (min-width: 768px) { .dh-ringbar { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 60px; } }

/* ---------- Diskret fade-in (main.js tilføjer .is-visible) ---------- */
.dh-fade { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
.dh-fade.is-visible { opacity: 1; transform: none; }
