/* Community Outreach Portal — alternate Wagtail frontend */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  --color-nav-bg: #0f172a;
  --color-surface: #ffffff;
  --color-background: #f8fafc;
  --color-border: #e2e8f0;
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-text-muted: #64748b;
  --color-accent: #0ea5e9;
  --color-success: #10b981;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1200px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  gap: 1rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #f8fafc;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.0625rem;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(248, 250, 252, 0.85);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  transition: background 150ms ease, color 150ms ease;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-links a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-links .nav-cta {
  background: var(--color-primary);
  color: #fff;
  margin-left: 0.5rem;
}

.nav-links .nav-cta:hover {
  background: var(--color-primary-dark);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: transparent;
  border: none;
  color: rgba(248, 250, 252, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.is-open .nav-dropdown-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 16rem;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  list-style: none;
  margin: 0;
  padding: 0.375rem;
  z-index: 200;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  color: rgba(248, 250, 252, 0.85);
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-dropdown-menu i {
  width: 1rem;
  text-align: center;
  opacity: 0.85;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
  color: #f8fafc;
  padding: 4rem 0 5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.hero-lead {
  font-size: 1.125rem;
  color: rgba(248, 250, 252, 0.85);
  margin: 0 0 1.75rem;
  max-width: 38rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
}

.stat-card strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.stat-card span {
  font-size: 0.875rem;
  color: rgba(248, 250, 252, 0.7);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-light {
  background: #fff;
  color: var(--color-primary-dark);
}

.btn-light:hover {
  background: #f1f5f9;
}

.btn-sm {
  padding: 0.45rem 0.875rem;
  font-size: 0.8125rem;
}

/* Intro */
.intro {
  padding: 3rem 0 1rem;
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
}

.intro p {
  max-width: 52rem;
  margin: 0;
}

/* Sections grid */
.sections {
  padding: 3rem 0 4rem;
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.section-heading p:last-child {
  color: var(--color-text-muted);
  margin: 0;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.section-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.section-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.section-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.section-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  border-top: 1px solid var(--color-border);
  background: var(--color-background);
}

.section-card-header {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
}

.section-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.15);
  font-size: 1.125rem;
}

.section-card-header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.section-card-header p {
  margin: 0;
  font-size: 0.875rem;
  opacity: 0.9;
  line-height: 1.5;
}

.subsection-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subsection-link {
  display: block;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--color-border);
  transition: background 150ms ease;
}

.subsection-link:hover {
  background: rgba(37, 99, 235, 0.04);
}

.subsection-title {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  margin-bottom: 0.2rem;
}

.subsection-summary {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* Subsection detail blocks */
.subsection-detail {
  padding: 2rem 0 4rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
}

.subsection-group {
  margin-bottom: 4rem;
}

.subsection-group:last-child {
  margin-bottom: 0;
}

.subsection-group-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-border);
}

.subsection-group-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.subsection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.subsection-card {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  scroll-margin-top: 6rem;
}

.subsection-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.subsection-card > p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.subsection-body {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.75rem;
}

.subsection-body p {
  margin: 0 0 0.5rem;
}

.subsection-footer {
  margin-top: 0.75rem;
}

.subsection-cta {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-primary);
}

/* Mission */
.mission {
  padding: 4rem 0;
  background: var(--color-nav-bg);
  color: #f8fafc;
}

.mission-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: start;
}

.mission h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.mission-inner > p {
  margin: 0;
  font-size: 1.0625rem;
  color: rgba(248, 250, 252, 0.85);
  line-height: 1.7;
}

/* CTA band */
.cta-band {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #fff;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.cta-inner h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.cta-inner p {
  margin: 0;
  opacity: 0.9;
  max-width: 36rem;
}

/* Detail page */
.page-hero {
  background: var(--color-nav-bg);
  color: #f8fafc;
  padding: 3rem 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
}

.page-content {
  padding: 3rem 0 4rem;
}

.page-content .back-link {
  margin-top: 2rem;
}

.page-content .back-link a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

.page-content .back-link a:hover {
  text-decoration: underline;
}

.page-actions {
  margin-top: 1.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.875rem;
}

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--color-text-muted);
}

/* Page layout with sidebar */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  padding: 2rem 0 4rem;
  align-items: start;
}

.page-content-main {
  padding: 0;
}

.section-sidebar {
  position: sticky;
  top: 5rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.sidebar-title {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  font-weight: 700;
}

.sidebar-title a {
  color: var(--color-text);
  text-decoration: none;
}

.sidebar-title a:hover {
  color: var(--color-primary);
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links a {
  display: block;
  padding: 0.5rem 0.625rem;
  border-radius: var(--radius);
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.4;
}

.sidebar-links a:hover {
  background: var(--color-background);
  color: var(--color-primary);
}

.sidebar-links a.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--color-primary);
  font-weight: 600;
}

.section-hero .section-icon-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.375rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.subsection-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.subsection-card h3 a:hover {
  color: var(--color-primary);
}

.richtext-body {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.richtext-body p {
  margin: 0 0 1rem;
}

.page-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.page-nav-links a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
  font-size: 0.875rem;
}

.page-nav-links a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: #0b1120;
  color: rgba(248, 250, 252, 0.85);
  padding: 3rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  padding-bottom: 2rem;
}

.site-footer h2,
.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin: 0 0 0.75rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.35rem;
}

.site-footer a {
  color: rgba(248, 250, 252, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  color: rgba(248, 250, 252, 0.5);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-inner,
  .mission-inner {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem;
  }

  .nav-menu.is-open {
    display: block;
  }

  .site-nav {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .nav-links a,
  .nav-dropdown-toggle {
    width: 100%;
    text-align: left;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(255, 255, 255, 0.04);
    margin-top: 0.25rem;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .section-sidebar {
    position: static;
  }

  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .section-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }
}
