
/* === schulferien.fun – Stylesheet === */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #f59e0b;
  --text: #1f2937;
  --text-light: #6b7280;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

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

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

/* ── Header ── */
.site-header { background: var(--primary); color: white; padding: 0; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.site-header .container { display: flex; align-items: center; gap: 16px; height: 60px; }
.site-logo { color: white; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.site-logo span { color: rgba(255,255,255,0.9); }
.site-logo strong { color: white; }
.main-nav { display: flex; gap: 4px; align-items: center; margin-left: auto; }
.main-nav a { color: rgba(255,255,255,0.85); padding: 6px 12px; border-radius: var(--radius); font-size: 0.9rem; transition: background 0.15s; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.2); color: white; text-decoration: none; }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.4rem; cursor: pointer; padding: 8px; }

/* ── 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%, #1e40af 100%); color: white; padding: 48px 0; border-radius: var(--radius); margin: 24px 0; text-align: center; }
.hero h1 { font-size: 2rem; margin-bottom: 12px; }
.hero-sub { font-size: 1.1rem; opacity: 0.9; margin-bottom: 24px; }
.hero-search { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; }
.hero-search label { font-weight: 600; }
.hero-search select, .hero-search button { padding: 10px 16px; border-radius: var(--radius); border: none; font-size: 1rem; }
.hero-search select { background: white; color: var(--text); min-width: 200px; }
.hero-search button { background: var(--secondary); color: white; font-weight: 700; cursor: pointer; }

/* ── State Grid ── */
.state-hero-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin: 16px 0; }
.state-hero-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow 0.15s, transform 0.15s; text-decoration: none; color: var(--text); }
.state-hero-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.state-name { font-weight: 600; font-size: 0.95rem; }
.badge { font-size: 0.8rem; color: var(--text-light); border-radius: 4px; padding: 4px 8px; background: #f3f4f6; line-height: 1.4; }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 12px 0; }
.state-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; font-size: 0.9rem; color: var(--text); transition: background 0.1s; text-align: center; text-decoration: none; }
.state-card:hover { background: var(--primary); color: white; text-decoration: none; }
.state-card.active { background: var(--primary); color: white; }

/* ── Year Cards ── */
.year-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0; }
.year-card { background: white; border: 2px solid var(--primary); color: var(--primary); text-align: center; padding: 20px; border-radius: var(--radius); font-size: 1.1rem; font-weight: 700; transition: background 0.15s, color 0.15s; text-decoration: none; }
.year-card:hover { background: var(--primary); color: white; text-decoration: none; }
.year-tabs { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.year-tab { background: white; border: 1px solid var(--border); padding: 8px 20px; border-radius: 999px; font-weight: 600; color: var(--text); text-decoration: none; }
.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); margin: 16px 0; }
.table-scroll { overflow-x: scroll; }
.holiday-table { width: 100%; border-collapse: collapse; background: white; font-size: 0.9rem; }
.holiday-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: left; white-space: nowrap; }
.holiday-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.holiday-table tr:last-child td { border-bottom: none; }
.holiday-table tr:hover td { background: #f0f7ff; }
.period { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.85rem; white-space: nowrap; }
.period-cell small { color: var(--text-light); font-size: 0.75rem; }
.ftype-label { display: inline-block; padding: 4px 10px; }
.no-ferien { color: var(--text-light); text-align: center; }

/* ── 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: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.sidebar-widget h3 { margin-bottom: 10px; font-size: 1rem; }

/* ── Upcoming ── */
.upcoming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 12px 0; }
.upcoming-card { background: white; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); }
.upcoming-type { font-weight: 600; font-size: 0.95rem; }
.upcoming-dates { font-size: 0.85rem; color: var(--text-light); margin: 4px 0; }
.upcoming-badge { background: var(--primary); color: white; font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; }

/* ── Calc Widget ── */
.calc-widget, .download-widget { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin: 24px 0; }
.calc-controls { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-weight: 600; font-size: 0.9rem; }
.form-group select { padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; min-width: 180px; }

/* ── Buttons ── */
.btn-primary { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); padding: 10px 20px; border-radius: var(--radius); font-size: 1rem; font-weight: 600; cursor: pointer; }
.btn-link { display: inline-block; color: var(--primary); font-weight: 600; }

/* ── ICS Section ── */
.ics-section { background: #f0f7ff; border: 1px solid #bfdbfe; border-radius: var(--radius); padding: 20px; margin: 24px 0; }
.ics-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0; }
.ics-controls select { padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.hint { font-size: 0.85rem; color: var(--text-light); margin-top: 8px; }

/* ── FAQ ── */
.faq-section { margin: 24px 0; }
.faq-section details { background: white; border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0; padding: 0; }
.faq-section summary { padding: 14px 18px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-section summary::after { content: "+"; font-size: 1.2rem; color: var(--primary); }
.faq-section details[open] summary::after { content: "−"; }
.faq-section details p { padding: 0 18px 14px; color: var(--text-light); }

/* ── 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: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.bt-tipp { display: inline-block; background: #d1fae5; color: #065f46; padding: 4px 10px; border-radius: 999px; font-size: 0.85rem; 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: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; font-size: 0.95rem; }
.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: 20px; margin: 16px 0; }
.how-to { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.how-to h3 { margin-bottom: 10px; }
.how-to ol { padding-left: 18px; }
.how-to li { margin: 6px 0; font-size: 0.9rem; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.85rem; color: var(--text-light); margin: 16px 0 8px; }
.breadcrumb a { color: var(--primary); }

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

/* ── Sections ── */
section { margin: 28px 0; }
h1 { font-size: 1.75rem; margin-bottom: 8px; }
h2 { font-size: 1.3rem; margin-bottom: 12px; color: var(--text); }
h3 { font-size: 1.1rem; margin-bottom: 8px; }

/* ── Footer ── */
.site-footer { background: #1e293b; color: #94a3b8; margin-top: 60px; padding: 40px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.site-footer a { color: #94a3b8; font-size: 0.85rem; display: block; margin: 2px 0; }
.site-footer a:hover { color: white; text-decoration: none; }
.site-footer strong { color: #e2e8f0; display: block; margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 16px; font-size: 0.8rem; display: flex; gap: 16px; }
.footer-bottom a { color: #94a3b8; }

/* ── 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; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 1.4rem; }
  .main-nav { display: none; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--primary); padding: 12px; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .year-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .state-hero-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.3rem; }
  .calc-controls { flex-direction: column; }
  .ics-controls { flex-direction: column; }
}
