/* ============================================================
   style.css – Hva skjer i byen min
   Moderne, lyst og mobilvennlig design
   ============================================================ */

/* ============================================================
   1. CSS-variabler (design tokens)
   ============================================================ */
:root {
  /* Primærfarger */
  --color-primary:      #2563eb;
  --color-primary-dk:   #1d4ed8;
  --color-primary-lt:   #dbeafe;
  --color-accent:       #f59e0b;
  --color-accent-dk:    #d97706;
  --color-accent-lt:    #fef3c7;

  /* Hero */
  --color-hero-bg:      #0f172a;
  --color-hero-mid:     #1e3a8a;

  /* Nøytrale */
  --color-bg:           #f1f5f9;
  --color-surface:      #ffffff;
  --color-border:       #e2e8f0;
  --color-border-dk:    #cbd5e1;
  --color-text:         #1e293b;
  --color-text-muted:   #64748b;
  --color-text-inv:     #ffffff;

  /* Kategorifarger */
  --color-familie:      #059669;
  --color-gratis:       #7c3aed;
  --color-konsert:      #db2777;
  --color-barn:         #ea580c;

  /* Dato-gruppe-headere */
  --color-group-idag:   #dc2626;
  --color-group-imorgen:#7c3aed;
  --color-group-uke:    #2563eb;
  --color-group-neste:  #059669;
  --color-group-senere: #64748b;

  /* Typografi */
  --font-sans:      "Segoe UI", system-ui, -apple-system, sans-serif;
  --line-height:    1.6;

  /* Layout */
  --radius:     0.875rem;
  --radius-sm:  0.4rem;
  --radius-lg:  1.25rem;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 16px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.05);
  --shadow-lg:  0 12px 32px rgba(0,0,0,.13), 0 4px 10px rgba(0,0,0,.06);
  --shadow-xl:  0 24px 48px rgba(0,0,0,.18);

  --max-width:  1200px;
  --gap:        1.25rem;
}

/* ============================================================
   2. Reset & Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Sikre at hidden-attributtet alltid fungerer uavhengig av display-regler */
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--color-primary); }
a:hover { color: var(--color-primary-dk); }

/* ============================================================
   3. Layout
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ============================================================
   4. HERO – mørk bakgrunn med gradient og søk integrert
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, var(--color-hero-bg) 0%, var(--color-hero-mid) 60%, #1d4ed8 100%);
  color: var(--color-text-inv);
  padding: 3rem 1.25rem 3.5rem;
  position: relative;
  overflow: hidden;
}

/* Subtilt mønster i bakgrunnen */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(99,102,241,.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(37,99,235,.3) 0%, transparent 50%);
  pointer-events: none;
}

.site-header .container { position: relative; z-index: 1; }

/* By-label over logoen */
.site-header__location {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
}

.site-header__logo {
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.site-header__logo span { color: #fbbf24; }

.site-header__tagline {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-bottom: 1.75rem;
  max-width: 480px;
}

/* Søkefelt embedded i hero */
.hero-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,.97);
  border-radius: 999px;
  padding: 0.6rem 0.75rem 0.6rem 1.1rem;
  max-width: 580px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.15);
  transition: box-shadow 0.2s;
}

.hero-search:focus-within {
  box-shadow: 0 8px 32px rgba(0,0,0,.3), 0 0 0 3px rgba(96,165,250,.5);
}

.hero-search__icon { font-size: 1.15rem; flex-shrink: 0; }

.hero-search input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--color-text);
  outline: none;
}
.hero-search input::placeholder { color: var(--color-text-muted); }

/* Tøm-knapp */
#search-clear {
  background: #f1f5f9;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  line-height: 1;
  transition: background 0.15s;
  flex-shrink: 0;
}
#search-clear:hover { background: var(--color-border-dk); }

/* Stats-rad under søk */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  margin-top: 1.5rem;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.hero-stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: #fbbf24;
}

.hero-stat__label {
  font-size: 0.78rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Byvelger */
.city-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.city-pill {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(4px);
  font-family: var(--font-sans);
}

.city-pill:hover,
.city-pill--active {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.5);
}

.city-pill--active {
  background: #fff;
  color: var(--color-hero-bg);
  font-weight: 700;
}

.city-pill--locate {
  border-style: dashed;
  opacity: .85;
}
.city-pill--locate:hover {
  opacity: 1;
}
.city-pill--locate:disabled {
  opacity: .5;
  cursor: wait;
}

.city-pill--nearby {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, .22);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, .4);
  font-weight: 600;
}

.locate-notice {
  font-size: .78rem;
  color: rgba(255,255,255,.7);
  margin-top: .6rem;
  text-align: center;
}
.locate-notice__link {
  color: rgba(255,255,255,.9);
  text-decoration: underline;
}

/* ============================================================
   5. FEATURED EVENT – fremhevet arrangement
   ============================================================ */
.featured-section {
  padding: 0 1.25rem;
  margin-top: -1.5rem; /* Overlapper hero nedkant */
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-xl);
  background: var(--color-hero-bg);
  text-decoration: none;
  color: #fff;
}

/* Bakgrunnsbilde */
.featured-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.featured-card:hover .featured-card__bg { transform: scale(1.03); }

/* Gradient-overlay */
.featured-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.4) 50%,
    rgba(0,0,0,.1) 100%
  );
}

/* Innhold */
.featured-card__content {
  position: relative;
  z-index: 1;
  padding: 1.75rem 2rem;
  width: 100%;
}

.featured-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.featured-card__title {
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.6rem;
  text-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.featured-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

.featured-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ============================================================
   6. ANNONSE-PLASSER
   ============================================================ */
.ad-wrap { padding: 1rem 0; }

.ad-slot {
  background: var(--color-surface);
  border: 2px dashed var(--color-border-dk);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.2rem;
}

.ad-slot__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.55;
}

.ad-slot--leaderboard { max-width: 728px; margin: 0 auto; min-height: 90px; }
.ad-slot--rectangle   { width: 300px; height: 250px; margin: 0 auto; }

/* ============================================================
   7. FILTER-SEKSJON
   ============================================================ */
.filter-section {
  padding: 1.25rem 0 0.75rem;
}

.filter-section__title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: 999px;
  padding: 0.45rem 1.05rem;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  font-weight: 500;
  cursor: pointer;
  color: var(--color-text);
  transition: all 0.18s;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(37,99,235,.12);
}

.filter-btn--active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(37,99,235,.35);
}
.filter-btn--active:hover {
  background: var(--color-primary-dk);
  border-color: var(--color-primary-dk);
  color: #fff;
}

#reset-filters {
  background: none;
  border: 2px solid var(--color-border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--color-text-muted);
  font-family: var(--font-sans);
  transition: all 0.18s;
  margin-top: 0.6rem;
}
#reset-filters:hover {
  border-color: var(--color-text-muted);
  color: var(--color-text);
}

/* ============================================================
   8. AFFILIATE-SEKSJON
   ============================================================ */
.affiliate-section {
  background: linear-gradient(135deg, var(--color-accent-lt), #fffbeb);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.affiliate-section__title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-accent-dk);
  margin-bottom: 0.85rem;
}

.affiliate-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.affiliate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.18s;
  box-shadow: var(--shadow-sm);
}
.affiliate-link:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.25);
}

/* ============================================================
   9. RESULTATER-HEADER
   ============================================================ */
.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 0.5rem;
  flex-wrap: wrap;
}

.results-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.results-header__count {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* ============================================================
   10. DATO-GRUPPER
   ============================================================ */
.date-group {
  margin-bottom: 2rem;
}

.date-group__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-border);
}

.date-group__label {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  color: #fff;
}

/* Fargekoding per tidsgruppe */
.date-group--idag   .date-group__label { background: var(--color-group-idag); }
.date-group--imorgen .date-group__label { background: var(--color-group-imorgen); }
.date-group--uke    .date-group__label { background: var(--color-group-uke); }
.date-group--neste  .date-group__label { background: var(--color-group-neste); }
.date-group--senere .date-group__label { background: var(--color-group-senere); }

.date-group__count {
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

/* Grid per gruppe */
.date-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}

/* ============================================================
   11. ARRANGEMENTKORT
   ============================================================ */
.event-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Sponset: gull-ramme */
.event-card--sponsored {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent), var(--shadow-md);
}

/* Bildetopp */
.event-card__image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.event-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.event-card:hover .event-card__image img { transform: scale(1.05); }

/* Emoji-fallback når det ikke er bilde */
.event-card__emoji-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  line-height: 1;
}

/* Sponset-badge over bildet */
.sponsored-label {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

/* Kortinnhold */
.event-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1;
}

.event-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.event-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.83rem;
  color: var(--color-text-muted);
  line-height: 1.35;
}

/* Trunkert beskrivelse */
.event-card__desc {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Kategori-badges */
.event-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.badge--familie { background: var(--color-familie); }
.badge--gratis  { background: var(--color-gratis); }
.badge--konsert { background: var(--color-konsert); }
.badge--barn    { background: var(--color-barn); }

/* Kortets handlingsfelt */
.event-card__actions {
  margin-top: auto;
  padding-top: 0.2rem;
}

/* ============================================================
   12. KNAPPER
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.18s;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-primary-dk);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(37,99,235,.35);
}

.btn--outline-white {
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.6);
  color: #fff;
  backdrop-filter: blur(4px);
}
.btn--outline-white:hover {
  background: rgba(255,255,255,.25);
  color: #fff;
  transform: translateY(-1px);
}

.btn--free {
  background: #dcfce7;
  color: #15803d;
  cursor: default;
  font-weight: 600;
}

/* ============================================================
   13. TOM TILSTAND
   ============================================================ */
.no-results {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--color-text-muted);
}
.no-results__emoji { font-size: 3rem; margin-bottom: 1rem; }
.no-results h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--color-text); }

/* ============================================================
   14. LASTE-INDIKATOR
   ============================================================ */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
  color: var(--color-text-muted);
}

.loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   15. FOOTER
   ============================================================ */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 3rem;
}

.site-footer a { color: #60a5fa; text-decoration: none; }
.site-footer a:hover { color: #93c5fd; text-decoration: underline; }

.site-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.25rem;
}

.site-footer__copy { opacity: 0.6; font-size: 0.82rem; }

.site-footer__privacy {
  font-size: 0.78rem;
  opacity: 0.55;
  margin-top: 0.75rem;
  max-width: 680px;
  line-height: 1.5;
}

/* ============================================================
   16. STARTSIDE (ingen by valgt)
   ============================================================ */
.start-state {
  padding: 2rem 1.25rem 3rem;
  display: flex;
  justify-content: center;
}

.start-state__card {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 2.5rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.start-state__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.start-state__title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-hero-bg);
  margin-bottom: 0.75rem;
}

.start-state__text {
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.start-state__hint {
  font-size: 0.9rem;
  color: #94a3b8;
  font-style: italic;
}

.site-header__logo-highlight { color: #fbbf24; }

/* ============================================================
   17. RESPONSIVT DESIGN
   ============================================================ */
@media (max-width: 768px) {
  .site-header { padding: 2.25rem 1rem 3rem; }
  .site-header__logo { font-size: 1.6rem; }

  /* Horisontal scroll for event-kort på mobil */
  .date-group__grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }

  .featured-card { min-height: 200px; }
  .featured-card__content { padding: 1.25rem 1.25rem; }
  .featured-card__title { font-size: 1.3rem; }

  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }

  .hero-stats { gap: 0.75rem 1.25rem; }
  .hero-stat__value { font-size: 1.25rem; }
}

@media (max-width: 480px) {
  .filter-btn { padding: 0.4rem 0.8rem; font-size: 0.82rem; }

  .date-group__grid {
    grid-template-columns: 1fr;
  }

  .btn { padding: 0.55rem 1rem; font-size: 0.84rem; }
  .featured-card__actions { flex-direction: column; }
  .featured-card__actions .btn { justify-content: center; }
}

/* ============================================================
   17. TILGJENGELIGHET
   ============================================================ */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}

.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;
}

/* ============================================================
   18. SKELETON LOADING
   ============================================================ */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
  padding: 1.5rem 0;
}

.skeleton-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border) 25%,
    var(--color-border-dk) 50%,
    var(--color-border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--image      { aspect-ratio: 3 / 2; border-radius: 0; width: 100%; }
.skeleton--title      { height: 1.3rem; width: 80%; }
.skeleton--line       { height: 0.82rem; width: 100%; }
.skeleton--line-short { width: 60%; }

.skeleton-card__body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* ============================================================
   19. STICKY BY-BAR
   ============================================================ */
.sticky-city-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: #fff;
  padding: 0.6rem 1.25rem;
  transform: translateY(-110%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-city-bar--visible {
  transform: translateY(0);
}

.sticky-city-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.sticky-city-bar__label {
  font-size: 0.9rem;
  opacity: 0.9;
}

.sticky-city-bar__change {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: #fff;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  padding: 0.28rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.sticky-city-bar__change:hover { background: rgba(255,255,255,.28); }

/* ============================================================
   20. BY-PILL COUNT BADGE
   ============================================================ */
.city-pill__count {
  display: inline-block;
  background: rgba(255,255,255,.22);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.05rem 0.42rem;
  margin-left: 0.25rem;
  vertical-align: middle;
  line-height: 1.5;
}

.city-pill--active .city-pill__count {
  background: rgba(0,0,0,.15);
}

/* ============================================================
   21. KALENDER-KNAPP
   ============================================================ */
.btn--calendar {
  background: var(--color-surface);
  border: 1.5px solid var(--color-border-dk);
  color: var(--color-text-muted);
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
}
.btn--calendar:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.event-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.2rem;
}

/* ============================================================
   22. HELGE-GRUPPE
   ============================================================ */
.date-group--helgen .date-group__label {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  padding: 0.3rem 1rem;
}

.date-group--helgen .date-group__header {
  border-bottom-color: #fde68a;
}

/* ============================================================
   23. DARK MODE
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:           #0f172a;
    --color-surface:      #1e293b;
    --color-border:       #334155;
    --color-border-dk:    #475569;
    --color-text:         #f1f5f9;
    --color-text-muted:   #94a3b8;
    --color-primary-lt:   #1e3a8a;
    --color-accent-lt:    #1c1400;
  }

  /* Søkefelt */
  .hero-search {
    background: rgba(30, 41, 59, 0.97);
  }
  .hero-search input { color: var(--color-text); }
  #search-clear {
    background: #334155;
    color: #94a3b8;
  }
  #search-clear:hover { background: #475569; }

  /* Startsidekort */
  .start-state__card { background: var(--color-surface); }
  .start-state__title { color: var(--color-text); }
  .start-state__text  { color: var(--color-text-muted); }

  /* Affiliate */
  .affiliate-section {
    background: linear-gradient(135deg, #1c1a0a, #1a1500);
    border-color: #78350f;
  }
  .affiliate-link {
    background: #1e293b;
    border-color: #78350f;
    color: var(--color-text);
  }

  /* Filtere */
  .filter-btn {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text);
    box-shadow: none;
  }
  #reset-filters {
    border-color: var(--color-border);
    color: var(--color-text-muted);
  }

  /* Annonse-plasser */
  .ad-slot {
    background: var(--color-surface);
    border-color: var(--color-border);
  }

  /* Event-kort */
  .event-card__image {
    background: linear-gradient(135deg, #1e293b, #0f172a);
  }
  .btn--calendar {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-text-muted);
  }

  /* Skeleton */
  .skeleton-card { background: var(--color-surface); }

  /* Sticky bar – mørk modus er allerede mørk, men juster border */
  .sticky-city-bar {
    border-bottom-color: rgba(255,255,255,.06);
  }
}
