
/* === schulferien.fun – Stylesheet v2 === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #1d4ed8;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #f97316;
  --accent-dark: #ea580c;
  --success: #10b981;
  --text: #111827;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg: #f1f5f9;
  --white: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.site-logo {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo:hover { text-decoration: none; }
.site-logo-icon {
  background: var(--primary);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
}
.main-nav { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.main-nav a {
  color: var(--text-light);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}
.main-nav a:hover, .main-nav a.active {
  background: #eff6ff;
  color: var(--primary);
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--border-light); }

/* ── Ads ── */
.top-ad { background: var(--white); border-bottom: 1px solid var(--border); padding: 8px 0; text-align: center; }
.ad-section, .content-ad { margin: 24px 0; text-align: center; }
.adsbygoogle { display: block; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a8a 60%, #1e40af 100%);
  color: white;
  padding: 56px 0;
  margin: 24px 0;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}
.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}
.hero-sub {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.hero-search {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-search label { font-weight: 600; }
.hero-search select {
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1rem;
  background: white;
  color: var(--text);
  min-width: 220px;
  font-family: inherit;
  box-shadow: var(--shadow);
}
.hero-search button {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1rem;
  background: var(--accent);
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, transform 0.1s;
  box-shadow: var(--shadow);
}
.hero-search button:hover { background: var(--accent-dark); transform: translateY(-1px); }

/* ── State Grid ── */
.state-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin: 16px 0;
}
.state-hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
}
.state-hero-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  text-decoration: none;
}
.state-name { font-weight: 600; font-size: 0.9rem; }
.badge {
  font-size: 0.75rem;
  color: var(--text-light);
  border-radius: 6px;
  padding: 3px 8px;
  background: var(--bg);
  line-height: 1.4;
}

.state-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
/* ── Nächste Ferien Widget ── */
.next-ferien-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 20px 0;
}
.next-ferien-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.next-ferien-header h2 { margin: 0; font-size: 1.1rem; }
.next-ferien-header select {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  background: var(--bg);
  cursor: pointer;
}
.nf-cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.nf-card {
  flex: 1;
  min-width: 180px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border-left: 4px solid #ccc;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nf-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); text-decoration: none; }
.nf-card .nf-type { font-weight: 600; font-size: .95rem; margin-bottom: 4px; }
.nf-card .nf-dates { font-size: .82rem; color: var(--text-muted); margin-bottom: 6px; }
.nf-card .nf-countdown { font-size: .8rem; font-weight: 600; }
.nf-card .nf-countdown.soon { color: #dc2626; }
.nf-card .nf-countdown.near { color: #d97706; }
.nf-card .nf-countdown.later { color: #16a34a; }
.nf-placeholder { color: var(--text-muted); font-size: .9rem; padding: 8px 0; }

.state-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}
.state-card:hover { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }
.state-card.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Year Cards ── */
.year-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.year-card {
  background: var(--white);
  border: 2px solid var(--border);
  color: var(--primary);
  text-align: center;
  padding: 24px;
  border-radius: var(--radius);
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.2s;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}
.year-card:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.year-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.year-tab {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 8px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.15s;
}
.year-tab.active, .year-tab:hover { background: var(--primary); color: white; border-color: var(--primary); text-decoration: none; }

/* ── Tables ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 16px 0;
  border: 1px solid var(--border);
}
.table-scroll { overflow-x: scroll; }
.holiday-table { width: 100%; border-collapse: collapse; background: white; font-size: 0.875rem; }
.holiday-table th {
  background: var(--primary);
  color: white;
  padding: 14px 18px;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.holiday-table td { padding: 12px 18px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.holiday-table tr:last-child td { border-bottom: none; }
.holiday-table tbody tr:nth-child(even) td { background: #f8fafc; }
.holiday-table tbody tr:hover td { background: #eff6ff; }
.period {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.82rem;
  white-space: nowrap;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 500;
}
.period-cell small { color: var(--text-muted); font-size: 0.75rem; display: block; margin-top: 2px; }
.ftype-label { display: inline-block; padding: 4px 10px; font-weight: 500; }
.no-ferien { color: var(--text-muted); text-align: center; padding: 24px; }

/* ── Sidebar Layout ── */
.sidebar-layout { display: grid; grid-template-columns: 1fr 280px; gap: 24px; margin: 16px 0; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.sidebar-widget h3 { margin-bottom: 12px; font-size: 0.95rem; color: var(--text); }

/* ── Upcoming ── */
.upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.upcoming-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow 0.15s;
}
.upcoming-card:hover { box-shadow: var(--shadow); }
.upcoming-type { font-weight: 600; font-size: 0.9rem; }
.upcoming-dates { font-size: 0.82rem; color: var(--text-light); margin: 4px 0; }
.upcoming-badge {
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-block;
}

/* ── Calc Widget ── */
.calc-widget, .download-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}
.calc-controls { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-weight: 600; font-size: 0.85rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.3px; }
.form-group select {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  min-width: 180px;
  font-family: inherit;
  color: var(--text);
  background: white;
  transition: border-color 0.15s;
}
.form-group select:focus { outline: none; border-color: var(--primary-light); }

/* ── Buttons ── */
.btn-primary {
  background: var(--primary);
  color: white;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-secondary:hover { background: #eff6ff; }
.btn-link { display: inline-block; color: var(--primary); font-weight: 600; }

/* ── ICS Section ── */
.ics-section {
  background: linear-gradient(135deg, #eff6ff 0%, #e0f2fe 100%);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}
.ics-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.ics-controls select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
}
.hint { font-size: 0.82rem; color: var(--text-light); margin-top: 8px; }

/* ── FAQ ── */
.faq-section { margin: 24px 0; }
.faq-section details {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 8px 0;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.faq-section details:hover { box-shadow: var(--shadow-sm); }
.faq-section summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-section summary::after { content: "+"; font-size: 1.3rem; color: var(--primary); font-weight: 400; }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details[open] summary { color: var(--primary); }
.faq-section details p { padding: 0 20px 16px; color: var(--text-light); font-size: 0.9rem; line-height: 1.7; }

/* ── Brückentage ── */
.bt-result { margin-top: 20px; }
.bt-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 12px; }
.bt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s;
}
.bt-card:hover { box-shadow: var(--shadow); }
.bt-tipp {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 8px;
}

/* ── Features ── */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 16px 0; }
.feature {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
}
.feature:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.info-section { margin: 32px 0; }
.info-section h2 { margin-bottom: 12px; }

/* ── How-to ── */
.how-to-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.how-to {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.how-to h3 { margin-bottom: 10px; font-size: 1rem; }
.how-to ol { padding-left: 18px; }
.how-to li { margin: 6px 0; font-size: 0.875rem; color: var(--text-light); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.82rem; color: var(--text-muted); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-light); }
.breadcrumb a:hover { color: var(--primary); text-decoration: none; }
.breadcrumb span { color: var(--text-muted); }

/* ── Intro ── */
.intro { font-size: 1rem; color: var(--text-light); margin: 8px 0 24px; max-width: 700px; line-height: 1.7; }

/* ── Sections ── */
section { margin: 28px 0; }
h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.3px; }
h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; color: var(--text); }
h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }

/* ── Chips / Tags ── */
.chip {
  display: inline-block;
  background: #eff6ff;
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}


/* ── Language Switch ──────────────────────────────────────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.lang-switch:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--primary);
  color: var(--primary);
}
/* ── Footer ── */
.site-footer {
  background: #0f172a;
  color: #64748b;
  margin-top: 64px;
  padding: 48px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer a { color: #64748b; font-size: 0.85rem; display: block; margin: 4px 0; transition: color 0.15s; }
.site-footer a:hover { color: #e2e8f0; text-decoration: none; }
.site-footer strong { color: #e2e8f0; display: block; margin-bottom: 12px; font-size: 0.875rem; letter-spacing: 0.3px; text-transform: uppercase; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  font-size: 0.8rem;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-bottom a { color: #64748b; }


/* ── Dropdown Nav ── */
.nav-dropdown { position: relative; display: inline-block; }
.nav-dropdown-btn {
  background: none;
  border: none;
  color: var(--text-light);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.nav-dropdown-btn:hover,
.nav-dropdown.nav-active .nav-dropdown-btn {
  background: #eff6ff;
  color: var(--primary);
}
.nav-dropdown-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: -20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 200;
  padding: 6px;
  margin-top: 4px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block !important; }
.nav-dropdown-menu a {
  display: block;
  padding: 5px 10px;
  color: var(--text);
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
  text-decoration: none;
}
.nav-dropdown-menu a:hover { background: #eff6ff; color: var(--primary); text-decoration: none; }
.nav-dropdown-menu a + a { margin-top: 1px; }

/* Mega-Menu */
.mega-menu { display: flex; gap: 0; }
.mega-col {
  min-width: 140px;
  padding: 4px 12px;
  border-right: 1px solid var(--border);
}
.mega-col a { white-space: nowrap; }
.mega-col:last-child { border-right: none; }
.mega-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 4px 10px 3px;
  pointer-events: none;
}

@media (max-width: 600px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-btn { width: 100%; text-align: left; padding: 12px 16px; font-size: 1rem; color: var(--text); }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; border-left: 3px solid var(--border); margin-left: 16px; border-radius: 0; padding: 4px 0; }
  .nav-dropdown:hover .nav-dropdown-menu { display: none; }
  .nav-dropdown.open .nav-dropdown-menu { display: block; }
}


/* ── Feriendichte ── */
.density-widget-section { margin: 32px 0; }
.heatmap-widget-wrap { position: relative; overflow-x: auto; padding: 4px 0; }
.heatmap-outer { position: relative; overflow-x: auto; padding: 4px 0; }
.hm-tooltip {
  display: none; position: fixed; z-index: 999;
  background: #1f2937; color: #fff; font-size: .82rem;
  padding: 6px 10px; border-radius: 6px; pointer-events: none;
  white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.heatmap-legend { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.legend-swatch { width: 14px; height: 14px; border-radius: 3px; }
.legend-label { font-size: .8rem; color: var(--text-muted); }
.legend-item { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.legend-item span { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }

/* ── Schuljahr-Tabelle ── */
/* ── Jahreskalender ── */
.kalender-preview {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 16px 0;
}
.kal-controls { margin-bottom: 16px; }
.kal-ctrl-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.kal-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; padding-bottom: 2px; }
.kal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-muted);
}
.kal-leg-item { display: flex; align-items: center; gap: 4px; }
.kal-leg-dot { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.kal-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 12px; display: none; }
.print-only { display: none; }
.kal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 900px) { .kal-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .kal-grid { grid-template-columns: repeat(2, 1fr); } }
.kal-month { font-size: .75rem; }
.kal-month-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 3px;
  margin-bottom: 4px;
}
.kal-table { width: 100%; border-collapse: collapse; }
.kal-table th {
  font-size: .65rem;
  font-weight: 600;
  text-align: center;
  padding: 2px 1px;
  color: var(--text-muted);
  background: var(--bg);
}
.kal-table th.we { color: #9ca3af; }
.kw-th { color: #c4b5fd !important; font-size: .6rem !important; }
.kal-table td {
  text-align: center;
  padding: 1px;
  font-size: .72rem;
  vertical-align: top;
  position: relative;
  min-width: 18px;
}
.kal-kw {
  font-size: .6rem;
  color: #c4b5fd;
  text-align: right;
  padding-right: 2px;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.kal-we .kal-day-num { color: #9ca3af; }
.kal-ft .kal-day-num { font-weight: 700; color: #92400e; }
.kal-ft-name {
  display: block;
  font-size: .55rem;
  line-height: 1.1;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 36px;
}
.kal-day-num { display: block; line-height: 1.4; }
.kal-leg-hint {
  font-size: .75rem;
  color: var(--text-muted);
  font-style: italic;
  cursor: help;
  margin-left: 4px;
}

.sj-legend {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin: 12px 0 4px; font-size: .82rem; color: var(--text-muted);
}
.sj-legend-item { display: flex; align-items: center; gap: 5px; }
.sj-legend-dot {
  width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0;
}

.schuljahr-wrap { overflow-x: auto; }
.schuljahr-table { min-width: 900px; font-size: .82rem; }
.schuljahr-table .year-group-header {
  background: var(--primary); color: #fff;
  text-align: center; padding: 6px 8px; font-size: .85rem;
}
.schuljahr-table .year-group-2 { background: #1e40af; }
.schuljahr-table .ft-col {
  background: #f8faff; font-size: .78rem; font-weight: 600;
  text-align: center; padding: 5px 4px; white-space: nowrap;
}
.schuljahr-table .bl-name { font-weight: 600; white-space: nowrap; padding: 6px 10px; }
.schuljahr-table .bl-name a { color: var(--primary); text-decoration: none; }
.schuljahr-table .bl-name a:hover { text-decoration: underline; }
.sj-cell { text-align: center; padding: 4px 6px; vertical-align: middle; }
.sj-period {
  display: inline-block; font-size: .78rem; padding: 2px 5px;
  border-radius: 3px; background: #f0f4ff;
  white-space: nowrap;
}
.schuljahr-table .no-ferien { color: #9ca3af; text-align: center; }
.info-box {
  background: #fef3c7; border: 1px solid #f59e0b; border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 16px; font-size: .9rem;
}
.density-legend { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.tip-card { display: flex; gap: 12px; align-items: flex-start; background: var(--bg-subtle); padding: 14px; border-radius: var(--radius); }
.tip-icon { font-size: 1.5rem; flex-shrink: 0; }
.checkbox-group { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.checkbox-group label { display: flex; align-items: center; gap: 6px; font-size: .9rem; cursor: pointer; }
.dl-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ── Print ── */
@media print {
  .site-header, .site-footer, .top-ad, .ad-section, .content-ad, .sidebar, .hero-search { display: none !important; }
  .sidebar-layout { grid-template-columns: 1fr !important; }
  .table-wrap { box-shadow: none; }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .sidebar-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hero h1 { font-size: 1.75rem; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0; margin: 12px 0; border-radius: var(--radius); }
  .hero h1 { font-size: 1.4rem; }
  .hero-sub { font-size: 0.95rem; }
  .hero-search { flex-direction: column; align-items: stretch; padding: 0 16px; }
  .hero-search select, .hero-search button { width: 100%; }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 16px; border-radius: var(--radius-sm); color: var(--text); font-size: 1rem; }
  .nav-toggle { display: block; margin-left: auto; }
  .year-grid { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; }
  .state-hero-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  h1 { font-size: 1.3rem; }
  .calc-controls { flex-direction: column; }
  .ics-controls { flex-direction: column; }
  .calc-widget, .download-widget { padding: 20px 16px; }
  .bt-cards { grid-template-columns: 1fr; }
  .holiday-table th, .holiday-table td { padding: 10px 12px; font-size: 0.82rem; }
  section { margin: 20px 0; }
  .features { grid-template-columns: 1fr; }
  .how-to-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; align-items: flex-start; }
}

@media (max-width: 400px) {
  .state-hero-grid { grid-template-columns: 1fr; }
}
