/*
 * Global stylesheet for the Clean Air for Schools website. This file defines
 * typography, layout primitives, navigation styling and responsive
 * behaviours. The design uses a professional navy/teal color scheme
 * to evoke trust and cleanliness.
 */

/* ========================================
   1. CSS VARIABLES & RESET
   ======================================== */

:root {
  --primary: #1a365d;            /* deep navy for headings and primary elements */
  --secondary: #2d3748;          /* charcoal gray for secondary elements */
  --accent: #f7fafc;             /* very light gray background */
  --bg: #ffffff;                 /* pure white page background */
  --text: #2d3748;               /* dark gray text for readability */
  --text-light: #4a5568;        /* lighter gray for secondary text */
  --card-bg: #ffffff;            /* white card backgrounds */
  --table-header-bg: #f7fafc;   /* very light gray for table headers */
  --footnote-text: #718096;     /* medium gray for footnote text */
  --border-color: #e2e8f0;      /* light gray border */
  --link-color: #3182ce;        /* professional blue for links */
  --link-hover: #2c5282;        /* darker blue on hover */
  --highlight: #edf2f7;         /* subtle highlight background */
  --shadow: rgba(0, 0, 0, 0.1);  /* subtle shadow */
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ========================================
   2. BASE TYPOGRAPHY & LAYOUT
   ======================================== */

html, body {
  font-family: 'Avenir Next', Avenir, 'Helvetica Neue', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: #fafafa;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.015em;
  font-weight: 400;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* ========================================
   3. NAVIGATION
   ======================================== */

header {
  background: var(--bg);
  color: var(--text);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px var(--shadow);
  border-bottom: 1px solid var(--border-color);
}

header .nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--primary);
}

header h1 a {
  color: var(--primary);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

header h1 a:hover {
  opacity: 0.8;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease, border-bottom-color 0.2s ease;
  padding: 0.5rem 0 0.25rem 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  display: inline-block;
}

nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
  text-decoration: none;
}

/* Dropdown submenu styles */
nav ul li {
  position: relative;
  display: flex;
  align-items: center;
}

/* Parent menu items with submenus - not clickable */
nav ul li.has-submenu > a {
  cursor: default;
  pointer-events: auto;
}

nav ul li.has-submenu > a:hover {
  cursor: default;
  color: var(--primary);
  border-bottom-color: transparent;
}

/* Add dropdown arrow indicator to show it has submenu */
nav ul li.has-submenu > a::after {
  content: ' ▾';
  font-size: 1.2em;
  margin-left: 0.15rem;
  color: #3182ce;
  opacity: 1;
}

/* Create invisible bridge between parent and submenu */
nav ul li.has-submenu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
  display: none;
}

nav ul li.has-submenu:hover::after {
  display: block;
}

nav ul li ul {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: var(--bg);
  box-shadow: 0 4px 12px var(--shadow);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 200px;
  z-index: 1001;
}

nav ul li:hover > ul {
  display: block;
}

/* Touch-friendly dropdown on mobile */
@media (max-width: 768px) {
  nav ul li ul {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 0.25rem;
    padding: 0.25rem 0 0.25rem 1rem;
    min-width: auto;
  }

  nav ul li:hover > ul,
  nav ul li:focus-within > ul {
    display: block;
  }
}

nav ul li ul li {
  display: block;
  padding: 0;
  text-align: center;
}

nav ul li ul li a {
  display: inline-block;
  padding: 0.75rem 1rem 0.25rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

nav ul li ul li a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ========================================
   4. HERO SECTIONS
   ======================================== */

.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  padding: 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero img {
  width: 100%;
  height: auto;
  min-height: 500px;
  object-fit: cover;
  display: block;
}

.hero .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(45, 55, 72, 0.85) 100%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
  overflow: visible;
}

.hero h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: white;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  max-width: 800px;
  margin: 0 auto 1.8rem;
  opacity: 1;
  line-height: 1.5;
  color: white;
}

/* Hero variants */
.case-hero {
  background: linear-gradient(135deg, #0d7a94 0%, #1a5c6e 100%);
  color: white;
  text-align: center;
  padding: 4rem 0;
}

.research-hero {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  color: white;
  padding: 4rem 0;
}

.research-hero .overlay h2,
.research-hero .overlay p {
  color: white;
}

.research-hero .overlay p {
  opacity: 0.9;
}

.solution-hero {
  background: linear-gradient(135deg, #2563a8 0%, #3182ce 100%);
  color: white;
  padding: 4rem 0;
}

.solution-hero .overlay h2,
.solution-hero .overlay p {
  color: white;
}

.solution-hero .overlay p {
  opacity: 0.9;
}

.understanding-hero {
  background: linear-gradient(135deg, #1e88a8 0%, #2d9fc2 100%);
  color: white;
  padding: 4rem 0;
}

.understanding-hero .overlay h2,
.understanding-hero .overlay p {
  color: white;
}

.understanding-hero .overlay p {
  opacity: 0.9;
}

.innovation-hero {
  background: linear-gradient(135deg, #0d7a94 0%, #1a88a5 100%);
  color: white;
  padding: 4rem 0;
}

.innovation-hero .overlay h2,
.innovation-hero .overlay p {
  color: white;
}

.innovation-hero .overlay p {
  opacity: 0.9;
}

.about-hero {
  background: linear-gradient(135deg, #3b5268 0%, #4a6a8a 100%);
  color: white;
  padding: 4rem 0;
}

.about-hero .overlay h2,
.about-hero .overlay p {
  color: white;
}

.about-hero .overlay p {
  opacity: 0.9;
}

.getinvolved-hero {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
  color: white;
  padding: 4rem 0;
}

.getinvolved-hero .overlay h2,
.getinvolved-hero .overlay p {
  color: white;
}

.getinvolved-hero .overlay p {
  opacity: 0.9;
}

/* Legacy guidance-hero class for backwards compatibility */
.guidance-hero {
  background: linear-gradient(135deg, #2563a8 0%, #3182ce 100%);
  color: white;
  padding: 4rem 0;
}

.guidance-hero .overlay h2,
.guidance-hero .overlay p {
  color: white;
}

.guidance-hero .overlay p {
  opacity: 0.9;
}

/* Override absolute positioning for non-image hero variants */
.case-hero .overlay,
.research-hero .overlay,
.solution-hero .overlay,
.understanding-hero .overlay,
.innovation-hero .overlay,
.about-hero .overlay,
.getinvolved-hero .overlay,
.guidance-hero .overlay {
  position: relative;
  background: none;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  height: auto;
}

.case-hero h2 {
  color: white;
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 2rem;
}

.case-hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  max-width: 800px;
  margin: 2rem auto 0;
  color: rgba(255, 255, 255, 0.95);
}

.page-hero {
  background: var(--accent);
  border-bottom: 1px solid var(--border-color);
}

.page-hero .container {
  padding: 4rem 0;
}

.page-hero h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.page-hero p {
  max-width: 800px;
  font-size: 1.1rem;
}

/* ========================================
   5. BUTTONS & CTAs
   ======================================== */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 3rem;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.5;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  position: relative;
  overflow: visible;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.cta-button:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
}

.cta-button.secondary {
  background: transparent;
  color: var(--primary);
  border: 3px solid var(--primary);
  box-shadow: 0 4px 15px rgba(26, 54, 93, 0.2);
}

.cta-button.secondary:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 35px rgba(26, 54, 93, 0.4);
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Form button styles */
form .cta-button {
  border: none;
  cursor: pointer;
}

form .cta-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========================================
   6. SECTIONS & CONTENT
   ======================================== */

section {
  padding: 4rem 0;
}

section h3 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

section h4 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1.5rem 0;
  color: var(--primary);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

section p, section li {
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
}

section ul {
  padding-left: 1.5rem;
  list-style-type: none;
}

section ul li {
  position: relative;
  padding-left: 1rem;
}

section ul li::before {
  content: "•";
  color: var(--primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* Add top margin to the first content section after hero */
section.hero + section.container {
  margin-top: 5rem;
}

/* ========================================
   7. CARDS & LAYOUTS
   ======================================== */

/* Professional card styling for content sections */
section.container:not(.footnotes) {
  background: var(--card-bg);
  border-radius: 0.75rem;
  box-shadow: 0 4px 12px var(--shadow);
  padding: 3rem;
  margin-bottom: 3rem;
  border: 1px solid var(--border-color);
  position: relative;
}

/* Two-column layout for content */
.columns {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .columns {
    flex-direction: row;
  }
  .columns .column {
    flex: 1;
  }
}

/* Grid utilities */
.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Form cards */
.form-card,
.contact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.05);
}

.form-card h3,
.contact-card h3 {
  font-family: 'Playfair Display', serif;
  color: var(--primary);
  margin-bottom: 1rem;
}

/* ========================================
   8. RESEARCH PAGE COMPONENTS
   ======================================== */

.study-entry {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.study-entry:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.study-entry h4,
.study-entry h5 {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--primary);
  line-height: 1.4;
}

.study-entry h4 a,
.study-entry h5 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.study-entry h4 a:hover,
.study-entry h5 a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.study-meta {
  font-style: italic;
  color: var(--footnote-text);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
}

.study-entry p {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.significance {
  background: rgba(25, 100, 126, 0.05);
  border-left: 4px solid var(--secondary);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  border-radius: 0 0.375rem 0.375rem 0;
  font-size: 0.95rem;
}

/* Research grid layouts */
.research-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .research-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  }
}

.study-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.study-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.study-card h4 {
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-family: 'Playfair Display', serif;
}

/* Stats and impact displays */
.study-impact,
.evidence-stat,
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1rem;
  padding: 1rem;
  background: var(--accent);
  border-radius: 0.5rem;
}

.impact-number,
.evidence-number,
.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
}

.stat-number {
  font-size: 2.2rem;
}

.evidence-number {
  font-size: 2.5rem;
}

.impact-label,
.evidence-label,
.stat-label {
  font-size: 0.85rem;
  color: var(--footnote-text);
  margin-top: 0.25rem;
  line-height: 1.3;
}

.stat-label {
  font-size: 0.9rem;
}

/* Stats grids */
.stats-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 576px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* ========================================
   9. SPECIALIZED COMPONENTS
   ======================================== */

/* Economic research cards */
.economic-research {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .economic-research {
    grid-template-columns: 1fr 1fr;
  }
}

.cost-benefit-card,
.equity-impact {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
}

.cost-comparison,
.cost-breakdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.cost-breakdown {
  gap: 2rem;
}

.cost-item {
  text-align: center;
  padding: 1rem;
  border-radius: 0.5rem;
  min-width: 120px;
  background: var(--accent);
}

.cost-breakdown .cost-item {
  min-width: 140px;
}

.cost-item.green {
  background: rgba(126, 211, 33, 0.1);
  border: 2px solid #7ed321;
}

.cost-item.red {
  background: rgba(227, 66, 52, 0.1);
  border: 2px solid #e34234;
}

.cost-amount,
.cost-range {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
}

.cost-amount {
  color: inherit;
}

.cost-range {
  color: var(--primary);
}

.cost-desc {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  color: var(--footnote-text);
}

.cost-breakdown .cost-desc {
  font-size: 0.9rem;
}

.vs {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.2rem;
}

/* Hero stats */
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
}

.hero-number {
  font-size: 3.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-label {
  font-size: 1.1rem;
  text-align: center;
  line-height: 1.4;
  opacity: 0.95;
}

/* Evidence highlights */
.evidence-highlight {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--accent);
  border-radius: 1rem;
}

@media (min-width: 768px) {
  .evidence-highlight {
    grid-template-columns: repeat(3, 1fr);
  }
}

.evidence-stat {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Evidence grid for home page */
.evidence-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 576px) {
  .evidence-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .evidence-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.evidence-card {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.evidence-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.evidence-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: grayscale(20%);
  transition: all 0.3s ease;
}

.evidence-card:hover .evidence-icon {
  transform: scale(1.15);
  filter: grayscale(0%);
}

.evidence-card h4 {
  color: var(--primary);
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  margin-top: 0.5rem;
  margin-bottom: 5px;
  font-weight: 700;
}

.evidence-card p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-light);
  margin-bottom: 1.2rem;
}

.cost-highlight {
  background: linear-gradient(135deg, rgba(49, 130, 206, 0.1) 0%, rgba(26, 54, 93, 0.05) 100%);
  border: 2px solid var(--primary);
  border-radius: 1rem;
  padding: 2rem;
  margin: 2rem 0 0;
  text-align: center;
  box-shadow: 0 4px 12px rgba(26, 54, 93, 0.1);
}

.cost-highlight p {
  font-size: 1.25rem;
  margin: 0;
  color: var(--primary);
  line-height: 1.6;
}

/* Equity components */
.equity-stats {
  margin-top: 1.5rem;
  text-align: center;
}

.equity-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--accent);
  border-radius: 0.5rem;
}

.equity-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
}

.equity-label {
  font-size: 0.9rem;
  color: var(--footnote-text);
  margin-top: 0.5rem;
  text-align: center;
}

/* ========================================
   10. CARDS & GRIDS
   ======================================== */

/* Benefits grid */
.benefits-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.benefit-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  transition: all 0.3s ease;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.benefit-card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
}

/* Problem cards */
.problem-cards {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .problem-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.problem-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
}

.problem-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.problem-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.problem-card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
}

.problem-stat {
  font-size: 3rem;
  font-weight: 700;
  color: #e34234;
  font-family: 'Playfair Display', serif;
  margin: 1rem 0;
  display: block;
}

/* Action items */
.action-items {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .action-items {
    grid-template-columns: repeat(3, 1fr);
  }
}

.action-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.action-card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

/* Methodology grid */
.methodology-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .methodology-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.method-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.method-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.method-card h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
}

/* Solution items */
.solutions-section {
  margin: 2rem 0;
}

.solution-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 2rem;
}

.solution-item h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
}

/* ========================================
   11. CALLOUTS & HIGHLIGHTS
   ======================================== */

.mechanism-callout,
.note {
  background: rgba(25, 100, 126, 0.05);
  border-left: 4px solid var(--primary);
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
}

.note {
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 0.75rem 0 0.5rem;
  font-size: 0.95rem;
  border-left: 4px solid var(--secondary);
}

.mechanism-callout h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
}

.equity-highlight {
  background: rgba(126, 211, 33, 0.05);
  border-left: 4px solid #7ed321;
  padding: 2rem;
  margin: 2rem 0;
  border-radius: 0 0.75rem 0.75rem 0;
}

.rare-exception {
  background: rgba(25, 100, 126, 0.05);
  border: 2px solid var(--secondary);
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.rare-exception p {
  font-size: 1.1rem;
  margin: 0;
}

.epa-callout {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}

.epa-callout p {
  margin: 0;
  font-size: 1.1rem;
}

/* Mission Statement */
.mission-section {
  background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%) !important;
  border: 2px solid var(--primary) !important;
  box-shadow: 0 8px 24px rgba(26, 54, 93, 0.15) !important;
  text-align: center;
  padding: 3rem 2.5rem !important;
}

.mission-statement {
  font-size: 1.5rem;
  line-height: 1.7;
  color: var(--primary);
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.mission-highlight {
  font-weight: 700;
  color: var(--primary);
  position: relative;
}

/* Mobile adjustments for mission */
@media (max-width: 768px) {
  .mission-section {
    padding: 2rem 1.5rem !important;
  }

  .mission-statement {
    font-size: 1.2rem;
    line-height: 1.6;
  }
}

/* Final CTA section */
.final-cta {
  background: linear-gradient(135deg, var(--accent) 0%, #f0f8ff 100%);
  border-radius: 1rem;
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 3rem;
}

.cta-content h3 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
  color: var(--primary);
}

.cta-text {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   12. TABLES & DATA
   ======================================== */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  background: var(--card-bg);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

th, td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

th {
  background: var(--table-header-bg);
  font-weight: 600;
  color: var(--primary);
}

tr:last-child td {
  border-bottom: none;
}

/* ========================================
   13. FOOTNOTES & CITATIONS
   ======================================== */

.footnotes {
  font-size: 0.9rem;
  border-top: 2px solid var(--border-color);
  margin-top: 4rem;
  padding-top: 2rem;
  color: var(--footnote-text);
  background: var(--highlight);
  padding: 2rem;
  border-radius: 0.5rem;
}

.footnotes ol {
  list-style: decimal;
  padding-left: 1.5rem;
  line-height: 1.6;
}

.footnotes a {
  color: var(--link-color);
  word-break: break-word;
}

.citation {
  vertical-align: super;
  font-size: 0.75em;
  margin-left: 2px;
  color: var(--link-color);
}

/* ========================================
   14. READING LIST & LISTS
   ======================================== */

.reading-category {
  margin-bottom: 2rem;
}

.reading-category h4 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
  font-family: 'Playfair Display', serif;
}

.reading-category ul {
  list-style: square;
  padding-left: 1.25rem;
}

.research-list {
  list-style: none;
  padding: 0;
}

.research-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.research-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 600;
}

/* ========================================
   15. ANIMATION & INTERACTIVE
   ======================================== */

#airCanvas {
  width: 100%;
  max-width: 800px;
  height: 400px;
  border: 1px solid #d9e2e7;
  background: #f5faff;
  margin: 1rem auto;
  display: block;
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.toggle-wrapper input[type="checkbox"] {
  width: 40px;
  height: 20px;
  appearance: none;
  background: #ccc;
  border-radius: 20px;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle-wrapper input[type="checkbox"]:checked {
  background: #0d7a94;
}

.toggle-wrapper input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.toggle-wrapper input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

.toggle-wrapper label {
  font-size: 0.95rem;
  color: #33535f;
}

/* ========================================
   16. DECORATIVE ELEMENTS
   ======================================== */

.decor-image {
  width: 100%;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  display: block;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* ========================================
   17. FORMS
   ======================================== */

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

input[type="text"],
input[type="email"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  resize: vertical;
  min-height: 160px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(108,165,192,0.25);
}

.helper {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--footnote-text);
}

.consent-row {
  margin: 0.75rem 0 0.5rem;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.checkbox input[type="checkbox"] {
  width: 18px; 
  height: 18px;
  accent-color: var(--secondary);
}

.actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.sending {
  font-size: 0.95rem;
  color: var(--footnote-text);
}

.status {
  margin-top: 0.75rem;
  font-weight: 600;
  padding: 0.6rem 0.8rem;
  border-radius: 0.5rem;
  display: none;
}

.status.success,
.status.error {
  display: block;
}

.status.success {
  color: #155724;
  background: #d4edda;
  border: 1px solid #c3e6cb;
}

.status.error {
  color: #721c24;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
}

.error-msg {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: #e34234;
  min-height: 1.2em;
}

input.invalid,
select.invalid,
textarea.invalid {
  border-color: #e34234 !important;
  box-shadow: 0 0 0 3px rgba(227, 66, 52, 0.15);
}

input.valid,
select.valid,
textarea.valid {
  border-color: #7ed321;
  box-shadow: 0 0 0 3px rgba(126, 211, 33, 0.12);
}

/* ========================================
   18. ACCESSIBILITY
   ======================================== */

.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;
}

.required {
  color: #e34234;
}

/* ========================================
   19. MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 768px) {
  /* Header and navigation */
  header {
    padding: 0.75rem 0;
  }

  header .nav-wrapper {
    flex-direction: column;
    gap: 1rem;
  }

  header h1 {
    font-size: 1.3rem;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
  }

  nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
  }

  nav ul li ul li a {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
  }

  /* Hero sections */
  .hero img {
    min-height: auto;
  }

  .hero .overlay {
    padding: 2.5rem 1.5rem;
    position: relative;
    height: auto;
    min-height: auto;
  }

  .case-hero .overlay,
  .research-hero .overlay,
  .solution-hero .overlay,
  .understanding-hero .overlay,
  .innovation-hero .overlay,
  .about-hero .overlay,
  .getinvolved-hero .overlay,
  .guidance-hero .overlay {
    padding: 1.5rem 1rem;
  }

  .hero h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    margin-bottom: 1rem;
  }

  .hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
  }

  /* Sections and content */
  section {
    padding: 2rem 0;
  }

  section.container:not(.footnotes) {
    padding: 1.5rem;
  }

  section h3 {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
  }

  section h4 {
    font-size: 1.4rem;
    margin: 1.5rem 0 1rem 0;
  }

  section p, section li {
    font-size: 1rem;
  }

  /* Buttons */
  .cta-button {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    width: 100%;
    max-width: 300px;
    text-align: center;
    text-transform: none;
    line-height: 1.4;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  /* Cards */
  .form-card,
  .contact-card {
    padding: 1.5rem;
  }

  .study-entry,
  .benefit-card,
  .problem-card,
  .action-card,
  .method-card,
  .solution-item {
    padding: 1.5rem;
  }

  /* Tables - add horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  th, td {
    padding: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* Evidence grid on home page */
  .evidence-grid {
    gap: 1rem;
  }

  .evidence-card {
    padding: 1rem;
  }

  /* Cost items */
  .cost-item {
    min-width: 100px;
  }

  .cost-breakdown .cost-item {
    min-width: 120px;
  }

  /* Final CTA */
  .final-cta {
    padding: 2rem 1rem;
  }

  .cta-text {
    font-size: 1.1rem;
  }

  /* Rare exception and callouts */
  .rare-exception,
  .mechanism-callout,
  .equity-highlight,
  .epa-callout {
    padding: 1.5rem;
  }

  /* Footnotes */
  .footnotes {
    padding: 1.5rem;
    font-size: 0.85rem;
  }

  /* Container width */
  .container {
    width: 95%;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  header h1 {
    font-size: 1.1rem;
  }

  nav ul {
    gap: 0.5rem;
  }

  nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.5rem;
  }

  nav ul li ul li a {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
  }

  .hero img {
    min-height: auto;
  }

  .hero .overlay {
    padding: 2rem 1rem;
  }

  section.container:not(.footnotes) {
    padding: 1rem;
  }

  section h3 {
    font-size: 1.4rem;
  }

  section h4 {
    font-size: 1.2rem;
  }

  .cta-button {
    padding: 0.9rem 1.25rem;
    font-size: 0.9rem;
    text-transform: none;
    line-height: 1.4;
  }

  .evidence-card h4 {
    font-size: 1.1rem;
  }

  .evidence-card p {
    font-size: 0.95rem;
  }

  /* Op-ed callout and inline boxes */
  [style*="padding: 2rem"] {
    padding: 1rem !important;
  }

  [style*="padding: 1.5rem 2rem"] {
    padding: 1rem !important;
  }

  [style*="padding: 2rem 2.5rem"] {
    padding: 1.25rem 1rem !important;
  }

  /* Case for Your District box */
  [style*="margin-top: 2rem; padding: 1.5rem"] {
    padding: 1rem !important;
    margin-top: 1rem !important;
  }
}