/* ==========================================================================
   Cambridge Cycling Club - Modern Design System (2026)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Brand Colours */
  --primary: #0f172a;        /* Deep Slate / Navy */
  --primary-light: #1e293b;
  --primary-muted: #334155;
  --accent: #0284c7;         /* Cambridge Racing Cyan/Blue */
  --accent-hover: #0369a1;
  --accent-light: #e0f2fe;
  --accent-soft: rgba(2, 132, 199, 0.08);
  --racing-red: #e11d48;     /* Heritage Red Stripe */
  --racing-red-hover: #be123c;
  --racing-red-light: #ffe4e6;
  --cam-green: #10b981;

  /* Neutrals & Surfaces */
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-surface-subtle: #f8fafc;
  --border-color: #e2e8f0;
  --border-light: #edf2f7;
  --border-color-hover: #cbd5e1;

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Text Colors */
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-inverse: #ffffff;

  /* Elevation / Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 25px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 30px -6px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.06);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Natural, snappy scrolling without lag */
  overflow-y: scroll;    /* Consistent scrollbar gutter */
  -webkit-text-size-adjust: 100%;
}

html, body {
  font-family: var(--font-body);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;    /* Prevent horizontal jitter on resize */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

h1 { font-size: 2.25rem; font-weight: 800; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ==========================================================================
   Integrated Modern Header & Navigation
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  width: 100%;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none !important;
  color: inherit;
  flex-shrink: 0;
}

.brand-crest {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.08));
  transition: transform var(--transition-base);
}

.brand-link:hover .brand-crest {
  transform: scale(1.05) rotate(-2deg);
}

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

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.brand-name span {
  color: var(--accent);
}

.brand-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Nav Container & Wrapper */
.site-nav, .nav-placeholder {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;
}

.nav-wrapper {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
  justify-content: flex-end;
}

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

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.7rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--primary-light);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.nav-link:hover, .nav-item:hover > .nav-link {
  color: var(--accent);
  background-color: var(--bg-surface-alt);
}

.nav-dropdown-btn {
  font-family: inherit;
}

.nav-link i.fa-caret-down {
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.nav-item:hover .nav-link i.fa-caret-down,
.nav-item:focus-within .nav-link i.fa-caret-down {
  transform: rotate(180deg);
}

/* Desktop Dropdowns */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 210px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.12), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
  padding: 0.5rem;
  margin-top: 0.25rem;
  list-style: none;
  display: none;
  z-index: 1050;
}

/* Invisible bridge to prevent hover loss when moving cursor across gap into dropdown */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -10px;
  right: -10px;
  height: 20px;
  background: transparent;
}

@media (min-width: 1025px) {
  .has-dropdown:hover .dropdown-menu,
  .has-dropdown:focus-within .dropdown-menu {
    display: block;
    animation: fadeInMenu 0.15s ease-out;
  }
}

@keyframes fadeInMenu {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-main);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background-color: var(--accent-light);
  color: var(--accent-hover);
  padding-left: 1rem;
}

/* Header CTAs */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn-join {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, var(--racing-red) 0%, #be123c 100%);
  color: var(--text-inverse) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.45rem 1.05rem;
  border-radius: var(--radius-full);
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.3);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-join:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 15px rgba(225, 29, 72, 0.4);
}

/* Mobile Toggle */
.nav-mobile-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  color: var(--primary);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.nav-mobile-toggle:hover {
  background-color: var(--bg-surface-alt);
}

/* Mobile Responsive Navigation (<= 1024px) */
@media (max-width: 1024px) {
  .nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-wrapper {
    justify-content: flex-end;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border-color);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.15);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1.5rem;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1001;
  }

  .site-header.nav-open .nav-list {
    display: flex;
  }

  .nav-link {
    width: 100%;
    padding: 0.85rem 0.75rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: 0;
    justify-content: space-between;
  }

  .has-dropdown.dropdown-open .dropdown-menu {
    display: flex;
    flex-direction: column;
    position: static;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--accent);
    background: var(--bg-surface-alt);
    border-radius: 0;
    padding: 0.25rem 0 0.5rem 1rem;
    margin: 0;
  }

  .dropdown-menu::before {
    display: none;
  }

  .dropdown-menu a {
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 480px) {
  .brand-crest {
    height: 38px;
    width: auto;
  }
  .brand-name {
    font-size: 0.98rem;
  }
  .brand-tagline {
    display: none;
  }
  .btn-join {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
  .header-inner {
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }
}

/* ==========================================================================
   Content Containers & Layout Width Rules
   ========================================================================== */

.site-main, 
.flex-content, 
article.w3-container, 
.w3-container.flex-content,
section.w3-row.flex-content {
  flex: 1 0 auto;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  box-sizing: border-box;
}

.flex-content p, 
article.w3-container p, 
.site-main p {
  max-width: 85ch;
  line-height: 1.7;
}

.flex-content img,
article.w3-container img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.container-narrow {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   Page Headers & Hero Sections
   ========================================================================== */

.page-header {
  position: relative;
  background: linear-gradient(135deg, #091224 0%, #0f1f38 50%, #0369a1 100%);
  color: var(--text-inverse);
  padding: 3.25rem 1.25rem 2.75rem;
  text-align: center;
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.35;
  pointer-events: none;
}

.page-header-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
}

.page-header h1 {
  color: var(--text-inverse);
  font-size: 2.5rem;
  font-weight: 800;
  margin-top: 0.5rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.page-header p {
  color: #cbd5e1;
  font-size: 1.15rem;
  margin: 0 auto;
  line-height: 1.6;
  max-width: 700px;
}

.hero-section {
  position: relative;
  background: linear-gradient(135deg, #091224 0%, #0f1f38 50%, #0369a1 100%);
  color: var(--text-inverse);
  padding: 4.5rem 1.5rem 4rem;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  color: #bae6fd;
}

.hero-pill i {
  color: #38bdf8;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.12;
  color: var(--text-inverse);
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
}

.hero-title .highlight {
  background: linear-gradient(135deg, #38bdf8 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 auto 2.25rem;
  color: #cbd5e1;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat-item {
  text-align: center;
}

.hero-stat-num {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: #38bdf8;
  display: block;
}

.hero-stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ==========================================================================
   Buttons & Badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-inverse) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--accent) !important;
  border-color: var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--text-inverse) !important;
}

.btn-sm {
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-blue { background: var(--accent-light); color: var(--accent-hover); }
.badge-red { background: var(--racing-red-light); color: var(--racing-red); }
.badge-green { background: #d1fae5; color: #047857; }
.badge-gray { background: var(--bg-surface-alt); color: var(--text-muted); }

/* ==========================================================================
   Modern Cards
   ========================================================================== */

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-interactive {
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

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

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3, .card-header h4, .card-header h5 {
  margin: 0;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface-alt);
}

/* Callout Box */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  margin: 1.5rem 0;
}

.callout-warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

/* ==========================================================================
   Club Runs Pace Grid
   ========================================================================== */

.pace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.pace-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-fast);
}

.pace-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pace-group-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.pace-speed {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.pace-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Affiliations Strip
   ========================================================================== */

.affiliations-section {
  padding: 2.5rem 1.25rem;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.affiliations-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.affiliations-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.affiliations-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.affil-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1.25rem;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.affil-badge img {
  height: 28px;
  width: auto;
  border-radius: var(--radius-sm);
}

.affil-badge:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Modern Tables
   ========================================================================== */

.table-responsive, .w3-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  background: var(--bg-surface);
}

.modern-table, .w3-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.modern-table th, .w3-table th {
  background: var(--primary) !important;
  color: var(--text-inverse) !important;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 0.85rem 1.1rem;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.modern-table td, .w3-table td {
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.modern-table tr:hover td, .w3-table tr:hover td {
  background-color: var(--accent-light) !important;
}

.w3-ccc-blue {
  background: var(--primary) !important;
  color: var(--text-inverse) !important;
}

/* ==========================================================================
   Committee / Directory Grid
   ========================================================================== */

.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 2rem 0;
}

.official-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition-fast);
}

.official-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.official-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.official-info {
  flex: 1;
  min-width: 0;
}

.official-role {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.official-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.official-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Modern Footer
   ========================================================================== */

.site-footer {
  background: var(--primary);
  color: #94a3b8;
  border-top: 1px solid var(--primary-light);
  padding: 3.5rem 1.25rem 2rem;
  margin-top: auto;
  width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
  box-sizing: border-box;
}

.footer-col {
  min-width: 0;
  overflow-wrap: break-word;
}

.footer-col h5 {
  color: var(--text-inverse);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--text-inverse);
  padding-left: 4px;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  box-sizing: border-box;
}

/* ==========================================================================
   Responsive Breakpoints & Media Queries
   ========================================================================== */

@media (max-width: 992px) {
  .hero-title { font-size: 2.5rem; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 768px) {
  .hero-title { font-size: 2rem; }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}

/* ==========================================================================
   Harmonization for Legacy W3.CSS Elements & Layout Components
   ========================================================================== */

body.w3-light-grey,
body.flex,
.w3-light-grey {
  background-color: var(--bg-page) !important;
}

.w3-white {
  background-color: var(--bg-surface) !important;
}

.w3-card-4, .w3-card-2 {
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.w3-blue {
  background-color: var(--primary) !important;
  color: var(--text-inverse) !important;
}

.w3-center {
  text-align: center;
}

.w3-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.w3-container {
  padding: 0.5rem 0.75rem;
}

/* Document & Resource Lists */
.doc-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  text-decoration: none !important;
  color: var(--text-main) !important;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.doc-item:hover {
  background: var(--bg-surface);
  border-color: var(--accent);
  color: var(--accent-hover) !important;
  transform: translateX(3px);
  box-shadow: var(--shadow-xs);
}

.doc-item-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.95rem;
}

.doc-item-title i {
  color: var(--accent);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.doc-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--border-light);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

/* Step Guides (e.g. tutorials, archive guides) */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 1.25rem 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-content {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.5;
}

/* Year / Filter Nav Pills */
.year-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 2rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.year-pill {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-color);
  color: var(--text-main) !important;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--transition-fast);
}

.year-pill:hover, .year-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Client-Side Blog Feed
   ========================================================================== */

.blog-feed {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-post-header {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
}

.blog-post-title {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 0;
}

.blog-post-title a {
  color: var(--primary);
  text-decoration: none;
}

.blog-post-title a:hover {
  color: var(--accent);
}

.blog-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.blog-post-meta i {
  margin-right: 0.25rem;
  color: var(--accent);
}

.blog-post-content {
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.blog-post-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.blog-post-content p:last-child {
  margin-bottom: 0;
}

.blog-post-content img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius-md);
  margin: 0.75rem auto;
  display: block;
}

.blog-post-content .separator {
  margin: 1rem 0;
}

.blog-post-content iframe,
.blog-post-content video,
.blog-post-content table {
  max-width: 100% !important;
}

.blog-post-content table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

.blog-post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.blog-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.blog-post-permalink {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
}

.blog-post-permalink:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.blog-feed-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.blog-feed-actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.blog-feed-status {
  font-size: 0.85rem;
  color: var(--text-muted);
}


