/* ============================================
   ENHANCED STYLES - MERGED + REFACTORED (CLEANED)
   - Duplicate / conflicting earlier blocks removed.
   - Where similar/conflicting blocks existed, the later (second) occurrence was kept.
   - Follow-up edits available on request.
============================================ */

/* --------- THEME VARIABLES (easy to override) --------- */
:root {
  --bg: #f6fbff;
  --text: #0f1724;
  --muted: #6b7a86;
  --accent: #1f6feb;
  --accent-600: #0f4fd8;
  --success: #10b981;
  --success-600: #0da271;
  --warn: #f59e0b;
  --warn-600: #d97706;
  --hc-accent: #00ffff;
  --card-shadow: rgba(15, 23, 36, 0.06);
  --card-shadow-deep: rgba(15, 23, 36, 0.12);
  --glass-bg: rgba(255,255,255,0.85);
  --focus-outline: rgba(31, 111, 235, 0.4);
  --ui-radius: 8px;
  --ui-radius-lg: 12px;
  --ui-radius-xl: 20px;
  --container-max: 1200px;
  --container-max-xl: 1400px;
  --page-max: 1400px;
  --transition: 0.2s ease;
}

/* ============================================
   GLOBAL RESET + SAFETY - ENHANCED
============================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
  transition: font-size 0.3s ease;
}

html, body {
  width: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  min-height: 100vh;
  height: auto;
}

/* Remove any accidental huge bottom gaps (added from styles_global.css) */
body > * {
  margin-bottom: 0 !important;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  margin: 0;
  padding: 0;
}

/* Improved focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enhanced selection styles */
::selection {
  background: rgba(31, 111, 235, 0.2);
  color: inherit;
}
::-moz-selection {
  background: rgba(31, 111, 235, 0.2);
  color: inherit;
}

/* ============================================
   ENHANCED TYPOGRAPHY SYSTEM
============================================ */
h1,h2,h3,h4,h5,h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

p { margin-bottom: 1rem; color: var(--muted); }

/* Enhanced link styles */
a {
  color: var(--accent);
  text-decoration: none;
  transition: all var(--transition);
}
a:hover, a:focus {
  color: var(--accent-600);
  text-decoration: underline;
}

/* ============================================
   ENHANCED FORM ELEMENTS
============================================ */
input, textarea, button, select {
  max-width: 100%;
  box-sizing: border-box;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid rgba(15, 23, 36, 0.08);
  border-radius: var(--ui-radius);
  padding: 0.75rem 1rem;
  transition: all var(--transition);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.08);
}

button {
  cursor: pointer;
  font-weight: 600;
  border: none;
  background: var(--accent);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: var(--ui-radius);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background var(--transition);
}

button:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(31, 111, 235, 0.3);
}
button:active { transform: translateY(0); }

/* ============================================
   ENHANCED LAYOUT CONTAINERS
============================================ */
.page-root, .site-wrapper, .hero-wrap, .container, .section, .row {
  overflow-x: hidden;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.section { padding: 4rem 0; }

/* ============================================
   HERO LAYOUT — VIDEO SAME HEIGHT AS TEXT
============================================ */
.hero {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: space-between;
  gap: 40px;
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}

.hero-left {
  flex: 1;
  max-width: 600px;
  display:flex;
  flex-direction: column;
  justify-content: center;
}

.hero-right {
  flex: 1;
  display:flex;
  align-items: stretch;
}

.hero-right .media-frame {
  width: 100%;
  border-radius: var(--ui-radius-xl);
  overflow: hidden;
  display:flex;
  box-shadow: 0 20px 60px rgba(15,23,36,0.15);
}

.hero-right video,
.hero-right iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   ENHANCED DOCUMENT SLIDESHOW
============================================ */
.paper-frame {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  aspect-ratio: 3/4;
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(15, 23, 36, 0.1);
  background: white;
}

.paper-frame .slides,
.paper-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
}
.paper-frame:hover .slides { transform: scale(1.02); }

/* ============================================
   ENHANCED UTILITY CLASSES
============================================ */
.text-gradient {
  background: linear-gradient(135deg, var(--accent), #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft { box-shadow: 0 8px 30px rgba(15,23,36,0.06); }
.shadow-deep { box-shadow: 0 20px 60px rgba(15,23,36,0.12); }

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--ui-radius-lg);
}

/* ============================================
   ENHANCED MOBILE FIXES (≤700px)
   (non-conflicting mobile tweaks retained; mobile-nav contrast blocks
    removed here in favor of the consolidated later mobile menu fixes)
============================================ */
@media (max-width: 700px) {
  .hero { flex-direction: column; padding: 20px; gap: 30px; }
  .hero-left { text-align: center; max-width: 100%; }
  .hero-right .media-frame { aspect-ratio: 16/9; border-radius: 16px; }
  .programs-slideshow { width: 100%; padding-inline: 12px; }
  .paper-frame { max-width: 100%; aspect-ratio: 3/4; }
  [style*="min-width"] { min-width: 0 !important; max-width: 100% !important; }
  .section { padding: 2rem 0; }

  .mobile-nav-overlay,
  #mobileNavOverlay,
  .nav-modal-overlay {
    background: rgba(2,6,23,0.6) !important;
    z-index: 110 !important;
  }
}

/* ============================================
   ENHANCED DESKTOP LARGE SCREENS (≥900px)
============================================ */
@media (min-width: 900px) {
  .video-section,
  .video-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    aspect-ratio: 16/9;
    min-height: 700px;
  }
  .video-wrapper video,
  .video-wrapper iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  .paper-frame { max-width: 700px; }
  .section, .video-section { padding: 0 40px; }
}

/* ============================================
   ENHANCED EXTRA-LARGE SCREENS (≥1400px)
============================================ */
@media (min-width: 1400px) {
  .hero-right .media-frame { max-width: 820px; }
  .paper-frame { max-width: 820px; }
  .container { max-width: var(--container-max-xl); }
}

/* ============================================
   ENHANCED SCROLLBEHAVIOR + SCROLLBAR
   (consolidated single copy)
============================================ */
.page-root, .site-wrapper, .hero-wrap, .container, .section, .row {
  overflow-x: hidden;
}

/* Enhanced scrollbar for webkit browsers */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================
   ENHANCED MOBILE NAVIGATION
============================================ */
.nav { position: relative; }

/* Keep both defensive variants for mobile-nav-open so inline or specific rules are overridden */
body.mobile-nav-open {
  overflow: hidden;
  touch-action: none;
}
body.mobile-nav-open.override {
  /* helper class if you want the stronger variant without !important */
  overflow: hidden !important;
  touch-action: none;
}

/* also include the exact !important rule from styles_global.css for maximum compatibility */
body.mobile-nav-open {
  overflow: hidden !important;
  touch-action: none;
}

nav, .nav { max-width: 100%; }


/* ============================================
   ENHANCED HC-MODE (High-contrast) OVERRIDES
   (consolidated and made robust)
============================================ */
body.hc-mode {
  --bg: #000000;
  --text: #ffffff;
  --accent: var(--hc-accent);
  --muted: #cccccc;
}

/* Make main UI components high-contrast */
body.hc-mode .paper-frame,
body.hc-mode .card,
body.hc-mode .contact,
body.hc-mode .about-portrait {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid var(--hc-accent) !important;
}

/* More general inline style overrides (less brittle) */
body.hc-mode [style*="background"],
body.hc-mode [style*="color"] {
  background: #000 !important;
  color: #fff !important;
}

/* SVG fills - prefer hc-accent but allow fallback to currentColor for white fills */
body.hc-mode svg [fill="#fff"],
body.hc-mode svg [fill="#ffffff"] {
  fill: currentColor !important;
}

/* Avoid forcing webkit text-fill globally; unset where needed */
body.hc-mode * { -webkit-text-fill-color: unset !important; }

/* Mobile-specific HC rules (consolidated copy kept) */
@media (max-width:1100px) {
  html.hc-mode #mainNav,
  body.hc-mode #mainNav,
  html.hc-mode #mainNav.open,
  body.hc-mode #mainNav.open,
  html.hc-mode .nav-actions-mobile,
  body.hc-mode .nav-actions-mobile {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid var(--hc-accent) !important;
  }

  html.hc-mode #mainNav a,
  body.hc-mode #mainNav a,
  html.hc-mode .nav-actions-mobile a,
  body.hc-mode .nav-actions-mobile a {
    color: #fff !important;
  }

  html.hc-mode .mobile-toggle,
  body.hc-mode .mobile-toggle {
    background: transparent !important;
    color: #fff !important;
  }

  html.hc-mode .mobile-toggle .icon,
  body.hc-mode .mobile-toggle .icon {
    color: #fff !important;
  }

  html.hc-mode #mobileNavOverlay,
  body.hc-mode #mobileNavOverlay {
    background: rgba(0, 255, 255, 0.3) !important;
  }
}

/* Dropdown HC styles (consolidated) */
.hc-mode .dropdown,
.hc-mode .dropdown-menu,
html.hc-mode .dropdown,
html.hc-mode .dropdown-menu,
body.hc-mode .dropdown,
body.hc-mode .dropdown-menu {
  background: #000 !important;
  color: #fff !important;
  border: 2px solid var(--hc-accent) !important;
}

@media (max-width:1100px) {
  html.hc-mode .dropdown,
  body.hc-mode .dropdown,
  html.hc-mode .dropdown-menu,
  body.hc-mode .dropdown-menu {
    background: #000 !important;
    color: var(--hc-accent) !important;
    border: 2px solid var(--hc-accent) !important;
  }

  html.hc-mode .dropdown-menu a,
  body.hc-mode .dropdown-menu a,
  html.hc-mode .dropdown-item,
  body.hc-mode .dropdown-item {
    color: var(--hc-accent) !important;
  }

  .access-toolbar { display: none !important; }
}

/* ============================================
   ACCESSIBILITY TOOLBAR (merged + improved)
   (kept consolidated second version)
============================================ */

/* Toolbar base */
.access-toolbar {
  position: fixed;
  right: 20px;
  top: 140px;
  z-index: 120;
  display: flex;
  gap: 8px;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  padding: 16px;
  border-radius: 16px;
  box-shadow:
    0 8px 32px rgba(15, 23, 36, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.6);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  pointer-events: auto;
}

/* Slight lift on hover */
.access-toolbar:hover {
  box-shadow:
    0 12px 48px rgba(15, 23, 36, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* Button base */
.access-toolbar button {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow:
    0 4px 16px rgba(15, 23, 36, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-weight: 700;
  font-size: 18px;
  border: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  min-height: 60px;
  position: relative;
  overflow: hidden;
}

/* Decorative sweep - disabled with reduced motion */
.access-toolbar button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.6s ease;
}
.access-toolbar button:hover::before { left: 100%; }

.access-toolbar button:hover {
  background: linear-gradient(135deg, #f8fbff, #ffffff);
  box-shadow:
    0 8px 24px rgba(15, 23, 36, 0.12),
    0 0 0 1px rgba(31, 111, 235, 0.2);
  transform: translateY(-2px) scale(1.05);
  color: var(--accent);
}
.access-toolbar button:active { transform: translateY(0) scale(0.98); }
.access-toolbar button:focus-visible {
  outline: 3px solid rgba(31, 111, 235, 0.4);
  outline-offset: 2px;
}

/* Specific buttons */
#increaseText {
  background: linear-gradient(135deg, var(--success), var(--success-600));
  color: white;
  box-shadow: 0 6px 20px rgba(16,185,129,0.3);
}
#increaseText:hover { box-shadow: 0 8px 28px rgba(16,185,129,0.4); }

#decreaseText {
  background: linear-gradient(135deg, #6b7280, #4b5563);
  color: white;
  box-shadow: 0 6px 20px rgba(107,114,128,0.3);
}
#decreaseText:hover { box-shadow: 0 8px 28px rgba(107,114,128,0.4); }

#toggleContrast {
  background: linear-gradient(135deg, var(--warn), var(--warn-600));
  color: white;
  box-shadow: 0 6px 20px rgba(245,158,11,0.3);
  font-size: 20px;
  position: relative;
}
#toggleContrast::after { content: '☀'; position: absolute; opacity: 0; transition: all 0.3s ease; }

/* toggled state */
#toggleContrast[aria-pressed="true"] {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  box-shadow: 0 6px 20px rgba(30,64,175,0.3);
}
#toggleContrast[aria-pressed="true"]::before { content: '◧'; }
#toggleContrast[aria-pressed="true"]::after  { content: '☀'; }

/* Disabled state */
.access-toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}
.access-toolbar button:disabled:hover {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 4px 16px rgba(15,23,36,0.08);
  color: inherit;
}

/* Toolbar groups */
.access-toolbar .toolbar-group {
  display: flex;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 23, 36, 0.06);
}
.access-toolbar .toolbar-group:last-child { border-bottom: none; padding-bottom: 0; }
.access-toolbar .toolbar-group:first-child { padding-top: 0; }

/* Active state */
.access-toolbar button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-600)) !important;
  color: white !important;
  box-shadow: 0 6px 20px rgba(31,111,235,0.4) !important;
}

/* Visibility toggle button */
.access-toolbar-toggle {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 119;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 16px rgba(31,111,235,0.3);
}
.access-toolbar-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(31,111,235,0.4); }
.access-toolbar-toggle:active { transform: scale(0.95); }

/* Assistive label (appears on hover) */
.access-toolbar::before {
  content: 'Accessibility Tools';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: all 0.24s ease;
  pointer-events: none;
}
.access-toolbar:hover::before { opacity: 1; top: -40px; }

/* Text size feedback + contrast toggle animations */
@keyframes textSizeFeedback {
  0% { transform: scale(1); } 50% { transform: scale(1.2); } 100% { transform: scale(1); }
}
.text-size-changed { animation: textSizeFeedback 0.4s ease; }

@keyframes contrastToggle {
  0% { transform: rotate(0deg) scale(1); } 50% { transform: rotate(180deg) scale(1.1); } 100% { transform: rotate(360deg) scale(1); }
}
.contrast-toggled { animation: contrastToggle 0.6s ease; }

/* Provide broader focus fallback for browsers without :has() */
.access-toolbar:has(button:focus),
.access-toolbar:focus-within {
  box-shadow:
    0 12px 48px rgba(15, 23, 36, 0.18),
    0 0 0 2px rgba(31, 111, 235, 0.3);
}

/* Mobile alternative controls (displayed when toolbar hidden on small screens) */
.mobile-access-controls {
  display: none;
}
@media (max-width: 1100px) {
  .access-toolbar { display: none !important; }
  .mobile-access-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    padding: 12px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15,23,36,0.15);
    border: 1px solid rgba(255,255,255,0.6);
    z-index: 100;
  }
  .mobile-access-controls button {
    padding: 12px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 4px 12px rgba(15,23,36,0.1);
    font-weight: 700;
    font-size: 16px;
    min-width: 50px;
    transition: all 0.18s ease;
  }
  .mobile-access-controls button:active { transform: scale(0.95); }
}

/* Responsive tweaks for smaller toolbar */
@media (max-width: 480px) {
  .access-toolbar { right: 10px; top: 120px; padding: 12px; }
  .access-toolbar button { min-width: 50px; min-height: 50px; font-size: 16px; padding: 12px 14px; }
}

/* Print: hide toolbar controls */
@media print {
  .access-toolbar, .access-toolbar-toggle, .mobile-access-controls { display: none !important; }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .access-toolbar, .access-toolbar button, .access-toolbar-toggle { transition: none !important; }
  .access-toolbar button::before { display: none !important; }
  .text-size-changed, .contrast-toggled { animation: none !important; }
}

/* Text size helper classes (applied to html or body for scaling) */
.text-size-small  { font-size: 14px !important; }
.text-size-medium { font-size: 16px !important; }
.text-size-large  { font-size: 18px !important; }
.text-size-xlarge { font-size: 20px !important; }
.text-size-xxlarge{ font-size: 22px !important; }

/* ============================================
   ENHANCED ANIMATIONS AND TRANSITIONS
   (single consolidated copy)
============================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-in { animation: fadeIn 0.6s ease-out; }
  .slide-up { animation: slideUp 0.6s ease-out; }
  .scale-in { animation: scaleIn 0.4s ease-out; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); }
}

/* ============================================
   ENHANCED PRINT STYLES
============================================ */
@media print {
  * { background: transparent !important; color: black !important; box-shadow: none !important; text-shadow: none !important; }
  .hero-right, .floating-right, .access-toolbar, .mobile-toggle, .access-toolbar-toggle, .mobile-access-controls { display: none !important; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
}

/* ============================================
   MOBILE MENU CONTRAST & VISIBILITY FIXES
   (consolidated second version kept — overrides for many mobile nav implementations)
============================================ */
@media (max-width: 700px) {
  /* common selectors for mobile nav implementations */
  .nav #mainNav.modal,
  #mainNav.modal,
  .mobile-nav,
  .mobile-menu,
  .mobile-menu .menu,
  .mobile-menu .menu-item {
    background: var(--bg, #ffffff) !important;
    color: var(--text, #0f1724) !important;
    -webkit-text-fill-color: unset !important;
  }

  /* Make sure links, buttons and nav items are readable */
  .nav #mainNav.modal a,
  .nav #mainNav.modal .nav-link,
  .nav #mainNav.modal button,
  .nav #mainNav.modal .menu-item,
  .mobile-menu a,
  .mobile-menu button {
    color: var(--text, #0f1724) !important;
  }

  .nav #mainNav.modal a:hover,
  .nav #mainNav.modal .nav-link:hover,
  .mobile-menu a:hover {
    color: var(--accent-600, #0f4fd8) !important;
    text-decoration: underline;
  }

  /* Ensure overlays remain dark/translucent so menu is visible on top */
  .mobile-nav-overlay,
  #mobileNavOverlay,
  .nav-modal-overlay {
    background: rgba(2,6,23,0.6) !important;
    z-index: 110 !important;
  }

  /* Prevent cards/dropdowns inside the mobile nav from creating white blocks */
  .nav #mainNav.modal .card,
  .nav #mainNav.modal .dropdown-menu,
  .nav #mainNav.modal [class*="card"],
  .nav #mainNav.modal [class*="dropdown"] {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text, #0f1724) !important;
  }

  /* If the menu toggle uses a white icon on white, ensure it contrasts */
  .nav #mainNav.modal .mobile-toggle,
  .mobile-toggle {
    color: var(--text, #0f1724) !important;
  }
}

/* ============================================
   PREVENT HORIZONTAL SCROLL ON MOBILE SCREENS
============================================ */
@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }

  picture,
  video,
  iframe,
  .media-frame,
  .paper-frame,
  .container,
  .row,
  .hero,
  .hero-left,
  .hero-right {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }

  /* Override inline styles that use 100vw which often cause horizontal scroll */
  [style*="width:100vw"],
  [style*="100vw"] {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }

  body {
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }
}

/* Very small screens adjustments */
@media (max-width: 420px) {
  html, body { max-width: 100vw; overflow-x: hidden; }
  .hero, .container, .section { padding-left: 12px; padding-right: 12px; }
}

/* ============================================
   DONATE SECTION - HORIZONTAL LAYOUT ON MOBILE
============================================ */

.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.donate-amounts label {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(15, 23, 36, 0.04);
  border-radius: var(--ui-radius);
  border: 1px solid rgba(15, 23, 36, 0.08);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.donate-amounts label:hover {
  background: rgba(15, 23, 36, 0.08);
  border-color: rgba(15, 23, 36, 0.12);
}

.donate-amounts input[type="radio"] {
  margin: 0 6px 0 0;
  transform: scale(1.1);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-area {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .donate-amounts {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-right: -8px;
    margin-left: -8px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .donate-amounts::-webkit-scrollbar {
    height: 4px;
  }
  .donate-amounts::-webkit-scrollbar-track {
    background: rgba(15, 23, 36, 0.04);
    border-radius: 2px;
  }
  .donate-amounts::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 36, 0.2);
    border-radius: 2px;
  }

  .donate-amounts label {
    flex-shrink: 0;
    min-width: fit-content;
  }

  .form-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
  }

  .form-row input {
    flex: 1;
    min-width: 120px;
  }

  .form-row button {
    flex-shrink: 0;
    min-width: fit-content;
  }

  .btn-area {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  .btn-area .btn {
    flex-shrink: 0;
  }

  .btn-area > div {
    text-align: left;
    flex: 1;
  }
}

@media (max-width: 480px) {
  .form-row {
    gap: 8px;
  }

  .form-row input {
    min-width: 100px;
  }

  #donor_amount {
    width: 100px !important;
  }

  .btn-area {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-area > div {
    text-align: center;
  }
}

.donate-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hc-mode .donate-amounts label {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid var(--hc-accent) !important;
  color: #fff !important;
}

.hc-mode .donate-amounts label:hover {
  background: rgba(255, 255, 255, 0.2) !important;
}

.donate-amounts input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.donate-amounts input[type="radio"]:checked + span {
  font-weight: 700;
  color: var(--accent);
}

.hc-mode .donate-amounts input[type="radio"]:checked + span {
  color: var(--hc-accent);
  font-weight: 800;
}

@media (max-width: 360px) {
  .donate-amounts label {
    padding: 6px 10px;
    font-size: 14px;
  }

  .form-row {
    flex-direction: column;
  }

  .form-row input,
  .form-row button {
    width: 100%;
    min-width: auto;
  }

  #donor_amount {
    width: 100% !important;
  }
}

/* ============================================
   PROGRAMS SECTION - HORIZONTAL SIDE-BY-SIDE ON MOBILE
   (kept the more complete second variant for .card and grid behavior)
============================================ */

#programs > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  width: 100%;
}

/* Individual card styling (consolidated richer definition) */
.card {
  background: white;
  border-radius: var(--ui-radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px var(--card-shadow);
  border: 1px solid rgba(15, 23, 36, 0.04);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  height: auto;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 40px var(--card-shadow-deep);
}

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
}

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

.card:hover .card-media img {
  transform: scale(1.05);
}

.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: var(--text);
}

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

.card-desc {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.card-actions {
  display: flex;
  gap: 12px;
  margin-top: auto;
}

.card-actions .btn {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.875rem;
  white-space: nowrap;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(15, 23, 36, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--muted);
  background: rgba(15, 23, 36, 0.02);
}

/* Mobile horizontal side-by-side layout */
@media (max-width: 768px) {
  #programs > div:first-child {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
  }

  #programs > div:first-child > div:first-child {
    flex: 1;
  }

  #programs > div:first-child > div:last-child {
    flex-shrink: 0;
  }

  .card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
  }

  .card {
    flex: 1;
    min-width: calc(50% - 8px); /* 2 cards per row with gap */
    max-width: calc(50% - 8px);
  }
}

/* Small screen adjustments - single column */
@media (max-width: 600px) {
  #programs > div:first-child {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  #programs > div:first-child > div:last-child {
    align-self: flex-start;
  }

  .card-grid {
    flex-direction: column;
  }

  .card {
    min-width: 100%;
    max-width: 100%;
  }
}

/* Medium screens - 3 cards side by side */
@media (min-width: 769px) and (max-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* High contrast mode support */
.hc-mode .card {
  background: #000 !important;
  border: 2px solid var(--hc-accent) !important;
  color: #fff !important;
}

.hc-mode .card-footer {
  background: rgba(255, 255, 255, 0.05) !important;
  border-top-color: var(--hc-accent) !important;
}

.hc-mode .card-title,
.hc-mode .card-desc,
.hc-mode .card-meta {
  color: #fff !important;
}

.card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--ui-radius);
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .card-media img {
    transition: none;
  }

  .card:hover .card-media img {
    transform: none;
  }
}

/* Compact horizontal variant for smaller widths (kept the second richer variant) */
@media (max-width: 768px) {
  .card-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    justify-content: space-between;
  }

  .card {
    flex: 1;
    min-width: 0;
    max-width: calc(33.333% - 8px);
  }

  .card-body {
    padding: 1rem;
    gap: 8px;
  }

  .card-title {
    font-size: 1rem;
    line-height: 1.2;
  }

  .card-desc {
    font-size: 0.8125rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .card-actions {
    flex-direction: column;
    gap: 6px;
  }

  .card-actions .btn {
    font-size: 0.75rem;
    padding: 6px 10px;
    white-space: nowrap;
  }

  .card-footer {
    padding: 0.75rem 1rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.75rem;
  }
}

/* Single column only on very small screens */
@media (max-width: 480px) {
  .card-grid {
    flex-direction: column;
  }

  .card {
    max-width: 100%;
    min-width: 100%;
  }

  .card-body {
    padding: 1.25rem;
  }

  .card-title {
    font-size: 1.125rem;
  }

  .card-desc {
    font-size: 0.875rem;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    overflow: visible;
  }

  .card-actions {
    flex-direction: row;
  }

  .card-actions .btn {
    font-size: 0.875rem;
    padding: 10px 16px;
  }

  .card-footer {
    padding: 1rem 1.25rem;
    flex-direction: row;
    font-size: 0.875rem;
  }
}

/* ============================================
   CONTACT SECTION - HORIZONTAL LAYOUT ON MOBILE
   (consolidated with second variants kept)
============================================ */

#contact > div {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: stretch;
}

#contact > div > div:first-child {
  flex: 1;
  min-width: 320px;
}

#contact > div > div:last-child {
  flex: 0 0 360px;
  min-width: 260px;
}

.contact {
  background: white;
  padding: 24px;
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 36, 0.04);
  height: 100%;
}

.form-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.form-row .col {
  flex: 1;
  min-width: 0;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(15, 23, 36, 0.12);
  border-radius: var(--ui-radius);
  background: rgba(15, 23, 36, 0.02);
  transition: all var(--transition);
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.08);
}

.contact a[href*="whatsapp"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(37, 211, 102, 0.1);
  transition: all var(--transition);
}

.contact a[href*="whatsapp"]:hover {
  background: rgba(37, 211, 102, 0.2);
  text-decoration: none;
}

#contact > div > div:last-child > div {
  background: white;
  padding: 20px;
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 36, 0.04);
  height: 100%;
}

#contact form[action*="newsletter"] {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

#contact form[action*="newsletter"] input {
  flex: 1;
  min-width: 160px;
}

/* Mobile horizontal layout (kept consolidated second copy of behavior) */
@media (max-width: 768px) {
  #contact > div {
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    padding: 8px 0 16px;
    margin-right: -16px;
    margin-left: -16px;
    padding-left: 16px;
    padding-right: 16px;
    -webkit-overflow-scrolling: touch;
  }

  #contact > div::-webkit-scrollbar {
    height: 4px;
  }
  #contact > div::-webkit-scrollbar-track {
    background: rgba(15, 23, 36, 0.04);
    border-radius: 2px;
  }
  #contact > div::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 36, 0.2);
    border-radius: 2px;
  }

  #contact > div > div:first-child,
  #contact > div > div:last-child {
    flex: 0 0 280px;
    min-width: 280px;
    scroll-snap-align: start;
  }

  .contact {
    padding: 20px;
  }

  .form-row {
    flex-direction: column;
    gap: 8px;
  }

  #contact > div > div:last-child > div {
    padding: 16px;
  }

  #contact h4 {
    font-size: 1.125rem;
  }

  #contact form[action*="newsletter"] {
    flex-direction: column;
  }

  #contact form[action*="newsletter"] input {
    min-width: auto;
  }
}

/* Small screen adjustments */
@media (max-width: 600px) {
  #contact > div {
    flex-wrap: wrap; /* Stack vertically on very small screens */
    overflow-x: visible;
    margin-right: 0;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }

  #contact > div > div:first-child,
  #contact > div > div:last-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
  }

  .contact {
    padding: 24px;
  }

  #contact > div > div:last-child > div {
    padding: 20px;
  }

  .form-row {
    flex-direction: row;
  }

  #contact form[action*="newsletter"] {
    flex-direction: row;
  }
}

@media (max-width: 480px) {
  .contact {
    padding: 20px;
  }

  #contact > div > div:last-child > div {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
  }

  #contact form[action*="newsletter"] {
    flex-direction: column;
  }
}

/* High contrast mode support for contact */
.hc-mode .contact,
.hc-mode #contact > div > div > div {
  background: #000 !important;
  border: 2px solid var(--hc-accent) !important;
  color: #fff !important;
}

.hc-mode .form-row input,
.hc-mode .form-row textarea {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--hc-accent) !important;
  color: #fff !important;
}

.hc-mode .form-row input:focus,
.hc-mode .form-row textarea:focus {
  background: rgba(255, 255, 255, 0.2) !important;
  border-color: var(--hc-accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.2) !important;
}

/* Focus styles for accessibility */
.contact a:focus-visible,
.contact button:focus-visible,
.contact input:focus-visible,
.contact textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.hc-mode .contact a:focus-visible,
.hc-mode .contact button:focus-visible,
.hc-mode .contact input:focus-visible,
.hc-mode .contact textarea:focus-visible {
  outline-color: var(--hc-accent);
}

@media (prefers-reduced-motion: reduce) {
  .contact a[href*="whatsapp"],
  .form-row input,
  .form-row textarea {
    transition: none;
  }
}

/* Ensure proper touch targets */
@media (max-width: 768px) {
  .contact .btn,
  #contact form[action*="newsletter"] .btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Alternative side-by-side (kept second copy with compact styles) */
@media (max-width: 768px) {
  #contact > div {
    flex-wrap: nowrap;
    gap: 16px;
    overflow-x: visible;
  }

  #contact > div > div:first-child,
  #contact > div > div:last-child {
    flex: 1;
    min-width: 0;
    max-width: 50%;
  }

  .contact {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 6px;
  }

  .form-row input {
    padding: 10px 12px;
    font-size: 14px;
  }

  textarea {
    min-height: 80px;
    font-size: 14px;
  }

  #contact > div > div:last-child > div {
    padding: 16px;
  }

  #contact h4 {
    font-size: 1rem;
    margin-bottom: 6px;
  }

  #contact form[action*="newsletter"] {
    flex-direction: column;
    gap: 6px;
  }

  #contact form[action*="newsletter"] input {
    font-size: 14px;
    padding: 10px 12px;
  }

  #contact form[action*="newsletter"] .btn {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* Single column only on very small screens */
@media (max-width: 480px) {
  #contact > div {
    flex-wrap: wrap;
  }

  #contact > div > div:first-child,
  #contact > div > div:last-child {
    max-width: 100%;
    min-width: 100%;
  }
}

/* End of cleaned enhanced_styles.css */
/* ============================================
   CONTACT SECTION - FIXED FOR IPHONE 14 PRO MAX
============================================ */

/* Reset and simplify contact section layout */
#contact > div {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

#contact > div > div:first-child {
  flex: 1;
  min-width: 320px;
}

#contact > div > div:last-child {
  flex: 0 0 360px;
  min-width: 260px;
}

/* Fix for iPhone 14 Pro Max (430px width) and similar sizes */
@media (max-width: 768px) {
  #contact > div {
    flex-direction: column;
    gap: 20px;
    overflow-x: visible;
    margin-right: 0;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  #contact > div > div:first-child,
  #contact > div > div:last-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }
  
  /* Ensure proper spacing on mobile */
  .contact {
    padding: 20px;
    margin: 0;
  }
  
  #contact > div > div:last-child > div {
    padding: 20px;
    margin: 0;
  }
  
  /* Fix form layout for mobile */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  /* Fix newsletter form */
  #contact form[action*="newsletter"] {
    flex-direction: column;
    gap: 12px;
  }
  
  #contact form[action*="newsletter"] input {
    min-width: auto;
    width: 100%;
  }
}

/* Specific fix for iPhone 14 Pro Max and similar sizes */
@media (max-width: 430px) {
  #contact > div {
    gap: 16px;
  }
  
  .contact {
    padding: 16px;
  }
  
  #contact > div > div:last-child > div {
    padding: 16px;
  }
  
  /* Optimize form elements for very small screens */
  .form-row input,
  .form-row textarea {
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  /* Ensure buttons are touch-friendly */
  .contact .btn,
  #contact form[action*="newsletter"] .btn {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  /* Fix WhatsApp link spacing */
  .contact a[href*="whatsapp"] {
    margin: 4px 0;
    display: inline-flex;
    align-items: center;
  }
}

/* Remove any conflicting horizontal scroll behavior */
@media (max-width: 900px) {
  #contact > div {
    overflow-x: visible !important;
  }
}

/* Ensure no horizontal overflow */
#contact {
  width: 100%;
  overflow: hidden;
}

#contact > div,
#contact > div > div:first-child,
#contact > div > div:last-child {
  max-width: 100%;
  box-sizing: border-box;
}
/* ============================================
   VOLUNTEER SECTION - FIXED FOR IPHONE 14 PRO MAX
============================================ */

/* Volunteer section base styles */
#volunteer > div {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

#volunteer > div > div:first-child {
  flex: 1;
  min-width: 320px;
}

#volunteer > div > div:last-child {
  flex: 0 0 360px;
  min-width: 260px;
}

/* Volunteer form styling */
.volunteer-form {
  background: white;
  padding: 24px;
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 36, 0.04);
  height: 100%;
}

/* Volunteer info sidebar */
.volunteer-info {
  background: white;
  padding: 20px;
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 36, 0.04);
  height: 100%;
}

/* Fix for iPhone 14 Pro Max (430px width) and mobile */
@media (max-width: 768px) {
  #volunteer > div {
    flex-direction: column;
    gap: 20px;
    overflow-x: visible;
    margin-right: 0;
    margin-left: 0;
    padding-left: 0;
    padding-right: 0;
  }
  
  #volunteer > div > div:first-child,
  #volunteer > div > div:last-child {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
    width: 100%;
  }
  
  /* Ensure proper spacing on mobile */
  .volunteer-form {
    padding: 20px;
    margin: 0;
  }
  
  .volunteer-info {
    padding: 20px;
    margin: 0;
  }
  
  /* Fix form layout for mobile */
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  /* Ensure form elements are full width */
  .volunteer-form input,
  .volunteer-form textarea,
  .volunteer-form select {
    width: 100%;
    box-sizing: border-box;
  }
}

/* Specific fix for iPhone 14 Pro Max and similar sizes */
@media (max-width: 430px) {
  #volunteer > div {
    gap: 16px;
  }
  
  .volunteer-form {
    padding: 16px;
  }
  
  .volunteer-info {
    padding: 16px;
  }
  
  /* Optimize form elements for very small screens */
  .volunteer-form input,
  .volunteer-form textarea,
  .volunteer-form select {
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  /* Ensure buttons are touch-friendly */
  .volunteer-form .btn {
    min-height: 44px;
    padding: 12px 16px;
    width: 100%;
  }
  
  /* Fix volunteer role checkboxes/radios */
  .volunteer-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .volunteer-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(15, 23, 36, 0.02);
    border-radius: var(--ui-radius);
  }
}

/* Remove any conflicting horizontal scroll behavior */
@media (max-width: 900px) {
  #volunteer > div {
    overflow-x: visible !important;
  }
}

/* Ensure no horizontal overflow */
#volunteer {
  width: 100%;
  overflow: hidden;
}

#volunteer > div,
#volunteer > div > div:first-child,
#volunteer > div > div:last-child {
  max-width: 100%;
  box-sizing: border-box;
}

/* High contrast mode support */
.hc-mode .volunteer-form,
.hc-mode .volunteer-info {
  background: #000 !important;
  border: 2px solid var(--hc-accent) !important;
  color: #fff !important;
}

.hc-mode .volunteer-form input,
.hc-mode .volunteer-form textarea,
.hc-mode .volunteer-form select {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: var(--hc-accent) !important;
  color: #fff !important;
}

/* Focus styles */
.volunteer-form input:focus-visible,
.volunteer-form textarea:focus-visible,
.volunteer-form select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* ============================================
   FIX BLURRY DROPDOWNS - REMOVE BACKDROP FILTERS
============================================ */

/* Remove backdrop-filter from ALL dropdown elements */
.dropdown,
.dropdown-menu,
[class*="dropdown"],
.dropdown-content,
.dropdown-list {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #fff !important;
}

/* Fix mobile navigation - remove blur from dropdowns only */
@media (max-width: 420px) {
  .nav #mainNav.modal .dropdown,
  .nav #mainNav.modal .dropdown-menu,
  #mainNav.modal .dropdown,
  #mainNav.modal .dropdown-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #fff !important;
  }
}

/* Fix accessibility toolbar - keep backdrop-filter for toolbar itself but not dropdowns */
.access-toolbar .dropdown,
.access-toolbar .dropdown-menu {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #fff !important;
}

/* Remove glass effect from dropdowns */
.glass-effect.dropdown,
.glass-effect.dropdown-menu,
.dropdown.glass-effect,
.dropdown-menu.glass-effect {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #fff !important;
}

/* High contrast mode fixes */
.hc-mode .dropdown,
.hc-mode .dropdown-menu,
html.hc-mode .dropdown,
html.hc-mode .dropdown-menu,
body.hc-mode .dropdown,
body.hc-mode .dropdown-menu {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: #000 !important;
}

/* Mobile-specific dropdown fixes */
@media (max-width: 1100px) {
  .dropdown,
  .dropdown-menu,
  #mainNav .dropdown,
  #mainNav .dropdown-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #fff !important;
  }
  
  .hc-mode .dropdown,
  .hc-mode .dropdown-menu {
    background: #000 !important;
  }
}

/* Ensure dropdown text remains crisp */
.dropdown-menu,
.dropdown-menu * {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* --- Mobile: force solid, crisp dropdowns and overlays (apply last) --- */
@media (max-width: 900px) {
  /* Ensure modal nav itself is not blurred and is full-height on small screens */
  .nav #mainNav.modal,
  #mainNav.modal {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg, #ffffff) !important;
    color: var(--text, #0f1724) !important;
    position: fixed;
    inset: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 120 !important;
    padding: 64px 18px 24px !important; /* match your existing spacing */
  }

  /* Overlays: keep dimming but remove blur */
  .mobile-nav-overlay,
  #mobileNavOverlay,
  .nav-modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(2,6,23,0.6) !important;
    z-index: 110 !important;
    pointer-events: auto;
  }

  /* Dropdowns, glass-effect utilities and toolbar dropdowns */
  .dropdown,
  .dropdown-menu,
  [class*="dropdown"],
  .dropdown-content,
  .dropdown-list,
  .glass-effect,
  .glass-effect.dropdown,
  .glass-effect.dropdown-menu,
  .access-toolbar .dropdown,
  .access-toolbar .dropdown-menu,
  .mobile-access-controls {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: #fff !important;
    color: var(--text, #0f1724) !important;
    box-shadow: 0 8px 24px rgba(15,23,36,0.06);
  }

  /* Make dropdown menus easy to scroll on touch devices */
  .dropdown-menu {
    max-height: calc(100vh - 160px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px;
  }

  /* Optional: prevent transform-based compositing issues */
  .site-wrapper,
  .page-root,
  nav,
  .nav,
  #mainNav {
    transform: none !important;
    will-change: auto !important;
  }

  /* Neutralize any inline backdrop-filter set by scripts/styles */
  [style*="backdrop-filter"],
  [style*="-webkit-backdrop-filter"] {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}
html, body {
  overflow-x: hidden !important;
  height: auto;
}

body {
  margin: 0;
  padding: 0;
}

.page-root,
.site-wrapper,
.hero-wrap,
.container,
.section,
.row {
  overflow-x: hidden !important;
}

/* Remove any accidental huge bottom gaps */
body > * {
  margin-bottom: 0 !important;
}

/* Prevent rogue children from stretching page */
* {
  max-width: 100vw;
}

