/* ═══════════════════════════════════════════════════════════════
   components.css  —  Wiederverwendbare UI-Komponenten
   naechster-feiertag.de
   ───────────────────────────────────────────────────────────────
   Enthält alle Komponenten, die auf mehreren Seiten genutzt werden:
   Navigation, Footer, Buttons, Cards, Badges, Formulare,
   Feiertags-Tabelle, Cookie-Banner, AdSense-Slots.
═══════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(247, 250, 251, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--s8);
}

.nav-inner {
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}

/* Logo */
.nav-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--primary);
  white-space: nowrap;
  transition: color 0.15s;
}
.nav-logo:hover { color: var(--primary-dark); }

/* Desktop Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sec);
  transition: all 0.15s;
  cursor: pointer;
}
.nav-link:hover  { background: var(--primary-tint); color: var(--primary); }
.nav-link.active { background: var(--primary-tint); color: var(--primary); }

/* Bundesland-Schnellwahl */
.nav-select {
  padding: 6px 30px 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A98A1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 0.15s;
}
.nav-select:focus { border-color: var(--teal-500); }

/* Hamburger (Mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;   /* ≥44 px Touch-Target */
  cursor: pointer;
  background: none;     /* Reset für <button>-Element */
  border: none;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile-Dropdown-Menü */
.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--s4) var(--s6);
  flex-direction: column;
  gap: var(--s2);
  z-index: 99;
  box-shadow: var(--sh-md);
}
.nav-mobile.open    { display: flex; }
.nav-mobile .nav-link { padding: 12px 14px; }  /* ≥44 px Touch-Target */


/* ─────────────────────────────────────────────────────────────
   SEITENCONTAINER
───────────────────────────────────────────────────────────── */
.page-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--s12) var(--s8) var(--s20);
}


/* ─────────────────────────────────────────────────────────────
   TYPOGRAFIE-HELFER
───────────────────────────────────────────────────────────── */
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-sec);   /* war --text-muted: 2,84:1 → jetzt ~7,6:1 */
  margin-bottom: var(--s3);
}

.section-heading {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--text);
  line-height: 1.15;
  margin-bottom: var(--s8);
}
.section-heading em { color: var(--primary); font-style: italic; }

.divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: var(--s12) 0;
}


/* ─────────────────────────────────────────────────────────────
   BADGES
───────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

/* Varianten */
.badge-teal    { background: var(--primary-tint); color: var(--teal-900); border: 1px solid var(--teal-100); }
.badge-dark    { background: var(--teal-900); color: var(--white); }
.badge-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--teal-300); }
.badge-neutral { background: var(--slate-100); color: var(--text-sec); }
.badge-cyan    { background: rgba(0, 194, 212, 0.10); color: var(--cyan-accessible); border: 1px solid rgba(0, 194, 212, 0.20); }

/* Pulsierender Punkt (z.B. Live-Anzeige) */
.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s ease infinite;
}


/* ─────────────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
  font-family: var(--sans);
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
}

/* Primär: Solid */
.btn-solid {
  background: var(--primary);
  color: var(--white);
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  box-shadow: 0 1px 3px rgba(13, 31, 38, 0.15),
              inset 0 1px 0 rgba(255, 255, 255, 0.10);
}
.btn-solid:hover  { background: var(--primary-dark); box-shadow: var(--sh-teal); transform: translateY(-1px); }
.btn-solid:active { transform: translateY(0); }

/* Sekundär: Tonal */
.btn-tonal {
  background: var(--primary-tint);
  color: var(--teal-900);
  padding: 10px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  border: 1px solid var(--teal-100);
}
.btn-tonal:hover { background: var(--teal-100); border-color: var(--teal-300); }

/* Tertiär: Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  padding: 9px 22px;
  border-radius: var(--r-md);
  font-size: 14px;
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--teal-300); color: var(--primary); }

/* Größen-Modifier */
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 13px 28px; font-size: 16px; }

/* Volle Breite */
.btn-full { width: 100%; }


/* ─────────────────────────────────────────────────────────────
   CARDS
───────────────────────────────────────────────────────────── */
.card {
  border-radius: var(--r-xl);
  padding: var(--s6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); }

/* Varianten */
.card-flat   { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.card-flat:hover  { box-shadow: var(--sh-md); }

.card-tonal  { background: var(--primary-tint); border: 1px solid var(--teal-100); }
.card-tonal:hover { box-shadow: var(--sh-teal); }

.card-dark   { background: var(--teal-900); border: 1px solid rgba(255,255,255,0.06); }
.card-dark:hover  { box-shadow: var(--sh-teal); }

/* Card-Inhalte */
.card-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--s3);
}
.card-dark .card-label { color: rgba(255,255,255,0.30); }

.card-number {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--primary);
  margin-bottom: var(--s2);
  font-variant-numeric: tabular-nums;
}
.card-tonal .card-number { color: var(--teal-900); }
.card-dark  .card-number { color: var(--white); }

.card-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.3;
}
.card-dark .card-title { color: rgba(255,255,255,0.85); }

.card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: var(--s1);
}
.card-dark .card-sub { color: rgba(255,255,255,0.30); }


/* ─────────────────────────────────────────────────────────────
   FORMULAR-ELEMENTE
───────────────────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.field label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field select,
.field input {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237A98A1'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.field select:focus,
.field input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(27, 143, 166, 0.12);
}

/* Filter-Zeile: mehrere Felder nebeneinander */
.filter-bar {
  display: flex;
  gap: var(--s4);
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: var(--s8);
}
.filter-bar .field { min-width: 180px; }

/* Tab Bar */
.tab-bar {
  display: flex;
  gap: 2px;
  background: var(--slate-100);
  padding: 3px;
  border-radius: var(--r-md);
  width: fit-content;
  margin-bottom: var(--s6);
}

.tab {
  padding: 7px 16px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: transparent;
  font-family: var(--sans);
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: var(--sh-xs); }


/* ─────────────────────────────────────────────────────────────
   FEIERTAGS-TABELLE  (genutzt auf: feiertage.html)
───────────────────────────────────────────────────────────── */
.holiday-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.ht-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  padding: var(--s4) var(--s6);
  gap: var(--s4);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.15s;
  cursor: default;
}
.ht-row:last-child { border-bottom: none; }
.ht-row:hover      { background: var(--primary-tint); }

/* Nächster Feiertag: hervorgehoben */
.ht-row.ht-next {
  background: var(--teal-100);  /* stärker als hover-tint → klar unterscheidbar */
}

.ht-date       { display: flex; flex-direction: column; align-items: center; }
.ht-day        { font-size: 1.5rem; font-weight: 800; color: var(--primary); letter-spacing: -0.03em; line-height: 1; }
.ht-mon        { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-top: 2px; }
.ht-name       { font-size: 14px; font-weight: 600; }
.ht-meta       { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.ht-badge-soon {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--primary-tint);
  color: var(--teal-700);
  border: 1px solid var(--teal-100);
  white-space: nowrap;
}
.ht-badge-later {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--slate-100);
  color: var(--text-sec);   /* war --text-muted: 2,60:1 → jetzt ~6,9:1 */
  white-space: nowrap;
}

/* Leer-Zustand (kein Datensatz für dieses Jahr) */
.ht-empty {
  padding: var(--s12);
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}


/* ─────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.50);
  padding: var(--s12) var(--s8);
  margin-top: var(--s20);
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--s12);
}

.footer-brand {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--teal-300);
  margin-bottom: var(--s4);
}

.footer-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--on-dark-sec);   /* war 0.35: ~2,5:1 → jetzt ~9,6:1 */
}

.footer-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-muted);  /* war 0.25: ~1,8:1 → jetzt ~6,2:1 */
  margin-bottom: var(--s4);
}

.footer-links { display: flex; flex-direction: column; gap: var(--s2); }

.footer-link {
  font-size: 13px;
  color: var(--on-dark-sec);   /* war 0.40: ~4,3:1 → jetzt ~9,6:1 */
  transition: color 0.15s;
  cursor: pointer;
}

/* Reset für <button>-Elemente mit footer-link-Klasse */
button.footer-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--sans);
  text-align: left;
}
.footer-link:hover { color: var(--teal-300); }

.footer-bottom {
  max-width: var(--max-w);
  margin: var(--s8) auto 0;
  padding-top: var(--s6);
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--on-dark-muted);  /* war 0.20: ~1,8:1 → jetzt ~6,2:1 */
}


/* ─────────────────────────────────────────────────────────────
   COOKIE BANNER
───────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: var(--s6);
  left: var(--s6);
  right: var(--s6);
  max-width: 520px;
  background: var(--ink);
  color: rgba(255,255,255,0.80);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s8);
  box-shadow: var(--sh-lg);
  z-index: 999;
  animation: fadeUp 0.4s ease both;
  display: none;
}
.cookie-banner.visible { display: block; }

.cookie-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--s2);
}

.cookie-text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  margin-bottom: var(--s5);
}
.cookie-text a {
  color: var(--teal-300);
  text-decoration: underline;
  cursor: pointer;
}

.cookie-actions { display: flex; gap: var(--s3); }

.cookie-accept {
  background: var(--cyan);
  color: var(--teal-900);
  padding: 12px 20px;   /* ≥44 px Touch-Target */
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.cookie-accept:hover { opacity: 0.9; }

.cookie-decline {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.60);
  padding: 12px 20px;   /* ≥44 px Touch-Target */
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.cookie-decline:hover { background: rgba(255,255,255,0.12); }


/* ─────────────────────────────────────────────────────────────
   ADSENSE PLATZHALTER
   → Werden nach AdSense-Genehmigung durch echte Anzeigen ersetzt
───────────────────────────────────────────────────────────── */
.ad-slot {
  background: var(--slate-100);
  border: 1px dashed var(--slate-200);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.ad-slot-banner { height: 90px;  width: 100%; margin: var(--s8) 0; }
.ad-slot-rect   { height: 250px; width: 100%; margin: var(--s8) 0; }


/* ─────────────────────────────────────────────────────────────
   LEGAL PAGES (Impressum, Datenschutz)
───────────────────────────────────────────────────────────── */
.legal-content     { max-width: 680px; }

.legal-content h1  {
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  color: var(--text);
  margin-bottom: var(--s8);
}

.legal-content h2  {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: var(--s8) 0 var(--s3);
}

.legal-content p   {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.8;
  margin-bottom: var(--s4);
}

.legal-content a   {
  color: var(--primary);
  text-decoration: underline;
}

.legal-note {
  margin-top: var(--s8);
  font-size: 13px;
  color: var(--text-sec);        /* war --text-muted */
  background: var(--primary-tint);
  border-radius: var(--r-md);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--teal-100); /* keine Side-stripe mehr */
}


/* ─────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .page-inner    { padding: var(--s8) var(--s5) var(--s16); }
  .nav-links     { display: none; }
  .nav-select    { display: none; }
  .nav-burger    { display: flex; }
  .footer-inner  { grid-template-columns: 1fr; gap: var(--s8); }
  .footer-bottom { flex-direction: column; gap: var(--s3); text-align: center; }
  .ht-row        { grid-template-columns: 50px 1fr auto; padding: var(--s3) var(--s4); }
  .cookie-banner { left: var(--s3); right: var(--s3); bottom: var(--s3); }
  .filter-bar    { flex-direction: column; }
  .filter-bar .field { width: 100%; }
}


/* ─────────────────────────────────────────────────────────────
   SKIP-LINK (Barrierefreiheit)
───────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--s4);
  z-index: 9999;
  background: var(--primary);
  color: var(--white);
  padding: var(--s2) var(--s5);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: var(--s2);
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
}


/* ─────────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .anim-up, .anim-up-2, .anim-up-3, .anim-up-4 { animation: none; }
  .cw-progress-fill  { transition: none; }
  .btn, .card, .state-card, .nav-logo, .nav-link,
  .nav-burger span, .footer-link, .cookie-banner { transition: none; }
}
