/**
 * CP Web · Layout v1.0.0 (site-release v3.0.0)
 * Fælles stylesheet for forsiden (index.html) og sektionssiderne (sektion.php).
 * Avis-layout i stil med CNN: mørkt sidehoved med logo, menulinje, hvid
 * indholdsflade og 3 kolonner på forsiden.
 */
:root {
  --navy-deep: #0D1A30;
  --navy:      #142543;
  --sky:       #30A3DE;
  --sky-light: #7ED3F0;
  --accent:    #0F7FB8;   /* sky, mørkere - kan læses på hvid */
  --ink:       #111827;
  --muted:     #5B6675;
  --line:      #DDE2E8;
  --bg:        #FFFFFF;
  --bg-soft:   #F4F6F9;
  --up:        #0A8F62;
  --down:      #D62839;
  --maxw:      1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #fff; color: #000; padding: 8px 14px; z-index: 2000; }
.skip-link:focus { left: 8px; top: 8px; }

/* ===== SIDEHOVED ===== */
.site-top { background: var(--navy-deep); color: #fff; }
.site-top-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.site-logo { display: block; flex-shrink: 0; }
.site-logo img { height: 52px; width: auto; display: block; }
.site-top-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; }
.site-dato { color: #A9BFD1; letter-spacing: .4px; }
.site-dato strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.site-links { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; }
.site-links a { color: var(--sky-light); font-weight: 600; }
.site-links a:hover { text-decoration: underline; }

/* ===== MENULINJE ===== */
.site-nav { background: var(--navy); border-top: 1px solid rgba(255,255,255,.08); border-bottom: 3px solid var(--sky); position: sticky; top: 0; z-index: 900; }
.site-nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 12px; display: flex; align-items: stretch; overflow-x: auto; scrollbar-width: none; }
.site-nav-inner::-webkit-scrollbar { display: none; }
.site-nav a {
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .6px; text-transform: uppercase;
  padding: 14px 18px; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px;
  transition: background .15s ease, border-color .15s ease;
}
.site-nav a:hover { background: rgba(255,255,255,.08); }
.site-nav a.aktiv { border-bottom-color: #fff; background: rgba(255,255,255,.1); }
.site-nav a.nav-forside { color: var(--sky-light); }

/* ===== SIDEINDHOLD ===== */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 60px; }
.sektion-overskrift {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  border-top: 4px solid var(--ink); padding-top: 8px; margin-bottom: 16px;
}
.sektion-overskrift h2, .sektion-overskrift h1 { font-size: 20px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.sektion-overskrift a { font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.sektion-overskrift a:hover { text-decoration: underline; }

/* ===== FORSIDE · 3 KOLONNER ===== */
.forside-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 320px;
  gap: 0 28px;
  align-items: start;
}
.kol { min-width: 0; }
.kol-venstre { border-right: 1px solid var(--line); padding-right: 24px; }
.kol-hoejre  { border-left: 1px solid var(--line); padding-left: 24px; }

.kol-titel {
  font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase;
  border-top: 3px solid var(--ink); padding-top: 6px; margin-bottom: 10px;
}
.kol-titel .live-prik { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--down); margin-right: 6px; vertical-align: 1px; }

/* Venstre: seneste-liste */
.seneste-liste { list-style: none; }
.seneste-liste li { border-bottom: 1px solid var(--line); }
.seneste-liste li:last-child { border-bottom: none; }
.seneste-liste a { display: block; padding: 11px 0; }
.seneste-liste .tid { display: block; font-size: 11px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.seneste-liste .tid .omr { color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin-left: 6px; }
.seneste-liste .tit { display: block; font-size: 14px; font-weight: 700; line-height: 1.32; }
.seneste-liste a:hover .tit { color: var(--accent); text-decoration: underline; }

/* Midten: hovedhistorie */
.hero { display: block; margin-bottom: 22px; }
.hero-billede { position: relative; display: block; background: var(--bg-soft); aspect-ratio: 16 / 9; overflow: hidden; }
.hero-billede img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-kicker { display: block; margin-top: 12px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--accent); }
.hero h2 { font-size: 34px; line-height: 1.12; font-weight: 800; margin: 4px 0 8px; letter-spacing: -.3px; }
.hero:hover h2 { text-decoration: underline; }
.hero p { color: #374151; font-size: 16px; line-height: 1.55; }
.hero .meta { margin-top: 8px; font-size: 12px; color: var(--muted); }

.kort-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.kort { display: block; min-width: 0; }
.kort-billede { position: relative; display: block; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; margin-bottom: 8px; }
.kort-billede img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kort .kicker { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: var(--accent); margin-bottom: 3px; }
.kort h3 { font-size: 17px; line-height: 1.25; font-weight: 800; }
.kort:hover h3 { text-decoration: underline; }
.kort .meta { margin-top: 5px; font-size: 11px; color: var(--muted); }
.ingen-billede-streg { border-top: 3px solid var(--line); padding-top: 8px; }

.mere-link { display: block; text-align: center; margin: 24px 0 4px; padding: 11px 16px; border: 2px solid var(--ink); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; }
.mere-link:hover { background: var(--ink); color: #fff; }

/* Højre: moduler */
.modul { margin-bottom: 28px; }
.modul-top { display: flex; align-items: baseline; justify-content: space-between; border-top: 3px solid var(--ink); padding-top: 6px; margin-bottom: 10px; }
.modul-top h3 { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; }
.modul-top .tag { font-size: 10px; color: var(--muted); letter-spacing: .6px; text-transform: uppercase; font-weight: 700; }

.info-kurs-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.info-kurs-row:last-child { border-bottom: none; }
.info-kurs-row .navn { font-weight: 700; }
.info-kurs-row .vaerdier { display: flex; gap: 10px; align-items: baseline; font-family: 'Roboto Mono', monospace; }
.info-kurs-row .vaerdi { color: var(--muted); }
.info-kurs-row .pct.up { color: var(--up); }
.info-kurs-row .pct.down { color: var(--down); }
.info-kurs-row .pct.flat { color: var(--muted); }
.opdateret-tid { margin-top: 8px; text-align: right; font-size: 11px; color: var(--muted); }
.henter { text-align: center; color: var(--muted); font-size: 12px; padding: 10px 0; }

.info-tal-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.info-tal-box { min-width: 0; background: var(--bg-soft); padding: 10px 12px; }
.info-tal-label { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: 3px; overflow-wrap: break-word; }
.info-tal-value { font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.info-tal-note { font-size: 12px; line-height: 1.4; color: var(--muted); margin-top: 4px; overflow-wrap: break-word; }
.info-tal-tid { font-size: 10px; color: var(--muted); margin-top: 5px; }

/* Vejr */
.vejr-boks { background: var(--bg-soft); padding: 12px 14px; font-size: 12px; transition: opacity .35s ease; }
.vejr-boks[hidden] { display: none; }
.vejr-boks.fade { opacity: 0; }
.vejr-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vejr-by { background: #fff; color: var(--ink); border: 1px solid var(--line); font: 700 11px 'Montserrat', sans-serif; padding: 4px 6px; max-width: 150px; }
.vejr-by:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.vejr-bynavn { font-size: 12px; font-weight: 800; }
.vejr-nu { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.vejr-ikon { font-size: 30px; line-height: 1; }
.vejr-temp { font-size: 28px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.vejr-tekst { color: var(--muted); line-height: 1.35; }
.vejr-dage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.vejr-dag { text-align: center; }
.vejr-dag .d { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.vejr-dag .i { font-size: 17px; line-height: 1.4; }
.vejr-dag .t { font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700; }
.vejr-dag .t span { color: var(--muted); font-weight: 600; }
.vejr-kilde { margin-top: 6px; font-size: 9.5px; color: var(--muted); letter-spacing: .3px; }
.vejr-kilde a { color: var(--muted); text-decoration: underline; }

/* "Dette har vi fokus på" - liste med små billeder */
.fokus-liste { list-style: none; }
.fokus-liste li { border-bottom: 1px solid var(--line); }
.fokus-liste li:last-child { border-bottom: none; }
.fokus-liste a { display: flex; gap: 12px; padding: 11px 0; align-items: flex-start; }
.fokus-liste .fokus-img { position: relative; flex: 0 0 84px; aspect-ratio: 4 / 3; background: var(--bg-soft); overflow: hidden; }
.fokus-liste .fokus-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fokus-liste .tit { font-size: 14px; font-weight: 700; line-height: 1.3; }
.fokus-liste a:hover .tit { color: var(--accent); text-decoration: underline; }
.fokus-liste .meta { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 500; }

/* Annonce */
.annonce-boks { margin-bottom: 24px; }
.annonce-banner { position: relative; cursor: pointer; background: var(--bg-soft); border: 1px solid var(--line); overflow: hidden; }
.annonce-label { position: absolute; top: 8px; left: 8px; z-index: 2; background: rgba(0,0,0,.7); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 3px 7px; }
.annonce-label-inline { display: inline-block; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 3px 7px; margin-bottom: 8px; }
.annonce-banner-image { width: 100%; display: block; max-height: 260px; object-fit: cover; }
.annonce-banner-caption { padding: 8px 12px; font-size: 13px; font-weight: 700; }
.annonce-banner-fallback { padding: 14px 16px; }
.annonce-banner-fallback h3 { font-size: 16px; margin-bottom: 6px; }
.annonce-banner-fallback p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.annonce-cta { font-size: 12px; font-weight: 800; color: var(--accent); }

/* ===== SEKTIONSRÆKKER PÅ FORSIDEN ===== */
.sektioner { margin-top: 44px; }
.sektion-raekke { margin-bottom: 36px; }
.raekke-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 20px; }
.raekke-tom { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* ===== SEKTIONSSIDE (sektion.php) ===== */
.sektion-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 0 32px; align-items: start; }
.sektion-side .kol-hoejre { padding-left: 24px; }
.sektion-intro { color: var(--muted); font-size: 14px; max-width: 640px; margin: -4px 0 20px; }
.sektion-liste { margin-top: 24px; border-top: 1px solid var(--line); }
.liste-raekke { display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.liste-raekke .liste-img { position: relative; flex: 0 0 220px; aspect-ratio: 16 / 10; background: var(--bg-soft); overflow: hidden; }
.liste-raekke .liste-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.liste-raekke h3 { font-size: 20px; line-height: 1.22; font-weight: 800; margin-bottom: 6px; }
.liste-raekke:hover h3 { text-decoration: underline; }
.liste-raekke p { color: #374151; font-size: 14px; line-height: 1.5; }
.liste-raekke .meta { margin-top: 6px; font-size: 11px; color: var(--muted); }
.tom-sektion { padding: 40px 0; color: var(--muted); font-size: 15px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 32px 0 8px; }
.pagination a, .pagination .disabled { border: 2px solid var(--ink); padding: 10px 20px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; }
.pagination a:hover { background: var(--ink); color: #fff; }
.pagination .disabled { opacity: .3; }
.pagination .side-info { font-size: 13px; color: var(--muted); font-weight: 600; }

/* Video + AI-mærke (genbrugt fra tidligere versioner) */
.ai-billede-wrap { position: relative; display: block; }
.ai-maerke { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.72); color: #fff; font: 700 11px/1 'Montserrat', sans-serif; padding: 5px 9px; border-radius: 999px; pointer-events: none; z-index: 2; }
.fokus-img .ai-maerke, .liste-img .ai-maerke { font-size: 9px; padding: 3px 6px; left: 5px; bottom: 5px; }
.ai-maerke.ai-maerke-top { bottom: auto; top: 10px; left: auto; right: 10px; }
.video-facade { position: relative; cursor: pointer; display: block; }
.video-play-button { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 54px; height: 54px; border-radius: 50%; background: rgba(13,26,48,.75); border: 2px solid rgba(255,255,255,.85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; padding-left: 3px; transition: all .2s ease; }
.video-facade:hover .video-play-button { background: var(--sky); }
.har-video .video-play-button { width: 40px; height: 40px; font-size: 14px; }
.ai-info-boks { margin-top: 36px; background: var(--bg-soft); border-left: 4px solid var(--sky); padding: 12px 16px; color: var(--muted); font-size: 12.5px; line-height: 1.55; }
.ai-info-boks a { color: var(--accent); text-decoration: underline; }

/* ===== ARTIKEL-POPUP ===== */
.article-modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(5,12,26,.7); z-index: 1000; padding: 30px 16px; overflow-y: auto; }
.article-modal-backdrop.active { display: flex; justify-content: center; align-items: flex-start; }
.article-modal { background: #fff; color: var(--ink); max-width: 760px; width: 100%; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.45); border-top: 5px solid var(--sky); animation: modalIn .2s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.article-modal-image { width: 100%; max-height: 380px; object-fit: cover; display: block; }
.article-modal-video { position: relative; width: 100%; padding-bottom: 56.25%; height: 0; margin-bottom: 16px; overflow: hidden; display: none; }
.article-modal-video.vertikal { padding-bottom: 0; aspect-ratio: 9 / 16; max-width: 360px; margin-left: auto; margin-right: auto; }
.article-modal-video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.article-modal-body { padding: 28px 32px 32px; }
.article-modal-close { position: sticky; top: 16px; float: right; margin: -8px -8px 0 16px; background: var(--bg-soft); border: none; color: var(--ink); width: 34px; height: 34px; border-radius: 50%; font-size: 18px; cursor: pointer; line-height: 1; z-index: 3; }
.article-modal-close:hover { background: var(--line); }
.article-modal h2 { font-size: 28px; line-height: 1.18; font-weight: 800; margin-bottom: 12px; padding-right: 40px; }
.blog-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.blog-meta .dato { font-family: 'Roboto Mono', monospace; }
.article-modal .blog-meta { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.article-modal-content { font-size: 16px; line-height: 1.75; color: #1f2937; }
.article-modal-content p { margin-bottom: 14px; }
.article-modal-content ul, .article-modal-content ol { margin: 0 0 14px 22px; }
.article-modal-content blockquote { border-left: 4px solid var(--sky); margin: 0 0 14px; padding: 4px 0 4px 14px; color: var(--muted); font-style: italic; }
.article-modal-content a { color: var(--accent); text-decoration: underline; }
.article-modal-content img { max-width: 100%; margin: 4px 0 14px; }
.ai-billedtekst-modal { font-size: 12.5px; font-style: italic; color: var(--muted); padding: 8px 32px 0; }
.ai-billedtekst-modal a { color: var(--accent); text-decoration: underline; }
.del-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.del-label { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.del-knapper { display: flex; flex-wrap: wrap; gap: 10px; }
.del-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--bg-soft); color: var(--ink); font: 800 13px/1 'Montserrat', sans-serif; border: none; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.del-btn:hover, .del-btn:focus-visible { color: #fff; transform: translateY(-2px); }
.del-btn.del-fb:hover { background: #1877F2; }
.del-btn.del-li:hover { background: #0A66C2; }
.del-btn.del-x:hover { background: #000; }
.del-btn.del-wa:hover { background: #25D366; }
.del-btn.del-mail:hover, .del-btn.del-kopier:hover, .del-btn.del-kopier.kopieret { background: var(--accent); color: #fff; }
.blog-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-modal .blog-tags { margin-top: 18px; }
.blog-tag { background: var(--bg-soft); color: var(--accent); padding: 3px 8px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px; }
.relaterede { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.relaterede h2 { font-size: 13px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; padding: 0; }
.rel-item { display: block; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.rel-item:hover { color: var(--accent); text-decoration: underline; }

/* ===== FOD ===== */
.site-footer { background: var(--navy-deep); color: #A9BFD1; margin-top: 20px; }
.site-footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 20px 36px; font-size: 12.5px; line-height: 1.7; text-align: center; }
.site-footer a { color: var(--sky-light); }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; margin-bottom: 10px; font-weight: 700; }
.site-footer .version { margin-top: 10px; font-size: 10px; opacity: .5; }

.til-toppen-btn { position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border: none; background: var(--navy); color: #fff; font-size: 15px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 800; }
.til-toppen-btn.synlig { opacity: .9; pointer-events: auto; }

/* ===== RESPONSIV ===== */
@media (max-width: 1100px) {
  .forside-grid { grid-template-columns: 220px minmax(0, 1fr); }
  .kol-hoejre { grid-column: 1 / -1; border-left: none; padding-left: 0; margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
  .kol-hoejre .modul-bred { grid-column: 1 / -1; }
  .raekke-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sektion-side { grid-template-columns: minmax(0, 1fr); }
  .sektion-side .kol-hoejre { margin-top: 32px; }
}
@media (max-width: 760px) {
  .site-top-inner { padding: 10px 14px; }
  .site-logo img { height: 40px; }
  .site-top-right { display: none; }
  .site-nav a { padding: 12px 14px; font-size: 13px; }
  .wrap { padding: 16px 14px 48px; }
  .forside-grid { grid-template-columns: minmax(0, 1fr); }
  .kol-midten { order: 1; }
  .kol-venstre { order: 2; border-right: none; padding-right: 0; margin-top: 28px; }
  .kol-hoejre { order: 3; display: block; }
  .hero h2 { font-size: 25px; }
  .hero p { font-size: 15px; }
  .kort-grid { grid-template-columns: minmax(0, 1fr); }
  .raekke-grid { grid-template-columns: minmax(0, 1fr); }
  .liste-raekke { flex-direction: column; gap: 10px; }
  .liste-raekke .liste-img { flex-basis: auto; width: 100%; }
  .article-modal-body { padding: 20px; }
  .article-modal h2 { font-size: 22px; }
  .ai-billedtekst-modal { padding: 8px 20px 0; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
