/* ============================================
   Florida School Calendar 閳?Design System
   Palette: Sunshine & Teal (warm white base)
   Typography: Outfit + Inter
   Style: Flat Design + Swiss Modernism
   ============================================ */

/* Fonts loaded via <link preload> in base.njk layout */

/* --- Design Tokens --- */
:root {
  --color-primary: #0F766E;
  --color-primary-dark: #115E59;
  --color-primary-light: #5EEAD4;
  --color-secondary: #134E4A;
  --color-accent: #F97316;
  --color-accent-hover: #EA580C;
  --color-bg: #FAFAFA;
  --color-bg-alt: #F5F5F4;
  --color-surface: #FFFFFF;
  --color-text: #1C1917;
  --color-text-secondary: #57534E;
  --color-text-muted: #78716C;
  --color-border: #E7E5E4;
  --color-border-light: #F5F5F4;
  --color-holiday: #DC2626;
  --color-holiday-bg: #FEF2F2;
  --color-halfday: #F97316;
  --color-halfday-bg: #FFF7ED;
  --color-hero-start: #F1F5F9;
  --color-hero-end: #FFFFFF;

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --transition: 200ms ease;
  --max-width: 1100px;
  --nav-height: 64px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.6rem;
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-alt {
  background-color: var(--color-surface);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover {
  transform: translateY(-1px) scale(1.03);
  text-shadow: 0 0 14px rgba(15, 118, 110, 0.25);
}

.nav-logo svg {
  width: 24px;
  height: 24px;
  color: var(--color-accent);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-logo:hover svg {
  transform: scale(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
    gap: var(--space-md);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 4px 4px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-50%);
  border-radius: 1px;
}

.nav-links a:hover {
  color: var(--color-primary);
  transform: translateY(-1px);
  text-shadow: 0 0 12px rgba(15, 118, 110, 0.2);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
  color: var(--color-text);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* --- Hero --- */
.hero {
  margin-top: var(--nav-height);
  background: linear-gradient(135deg, var(--color-hero-start), var(--color-hero-end));
  color: var(--color-text);
  padding: var(--space-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden; /* Added to clip the large background safely */
}

.florida-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 120%; /* Safely make it larger since overflow is hidden */
  width: auto;
  min-width: 600px;
  max-width: none;
  z-index: 0;
  pointer-events: none;
  color: var(--color-primary-dark);
  opacity: 0.8;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  color: var(--color-primary-dark);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
}

/* =========================================
   Search Component (Hero & District Browser)
   ========================================= */
.district-search-wrapper {
  position: relative;
  margin-bottom: var(--space-md);
}

.hero-search-wrapper {
  width: 100%;
  max-width: 600px;
  margin: var(--space-lg) auto var(--space-xl) auto;
  position: relative;
}

.district-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-text-muted);
}

.hero-search-wrapper .district-search-icon {
  width: 1.4rem;
  height: 1.4rem;
  left: 1.2rem;
}

.district-search {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-text-main);
  transition: all 0.2s ease;
}

.hero-search-wrapper .district-search {
  padding: 1rem 1.5rem 1rem 3.5rem;
  font-size: 1.1rem;
  border-radius: 3rem; /* Pill shape for hero search */
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255,255,255,0.8);
}

.district-search:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(3, 152, 158, 0.15); /* Tailwind teal-600 with opacity */
}

.hero-search-wrapper .district-search:focus {
  box-shadow: 0 0 0 4px rgba(3, 152, 158, 0.2), var(--shadow-lg);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}


/* --- Year Switcher --- */
.year-switcher {
  display: flex;
  gap: 10px;
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.global-year-switcher {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-2xl);
  background: var(--color-surface);
  padding: 6px;
  border-radius: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.year-tab {
  padding: 8px 24px;
  border-radius: 30px;
  background: transparent;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.year-tab:hover {
  color: var(--color-primary-dark);
  background: var(--color-bg-alt);
}

.year-tab.active {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-outline {
  background: var(--color-bg-alt);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background: var(--color-surface);
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}


/* --- Cards --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-featured {
  border-left: 4px solid var(--color-primary);
}

.card-accent {
  border-left: 4px solid var(--color-accent);
}

.card-primary {
  border-left: 4px solid var(--color-primary);
}

.quick-grid-compact {
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 12px;
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Quick Look Grid --- */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.quick-item {
  padding: var(--space-md);
  background: var(--color-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

.quick-item-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
  font-family: var(--font-heading);
}

.quick-item-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: var(--space-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: white;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

thead {
  background: rgba(15, 118, 110, 0.04); /* Soft tint of primary color */
}

thead th {
  padding: 16px 20px;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--color-border-light);
}

tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text);
  vertical-align: middle;
  font-weight: 400;
}

tbody tr:nth-child(even) {
  background: var(--color-bg-alt);
}

tbody tr:hover {
  background: var(--color-bg-alt);
}

tbody tr.holiday {
  /* zebra striping handles background; holiday distinguished by text color only */
}

tbody tr.holiday td:first-child {
  color: var(--color-text);
}

tbody tr.halfday {
  background: var(--color-halfday-bg);
}

.date-col {
  white-space: nowrap;
  font-weight: 500;
}

.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.tag-closed {
  background: #F0F4F8;
  color: #475569;
  border: 1px solid #CBD5E1;
}

.tag-halfday {
  background: #FFFBEB;
  color: #b45309;
  border: 1px solid #fde68a;
}

.tag-event {
  background: #F0FDF4;
  color: var(--color-primary);
  border: 1px solid #bbf7d0;
}

/* --- Monthly Calendar Sections --- */
.month-section {
  margin-bottom: var(--space-xl);
}

.month-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-primary);
  color: #FFFFFF;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
}

.month-header:hover {
  background: var(--color-primary-dark);
}

.month-header svg {
  width: 20px;
  height: 20px;
  margin-left: auto;
  transition: transform var(--transition);
}

.month-header.active svg {
  transform: rotate(180deg);
}

.month-body {
  display: none;
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.month-body.open {
  display: block;
}

/* --- Interactive Map & Regions Layout --- */
.regions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
}

@media (min-width: 900px) {
  .regions-layout {
    grid-template-columns: 350px 1fr;
    align-items: start;
  }
}

.florida-interactive-map {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  position: sticky;
  top: 100px; /* offset for sticky nav */
}

.map-svg {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.05));
}

.map-outline {
  fill: var(--color-bg-alt);
  stroke: var(--color-border);
  stroke-width: 0.5px;
}

.county-mesh {
  fill: none;
  stroke: var(--color-border);
  stroke-width: 0.15px;
  opacity: 0.7;
}

.interactive-regions .region-shape {
  fill: var(--color-primary);
  opacity: 0;
  transition: opacity var(--transition-fast, 0.2s ease);
}

.interactive-regions .region-hover {
  outline: none;
}

.interactive-regions .region-hover:hover .region-shape,
.interactive-regions .region-hover:focus-visible .region-shape {
  opacity: 0.15;
  cursor: pointer;
}

.map-pin {
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.pin-dot {
  fill: var(--color-accent);
  transition: r var(--transition), fill var(--transition);
}

.pin-label {
  font-family: var(--font-primary);
  font-size: 3.5px;
  font-weight: 600;
  fill: var(--color-text-secondary);
  transition: fill var(--transition), font-weight var(--transition);
  pointer-events: none;
}

.pin-label.text-right {
  text-anchor: end;
}

.map-pin:hover .pin-dot,
.map-pin:focus-visible .pin-dot {
  r: 2.5;
  fill: var(--color-primary);
}

.map-pin:hover .pin-label,
.map-pin:focus-visible .pin-label {
  fill: var(--color-primary-dark);
  font-weight: 700;
}

/* --- Districts Grid --- */
.districts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-sm);
}

.district-group h3 {
  font-size: 1.05rem;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
  display: inline-block;
}

.district-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.district-list li a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  transition: all var(--transition);
}

.district-list li a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.district-list li a svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.coming-soon {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-left: auto;
}

.region-accordion-item.hover-highlight {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* --- FAQ --- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question,
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-lg);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: left;
  transition: color var(--transition);
}

.faq-question:hover,
.faq-q:hover {
  color: var(--color-primary);
}

.faq-question svg,
.faq-q svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform var(--transition);
}

.faq-question.active svg,
.faq-q.active svg {
  transform: rotate(180deg);
}

.faq-question.active,
.faq-q.active {
  color: var(--color-primary);
}

.faq-answer,
.faq-a {
  display: none;
  padding: 0 var(--space-lg) var(--space-lg);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.faq-answer.open,
.faq-a.open {
  display: block;
}

/* --- Related Links --- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

.related-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
}

.related-link:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  color: var(--color-primary);
}

.related-link svg {
  width: 20px;
  height: 20px;
  color: var(--color-accent);
  flex-shrink: 0;
}

/* --- Disclaimer --- */
.disclaimer {
  padding: var(--space-lg);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--color-text);
}

.last-updated {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

/* --- Footer --- */
.footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-2xl) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #FFFFFF;
  margin-bottom: var(--space-md);
}

.footer-desc {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
}

.footer h4 {
  color: #FFFFFF;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.8rem;
  opacity: 0.6;
  text-align: center;
}

/* --- Projected Badge --- */
.projected-notice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-halfday-bg);
  border: 1px solid var(--color-halfday);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-accent-hover);
  margin-bottom: var(--space-lg);
}

.projected-notice svg {
  width: 16px;
  height: 16px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--nav-height);
}

.breadcrumb a {
  color: var(--color-text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb .sep {
  color: var(--color-border);
}

/* --- Visual Calendar Grid --- */
.cal-year {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.cal-month {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: visible; /* Required for sticky header and tooltips to escape */
}

.cal-month-name {
  background: var(--color-primary);
  color: #FFFFFF;
  padding: 10px var(--space-lg);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--color-border-light);
  overflow: visible; /* Required for sticky */
}

.cal-dow {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 6px 2px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: var(--nav-height);
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cal-day {
  background: var(--color-surface);
  padding: 6px 4px;
  min-height: 40px;
  font-size: 0.9rem;
  text-align: center;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  position: relative;
}

/* Tooltips for special days */
.cal-day.has-event {
  cursor: help;
}

.cal-day.has-event::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: var(--color-text);
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.cal-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-text) transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
  pointer-events: none;
}

.cal-day.has-event:hover {
  z-index: 60; /* Bring hovered cell above others */
}

.cal-day.has-event:hover::before,
.cal-day.has-event:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.cal-day.empty {
  background: var(--color-bg);
}

.cal-day.weekend {
  background: #F5F5F4;
  color: var(--color-text-muted);
}

.cal-day.no-school {
  background: #F5F5F4;
  color: var(--color-text-muted);
  opacity: 0.5;
}

.cal-day.school {
  background: var(--color-surface);
  color: var(--color-text);
}

.cal-day.holiday {
  background: var(--color-holiday-bg);
  color: var(--color-holiday);
  font-weight: 700;
}

.cal-day.break {
  background: var(--color-halfday-bg);
  color: var(--color-accent-hover);
  font-weight: 600;
}

.cal-day.first-day,
.cal-day.last-day {
  background: var(--color-primary);
  color: #FFFFFF;
  font-weight: 700;
  border-radius: 0;
}

.cal-day.exam {
  background: #ECFDF5;
  color: #065F46;
  font-weight: 500;
}

.cal-day .cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  margin-top: 2px;
}

.cal-day.holiday .cal-dot {
  background: var(--color-holiday);
}

.cal-day.break .cal-dot {
  background: var(--color-accent);
}

.cal-day.first-day .cal-dot,
.cal-day.last-day .cal-dot {
  background: #FFFFFF;
}

.cal-day.exam .cal-dot {
  background: #065F46;
}

.cal-events {
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--color-border-light);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.cal-events ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-events li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cal-events .ev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cal-events .ev-dot.dot-holiday {
  background: var(--color-holiday);
}

.cal-events .ev-dot.dot-break {
  background: var(--color-accent);
}

.cal-events .ev-dot.dot-event {
  background: var(--color-primary);
}

.cal-events .ev-dot.dot-exam {
  background: #065F46;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.cal-legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cal-legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.cal-legend-swatch.sw-school {
  background: var(--color-surface);
}

.cal-legend-swatch.sw-weekend {
  background: #F5F5F4;
}

.cal-legend-swatch.sw-holiday {
  background: var(--color-holiday-bg);
  border-color: var(--color-holiday);
}

.cal-legend-swatch.sw-break {
  background: var(--color-halfday-bg);
  border-color: var(--color-accent);
}

.cal-legend-swatch.sw-first {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.cal-legend-swatch.sw-exam {
  background: #ECFDF5;
  border-color: #065F46;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .hero {
    padding: var(--space-2xl) 0;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg);
    box-shadow: var(--shadow-lg);
  }

  .nav-toggle {
    display: block;
  }

  .quick-grid {
    grid-template-columns: 1fr;
  }

  .action-bar {
    flex-direction: column;
  }

  .action-bar .btn {
    width: 100%;
  }

  .districts-grid {
    grid-template-columns: 1fr;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .cal-year {
    grid-template-columns: 1fr;
  }

  .cal-day {
    min-height: 34px;
    font-size: 0.8rem;
    padding: 4px 2px;
  }

  .cal-dow {
    font-size: 0.65rem;
    padding: 4px 2px;
  }

  .cal-legend {
    gap: var(--space-sm) var(--space-md);
    font-size: 0.8rem;
  }


  .section {
    padding: var(--space-2xl) 0;
  }

  .container {
    padding: 0 var(--space-md);
  }

  table {
    font-size: 0.85rem;
  }

  thead th,
  tbody td {
    padding: 10px 12px;
  }

  /* P1: Nav overlay backdrop when mobile menu is open */
  .nav-links.open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: -1;
  }

  /* P1: Year switcher 閳?larger touch targets */
  .year-tab {
    padding: 10px 20px;
    min-height: 44px;
    font-size: 0.9rem;
  }

  /* P1: Hide map on mobile, show accordion first */
  .florida-interactive-map {
    display: none;
  }

  .regions-layout {
    grid-template-columns: 1fr;
  }

  /* P1: Calendar tooltip 閳?tap-to-show on touch devices */
  .cal-day.has-event.tapped::before,
  .cal-day.has-event.tapped::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

  .cal-day.has-event.tapped {
    z-index: 60;
  }
}

/* Lock body scroll when menu is open */
body.menu-open {
  overflow: hidden;
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Print --- Only calendar grid prints ---
   The "printing" class is toggled by script.js on body
   before/after window.print(). This lets us hide
   everything except #full-calendar reliably.
   ============================================ */
/* Hidden on screen, shown only in print */
.print-domain {
  display: none;
}

@media print {

  /* White background, tight page */
  body {
    background: #fff !important;
    margin: 0;
    padding: 0;
    font-size: 9pt;
  }

  @page {
    size: letter portrait;
    margin: 0.25in;
  }

  /* ---------- Hide ALL non-calendar content ---------- */
  body.printing .nav,
  body.printing .footer,
  body.printing .breadcrumb,
  body.printing .action-bar,
  body.printing .projected-notice,
  body.printing .hero,
  body.printing .hero-actions,
  body.printing .nav-toggle,
  body.printing #key-dates,
  body.printing #faq,
  body.printing .faq-list,
  body.printing .related-grid,
  body.printing .related-link,
  body.printing .disclaimer,
  body.printing .last-updated,
  body.printing .table-wrapper,
  body.printing .section:not(#full-calendar) {
    display: none !important;
  }

  /* Also hide the top breadcrumb container (direct child div) */
  body.printing>.container {
    display: none !important;
  }

  body.printing>nav {
    display: none !important;
  }

  body.printing>footer {
    display: none !important;
  }

  /* ---------- Show ONLY #full-calendar ---------- */
  body.printing #full-calendar {
    display: block !important;
    padding: 0 !important;
  }

  body.printing #full-calendar .container {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* Calendar title at top of print */
  body.printing #full-calendar h2 {
    font-size: 11pt;
    margin-bottom: 4pt;
    text-align: center;
  }

  /* Domain name floats right on same line as title */
  body.printing .print-domain {
    display: inline !important;
    float: right;
    font-size: 8pt;
    font-weight: 400;
    color: #888;
  }

  /* Hide the subtitle paragraph */
  body.printing #full-calendar>.container>p {
    display: none !important;
  }

  /* ---------- Legend (compact) ---------- */
  body.printing .cal-legend {
    border: 1px solid #ccc;
    padding: 3pt 8pt;
    margin-bottom: 5pt;
    font-size: 7pt;
    gap: 3pt 10pt;
    page-break-after: avoid;
  }

  /* ---------- Calendar grid: 3 cols, tight (12 months) ---------- */
  body.printing .cal-year {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6pt !important;
  }

  body.printing .cal-month {
    page-break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  body.printing .cal-month-name {
    background: #334155 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #fff !important;
    padding: 2pt 6pt;
    font-size: 8pt;
  }

  body.printing .cal-dow {
    background: #1E293B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    color: #fff !important;
    font-size: 5.5pt;
    padding: 2pt 1pt;
  }

  body.printing .cal-day {
    min-height: 16px;
    font-size: 6.5pt;
    padding: 1pt 1pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Print-optimized colors ---
     Deeper same-hue tones that:
     閳?Color printer 閳?vibrant, beautiful output
     閳?B&W printer  閳?well-separated gray levels
     Grayscale luminance targets:
       School  100%  |  Weekend 88%  |  Break 83%
       Exam    80%   |  Holiday 75%  |  First/Last 30%
     -------------------------------------------- */

  body.printing .cal-day.holiday {
    background: #F4B4B4 !important;
    /* soft rose 閳?gray 閳?5% */
    color: #7F1D1D !important;
    font-weight: 700;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.break {
    background: #F0D085 !important;
    /* warm gold 閳?gray 閳?3% */
    color: #78350F !important;
    font-weight: 600;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.exam {
    background: #A8D8B8 !important;
    /* sage green 閳?gray 閳?0% */
    color: #064E3B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.first-day,
  body.printing .cal-day.last-day {
    background: #1E293B !important;
    /* deep slate 閳?gray 閳?8% */
    color: #fff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.weekend {
    background: #DCDCDC !important;
    /* cool gray 閳?gray 閳?8% */
    color: #57534E !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day.no-school {
    background: #ECECEC !important;
    /* lighter gray 閳?gray 閳?3% */
    opacity: 0.7;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-day .cal-dot {
    display: none;
  }

  /* --- Legend swatches: match deeper print colors --- */
  body.printing .cal-legend-swatch.sw-holiday {
    background: #F4B4B4 !important;
    border-color: #DC2626 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-break {
    background: #F0D085 !important;
    border-color: #D97706 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-weekend {
    background: #DCDCDC !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-exam {
    background: #A8D8B8 !important;
    border-color: #065F46 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-legend-swatch.sw-first {
    background: #1E293B !important;
    border-color: #1E293B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* --- Event list below each month --- */
  body.printing .cal-events {
    font-size: 7.5pt;
    padding: 4pt 6pt;
    line-height: 1.5;
  }

  body.printing .cal-events .ev-dot {
    width: 5px;
    height: 5px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-events .ev-dot.dot-holiday {
    background: #DC2626 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-events .ev-dot.dot-break {
    background: #D97706 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-events .ev-dot.dot-event {
    background: #1E293B !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.printing .cal-events .ev-dot.dot-exam {
    background: #065F46 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 768px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }

  .back-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   District Browser 閳?Search + Accordion + Map
   ============================================ */

.district-browser {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* Search box */
.district-search-wrapper {
  position: relative;
}

.district-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
}

.district-search {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-surface);
  transition: all var(--transition);
}

.district-search:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

/* Accordion items */
.region-accordion-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.region-accordion-item:hover {
  box-shadow: var(--shadow-sm);
}

.region-accordion-item.active {
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent);
}

.region-accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: var(--color-bg);
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-align: left;
  transition: background var(--transition), color var(--transition);
  gap: var(--space-sm);
}

.region-accordion-header:hover {
  background: var(--color-bg-alt, #F5F5F4);
  color: var(--color-primary);
}

.region-accordion-header .region-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-left: var(--space-xs);
}

.region-accordion-header svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-text-muted);
  transition: transform 0.3s ease;
}

.region-accordion-header.open svg {
  transform: rotate(180deg);
}

.region-accordion-header.open {
  color: var(--color-primary);
  border-bottom: 1px solid var(--color-border-light);
}

/* Accordion body 閳?smooth collapse */
.region-accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--color-surface);
}

.region-accordion-body.open {
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--color-border) transparent;
}

.region-accordion-body::-webkit-scrollbar {
  width: 5px;
}

.region-accordion-body::-webkit-scrollbar-track {
  background: transparent;
}

.region-accordion-body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 3px;
}

@media (max-width: 768px) {
  .region-accordion-body.open {
    max-height: 320px;
  }
}

/* District list inside accordion */
.region-accordion-body ul {
  list-style: none;
  padding: var(--space-sm) 0;
  margin: 0;
}

.region-accordion-body li {
  border-bottom: 1px solid var(--color-border-light);
}

.region-accordion-body li:last-child {
  border-bottom: none;
}

.region-accordion-body li a,
.region-accordion-body li .district-coming-soon {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.93rem;
  transition: all var(--transition);
}

.region-accordion-body li a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.region-accordion-body li a:hover {
  background: var(--color-bg-alt, #F5F5F4);
  color: var(--color-primary);
}

.region-accordion-body li a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-accent);
}

/* Coming soon items */
.district-coming-soon {
  color: var(--color-text-muted);
  cursor: default;
}

.district-coming-soon svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-border);
}

.district-coming-soon .coming-soon-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Search no results */
.district-no-results {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  display: none;
}

/* Hidden during search */
.region-accordion-body li.search-hidden {
  display: none;
}

/* Map region active/dimmed states */
.interactive-regions .region-hover.map-active .region-shape {
  fill: var(--color-accent);
  fill-opacity: 0.25;
  stroke: var(--color-accent);
  stroke-width: 1.5;
}

.interactive-regions .region-hover.map-dimmed {
  opacity: 0.3;
}

/* --- District Hero Visual Treatment --- */
.district-hero {
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--color-accent), var(--color-primary)) 1;
  border-bottom: 1px solid var(--color-border);
}

/* --- Bento Grid Hero Layout --- */

/* --- Year Switcher Tabs --- */
.year-switcher {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.year-tab {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  border: 2px solid var(--color-border);
  color: var(--color-text);
  background: transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.year-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

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

/* --- Bento Grid Hero Layout --- */
.hero-split {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  align-items: center;
}

@media (min-width: 992px) {
  .hero-split {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
  .hero-left {
    flex: 1;
    max-width: 60%;
    padding-right: var(--space-2xl);
  }
  .hero-right {
    flex-shrink: 0;
    width: 380px;
  }
}

.bento-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.bento-card {
  background: var(--color-surface);
  border-radius: 16px;
  padding: var(--space-lg);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.03);
  border: 1px solid rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bento-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
}

.bento-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.bento-bookends {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
}

.bento-half {
  display: flex;
  flex-direction: column;
}

.bento-align-right {
  align-items: flex-end;
  text-align: right;
}

.bento-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  margin: 0 var(--space-md);
}

.bento-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.bento-value {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.bento-bookends .bento-value {
  font-size: 1.35rem;
}

.bento-highlight {
  border: 1px solid rgba(15, 118, 110, 0.15); /* primary tint */
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 100%);
}

.bento-highlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.bento-highlight .bento-label {
  margin-bottom: 0;
  color: var(--color-primary-dark);
}

.badge-tag {
  background: rgba(15, 118, 110, 0.1);
  color: var(--color-primary-dark);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 100px;
  font-weight: 700;
}

/* --- Status Notice (Official / Projected) --- */
.status-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border: 1px solid;
  margin: var(--space-lg) 0;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 850px;
}

.status-notice svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.status-notice.status-official {
  background: var(--color-accent-light);
  border-color: rgba(13, 148, 136, 0.25);
  color: var(--color-accent-hover);
}

.status-notice.status-projected {
  background: #FFF7ED;
  border-color: rgba(234, 179, 8, 0.35);
  color: #92400E;
}

/* --- Action Bar --- */
.action-bar {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.action-bar .btn {
  flex: 1 1 0;
  justify-content: center;
  text-align: center;
}

.action-bar-hint {
  width: 100%;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.action-bar-hint a {
  color: var(--color-text-secondary);
  text-decoration: underline;
}

.action-bar-hint a:hover {
  color: var(--color-primary);
}


/* ========================================
   Hero Dropdown Autocomplete
   ======================================== */
.relative { position: relative; }
.hero-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-top: var(--space-xs);
  box-shadow: var(--shadow-xl);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  list-style: none;
  padding: var(--space-xs) 0;
  text-align: left;
}
.hero-dropdown.hidden {
  display: none;
}
.hero-dropdown li {
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hero-dropdown li:hover {
  background-color: var(--color-bg-alt);
}
/* ========================================
   Phase 2: UI/UX Audit Improvements
   ======================================== */

/* 2. Mobile Horizontal Scroll (Top 5) */
.districts-grid#top5-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

@media (max-width: 768px) {
  .districts-grid#top5-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: var(--space-md);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .districts-grid#top5-grid::-webkit-scrollbar {
    display: none;
  }
  .districts-grid#top5-grid .card {
    flex: 0 0 85%;
    scroll-snap-align: center;
    max-width: 280px;
  }
}

/* 3. Mobile Calendar List View Visibility */
.hidden-desktop { display: none !important; }
@media (max-width: 768px) {
  .hidden-desktop { display: block !important; }
  .hidden-mobile { display: none !important; }
}

/* 4. Perfect Print Styles */
@media print {
  .nav, footer, .region-map-container, .interactive-regions, .map-pins, .hero, .hero-actions, .faq-list, #back-to-top, .district-search-wrapper, .btn, .map-svg, #region-accordion, .global-year-switcher {
    display: none !important;
  }
  body, .section {
    background-color: transparent !important;
    background: none !important;
    color: #000 !important;
  }
  .card, .calendar-container {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
  .calendar-container {
    page-break-inside: avoid;
  }
  .calendar-month {
    page-break-inside: avoid;
  }
  a { text-decoration: none; color: #000; }
}

/* 5. Modern CSS Polish (Micro-interactions) */
/* Glassmorphism for nav */
.nav {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.85);
}

/* Enhanced Card Hover */
.card {
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -4px rgba(0,0,0,0.08), 0 4px 8px -2px rgba(0,0,0,0.04);
}

/* FadeUp Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }

/* ========================================
   Quick Pills (Hero Section)
   ======================================== */
.hero-quick-pills {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
}
.pill-label {
  color: var(--color-text-muted);
  margin-right: 4px;
}
.quick-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(0, 150, 136, 0.08); /* slight teal tint */
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(0, 150, 136, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quick-pill:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 150, 136, 0.2);
}

/* ========================================
   Quick Pills (Hero Section)
   ======================================== */
.hero-quick-pills {
  margin-top: var(--space-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  font-size: 0.9rem;
}
.pill-label {
  color: var(--color-text-muted);
  margin-right: 4px;
}
.quick-pill {
  padding: 6px 14px;
  border-radius: 999px;
  background-color: rgba(0, 150, 136, 0.08); /* slight teal tint */
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid rgba(0, 150, 136, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.quick-pill:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 150, 136, 0.2);
}

/* ========================================
   Mobile Footer Accordions
   ======================================== */
.footer-details summary {
  list-style: none; /* standard reset */
}
.footer-details summary::-webkit-details-marker {
  display: none; /* Safari reset */
}

@media (max-width: 768px) {
  .footer-details {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-xs);
  }
  .footer-details summary {
    cursor: pointer;
    position: relative;
    padding: var(--space-sm) 0;
  }
  .footer-details summary h4 {
    margin-bottom: 0;
  }
  /* Toggle Icon */
  .footer-details summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--color-primary);
    line-height: 1;
  }
  .footer-details[open] summary::after {
    content: '閳?;
  }
  .footer-details .footer-links {
    padding-bottom: var(--space-md);
  }
}

@media (min-width: 769px) {
  .footer-details summary {
    cursor: default;
    pointer-events: none;
  }
}
@media (min-width: 769px) { .footer-details[open] > *:not(summary), .footer-details:not([open]) > *:not(summary) { display: block !important; } }

/* ========================================
   Mobile Footer Accordions (Polished)
   ======================================== */
.footer-details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--space-md);
}
.footer-details summary {
  list-style: none !important;
  cursor: pointer;
  padding: var(--space-sm) 0;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
}
.footer-details summary::-webkit-details-marker {
  display: none !important;
}
.footer-details summary::marker {
  display: none !important;
}
.footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-details summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--color-primary);
  font-weight: 300;
  line-height: 1;
}
.footer-details[open] summary::after {
  content: '閳?;
}
.footer-details .footer-links {
  padding-bottom: var(--space-sm);
  margin-top: 0;
}

@media (min-width: 769px) {
  .footer-details {
    border-bottom: none;
    margin-bottom: 0;
  }
  .footer-details summary {
    cursor: default;
    pointer-events: none;
    padding: 0 0 var(--space-sm) 0;
  }
  .footer-details summary::after {
    display: none;
  }
  .footer-details[open] > *:not(summary),
  .footer-details:not([open]) > *:not(summary) {
    display: block !important;
  }
}

@ m e d i a ( m a x - w i d t h : 7 6 8 p x ) { . f o o t e r - g r i d { g a p : v a r ( - - s p a c e - s m ) ! i m p o r t a n t } . f o o t e r - d e t a i l s { m a r g i n - b o t t o m : 0 ! i m p o r t a n t } . f o o t e r - d e t a i l s   s u m m a r y { p a d d i n g : 1 0 p x   0 ! i m p o r t a n t } }  
 @ m e d i a ( m a x - w i d t h : 7 6 8 p x ) { . f o o t e r - d e t a i l s : l a s t - c h i l d { b o r d e r - b o t t o m : n o n e ! i m p o r t a n t } }  
 
.footer-details:last-child{border-bottom:none!important}
details.footer-details:last-of-type{border-bottom:none!important}
/* ========================================
   Mobile Compact Spacing Override
   ======================================== */
@media (max-width: 768px) {
  .section { padding: var(--space-xl) 0 !important; }
  .hero { padding: var(--space-xl) 0 var(--space-lg) !important; }
  .section-header { margin-bottom: var(--space-md) !important; }
  .section-header h2 { font-size: 1.4rem !important; }
  .section-header p { font-size: 0.9rem !important; margin-top: var(--space-xs) !important; }
  .container { padding: 0 var(--space-md) !important; }
  .hero .container { padding: 0 var(--space-lg) !important; }
  .hero h1 { font-size: 1.6rem !important; }
  .hero p { font-size: 0.95rem !important; }
  .card { padding: var(--space-md) !important; }
  .essentials-grid { gap: var(--space-md) !important; }
  .faq-list { gap: var(--space-sm) !important; }
  .footer { padding: var(--space-xl) 0 var(--space-md) !important; }
}