/* ===========================
   Kerala Holidays — style.css
   Mobile-first, no frameworks
   =========================== */

/* --- Custom Properties --- */
:root {
  --green: #0F766E;
  --green-dark: #0d5f58;
  --green-light: #CCFBF1;
  --gold: #F59E0B;
  --gold-light: #FEF3C7;
  --blue: #1E40AF;
  --blue-light: #DBEAFE;
  --coral: #EF4444;
  --coral-light: #FEE2E2;
  --purple: #7C3AED;
  --purple-light: #EDE9FE;
  --bg: #FAFAF9;
  --surface: #FFFFFF;
  --border: #E7E5E4;
  --text: #1C1917;
  --text-muted: #78716C;
  --text-light: #A8A29E;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.08);
  --font-head: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ml: 'Noto Sans Malayalam', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; height: auto; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* --- Google Font loader (non-blocking) --- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ===========================
   HEADER
   =========================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-icon { font-size: 1.4rem; }

.logo-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.logo-text strong {
  color: var(--green);
  font-weight: 800;
}

.main-nav {
  display: none;
  gap: 0;
  flex: 1;
}

.main-nav a {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: .3rem .7rem;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  text-decoration: none;
}

.main-nav a:hover {
  color: var(--green);
  background: var(--green-light);
}

.nav-toggle {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s;
}

@media (min-width: 768px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ===========================
   HERO
   =========================== */
.hero {
  background: linear-gradient(135deg, #0F766E 0%, #0d5f58 50%, #065f52 100%);
  color: #fff;
  padding: 3rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 240px; height: 240px;
  background: rgba(245,158,11,.08);
  border-radius: 50%;
  pointer-events: none;
}

/* Ensure all hero content sits above decorative pseudo-elements */
.hero .container {
  position: relative;
  z-index: 1;
}

.hero-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .25rem .9rem;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.9);
}

.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
}

.hero-accent {
  color: var(--gold);
}

/* Next Holiday Card */
.next-holiday-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: inline-block;
  margin-bottom: 2rem;
  min-width: 260px;
}

.next-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .25rem;
}

.next-name {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: .2rem;
}

.next-date-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  margin-bottom: .5rem;
}

.next-dow {
  background: rgba(255,255,255,.15);
  padding: .1rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
}

.countdown {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gold);
}

#days-count {
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-head);
  line-height: 1;
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .65rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gold);
  color: #1a1200;
}

.btn-primary:hover {
  background: #e08e00;
  text-decoration: none;
}

.btn-outline {
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}

.btn-outline:hover {
  background: rgba(255,255,255,.2);
  text-decoration: none;
}

/* ===========================
   STATS BAR
   =========================== */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.stat-label {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

/* ===========================
   HOLIDAYS SECTION
   =========================== */
.holidays-section {
  padding: 2.5rem 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h2 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: .4rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 2px;
}

.filter-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.filter-btn {
  flex-shrink: 0;
}

.filter-btn {
  padding: .35rem .9rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.filter-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

.filter-btn.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Search */
.search-bar {
  margin-bottom: 1.5rem;
}

.search-bar input {
  width: 100%;
  max-width: 420px;
  padding: .6rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

.search-bar input:focus {
  border-color: var(--green);
}

/* Month Group */
.month-group {
  margin-bottom: 2rem;
}

.month-heading {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--green-light);
  margin-bottom: 1rem;
}

/* Holiday Card */
.holiday-card {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s, transform .15s;
}

.holiday-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: var(--green-light);
  transform: translateY(-1px);
}

.holiday-card.is-restricted {
  border-left: 3px solid var(--gold);
  background: linear-gradient(to right, var(--gold-light) 0%, var(--surface) 40px);
}

/* Date Block */
.holiday-date-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--green-light);
  border-radius: var(--radius-sm);
  padding: .4rem .2rem;
  text-align: center;
  flex-shrink: 0;
}

.hd-day {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.hd-month {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--green-dark);
}

.hd-dow {
  font-size: .6rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

/* Holiday Info */
.holiday-name {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .15rem;
  color: var(--text);
}

.holiday-name time { color: inherit; }

.holiday-ml {
  font-family: var(--font-ml), 'Noto Sans Malayalam', system-ui;
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: .35rem;
}

.holiday-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.holiday-note {
  font-size: .78rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: .3rem;
}

/* Tags */
.holiday-tags {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex-shrink: 0;
}

.tag {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}

.tag-public   { background: var(--green-light); color: var(--green-dark); }
.tag-bank     { background: var(--blue-light); color: var(--blue); }
.tag-school   { background: var(--coral-light); color: var(--coral); }
.tag-festival { background: var(--gold-light); color: #92400e; }
.tag-national { background: #f3e8ff; color: var(--purple); }
.tag-restricted { background: var(--gold-light); color: #92400e; border: 1px dashed var(--gold); }

/* Action buttons */
.holiday-actions {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.btn-ics, .btn-share {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .3rem .5rem;
  cursor: pointer;
  font-size: .9rem;
  transition: background .15s, border-color .15s;
  line-height: 1;
}

.btn-ics:hover, .btn-share:hover {
  background: var(--green-light);
  border-color: var(--green);
}

.no-results {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

/* ===========================
   QUICK LINKS
   =========================== */
.quick-links-section {
  padding: 2.5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.quick-links-section h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  text-decoration: none;
  transition: all .2s;
  background: var(--bg);
}

.quick-link-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  text-decoration: none;
}

.ql-bank:hover   { border-color: var(--blue); background: var(--blue-light); }
.ql-school:hover { border-color: var(--coral); background: var(--coral-light); }
.ql-lw:hover     { border-color: var(--gold); background: var(--gold-light); }
.ql-today:hover  { border-color: var(--green); background: var(--green-light); }
.ql-onam:hover   { border-color: var(--gold); background: var(--gold-light); }
.ql-vishu:hover  { border-color: var(--purple); background: var(--purple-light); }

.ql-icon { font-size: 1.6rem; }
.ql-title { font-family: var(--font-head); font-size: .95rem; font-weight: 700; color: var(--text); }
.ql-sub { font-size: .78rem; color: var(--text-muted); }

/* ===========================
   FAQ
   =========================== */
.faq-section {
  padding: 2.5rem 0;
}

.faq-section h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--green);
  transition: transform .2s;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
  border-top: 1px solid var(--border);
  padding-top: .75rem;
}

/* ===========================
   PAGE HERO (sub-pages)
   =========================== */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
}

.page-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-top: .5rem;
}

.page-subtitle {
  color: var(--text-muted);
  margin-top: .4rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--green); }
.breadcrumb span { color: var(--text-light); }

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .logo-text {
  color: #fff;
  display: block;
  margin-bottom: .5rem;
  font-size: 1.1rem;
}

.footer-brand p {
  font-size: .82rem;
  line-height: 1.5;
  max-width: 260px;
}

.footer-links h3 {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.9);
  margin-bottom: .75rem;
}

.footer-links a {
  display: block;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  padding: .2rem 0;
  text-decoration: none;
  transition: color .15s;
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1.5rem;
  margin-top: .5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.footer-bottom-info {
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  line-height: 1.6;
}

.footer-bottom-info a {
  color: rgba(255,255,255,.6);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.2);
}

.footer-bottom-info a:hover { color: var(--gold); }

.footer-bottom-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1rem;
  font-size: .75rem;
  color: rgba(255,255,255,.3);
  padding-bottom: .5rem;
}

.footer-bottom-meta a {
  color: rgba(255,255,255,.4);
  text-decoration: none;
  transition: color .15s;
}

.footer-bottom-meta a:hover { color: var(--gold); }

.footer-dot {
  color: rgba(255,255,255,.15);
}

/* ===========================
   RESPONSIVE BREAKPOINTS
   =========================== */
@media (min-width: 480px) {
  .quick-links-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    gap: 1.5rem;
  }
}

@media (min-width: 768px) {
  .hero { padding: 4rem 0 5rem; }

  .section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .holiday-card {
    grid-template-columns: 64px 1fr auto auto;
  }

  .hd-day { font-size: 1.75rem; }
  .holiday-date-block { padding: .5rem .4rem; width: 64px; }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  .quick-links-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .container { padding: 0 2rem; }
  .quick-links-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ===========================
   MOBILE NAV (open state) — animated
   =========================== */

/* Nav sits off-screen by default on mobile, slides down when open */
@media (max-width: 767px) {
  .main-nav {
    display: flex !important; /* always in DOM for animation */
    flex-direction: column;
    position: fixed;
    top: 56px; left: 0; right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0,0,0,.12);
    z-index: 99;
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: max-height .32s cubic-bezier(.4,0,.2,1),
                opacity .25s ease,
                transform .25s ease,
                padding .25s ease;
    pointer-events: none;
  }

  body.nav-open .main-nav {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    padding: .6rem 1rem 1rem;
    pointer-events: auto;
  }

  .main-nav a {
    padding: .75rem 1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    opacity: 0;
    transform: translateX(-10px);
    transition: opacity .2s ease, transform .2s ease, background .15s, color .15s;
  }

  /* Stagger each nav link in */
  body.nav-open .main-nav a:nth-child(1) { opacity: 1; transform: translateX(0); transition-delay: .05s; }
  body.nav-open .main-nav a:nth-child(2) { opacity: 1; transform: translateX(0); transition-delay: .10s; }
  body.nav-open .main-nav a:nth-child(3) { opacity: 1; transform: translateX(0); transition-delay: .15s; }
  body.nav-open .main-nav a:nth-child(4) { opacity: 1; transform: translateX(0); transition-delay: .20s; }
  body.nav-open .main-nav a:nth-child(5) { opacity: 1; transform: translateX(0); transition-delay: .25s; }
  body.nav-open .main-nav a:nth-child(6) { opacity: 1; transform: translateX(0); transition-delay: .30s; }
}

/* Hamburger → X animation */
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
  transform-origin: center;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===========================
   UTILITY
   =========================== */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Animate in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.holiday-card {
  animation: fadeUp .3s ease both;
}

/* Stagger via nth-child */
.holiday-card:nth-child(1)  { animation-delay: .02s; }
.holiday-card:nth-child(2)  { animation-delay: .04s; }
.holiday-card:nth-child(3)  { animation-delay: .06s; }
.holiday-card:nth-child(4)  { animation-delay: .08s; }
.holiday-card:nth-child(5)  { animation-delay: .10s; }
.holiday-card:nth-child(6)  { animation-delay: .12s; }
.holiday-card:nth-child(n+7){ animation-delay: .14s; }

/* ===========================
   PHASE 2 ADDITIONS
   =========================== */

/* --- Today / Tomorrow / This-Month --- */
.hero-compact {
  padding: 1.5rem 0 1.75rem;
}

.today-section {
  padding: 2rem 0 3rem;
}

.today-result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  max-width: 640px;
}

.today-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 1.5rem;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* Yes / No Badge */
.today-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  padding: .4rem 1.2rem;
  border-radius: 999px;
  margin-bottom: .75rem;
  letter-spacing: .04em;
}

.today-badge.yes {
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 1.3rem;
}

.today-badge.no {
  background: #f3f4f6;
  color: var(--text-muted);
}

.today-date-label {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.today-holiday-name {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: .25rem;
  color: var(--green);
}

.today-ml {
  font-family: var(--font-ml), 'Noto Sans Malayalam', system-ui;
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.today-desc {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.today-tags {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.today-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.today-no-msg {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1rem;
}

/* Next up box */
.next-up {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  margin-top: .75rem;
}

.next-up-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .2rem;
}

.next-up strong { color: var(--green); }

.days-badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  margin-left: .3rem;
}

/* Tomorrow teaser strip */
.tomorrow-teaser {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1.25rem;
  margin-bottom: 2rem;
  max-width: 640px;
  font-size: .875rem;
  flex-wrap: wrap;
}

.teaser-label {
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  flex-shrink: 0;
}

.teaser-link {
  margin-left: auto;
  font-size: .8rem;
  font-weight: 600;
}

/* Today ribbon on month card */
.is-today-card {
  border: 2px solid var(--green);
  position: relative;
}

.today-ribbon {
  position: absolute;
  top: -1px;
  right: 12px;
  background: var(--green);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .6rem;
  border-radius: 0 0 4px 4px;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.is-past {
  opacity: .55;
}

/* Month nav row */
.month-nav {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn-outline-dark {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}

.btn-outline-dark:hover {
  border-color: var(--green);
  color: var(--green);
  text-decoration: none;
}

/* WhatsApp button */
.btn-wa {
  background: #25D366;
  color: #fff;
}

.btn-wa:hover {
  background: #1da851;
  text-decoration: none;
}

/* --- Info Banners --- */
.info-banner {
  border-bottom: 1px solid var(--border);
  padding: .85rem 0;
}

.info-banner .container {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.info-icon { font-size: 1.3rem; flex-shrink: 0; }

.info-banner p { font-size: .875rem; color: var(--text-muted); line-height: 1.5; }
.info-banner p strong { color: var(--text); }

.info-blue  { background: var(--blue-light); border-color: #bfdbfe; }
.info-coral { background: var(--coral-light); border-color: #fecaca; }
.info-gold  { background: var(--gold-light); border-color: #fde68a; }

/* Count badge */
.count-badge {
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.bank-badge   { background: var(--blue-light); color: var(--blue); }
.school-badge { background: var(--coral-light); color: var(--coral); }

/* Bank / School date block colour overrides */
.bank-date-block   { background: var(--blue-light); }
.bank-date-block .hd-day { color: var(--blue); }
.bank-date-block .hd-month { color: #1e3a8a; }

.school-date-block   { background: var(--coral-light); }
.school-date-block .hd-day { color: var(--coral); }
.school-date-block .hd-month { color: #991b1b; }

/* Info box */
.info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.info-box h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.info-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.info-box li {
  font-size: .875rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.info-box li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: .75rem;
  top: .1rem;
}

/* --- School tabs --- */
.school-tabs {
  display: flex;
  gap: .4rem;
  margin-top: .5rem;
}

.school-tab {
  padding: .4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  color: var(--text-muted);
}

.school-tab.active {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
}

/* Vacation highlight card */
.vacation-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--gold-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.vacation-icon { font-size: 2rem; }
.vacation-info h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: .3rem; }
.vacation-info p { font-size: .875rem; color: var(--text-muted); line-height: 1.5; }
.vacation-note { font-size: .8rem !important; margin-top: .25rem; color: #92400e !important; }

/* --- District Page --- */
.district-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.district-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  background: var(--green-light);
  color: var(--green-dark);
  padding: .2rem .75rem;
  border-radius: 999px;
  margin-bottom: .4rem;
}

.district-meta {
  display: flex;
  gap: 1.5rem;
}

.district-stat {
  text-align: center;
}

.district-stat span {
  display: block;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--green);
}

.district-stat small {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Other districts grid */
.other-districts {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.other-districts h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.districts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.district-pill {
  padding: .35rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
  background: var(--surface);
}

.district-pill:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
  text-decoration: none;
}

/* This-month heading */
.this-month-preview h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.no-holidays-msg {
  color: var(--text-muted);
  font-size: .9rem;
  padding: 1rem 0;
}

/* ===========================
   PHASE 3 — Festivals & Long Weekends
   =========================== */

/* ── Festival Hero ── */
.festival-hero {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 60%, #044039 100%);
  color: #fff;
  padding: 2rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.festival-hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 360px; height: 360px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  pointer-events: none;
}

/* Festival hero content above decorative elements */
.festival-hero .container {
  position: relative;
  z-index: 1;
}

.festival-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.festival-emoji-badge {
  font-size: 3rem;
  margin-bottom: .5rem;
  line-height: 1;
}

.festival-meta-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gold);
  margin-bottom: .4rem;
}

.festival-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.festival-tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 1.5rem;
}

/* Date card */
.festival-date-card {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.fdc-main { margin-bottom: .75rem; }
.fdc-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gold);
  margin-bottom: .2rem;
}
.fdc-date {
  display: block;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
}
.fdc-dow {
  display: block;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}
.fdc-duration {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  margin-bottom: .75rem;
}
.fdc-dur-label {
  font-weight: 700;
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  color: rgba(255,255,255,.5);
  margin-bottom: .1rem;
}
.fdc-badge { display: flex; gap: .4rem; flex-wrap: wrap; }

.festival-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Multi-year dates panel */
.festival-years-panel {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  padding: 1.25rem;
  align-self: start;
}

.festival-years-panel h3 {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.6);
  margin-bottom: .85rem;
}

.fyl-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: .5rem;
  padding: .6rem 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}
.fyl-item:last-child { border-bottom: none; }
.fyl-item.fyl-current { background: rgba(255,255,255,.07); margin: 0 -.5rem; padding: .6rem .5rem; border-radius: 6px; }

.fyl-year {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .9rem;
  color: var(--gold);
}
.fyl-date { color: rgba(255,255,255,.85); line-height: 1.4; }
.fyl-date small { color: rgba(255,255,255,.5); font-size: .75rem; }
.fyl-note { font-size: .72rem; color: var(--gold); grid-column: 2; }

/* ── Festival Content Grid ── */
.festival-section {
  padding: 2.5rem 0;
}

.festival-content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.content-block {
  margin-bottom: 2.5rem;
}

.content-block h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--green-light);
  color: var(--green-dark);
}

.content-block p {
  color: var(--text-muted);
  line-height: 1.75;
  font-size: .95rem;
}

/* Traditions */
.traditions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tradition-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  border-left: 3px solid var(--green);
}

.tradition-header {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  margin-bottom: .4rem;
  flex-wrap: wrap;
}

.tradition-header h3 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tradition-ml {
  font-family: var(--font-ml), 'Noto Sans Malayalam', system-ui;
  font-size: .9rem;
  color: var(--text-muted);
}

.tradition-card p {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* Regional grid */
.regional-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}

.regional-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .9rem 1.1rem;
}

.regional-district {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--green);
  margin-bottom: .25rem;
  text-decoration: none;
}

.regional-card p {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Festival Sidebar ── */
.festival-sidebar { display: flex; flex-direction: column; gap: 1.25rem; }

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.sidebar-card h3 {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

/* Quick facts DL */
.quick-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem .75rem;
  font-size: .85rem;
}
.quick-facts dt { color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.quick-facts dd { color: var(--text); }

/* Sidebar holiday rows */
.sidebar-holiday-row { padding: .6rem 0; border-bottom: 1px solid var(--border); }
.sidebar-holiday-row:last-child { border-bottom: none; }
.shr-date { display: block; font-size: .72rem; color: var(--text-light); }
.shr-name { display: block; font-weight: 600; font-size: .875rem; margin: .15rem 0; }
.shr-tags { display: flex; gap: .3rem; flex-wrap: wrap; }

/* Other festivals list */
.other-festivals-list { display: flex; flex-direction: column; gap: .1rem; }
.other-festival-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .4rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.other-festival-link:hover { background: var(--green-light); color: var(--green); text-decoration: none; }

/* ── Festivals Index ── */
.festivals-index-section { padding: 2.5rem 0; }

.festivals-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.festival-index-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  transition: all .2s;
  color: var(--text);
}

.festival-index-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  text-decoration: none;
}

.fic-emoji { font-size: 2.5rem; flex-shrink: 0; line-height: 1; }
.fic-body { flex: 1; }
.fic-body h2 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin-bottom: .1rem; }
.fic-ml { font-family: var(--font-ml), system-ui; font-size: .9rem; color: var(--text-muted); margin-bottom: .3rem; }
.fic-tagline { font-size: .875rem; color: var(--text-muted); margin-bottom: .6rem; }
.fic-date { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; }
.fic-date-label { color: var(--text-muted); }
.fic-date strong { color: var(--green); }
.fic-arrow { font-size: 1.2rem; color: var(--text-light); flex-shrink: 0; align-self: center; transition: transform .2s; }
.festival-index-card:hover .fic-arrow { transform: translateX(4px); color: var(--green); }

/* ── Long Weekends ── */
.lw-stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.lw-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  text-align: center;
}

.lw-stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green);
  line-height: 1;
}

.lw-stat-label {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.lw-section { padding: 2.5rem 0; }
.lw-list { display: flex; flex-direction: column; gap: 1.25rem; }

.lw-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s;
  overflow: hidden;
  word-break: break-word;
}

.lw-card:hover { box-shadow: var(--shadow-hover); }
.lw-four-day { border-color: var(--gold); background: linear-gradient(to bottom right, var(--gold-light), var(--surface) 60px); }
.lw-bridge { border-color: #7C3AED; background: linear-gradient(to bottom right, var(--purple-light), var(--surface) 60px); }

.lw-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.lw-badge {
  padding: .3rem .9rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.lw-badge-green  { background: var(--green-light); color: var(--green-dark); }
.lw-badge-gold   { background: var(--gold-light); color: #78350f; }
.lw-badge-purple { background: var(--purple-light); color: #4c1d95; }

.lw-card-dates { font-size: .875rem; color: var(--text-muted); }

/* Days row */
.lw-days-row {
  display: flex;
  gap: .4rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.lw-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  text-align: center;
  min-width: 52px;
}
.lwd-holiday  { background: var(--green-light); border-color: var(--green); }
.lwd-weekend  { background: var(--blue-light); border-color: #93c5fd; }
.lwd-bridge   { background: var(--purple-light); border-color: #c4b5fd; border-style: dashed; }

.lwd-dow   { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.lwd-date  { font-family: var(--font-head); font-size: 1rem; font-weight: 800; color: var(--text); line-height: 1; margin: .1rem 0; }
.lwd-label {
  font-size: .6rem;
  color: var(--text-muted);
  line-height: 1.2;
  text-align: center;
  max-width: 64px;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}
.lwd-holiday .lwd-label { color: var(--green-dark); font-weight: 600; }

.lw-holiday-names {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

.lw-holiday-names .tag {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  max-width: 100%;
}

.lw-bridge-tip {
  background: var(--purple-light);
  border-radius: var(--radius-sm);
  padding: .55rem .9rem;
  font-size: .82rem;
  color: #4c1d95;
  margin-bottom: .75rem;
}

.lw-share {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .35rem .75rem;
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
}
.lw-share:hover { background: var(--green-light); border-color: var(--green); }

.lw-guide { margin-top: 2rem; }

/* ── Responsive Phase 3 ── */
@media (min-width: 768px) {
  .festival-hero-inner {
    grid-template-columns: 1.4fr 1fr;
  }

  .festival-content-grid {
    grid-template-columns: 1fr 280px;
    align-items: start;
  }

  .regional-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .festivals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .festival-content-grid {
    grid-template-columns: 1fr 300px;
  }
}

/* ===========================
   PHASE 4 — Compare, Search, Widget Page
   =========================== */

/* ── Year-over-Year Compare ── */
.compare-hero-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.festival-emoji-sm { font-size: 2.5rem; flex-shrink: 0; }

.compare-section { padding: 2.5rem 0; }

.compare-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.compare-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.compare-card-current {
  border-color: var(--green);
  background: var(--green-light);
}

.compare-year-label {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.current-pill {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: var(--green);
  color: #fff;
  padding: .15rem .55rem;
  border-radius: 999px;
}

.compare-date-main { margin-bottom: .75rem; }
.compare-date-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .15rem;
}
.compare-date-value {
  display: block;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.compare-dow {
  display: block;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.compare-date-sub {
  padding: .5rem 0;
  border-top: 1px solid var(--border);
  margin-bottom: .5rem;
}
.compare-detail {
  font-size: .85rem;
  color: var(--text-muted);
  padding: .25rem 0;
}
.compare-detail-label { font-weight: 600; margin-right: .3rem; }
.compare-note {
  font-size: .78rem;
  color: var(--gold);
  font-weight: 600;
  margin-top: .5rem;
}
.compare-weekend-badge {
  margin-top: .75rem;
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
}
.compare-tbd { color: var(--text-muted); font-style: italic; }

/* Weekend badge colours */
.wkend-fri   { background: var(--green-light); color: var(--green-dark); }
.wkend-mon   { background: var(--green-light); color: var(--green-dark); }
.wkend-thu   { background: var(--gold-light); color: #78350f; }
.wkend-tue   { background: var(--gold-light); color: #78350f; }
.wkend-sat   { background: var(--blue-light); color: var(--blue); }
.wkend-sun   { background: var(--blue-light); color: var(--blue); }
.wkend-mid   { background: var(--border); color: var(--text-muted); }

/* Diff callout */
.diff-callout {
  display: flex;
  align-items: center;
  gap: .85rem;
  background: var(--gold-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: .9rem;
  color: #78350f;
}
.diff-icon { font-size: 1.5rem; flex-shrink: 0; }

/* Comparison table */
.compare-table-section { margin-bottom: 2.5rem; }
.compare-table-section h2 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.compare-table-intro { font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; }
.compare-table-wrap { overflow-x: auto; }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.compare-table th {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: .6rem .75rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--bg);
}
.compare-table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.compare-row-highlight td { background: var(--green-light); }
.ctr-name { font-weight: 600; }
.ctr-ml   { display: block; font-size: .78rem; color: var(--text-muted); font-family: var(--font-ml), system-ui; }
.ctr-date time { font-weight: 600; display: block; }
.ctr-dow  { font-size: .72rem; color: var(--text-muted); }
.ctr-na   { color: var(--text-light); }
.shift-same    { color: var(--text-muted); }
.shift-later   { color: var(--coral); font-weight: 600; }
.shift-earlier { color: var(--green); font-weight: 600; }

/* Compare nav */
.compare-nav { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.compare-nav h3 { font-family: var(--font-head); font-size: 1rem; font-weight: 700; margin-bottom: .85rem; }
.compare-nav-grid { display: flex; flex-direction: column; gap: .4rem; }
.compare-nav-link {
  display: block;
  padding: .55rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all .15s;
}
.compare-nav-link:hover { border-color: var(--green); color: var(--green); background: var(--green-light); text-decoration: none; }

/* ── Search Page ── */
.search-page-section { padding: 2rem 0 3rem; }

.search-page-bar {
  position: relative;
  margin-bottom: 1rem;
}

.search-page-bar input {
  width: 100%;
  padding: .85rem 2.5rem .85rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.05rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color .15s;
}

.search-page-bar input:focus { border-color: var(--green); }

.search-clear-btn {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: .2rem;
  line-height: 1;
}

.search-filters {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.sf-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); }

.search-meta {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* Year badge on search results */
.hy-year-badge {
  display: inline-block;
  margin-left: .4rem;
  font-size: .65rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  padding: .1rem .45rem;
  border-radius: 999px;
  vertical-align: middle;
}

/* ── Widget Docs Page ── */
.widget-page-section { padding: 2rem 0 4rem; }

/* Preview block — full width on mobile, sits above docs */
.widget-preview-top {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 2rem;
}

.preview-header {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1rem;
}

.preview-heading {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.preview-tabs {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
}

.preview-tab {
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
  min-height: 36px;
}

.preview-tab.active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.preview-frames { margin-bottom: .75rem; }
.preview-frame { }

.preview-note {
  font-size: .75rem;
  color: var(--text-muted);
}

/* Widget docs section */
.widget-docs { }

.example-heading {
  font-family: var(--font-head);
  font-size: .95rem;
  font-weight: 700;
  margin: 1.25rem 0 .5rem;
  color: var(--text-muted);
}

/* Options list — replaces table, works on all screen sizes */
.options-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: .75rem;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
}

.option-attr {
  font-size: .85rem;
  font-family: monospace;
  background: var(--green-light);
  color: var(--green-dark);
  padding: .15rem .5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: .1rem;
}

.option-vals {
  font-size: .82rem;
  color: var(--text);
  font-weight: 500;
}

.option-vals em {
  color: var(--text-muted);
  font-style: normal;
}

.option-desc {
  font-size: .8rem;
  color: var(--text-muted);
}

/* Code blocks */
.code-block {
  position: relative;
  background: #1c1917;
  border-radius: var(--radius);
  overflow: hidden;
  margin: .5rem 0 1.25rem;
}

.code-block pre {
  margin: 0;
  padding: 1.1rem 1rem;
  padding-right: 4rem; /* space for copy button */
  font-family: 'Fira Code','Cascadia Code','JetBrains Mono',monospace;
  font-size: .78rem;
  line-height: 1.6;
  color: #e7e5e4;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

.copy-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-sm);
  color: #e7e5e4;
  font-size: .72rem;
  font-weight: 700;
  padding: .3rem .7rem;
  cursor: pointer;
  transition: background .15s;
  min-height: 36px;
}

.copy-btn:hover { background: rgba(255,255,255,.22); }

/* Desktop: side-by-side layout */
@media (min-width: 900px) {
  .widget-page-section .container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
  }

  /* On desktop, preview moves to right column — reorder with grid */
  .widget-docs { order: 1; }
  .widget-preview-top {
    order: 2;
    position: sticky;
    top: 72px;
    margin-bottom: 0;
  }

  .preview-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Responsive Phase 4 */
@media (min-width: 768px) {
  .widget-page-grid { grid-template-columns: 1.2fr 380px; }
  .compare-nav-grid { flex-direction: row; flex-wrap: wrap; }
  .compare-nav-link { flex: 0 0 auto; }
}


/* ===========================
   SEO / Accessibility additions
   =========================== */

/* Skip link — improves Core Web Vitals accessibility score */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--green);
  color: #fff;
  padding: .5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* Footer source citation */
.footer-source {
  font-size: .72rem;
  color: rgba(255,255,255,.3);
  margin-top: .25rem;
  font-style: italic;
}

.footer-logo-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  text-decoration: none;
  margin-bottom: .75rem;
}

.footer-legal { margin-top: .3rem; }
.footer-legal a { color: rgba(255,255,255,.4); }
.footer-legal a:hover { color: var(--gold); }

/* aria-current page nav highlight */
.main-nav a[aria-current="page"] {
  color: var(--green);
  background: var(--green-light);
  font-weight: 700;
}

/* Ensure time elements are styled for semantic clarity */
time { font-style: normal; }

/* Article microdata */
.holiday-card[itemscope] {}

/* Districts home section */
.all-districts-section {
  padding: 2.5rem 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.all-districts-section h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .4rem;
}
.section-intro {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.districts-grid-home {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.district-home-link {
  padding: .4rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  background: var(--bg);
  transition: all .15s;
}
.district-home-link:hover {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-light);
  text-decoration: none;
}

/* ===========================
   Mobile touch target fixes
   Minimum 44×44px per Apple HIG / Google Material
   =========================== */

/* Primary CTA buttons — already large enough, but enforce min-height */
.btn {
  min-height: 44px;
  min-width: 44px;
}

/* Filter pills — add padding so they're tall enough to tap */
.filter-btn {
  min-height: 36px;
  padding: .45rem 1rem;
}

/* Calendar + share icon buttons on holiday cards */
.btn-ics,
.btn-share {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
}

/* Nav toggle hamburger */
.nav-toggle {
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
}

/* FAQ summary tap area */
.faq-item summary {
  min-height: 44px;
}

/* School tabs */
.school-tab {
  min-height: 40px;
}

/* District pills */
.district-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

/* Preview tabs on widget page */
.preview-tab {
  min-height: 36px;
}
