/**
 * AMMC BUILDERS INSURANCE - MEDIA & PUBLICATIONS HUB
 * Comprehensive Semantic Design System & Root Stylesheet
 * Strict WCAG AA Contrast & Single Token Architecture for Light & Dark Modes
 */

/* ==========================================================================
   1. SEMANTIC COLOR TOKENS & SYSTEM VARIABLES
   ========================================================================== */
:root {
  /* Brand Primitives */
  --brand-green-base: #028835;
  --brand-green-dark: #016327;
  --brand-green-light: #e8f5ec;
  --brand-green-accent: #04a842;
  --brand-slate-base: #333F4D;
  --brand-slate-dark: #1e2630;

  /* Semantic Variables - LIGHT / DAY MODE */
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --surface-subtle: #f8fafc;
  --surface-card: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  /* Typography Colors (WCAG AA: text #0f172a on #fff has 15.6:1 contrast) */
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Header & Navigation */
  --header-bg: rgba(255, 255, 255, 0.96);
  --header-border: #e2e8f0;
  --header-text: #0f172a;
  --header-text-muted: #475569;
  --header-brand: #016327;
  --nav-link-color: #334155;
  --nav-link-hover: #028835;
  --nav-link-active-bg: #e8f5ec;
  --nav-link-active-text: #016327;

  /* Primary Accent & Contrast */
  --accent: #028835;
  --accent-hover: #016327;
  --accent-contrast: #ffffff;
  --accent-subtle: #e8f5ec;
  --accent-on-subtle: #016327;

  /* Category Badges */
  --badge-news-bg: #e8f5ec;
  --badge-news-text: #016327;
  --badge-press-bg: #eef2f6;
  --badge-press-text: #1e2630;
  --badge-insights-bg: #eff6ff;
  --badge-insights-text: #1d4ed8;
  --badge-safety-bg: #fef2f2;
  --badge-safety-text: #991b1b;

  /* Card and Shadows */
  --card-bg: #ffffff;
  --card-border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 16px 32px -4px rgba(2, 136, 53, 0.12);

  /* Fixed Dark Surfaces (Footer, Newsletter, Press Desk) — identical in both themes */
  --footer-bg: #1e2630;
  --footer-text: #cbd5e1;
  --footer-heading: #ffffff;
  --footer-muted: #94a3b8;
  --footer-faint: #64748b;
  --footer-accent: #34d399;
  --footer-border: rgba(255, 255, 255, 0.1);
  --footer-border-strong: rgba(255, 255, 255, 0.25);
  --footer-icon-bg: rgba(255, 255, 255, 0.1);
  --footer-input-bg: #2a3442;

  /* Radii & Spacing */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Semantic Variables - DARK / NIGHT MODE */
html.dark {
  --bg: #0f151c;
  --bg-alt: #161e27;
  --surface: #1a232e;
  --surface-hover: #222d3b;
  --surface-subtle: #161e27;
  --surface-card: #1a232e;
  --border: #283545;
  --border-strong: #38495d;

  /* Typography Colors (WCAG AA: text #f8fafc on #0f151c has 16:1 contrast) */
  --text: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #94a3b8;

  /* Header & Navigation */
  --header-bg: rgba(22, 30, 39, 0.96);
  --header-border: #283545;
  --header-text: #f8fafc;
  --header-text-muted: #cbd5e1;
  --header-brand: #10b981;
  --nav-link-color: #e2e8f0;
  --nav-link-hover: #34d399;
  --nav-link-active-bg: #14382b;
  --nav-link-active-text: #34d399;

  /* Primary Accent & Contrast */
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-contrast: #0f172a;
  --accent-subtle: rgba(16, 185, 129, 0.15);
  --accent-on-subtle: #34d399;

  /* Category Badges */
  --badge-news-bg: rgba(16, 185, 129, 0.2);
  --badge-news-text: #34d399;
  --badge-press-bg: rgba(148, 163, 184, 0.2);
  --badge-press-text: #f1f5f9;
  --badge-insights-bg: rgba(59, 130, 246, 0.2);
  --badge-insights-text: #93c5fd;
  --badge-safety-bg: rgba(239, 68, 68, 0.2);
  --badge-safety-text: #fca5a5;

  /* Card and Shadows */
  --card-bg: #1a232e;
  --card-border: #283545;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.55);
  --shadow-card-hover: 0 16px 32px -4px rgba(16, 185, 129, 0.16);
}

/* Utility: allow main content to grow so the footer stays at the bottom */
.flex-grow {
  flex: 1 0 auto;
}

/* ==========================================================================
   2. GLOBAL RESET & BASE RULES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ==========================================================================
   3. CONTAINER & ROOT LAYOUT (NO SQUEEZED CONTENT)
   ========================================================================== */
.site-container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 28px;
  padding-right: 28px;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .site-container {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Generous Section Spacing */
.section-py {
  padding-top: 80px;
  padding-bottom: 80px;
}

.section-py-lg {
  padding-top: 100px;
  padding-bottom: 100px;
}

@media (max-width: 768px) {
  .section-py {
    padding-top: 56px;
    padding-bottom: 56px;
  }
  .section-py-lg {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* ==========================================================================
   4. NAVIGATION & HEADER STYLES
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 24px;
}

/* Brand Logo Block */
.brand-logo-link {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  flex-shrink: 0;
}

.brand-text-block {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--header-text);
  white-space: nowrap;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--header-brand);
  white-space: nowrap;
}

/* Theme-aware logo variants: header & mobile drawer follow the active theme.
   The footer always sits on a dark surface, so it uses logo-dark.svg directly. */
.logo-variant-dark {
  display: none;
}

html.dark .logo-variant-dark {
  display: block;
}

html.dark .logo-variant-light {
  display: none;
}

/* Desktop Navigation Links */
.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 1;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--nav-link-color);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: all 0.2s ease;
  line-height: 1.2;
}

.nav-link:hover {
  color: var(--nav-link-hover);
  background-color: var(--surface-hover);
}

.nav-link.active {
  background-color: var(--nav-link-active-bg);
  color: var(--nav-link-active-text);
  font-weight: 700;
}

/* Header Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--header-border);
  background-color: var(--surface);
  color: var(--header-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.theme-toggle-btn:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

/* Mobile Hamburger Toggle */
.mobile-toggle-btn {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--header-border);
  background-color: var(--surface);
  color: var(--header-text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 1024px) {
  .mobile-toggle-btn {
    display: inline-flex;
  }
}

/* Keep the header within the viewport: hide the CTA button until large desktop widths */
@media (max-width: 1239px) {
  .header-actions .btn {
    display: none;
  }
}

@media (max-width: 640px) {
  .header-container {
    gap: 12px;
  }
  .brand-logo-link {
    gap: 10px;
  }
  .brand-logo-icon {
    width: 36px;
    height: 36px;
  }
  .brand-title {
    font-size: 16px;
  }
}

/* ==========================================================================
   5. UNIFIED BUTTON COMPONENT
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-lg {
  padding: 18px 36px;
  font-size: 16px;
  min-height: 52px;
}

.btn-sm {
  padding: 10px 22px;
  font-size: 13px;
  min-height: 44px;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--accent-contrast);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background-color: var(--surface-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-light {
  background-color: rgba(255, 255, 255, 0.15);
  color: var(--footer-heading);
  border-color: var(--footer-border-strong);
  backdrop-filter: blur(8px);
}

.btn-light:hover {
  background-color: rgba(255, 255, 255, 0.25);
  color: var(--footer-heading);
}

/* Outline button for use on fixed dark surfaces (footer, press desk) */
.btn-on-dark {
  color: var(--footer-heading);
  border-color: var(--footer-border-strong);
}

.btn-on-dark:hover {
  background-color: var(--footer-icon-bg);
  border-color: var(--footer-accent);
  color: var(--footer-accent);
}

/* ==========================================================================
   6. GRID LAYOUTS (EXPLICIT COLUMNS, NO OVERLAPPING)
   ========================================================================== */
/* 3-Column Standard Card Grid */
.cards-3col-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .cards-3col-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .cards-3col-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Featured Leader Card Profile (director portrait) */
.leader-featured-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 60px;
}

.leader-card-grid {
  display: grid;
  grid-template-columns: minmax(320px, 38%) 1fr;
  gap: 48px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .leader-featured-card {
    padding: 28px;
  }
  .leader-card-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.leader-portrait-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 380px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--accent);
  box-shadow: var(--shadow-md);
  position: relative;
}

.leader-portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Team Grid (Other 5 Members) */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

/* Contact Page Grid (2 Columns, never crushed or overlapping) */
.contact-layout-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(380px, 1.25fr);
  gap: 48px;
  align-items: start;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .contact-layout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ==========================================================================
   7. CARD COMPONENTS & TYPOGRAPHY
   ========================================================================== */
.content-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  height: 100%;
  box-sizing: border-box;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--surface-subtle);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.content-card:hover .card-image-wrap img {
  transform: scale(1.03);
}

.card-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-top: 10px;
  margin-bottom: 12px;
}

.card-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Badges & Tags */
.badge-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
  white-space: nowrap;
}

.badge-tag-news {
  background-color: var(--badge-news-bg);
  color: var(--badge-news-text);
}

.badge-tag-press {
  background-color: var(--badge-press-bg);
  color: var(--badge-press-text);
}

.badge-tag-insights {
  background-color: var(--badge-insights-bg);
  color: var(--badge-insights-text);
}

.badge-tag-safety {
  background-color: var(--badge-safety-bg);
  color: var(--badge-safety-text);
}

/* ==========================================================================
   8. HERO SECTIONS (READABLE TEXT OVER DARK OVERLAYS)
   ========================================================================== */
.hero-banner-section {
  position: relative;
  background-color: var(--brand-slate-dark);
  color: var(--footer-heading);
  padding: 96px 0;
  overflow: hidden;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
}

.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 34, 0.88) 0%, rgba(15, 23, 34, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 820px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 9999px;
  background-color: var(--footer-icon-bg);
  border: 1px solid var(--footer-border-strong);
  color: var(--footer-accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}

.hero-headline {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
  color: var(--footer-heading);
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 32px;
  }
}

.hero-subhead {
  font-size: 18px;
  color: var(--footer-text);
  line-height: 1.65;
  margin-bottom: 32px;
  max-width: 680px;
}

/* ==========================================================================
   9. ARTICLE & PROSE STYLING
   ========================================================================== */
.article-reader-container {
  max-width: 740px;
  margin: 0 auto;
}

.article-prose {
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-prose p {
  margin-bottom: 24px;
}

.article-prose h3 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.article-prose ul {
  margin-bottom: 24px;
  padding-left: 24px;
}

.article-prose li {
  margin-bottom: 10px;
}

.article-pullquote {
  margin: 40px 0;
  padding: 28px 32px;
  background-color: var(--accent-subtle);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-pullquote blockquote {
  font-size: 20px;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 12px;
}

.pullquote-attribution {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-on-subtle);
}

/* ==========================================================================
   10. FORMS, SEARCH, AND FILTERS
   ========================================================================== */
.newsletter-form input::placeholder {
  color: var(--footer-muted);
}

.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 14px 18px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.filter-btn-pill {
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background-color: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn-pill:hover {
  background-color: var(--surface-hover);
  border-color: var(--border-strong);
}

.filter-btn-pill.active {
  background-color: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}

/* ==========================================================================
   11. MOBILE DRAWER & MODALS
   ========================================================================== */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.mobile-nav-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 360px;
  background-color: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav-drawer.open .mobile-nav-panel {
  transform: translateX(0);
}

.mobile-nav-item {
  display: block;
  padding: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.mobile-nav-item.active {
  color: var(--accent);
}

/* Global Modal Backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-dialog {
  background-color: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 820px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 36px;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

@media (max-width: 640px) {
  .modal-dialog {
    padding: 24px;
  }
}

/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--footer-border);
  padding-top: 80px;
  padding-bottom: 48px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--footer-border);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-heading);
  margin-bottom: 18px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--footer-muted);
  font-size: 14px;
  transition: color 0.2s ease;
}

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

/* ==========================================================================
   13. ACCESSIBILITY & PREFERS-REDUCED-MOTION
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-to-content {
  position: absolute;
  top: -100px;
  left: 20px;
  background-color: var(--accent);
  color: var(--accent-contrast);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 2000;
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-to-content:focus {
  top: 20px;
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ==========================================================================
   14. MOBILE NAV DRAWER HEADER
   ========================================================================== */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.mobile-nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.mobile-nav-close:hover {
  background-color: var(--surface-hover);
  color: var(--text);
}

/* ==========================================================================
   15. FORM UTILITIES (label, group, row)
   ========================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 540px) {
  .form-row-2col {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   16. CONTACT PAGE — LAYOUT & COMPONENTS
   ========================================================================== */
.contact-info-col {
  display: flex;
  flex-direction: column;
}

.contact-form-col {
  display: flex;
  flex-direction: column;
}

.contact-info-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius-md);
  background-color: var(--surface-subtle);
  border: 1px solid var(--border);
}

.contact-info-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact-form-card {
  background-color: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .contact-form-card {
    padding: 24px 20px;
  }
}

.contact-map-placeholder {
  position: relative;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-slate-dark) 0%, var(--brand-green-base) 60%, var(--brand-green-dark) 100%);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  min-height: 220px;
}

/* ==========================================================================
   17. PRESS DESK SECTION
   ========================================================================== */
.press-desk-card {
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand-slate-dark) 0%, #0f1c14 60%, var(--brand-green-dark) 100%);
  border: 1px solid var(--footer-border);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.press-desk-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  align-items: center;
  padding: 48px;
}

@media (max-width: 860px) {
  .press-desk-inner {
    grid-template-columns: 1fr;
    padding: 36px 28px;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .press-desk-inner {
    padding: 28px 20px;
  }
}

.press-desk-info {
  /* flex column is implicit */
}

.press-desk-cta {
  border-left: 1px solid var(--footer-border-strong);
  padding-left: 48px;
}

@media (max-width: 860px) {
  .press-desk-cta {
    border-left: none;
    border-top: 1px solid var(--footer-border-strong);
    padding-left: 0;
    padding-top: 32px;
  }
}

/* ==========================================================================
   18. FOOTER UTILITY CLASSES
   ========================================================================== */
.footer-brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  text-decoration: none;
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background-color: var(--footer-icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 6px;
}

.footer-brand-name {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--footer-heading);
  line-height: 1.2;
}

.footer-brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-accent);
  line-height: 1.4;
}

.footer-desc {
  font-size: 13px;
  color: var(--footer-muted);
  line-height: 1.65;
  margin: 0;
}

.footer-address {
  font-size: 13px;
  color: var(--footer-text);
  line-height: 1.8;
  margin: 0 0 8px;
}

.footer-hours {
  font-size: 12px;
  color: var(--footer-faint);
  margin: 0;
}

.footer-contact-line {
  font-size: 13px;
  color: var(--footer-text);
  margin: 0 0 6px;
  line-height: 1.6;
}

.footer-contact-line strong {
  color: var(--footer-heading);
}

.footer-bottom {
  padding-top: 28px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--footer-faint);
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}

/* ==========================================================================
   19. SCROLL REVEAL & MICRO-ANIMATIONS
   ========================================================================== */
html.reveal-armed [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

html.reveal-armed [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  html.reveal-armed [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   20. ABOUT PAGE — MISSION/VALUES/HUB/DIRECTORS
   ========================================================================== */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

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

.mv-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 30px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .mv-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}

.mv-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.mv-card-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
}

.mv-card-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

.core-values-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .core-values-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .core-values-grid {
    grid-template-columns: 1fr;
  }
}

.value-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
  }
}

.value-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.value-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.value-card-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.hub-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 900px) {
  .hub-tiles-grid {
    grid-template-columns: 1fr;
  }
}

.hub-tile {
  display: flex;
  flex-direction: column;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

@media (hover: hover) {
  .hub-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
  }
}

.hub-tile-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.hub-tile-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.hub-tile-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
}

.hub-tile-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.directors-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
}

@media (max-width: 860px) {
  .directors-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.director-card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .director-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

@media (max-width: 640px) {
  .director-card {
    padding: 24px;
  }
}

.director-portrait {
  max-width: none;
  margin-bottom: 24px;
}

.director-portrait img {
  object-position: center 18%;
}

.director-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* ==========================================================================
   21. EVENTS — SEMINAR GALLERY, THUMBS, PRESS LINKS
   ========================================================================== */
.seminar-thumb-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 640px) {
  .seminar-thumb-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
}

.seminar-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 0;
  background: var(--surface-subtle);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.seminar-thumb:hover,
.seminar-thumb:focus-visible {
  border-color: var(--accent);
}

.seminar-thumb picture,
.gallery-card picture {
  display: block;
  width: 100%;
  height: 100%;
}

.seminar-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

.gallery-card {
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  overflow: visible;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.gallery-card .card-image-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-sm);
}

.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}

#events-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

@media (min-width: 640px) {
  #events-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  #events-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Single past event: constrain width so the lone card doesn't stretch */
#events-container.events-single {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

@media (max-width: 640px) {
  #events-container.events-single {
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
}

.press-links-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.press-links-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

/* ==========================================================================
   22. LIGHTBOX
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background-color: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-left: calc(20px + env(safe-area-inset-left));
  padding-right: calc(20px + env(safe-area-inset-right));
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-dialog {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-height: 0;
  width: 100%;
}

.lightbox-image-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: calc(92dvh - 140px);
  width: 100%;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: calc(92dvh - 140px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.lightbox-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--footer-heading);
  text-align: center;
  padding: 0 12px;
}

#lightbox-caption-text {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}

.lightbox-counter {
  font-size: 12px;
  color: var(--footer-muted);
  letter-spacing: 0.06em;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid var(--footer-border-strong);
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--footer-heading);
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background-color 0.2s ease;
  z-index: 2;
}

.lightbox-btn:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.lightbox-close {
  top: 0;
  right: 0;
  transform: none;
  font-size: 34px;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

@media (max-width: 640px) {
  .lightbox-dialog {
    max-height: 100dvh;
    padding: 8px;
  }
  .lightbox-btn {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }
  .lightbox-prev { left: 2px; }
  .lightbox-next { right: 2px; }
}

/* ==========================================================================
   23. MOBILE / TABLET REFINEMENTS
   ========================================================================== */
/* Anchor targets clear the sticky header */
section[id],
[id^="press-desk"],
main [id] {
  scroll-margin-top: 92px;
}

/* Event filter pills: thumb-friendly height */
.filter-btn-pill {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Modal becomes a full-screen sheet on phones */
@media (max-width: 640px) {
  .modal-overlay {
    padding: 0;
    align-items: stretch;
  }
  .modal-dialog {
    max-width: 100%;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    padding-top: calc(20px + env(safe-area-inset-top));
  }
  #global-modal-close {
    width: 48px;
    height: 48px;
    font-size: 26px;
  }
}

.modal-dialog {
  max-height: 90vh;
  max-height: 90dvh;
}

/* Footer extras injected into mobile drawer */
.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mobile-drawer-theme {
  align-self: flex-start;
}

.mobile-drawer-cta {
  width: 100%;
  justify-content: center;
}

/* Wrap long emails/URLs gracefully */
.footer-desc a,
.footer-contact-line a,
.hub-tile,
.press-links-list a {
  overflow-wrap: anywhere;
}

/* Touch: visible active state for cards */
@media (hover: none) {
  .content-card:active,
  .hub-tile:active,
  .value-card:active,
  .mv-card:active {
    transform: translateY(-2px);
  }
}

