/* ===== ADU Directory - Niagara Region ===== */
/* Base Reset & Variables */
:root {
  --primary: #1a5276;
  --primary-light: #2980b9;
  --primary-dark: #0e2f44;
  --accent: #e67e22;
  --accent-light: #f39c12;
  --success: #27ae60;
  --warning: #f1c40f;
  --danger: #e74c3c;
  --info: #3498db;
  --gray-50: #f8f9fa;
  --gray-100: #f1f3f5;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #868e96;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --max-width: 1200px;
  --transition: 0.2s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.65;
}
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }

/* ===== Header / Nav ===== */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem;
}
.logo { font-size: 1.3rem; font-weight: 700; color: var(--white); display: flex; align-items: center; gap: 0.5rem; }
.logo span { color: var(--accent-light); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }
.main-nav ul { list-style: none; display: flex; gap: 0.25rem; }
.main-nav a {
  color: rgba(255,255,255,0.85); padding: 0.5rem 0.85rem; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 500; transition: all var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--white); background: rgba(255,255,255,0.15); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: var(--white);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
}
.hero h1 { font-size: 2.4rem; font-weight: 800; margin-bottom: 0.75rem; line-height: 1.2; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 700px; margin: 0 auto 1.5rem; }
.hero-stats {
  display: flex; justify-content: center; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem;
}
.hero-stat { text-align: center; }
.hero-stat .num { font-size: 2rem; font-weight: 800; color: var(--accent-light); display: block; }
.hero-stat .label { font-size: 0.85rem; opacity: 0.8; }

/* ===== Container ===== */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.75rem; font-weight: 700; color: var(--primary-dark);
  margin-bottom: 0.5rem;
}
.section-subtitle { color: var(--gray-600); font-size: 1.05rem; margin-bottom: 2rem; }

/* ===== Phase Cards (Homepage) ===== */
.phase-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.5rem; }
.phase-card {
  background: var(--white); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md); transition: transform var(--transition), box-shadow var(--transition);
}
.phase-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.phase-header { padding: 1.25rem 1.5rem; color: var(--white); font-weight: 700; font-size: 1.1rem; }
.phase-header.before { background: var(--info); }
.phase-header.during { background: var(--success); }
.phase-header.after  { background: var(--accent); }
.phase-body { padding: 1.25rem 1.5rem; }
.phase-link {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800); font-size: 0.95rem; transition: color var(--transition);
}
.phase-link:last-child { border-bottom: none; }
.phase-link:hover { color: var(--primary-light); }
.phase-link .icon { font-size: 1.3rem; width: 2rem; text-align: center; flex-shrink: 0; }
.phase-link .desc { font-size: 0.82rem; color: var(--gray-500); }

/* ===== Quick Reference Tables ===== */
.quick-ref { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.ref-card {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.ref-card-title {
  padding: 0.85rem 1.25rem; font-weight: 700; font-size: 0.95rem;
  background: var(--gray-100); border-bottom: 2px solid var(--primary-light);
}
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.ref-table th { background: var(--gray-50); text-align: left; padding: 0.6rem 1rem; font-weight: 600; color: var(--gray-700); border-bottom: 1px solid var(--gray-200); }
.ref-table td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--gray-100); }
.ref-table tr:last-child td { border-bottom: none; }

/* ===== Status Badges ===== */
.badge {
  display: inline-block; padding: 0.2rem 0.6rem; border-radius: 20px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-open { background: #d4edda; color: #155724; }
.badge-capacity { background: #fff3cd; color: #856404; }
.badge-hold { background: #f8d7da; color: #721c24; }
.badge-coming { background: #d1ecf1; color: #0c5460; }
.badge-check { background: #e2e3f1; color: #383d6e; }

/* ===== Municipality Grid ===== */
.muni-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.muni-card {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 1.25rem; transition: all var(--transition);
  border-left: 4px solid var(--primary-light);
}
.muni-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.muni-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--primary-dark); }
.muni-card .program { font-size: 0.88rem; color: var(--gray-600); margin-bottom: 0.5rem; }
.muni-card .amount { font-size: 1.15rem; font-weight: 700; color: var(--success); margin-bottom: 0.5rem; }
.muni-card .contact { font-size: 0.82rem; color: var(--gray-500); }
.muni-card.status-open { border-left-color: var(--success); }
.muni-card.status-capacity { border-left-color: var(--warning); }
.muni-card.status-hold { border-left-color: var(--danger); }
.muni-card.status-coming { border-left-color: var(--info); }
.muni-card.status-check { border-left-color: var(--gray-400); }

/* ===== Content Pages ===== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: var(--white); padding: 2.5rem 1.5rem 2rem; text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.page-hero p { opacity: 0.85; max-width: 600px; margin: 0 auto; }
.breadcrumb { font-size: 0.85rem; margin-bottom: 1rem; opacity: 0.7; }
.breadcrumb a { color: var(--white); opacity: 0.8; }
.breadcrumb a:hover { opacity: 1; }

.content-wrapper {
  display: grid; grid-template-columns: 260px 1fr; gap: 2rem;
  max-width: var(--max-width); margin: 0 auto; padding: 2rem 1.5rem;
}
.sidebar {
  position: sticky; top: 80px; align-self: start;
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); padding: 1.25rem; max-height: calc(100vh - 100px); overflow-y: auto;
}
.sidebar h3 { font-size: 0.85rem; text-transform: uppercase; color: var(--gray-500); letter-spacing: 1px; margin-bottom: 0.75rem; }
.sidebar-nav a {
  display: block; padding: 0.45rem 0.75rem; margin-bottom: 0.15rem;
  font-size: 0.88rem; color: var(--gray-700); border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.sidebar-nav a:hover, .sidebar-nav a.active { background: var(--gray-100); color: var(--primary-light); }
.sidebar-nav a.sub { padding-left: 1.5rem; font-size: 0.82rem; color: var(--gray-500); }

.content-main {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 2rem 2.5rem;
  min-width: 0;
}
.content-main h2 {
  font-size: 1.5rem; color: var(--primary-dark); margin: 2rem 0 0.75rem;
  padding-bottom: 0.5rem; border-bottom: 2px solid var(--gray-200);
}
.content-main h2:first-child { margin-top: 0; }
.content-main h3 { font-size: 1.15rem; color: var(--gray-800); margin: 1.5rem 0 0.5rem; }
.content-main p { margin-bottom: 1rem; color: var(--gray-700); }
.content-main ul, .content-main ol { margin: 0.5rem 0 1rem 1.5rem; color: var(--gray-700); }
.content-main li { margin-bottom: 0.35rem; }

/* Tables inside content */
.content-main table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
.content-main th {
  background: var(--primary-dark); color: var(--white);
  padding: 0.7rem 1rem; text-align: left; font-weight: 600;
}
.content-main td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--gray-200); }
.content-main tr:nth-child(even) td { background: var(--gray-50); }

/* Callout boxes */
.callout {
  padding: 1rem 1.25rem; border-radius: var(--radius-sm);
  margin: 1rem 0; font-size: 0.92rem;
  border-left: 4px solid;
}
.callout-info { background: #ebf5fb; border-color: var(--info); }
.callout-warning { background: #fef9e7; border-color: var(--warning); }
.callout-danger { background: #fdedec; border-color: var(--danger); }
.callout-success { background: #eafaf1; border-color: var(--success); }
.callout-title { font-weight: 700; margin-bottom: 0.25rem; }

/* Checklist */
.checklist { list-style: none; margin-left: 0; }
.checklist li {
  padding: 0.5rem 0 0.5rem 2rem; position: relative;
  border-bottom: 1px solid var(--gray-100);
}
.checklist li::before {
  content: '☐'; position: absolute; left: 0; top: 0.5rem;
  font-size: 1.1rem; color: var(--primary-light);
}

/* ===== Contact Cards ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.contact-card {
  background: var(--gray-50); border-radius: var(--radius-sm); padding: 1rem;
  border: 1px solid var(--gray-200);
}
.contact-card h4 { font-size: 0.95rem; color: var(--primary-dark); margin-bottom: 0.35rem; }
.contact-card p { font-size: 0.85rem; color: var(--gray-600); margin-bottom: 0.15rem; }

/* ===== Footer ===== */
.site-footer {
  background: var(--gray-900); color: var(--gray-400); padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem;
}
.footer-col h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 0.75rem; }
.footer-col a { display: block; color: var(--gray-400); font-size: 0.88rem; padding: 0.2rem 0; }
.footer-col a:hover { color: var(--accent-light); }
.footer-bottom {
  text-align: center; padding-top: 1.5rem; margin-top: 2rem;
  border-top: 1px solid var(--gray-800); font-size: 0.82rem;
}
.disclaimer {
  background: var(--gray-800); border-radius: var(--radius-sm);
  padding: 1rem; margin-top: 1.5rem; font-size: 0.8rem; line-height: 1.5;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .content-wrapper { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-stats { gap: 1.25rem; }
  .phase-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--primary-dark); padding: 1rem; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { display: block; padding: 0.65rem 1rem; }
  .content-main { padding: 1.5rem; }
  .muni-grid { grid-template-columns: 1fr; }
}
