/* ── Variables ─────────────────────────────────────────── */
:root {
  --primary:        #1a1a3e;
  --primary-light:  #2a2a5e;
  --accent:         #dc2626;
  --accent-h:       #b91c1c;
  --bg:             #f1f5f9;
  --card:           #ffffff;
  --text:           #1e293b;
  --muted:          #64748b;
  --border:         #e2e8f0;
  --radius:         10px;
  --radius-lg:      16px;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 12px rgba(0,0,0,.10);
  --transition:     .18s ease;
  --container:      1200px;
  --player-h:       80px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-bottom: var(--player-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }

/* ── Container ─────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ────────────────────────────────────────────── */
.site-header { background: var(--primary); color: #fff; }

.header-top .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .9rem;
  padding-bottom: .9rem;
  gap: 1rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.logo-ikon { font-size: 1.4rem; }

.hoved-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.hoved-nav a { color: rgba(255,255,255,.85); font-size: .95rem; transition: color var(--transition); }
.hoved-nav a:hover { color: #fff; }

.btn-anmod {
  background: var(--accent);
  color: #fff !important;
  padding: .45rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: .9rem !important;
  transition: background var(--transition);
}
.btn-anmod:hover { background: var(--accent-h) !important; }

.genre-strip { background: var(--primary-light); border-top: 1px solid rgba(255,255,255,.06); }
.genre-nav {
  display: flex;
  gap: .25rem;
  overflow-x: auto;
  padding: .45rem 0;
  scrollbar-width: none;
}
.genre-nav::-webkit-scrollbar { display: none; }
.genre-link {
  white-space: nowrap;
  color: rgba(255,255,255,.75);
  font-size: .82rem;
  padding: .3rem .7rem;
  border-radius: 20px;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.genre-link:hover, .genre-link.aktiv {
  background: var(--accent);
  color: #fff;
}

/* ── Main ──────────────────────────────────────────────── */
.main-indhold { min-height: 60vh; }

/* ── Flash ─────────────────────────────────────────────── */
.flash {
  padding: .85rem 1.25rem;
  font-size: .95rem;
  border-left: 4px solid;
  margin: 1rem auto;
  max-width: var(--container);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.flash-fejl   { background: #fef2f2; border-color: var(--accent); color: #991b1b; }
.flash-succes { background: #f0fdf4; border-color: #16a34a;       color: #166534; }

/* ── Hero (forside) ────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #2d1b69 100%);
  color: #fff;
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: .6rem;
}
.hero p { font-size: 1.1rem; opacity: .8; margin-bottom: 2rem; }

.soeg-form {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  gap: .5rem;
}
.soeg-input {
  flex: 1;
  padding: .85rem 1.1rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  color: var(--text);
}
.soeg-input:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.4); }
.soeg-btn {
  padding: .85rem 1.4rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--transition);
}
.soeg-btn:hover { background: var(--accent-h); }

/* ── Sections ──────────────────────────────────────────── */
.sektion {
  padding: 2.5rem 0;
}
.sektion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.sektion-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}
.sektion-header a {
  font-size: .9rem;
  color: var(--accent);
  font-weight: 600;
}
.sektion-header a:hover { text-decoration: underline; }

/* ── Genre Grid (forside) ──────────────────────────────── */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .75rem;
}
.genre-kort {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}
.genre-kort:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.genre-kort-ikon { font-size: 2rem; }
.genre-kort-navn { font-size: .88rem; font-weight: 600; color: var(--text); }
.genre-kort-antal { font-size: .78rem; color: var(--muted); }

/* ── Podcast Grid ──────────────────────────────────────── */
.podcast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}
.podcast-kort {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.podcast-kort:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.podcast-kort-billede {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--primary-light);
}
.podcast-kort-billede img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.podcast-kort:hover .podcast-kort-billede img { transform: scale(1.04); }
.podcast-kort-billede-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,.3);
}
.podcast-kort-indhold { padding: .9rem; flex: 1; display: flex; flex-direction: column; gap: .3rem; }
.podcast-kort-titel {
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.podcast-kort-beskrivelse {
  font-size: .8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.podcast-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.tag {
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 20px;
  background: #ede9fe;
  color: #5b21b6;
}

/* ── Genre Page ────────────────────────────────────────── */
.genre-header {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 1.25rem;
}
.genre-header-inner { display: flex; align-items: center; gap: 1rem; }
.genre-header-ikon { font-size: 3rem; }
.genre-header h1 { font-size: 2rem; font-weight: 800; }
.genre-header p { opacity: .7; margin-top: .3rem; }

/* ── Podcast Side ──────────────────────────────────────── */
.podcast-header {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 0;
}
.podcast-header-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}
.podcast-header-billede {
  width: 200px;
  min-width: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.podcast-header-billede img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.podcast-header-info { flex: 1; }
.podcast-header-info h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: .6rem;
  line-height: 1.2;
}
.podcast-header-info .beskrivelse {
  opacity: .85;
  font-size: .95rem;
  line-height: 1.65;
  max-width: 620px;
  margin-bottom: 1rem;
}
.podcast-header-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.podcast-header-tags .tag { background: rgba(255,255,255,.15); color: #fff; }
.hjemmeside-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .88rem;
  transition: background var(--transition);
}
.hjemmeside-link:hover { background: rgba(255,255,255,.2); }
.sidst-opdateret { font-size: .78rem; opacity: .55; margin-top: .75rem; }

/* ── Episode List ──────────────────────────────────────── */
.afsnit-sektion { padding: 2.5rem 0; }
.afsnit-sektion h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--border);
}
.afsnit-liste { display: flex; flex-direction: column; gap: .0rem; }
.afsnit-rad {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: .85rem .25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  border-radius: var(--radius);
}
.afsnit-rad:hover { background: var(--bg); }
.afsnit-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  flex-shrink: 0;
  transition: background var(--transition);
}
.afsnit-play-btn:hover { background: var(--accent); }
.afsnit-play-btn.spiller { background: var(--accent); }
.afsnit-play-btn.spiller::before { content: '⏸'; }
.afsnit-info { min-width: 0; }
.afsnit-titel {
  font-weight: 600;
  font-size: .93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.afsnit-dato { font-size: .78rem; color: var(--muted); }
.afsnit-varighed { font-size: .82rem; color: var(--muted); white-space: nowrap; }
.afsnit-nr { font-size: .78rem; color: var(--muted); min-width: 2rem; text-align: right; }

/* ── Søg ───────────────────────────────────────────────── */
.soeg-header { padding: 2rem 0 1rem; }
.soeg-header h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: 1rem; }
.soeg-form-stor {
  display: flex;
  gap: .5rem;
  max-width: 600px;
}
.soeg-form-stor input {
  flex: 1;
  padding: .85rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition);
}
.soeg-form-stor input:focus { border-color: var(--accent); }
.soeg-form-stor button {
  padding: .85rem 1.4rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
}
.ingen-resultater { text-align: center; padding: 3rem; color: var(--muted); }
.ingen-resultater p { font-size: 1.1rem; margin-top: .5rem; }

/* ── Anmod formular ────────────────────────────────────── */
.side-header { padding: 2rem 0; border-bottom: 1px solid var(--border); }
.side-header h1 { font-size: 1.8rem; font-weight: 800; }
.side-header p { color: var(--muted); margin-top: .3rem; }
.formular-sektion { padding: 2rem 0; }
.formular { max-width: 560px; }
.formular-gruppe { margin-bottom: 1.25rem; }
.formular-gruppe label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: .4rem;
}
.formular-gruppe input,
.formular-gruppe textarea,
.formular-gruppe select {
  width: 100%;
  padding: .75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color var(--transition);
  background: #fff;
}
.formular-gruppe input:focus,
.formular-gruppe textarea:focus,
.formular-gruppe select:focus {
  outline: none;
  border-color: var(--primary);
}
.formular-gruppe textarea { resize: vertical; min-height: 100px; }
.formular-gruppe small { display: block; font-size: .78rem; color: var(--muted); margin-top: .3rem; }
.btn-primær {
  padding: .8rem 2rem;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--transition);
}
.btn-primær:hover { background: var(--primary-light); }
.btn-accent {
  padding: .7rem 1.5rem;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background var(--transition);
}
.btn-accent:hover { background: var(--accent-h); }

/* ── Relaterede ────────────────────────────────────────── */
.relaterede-sektion { padding: 2rem 0 3rem; border-top: 1px solid var(--border); }
.relaterede-sektion h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 1rem; }

/* ── Footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--primary);
  color: rgba(255,255,255,.75);
  padding: 2.5rem 0 1rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-logo { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: .75rem; }
.site-footer ul li { margin-bottom: .3rem; }
.site-footer a { color: rgba(255,255,255,.65); font-size: .85rem; transition: color var(--transition); }
.site-footer a:hover { color: #fff; }
.footer-bund { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1rem; font-size: .8rem; }

/* ── Audio Player ──────────────────────────────────────── */
.afspiller {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--player-h);
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  z-index: 1000;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.afspiller.synlig { transform: translateY(0); }
.afspiller-billede {
  width: 52px;
  height: 52px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--primary-light);
}
.afspiller-billede img { width: 100%; height: 100%; object-fit: cover; }
.afspiller-info { min-width: 0; flex: 1; }
.afspiller-podcast-navn { font-size: .7rem; color: rgba(255,255,255,.55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afspiller-episode-titel { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.afspiller-kontroller {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}
.afspiller-kontroller button {
  color: rgba(255,255,255,.8);
  font-size: 1.1rem;
  padding: .3rem;
  transition: color var(--transition);
}
.afspiller-kontroller button:hover { color: #fff; }
.afspiller-play-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background var(--transition) !important;
}
.afspiller-play-btn:hover { background: var(--accent-h) !important; }
.afspiller-fremgang-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .75rem;
  color: rgba(255,255,255,.55);
  min-width: 0;
}
.afspiller-fremgang-bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 4px;
  cursor: pointer;
  position: relative;
}
.afspiller-fremgang-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  width: 0%;
  transition: width .1s linear;
}
.afspiller-luk {
  color: rgba(255,255,255,.4);
  font-size: .85rem;
  padding: .4rem;
  transition: color var(--transition);
  flex-shrink: 0;
}
.afspiller-luk:hover { color: #fff; }

/* ── Pagination / Load more ────────────────────────────── */
.vis-mere-wrap { text-align: center; padding: 1.5rem 0; }
.vis-mere-knap {
  padding: .7rem 2rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 600;
  transition: all var(--transition);
}
.vis-mere-knap:hover { background: var(--primary); color: #fff; }

/* ── Tom tilstand ──────────────────────────────────────── */
.tom-tilstand {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
}
.tom-tilstand .tom-ikon { font-size: 3rem; margin-bottom: 1rem; }
.tom-tilstand h3 { font-size: 1.2rem; margin-bottom: .5rem; color: var(--text); }

/* ── Responsivt ────────────────────────────────────────── */
@media (max-width: 768px) {
  .podcast-header-inner { flex-direction: column; }
  .podcast-header-billede { width: 140px; min-width: 140px; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .afsnit-rad { grid-template-columns: auto 1fr auto; }
  .afsnit-nr { display: none; }
  .afspiller-fremgang-wrap { display: none; }
  .genre-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .soeg-form { flex-direction: column; }
}

@media (max-width: 480px) {
  .podcast-grid { grid-template-columns: repeat(2, 1fr); gap: .75rem; }
  .afspiller-info { display: none; }
}
