/* Core theme variables */
:root {
  --primary: #471396;
  --secondary: #7A1CAC;
  --third: #DDE6ED;
  --sixth: #F3E8FF;
  --accent: #2D5F9E;
  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-400: #9CA3AF;
  --blue-50: #eff6ff;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --nav-h: 80px;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --font-heading: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;

  /* Cool gray navbar palette */
  --nav-bg: #e9f2fc;                 /* slate-50 */
  --nav-bg-scrolled: rgba(248, 250, 252, 0.92);
  --nav-fg: #1f2937;                 /* slate-800 (darker) */
  --nav-fg-hover: var(--primary);    /* use primary on hover/active */
  --nav-border: #e9f2fc;             /* slate-200 */
  --nav-indicator-start: var(--primary);
  --nav-indicator-end: var(--secondary);
  --nav-overlay: rgba(2, 6, 23, 0.25); /* cool, slate-tinted overlay */
}


/* Final: remove all interactive effects on mobile menu links */
@media (max-width: 767.98px) {
  #mobile-menu.open,
  #mobile-menu.active {
    align-items: center !important;
    background: var(--nav-bg) !important;
  }

  #mobile-menu.open > a,
  #mobile-menu.active > a {
    color: var(--primary) !important;
    background: transparent !important;
    text-decoration: none !important;
    transition: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
    width: auto !important;
    text-align: center !important;
    -webkit-tap-highlight-color: transparent;
  }

  #mobile-menu.open > a:hover,
  #mobile-menu.open > a:focus,
  #mobile-menu.open > a:active,
  #mobile-menu.active > a:hover,
  #mobile-menu.active > a:focus,
  #mobile-menu.active > a:active {
    color: var(--primary) !important;
    background: transparent !important;
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    transform: none !important;
  }
}

/* Final mobile menu overrides: center links with primary color on nav background */
@media (max-width: 767.98px) {
  /* Center the stack and use nav background */
  .mobile-menu.open,
  .mobile-menu.active {
    align-items: center !important;
    background: var(--nav-bg) !important;
  }

  /* Make each link size to content and center text */
  .mobile-menu.open a,
  .mobile-menu.active a {
    width: auto !important;
    text-align: center !important;
    color: var(--primary) !important;
  }

  /* Keep states consistent */
  .mobile-menu.open a:hover,
  .mobile-menu.open a:focus,
  .mobile-menu.open a:active,
  .mobile-menu.active a:hover,
  .mobile-menu.active a:focus,
  .mobile-menu.active a:active {
    color: var(--primary) !important;
  }
}

/* Strong specificity overrides for mobile menu (uses #mobile-menu) */
@media (max-width: 767.98px) {
  #mobile-menu.open,
  #mobile-menu.active {
    align-items: center !important;
    background: var(--nav-bg) !important;
  }

  #mobile-menu.open > a,
  #mobile-menu.active > a {
    width: auto !important;
    text-align: center !important;
    color: var(--primary) !important;
    background: transparent !important;
  }

  #mobile-menu.open > a:hover,
  #mobile-menu.open > a:focus,
  #mobile-menu.open > a:active,
  #mobile-menu.active > a:hover,
  #mobile-menu.active > a:focus,
  #mobile-menu.active > a:active {
    color: var(--primary) !important;
  }
}

/* Robust mobile menu overlay sizing and scroll lock (final override) */
@media (max-width: 767.98px) {
  /* Lock background scroll defensively when menu is open */
  body.nav-open {
    overflow: hidden !important;
    overscroll-behavior: contain;
    touch-action: none;
  }

  /* Ensure full, stable viewport height using real-vh var with dvh fallback */
  .mobile-menu.open,
  .mobile-menu.active,
  #mobile-menu.open,
  #mobile-menu.active {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: calc(var(--real-vh, 1dvh) * 100) !important;
    min-height: calc(var(--real-vh, 1dvh) * 100) !important;
    box-sizing: border-box !important;
    padding-bottom: max(24px, env(safe-area-inset-bottom)) !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}


/* Base reset and media */
* { 
  box-sizing: 
  border-box; 
}
html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Ensure vertical scrolling is always enabled on mobile */
  overflow-y: auto;
  height: auto;
  min-height: 100%;
  -webkit-overflow-scrolling: touch;
}
img, video { 
  max-width: 100%; 
  height: auto; 
  display: block; 
}
body { 
  background: #fff; 
  color: #000; 
  line-height: 1.5; 
  font-family: var(--font-body); 
}
h1, h2, h3, h4, h5, h6 { 
  font-family: var(--font-heading); 
}

/* Simple layout helpers (new semantic set) */
.wrap { 
  max-width: 80rem; 
  margin: 0 auto; 
  padding: 0 1rem; 
}
@media (min-width: 640px) { 
  .wrap { padding: 0 1.5rem; } 
}
@media (min-width: 1024px) { 
  .wrap { padding: 0 2rem; } 
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 1.2rem;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: background-color 150ms ease-in-out, color 150ms ease-in-out;
}
.btn-primary:hover,
.btn-primary:focus-visible,
.btn-primary:active { 
  background-color: var(--secondary); 
}


/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  z-index: 50;
  transition: background-color 200ms ease, box-shadow 200ms ease, backdrop-filter 200ms ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.site-header.scrolled {
  background: var(--nav-bg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header.scrolled { backdrop-filter: none; }
}
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0; /* compact by default; we’ll adjust on scroll */
}
.brand { 
  display: inline-flex; 
  align-items: center; 
  text-decoration: none; 
}
.logo {
  display: block;
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  transition: transform 200ms ease;
}
.site-header.scrolled .logo { 
  transform: none; 
}
.nav-links {
  display: none;
  gap: 1.25rem;
  align-items: center;
  position: relative;
}
.nav-link {
  position: relative;
  color: var(--nav-fg);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: .2px;
  padding: 0.5rem 0.25rem;
  transition: color 150ms ease;
}
.nav-link:hover,
.nav-link:focus-visible { 
  color: var(--nav-fg-hover); 
}
.nav-link.active { 
  color: var(--nav-fg-hover); 
}
.nav-indicator {
  position: absolute;
  bottom: -6px;
  left: 0;
  height: 2px;
  width: var(--indicator-w, 0px);
  transform: translateX(var(--indicator-x, 0px));
  background: linear-gradient(90deg, var(--nav-indicator-start), var(--nav-indicator-end));
  border-radius: 9999px;
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), width 280ms cubic-bezier(0.22, 1, 0.36, 1), opacity 200ms ease;
  opacity: 0.7;
}
.mobile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--nav-border);
  background: var(--nav-bg);
  color: var(--primary);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}
.mobile-toggle:hover { 
  background: #f1f5f9; 
  border-color: #cbd5e1; 
}
.mobile-toggle:active { 
  transform: scale(0.98); 
}
.mobile-toggle i { 
  font-size: 20px; 
  line-height: 1; 
}
.mobile-toggle .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: transform 200ms ease, opacity 200ms ease;
}
.mobile-toggle .bar + .bar { 
  margin-top: 5px; 
}

@media (min-width: 768px) { .nav-links { display: flex; } .mobile-toggle { display: none; } }

/* Mobile dropdown (compact, right-aligned) */
.mobile-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 150ms ease, transform 150ms ease;
  visibility: hidden; /* prevent any flash when not open */
}
.mobile-menu,
#mobile-menu {
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}
.mobile-menu.open { 
  pointer-events: auto; 
  opacity: 1; 
  transform: translateY(0); 
  visibility: visible;
}
/* Ensure no flash under header while closing */
.mobile-menu.closing {
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translateY(-8px) !important;
  visibility: hidden !important;
}

/* Mobile: Follow us block inside mobile drawer */
@media (max-width: 767.98px) {
  #mobile-menu .mobile-follow {
    margin-top: 5rem;
    padding: 1.5rem;
    border-top: 1px solid var(--nav-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: var(--nav-bg);
    overflow: hidden;
  }
  #mobile-menu .mobile-follow__title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    font-weight: 600;
    color: var(--nav-fg);
    opacity: .85;
  }
  #mobile-menu .mobile-follow__icons {
    display: flex;
    gap: 1.5rem; /* more space between icons */
  }

  #mobile-menu .mobile-follow__icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px !important;   /* XL touch target */
    height: 45px !important;  /* XL touch target */
    border-radius: 9999px !important; /* ensure circular */
    color: var(--primary);
    background: white !important;     /* light gray background */
    border: 0;               /* no border */
    text-decoration: none;
    box-shadow: none;        /* no shadow */
    transition: color 150ms ease, transform 150ms ease, background-color 150ms ease;
    -webkit-tap-highlight-color: transparent; /* remove mobile tap highlight */
  }
  #mobile-menu .mobile-follow__icons a:hover,
  #mobile-menu .mobile-follow__icons a:focus-visible,
  #mobile-menu .mobile-follow__icons a:active {
    color: var(--secondary);
    background: #dfdfe0 !important;     /* keep same background on interaction */
    transform: none; /* remove hover lift */
    box-shadow: none;
  }
  #mobile-menu .mobile-follow__icons i { 
    font-size: 28px; 
    line-height: 1; 
  }
}

/* Mobile menu: prevent X/Y overflow on small screens */
@media (max-width: 767.98px) {
  .mobile-menu,
  #mobile-menu {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(100dvh - var(--nav-h));
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-left: 20px;
    padding-right: 20px;
  }
  .mobile-menu a,
  #mobile-menu > a {
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
    font-weight: 700;
  }
}
.mobile-menu__backdrop { 
  display: none; 
}
.mobile-menu__panel {
  position: relative;
  width: max-content;
  min-width: 220px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--nav-border);
  border-radius: 0.75rem;
  padding: 0.5rem;
  box-shadow: 0 12px 24px rgba(0,0,0,0.10);
  display: flex; flex-direction: column; gap: .25rem;
}
.mobile-menu__panel a {
  display: block;
  padding: 0.625rem 0.75rem;
  color: var(--nav-fg);
  text-decoration: none;
  font-weight: 600;
  border-radius: 0.5rem;
}
.mobile-menu__panel a:hover { 
  background: #eef2f7; 
  color: var(--nav-fg-hover); 
}

/* Sections */
.section { 
  padding: 5rem 0;
  margin: 6rem 0 6rem 0; 
}
/* Ensure anchored sections account for fixed header height */
.scroll-offset {
  scroll-margin-top: var(--nav-h);
}
.section-title { 
  font-size: 2.5rem; 
  font-weight: 700; 
  color: #000; 
  margin: 0 0 1rem; 
  text-align: center; 
}
.section-subtitle { 
  font-size: 1.1rem; 
  color: var(--gray-700); 
  max-width: 48rem; 
  margin: 0 auto; 
  text-align: center; 
}

/* Hero */
.hero {
  padding-top: var(--nav-h); 
  background: #ffffff; 
  /* Use real viewport height to avoid iOS 100vh bugs */
  min-height: calc(var(--real-vh, 1dvh) * 100);
  display: flex; 
  align-items: center; 
}
.hero-inner { 
  padding: 5rem 0; 
}
.grid-2 { 
  display: grid; 
  gap: 3rem; 
  grid-template-columns: 1fr; 
  align-items: center; 
}
.hero-text {
  margin: 1rem;
}

@media (min-width: 1024px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.hero-text { order: 2; }
.hero-media { order: 1; }

@media (min-width: 1024px) { .hero-text { order: 1; } .hero-media { order: 2; } }
.hero h1 { 
  font-size: 2.5rem; 
  line-height: 1.1; 
  color: var(--gray-900); 
  margin: 0; 
}
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 3.75rem; } }
.hero p { 
  margin-top: 1.5rem;
  font-size: 1.2rem; 
  color: #000; 
  line-height: 1.5; 
}
.hero-ctas { 
  margin-top: 2rem; 
  display: flex; 
  flex-direction: column; 
  gap: 1rem; 
}
@media (min-width: 640px) { .hero-ctas { flex-direction: row; } }

/* Services */
.services {     
  background: 
  conic-gradient(
  from 70deg at 30% 70%, 
  #aaddf5, 
  #fccddd,
  #fae9b4, 
  #d5f7d8, 
  #ddcef4,
  #c7ebfc);
}
.cards-3 {
  display: grid; 
  gap: 2rem; 
  grid-template-columns: 1fr; 
}

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

.service-card { 
  background: white;
  border: 1px solid #e5e7eb; 
  border-radius: 0.75rem; 
  padding: 2rem; 
  transition: box-shadow 150ms; 
}
.service-card:hover { 
  box-shadow: 0 10px 20px rgba(0,0,0,0.12); 
}
.icon-box { 
  width: 4rem; 
  height: 4rem; 
  border-radius: 0.5rem; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin-bottom: 1.25rem; 
  transition: background-color 150ms; 
}
.service-card:hover .icon-box { 
  background: var(--primary); 
}
.icon-box i { 
  font-size: 2rem; 
  color: var(--primary); 
  transition: color 150ms; 
}
.service-card:hover .icon-box i { 
  color: #fff; 
}
.service-card h3 { 
  font-size: 1.3rem; 
  font-weight: 700; 
  color: #0b0b0b; 
  margin: 0 0 0.75rem; 
  letter-spacing: .2px;
}
.service-card p { 
  color: #111827; 
  margin: 0 0 1rem; 
  line-height: 1.7;
}
.service-card ul { 
  color: black; 
  padding-left: 0; 
  margin: 0; 
  list-style: none; 
  display: grid; 
  gap: .5rem; 
}
.service-card li { 
  list-style: none; 
  color: var(--gray-600);
  margin: 0; 
  padding: .5rem .75rem; 
  background: #f6f7f7; 
  border: none; 
  border-radius: 10px; 
}

/* Services reveal animations */
@media (prefers-reduced-motion: no-preference) {
  .services .service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1), opacity 600ms ease;
    will-change: transform, opacity;
  }
  .services .service-card:nth-child(1) { transform: translateX(-48px); }
  .services .service-card:nth-child(2) { transform: translateY(48px); }
  .services .service-card:nth-child(3) { transform: translateX(48px); }
  .services .service-card:nth-child(4) { transform: translateY(-48px); }
  .services .service-card:nth-child(5) { transform: translate(-48px, 48px); }
  .services .service-card:nth-child(6) { transform: translate(48px, -48px); }

  /* Staggered delays for a cascading entrance */
  .services.in-view .service-card { opacity: 1; transform: none; }
  .services.in-view .service-card:nth-child(1) { transition-delay: 0ms; }
  .services.in-view .service-card:nth-child(2) { transition-delay: 60ms; }
  .services.in-view .service-card:nth-child(3) { transition-delay: 120ms; }
  .services.in-view .service-card:nth-child(4) { transition-delay: 180ms; }
  .services.in-view .service-card:nth-child(5) { transition-delay: 240ms; }
  .services.in-view .service-card:nth-child(6) { transition-delay: 300ms; }
}


/* Delivery Partnership */
.delivery { 
  background: white; 
  padding: 4rem 0;
  margin: 0 0 6rem 0; 
}
.delivery-inner { 
  display: flex; 
  flex-direction: column-reverse; 
  gap: 2.5rem; 
  align-items: center; 
  justify-content: space-between; 
}
@media (min-width: 768px) { .delivery-inner { flex-direction: row; } }

.delivery h2 { 
  font-size: 2.5rem; 
  font-weight: 700; 
  color: #15803d; 
  margin: 0 0 1rem; 
}
.delivery-text p {
  font-size: 1.1rem;
}
.delivery p { 
  color: #111827; 
  line-height: 1.7; 
  margin: 0 0 1rem; 
  font-size: 1.05rem;
}
.delivery ul { 
  color: #111827; 
  padding-left: 0; 
  margin-bottom: 1.25rem; 
  list-style: none;
  display: grid;
  gap: .5rem;
  font-size: 1.05rem;
}
.delivery li { 
  list-style: none; 
  margin: 0; 
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.delivery li i {
  color: var(--green-600);
  line-height: 1;
  margin-top: .15rem;
}
.delivery li span { 
  flex: 1; 
}
.delivery .cta { 
  display: inline-block; 
  background: var(--green-600); 
  color: #fff; 
  padding: 1rem 2rem; 
  border-radius: 0.5rem; 
  font-size: 1.2rem; 
  font-weight: bold;
  margin-top: 2rem; 
  transition: background-color 150ms; 
  text-decoration: none; 
}
.delivery .cta:hover { 
  background: var(--green-800); 
}
.delivery-video { 
  width: 100%; 
  max-width: 650px;
  border-radius: 0.75rem; 
  box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
  overflow: hidden; 
}


/* Vision Section*/

/* background image */
.why-us { 
  background-image: url('../images/AI-book.png'); 
  background-size: cover; 
  background-position: center 30%; }

.backdrop-blur-lg { 
  backdrop-filter: blur(10px);
}
.why-us { 
  position: relative;
  background-size: cover; 
  background-position: center 30%; 
  padding: 6rem 0; 
  color: #fff; 
}
.why-us .overlay { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.60); 
}
.why-us .content { 
  position: relative; 
  z-index: 1; 
  text-align: center; 
}
.reasons-grid { 
  display: grid; 
  gap: 1.5rem; 
  grid-template-columns: 1fr; 
  max-width: 64rem; 
  margin: 0 auto; 
  text-align: left; 
}
@media (min-width: 640px) { .reasons-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .reasons-grid { grid-template-columns: repeat(3, 1fr); } }

.reason-card { 
  background: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(10px); 
  padding: 1.5rem; 
  border-radius: 1rem; 
  transition: background-color 150ms; 
}
.reason-card:hover { 
  background: rgba(255,255,255,0.2); 
}
.reason-card .icon-box {
  margin: 0 auto 1rem;
  display: flex;
  justify-content: center;
}
.why-us .icon-box i {
  color: white;
  font-size: 2.5rem;
}
.reason-card h3 { 
  font-size: 1.25rem; 
  font-weight: 600; 
  color: #22c55e; 
  margin: 0 0 0.5rem; 
}
.reason-card p { 
  color: #f3f4f6; 
  font-size: 0.875rem; 
  margin: 0; 
}


/* Pricing */
.pricing-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 640px) { .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
@media (min-width: 1024px) { .pricing-grid { grid-template-columns: repeat(4, 1fr); gap: 1.75rem; } }

.pricing-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  transition: transform 150ms, box-shadow 150ms, border-color 150ms;
  height: 100%;
}
@media (min-width: 640px) { .pricing-card { padding: 1.5rem; gap: .75rem; } }
.pricing-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); border-color: #d1d5db; }

.pricing-icon { width: 3rem; height: 3rem; border-radius: .75rem; display: grid; place-items: center; background: linear-gradient(135deg, var(--sixth), #f3f4f6); color: var(--primary); margin-bottom: .25rem; }
.pricing-title { margin: .25rem 0 .125rem; font-size: 1.125rem; font-weight: 700; color: var(--gray-900); line-height: 1.3; }
.pricing-desc { margin: 0; color: var(--gray-700); line-height: 1.6; }
.pricing-actions { margin-top: .5rem; }

/* Keep section background white, and scope variables for card theme */
.pricing {
    background: #fff;
  --pricing-card-bg: linear-gradient(145deg, #fddbd3, #fab7a8, #fddbd3);       
  --pricing-card-border: #fedfdb;      /* blue-100 */
  --pricing-card-hover-bg: #ffffff;    /* white */
  --pricing-card-hover-border: #93c5fd;/* blue-300 */
}

.pricing-layout { display: grid; grid-template-columns: 1fr; grid-template-areas: "aside" "cards"; gap: 2rem; }
@media (min-width: 1024px) { .pricing-layout { grid-template-columns: 0.9fr 1.3fr; grid-template-areas: "aside cards"; align-items: start; } }

.pricing-aside { grid-area: aside; }

.pricing-aside .section-title { color: tomato; text-align: left; }
.pricing-aside .section-subtitle { color: #334155; text-align: left; max-width: 36rem; }

.pricing-cards { grid-area: cards; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .pricing-cards { grid-template-columns: 1fr 1fr; } }

/* Override default card styles for pricing section */
.pricing .pricing-card {
  background: var(--pricing-card-bg);
  border-color: var(--pricing-card-border);
}

/* Contact */
.contact { 
  background: #fff; 
  padding: 5rem 0; 
  margin-bottom: 0; 
}
@media (min-width: 1024px) {.contact { margin-bottom: 0; }}

.contact .intro { 
  text-align: center; 
  margin-bottom: 4rem; 
}
.contact-modern { 
  position: relative;
  background:
    radial-gradient(1000px 500px at 10% 0%, rgba(122,28,172,0.12), transparent 60%),
    radial-gradient(1200px 600px at 90% 100%, rgba(71,19,150,0.12), transparent 55%),
    linear-gradient(180deg, #faf5ff 0%, #ffffff 40%, #f5f3ff 100%);
}

.contact-modern-grid { 
  display: grid; 
  gap: 2.5rem; 
  grid-template-columns: 1fr; 
}

@media (min-width: 1024px) { .contact-modern-grid { grid-template-columns: 1.1fr 0.9fr; }}

.contact-card { 
  background: rgba(255,255,255,0.75); 
  backdrop-filter: blur(12px); 
  border: 1px solid rgba(0,0,0,0.06); 
  border-radius: 1rem; 
  padding: 2.25rem; 
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.contact-card-title { 
  margin: 0 0 1rem; 
  font-size: 1.5rem; 
  font-weight: 700; 
  color: var(--gray-900);
  display: flex; 
  align-items: center; 
  gap: .6rem;
}
.contact-card-title i { 
  color: var(--secondary); 
}

.contact-form { 
  display: grid; 
  gap: 1.25rem; 
}
.form-row { 
  display: grid; 
  gap: 1rem; 
  grid-template-columns: 1fr; 
}
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-field { 
  position: relative; 
}
.input { 
  width: 100%; 
  padding: 1rem 1rem 1rem 2.75rem; 
  border: 1px solid #e5e7eb; 
  border-radius: 0.75rem; 
  font-size: 1rem; 
  outline: none; 
  background: #fff; 
  transition: border-color 150ms, box-shadow 150ms; 
}
.input:focus { 
  border-color: var(--secondary); 
  box-shadow: 0 0 0 4px rgba(122,28,172,0.12); 
}
.contact .input:focus {
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}
.textarea { 
  resize: vertical; 
  min-height: 8rem; 
}
.input-icon { 
  position: absolute; 
  left: 0.9rem; 
  top: 50%; 
  transform: translateY(-50%); 
  font-size: 1.1rem; 
  color: var(--primary); 
}

/* Hide icon and placeholder label when user has typed */
.form-field.has-value .input-icon { 
  opacity: 0; 
  transition: opacity 120ms ease; 
}
.form-field.has-value .floating-label { 
  opacity: 0; 
  transition: opacity 120ms ease; 
}

/* Also hide while the field is focused */
.form-field:focus-within .input-icon { 
  opacity: 0; 
  transition: opacity 120ms ease; 
}
.form-field:focus-within .floating-label { 
  opacity: 0; 
  transition: opacity 120ms ease; 
}

/* Floating label */
.floating-label { 
  position: absolute; 
  left: 2.75rem; 
  top: 50%; 
  transform: translateY(-50%); 
  color: var(--gray-600); 
  pointer-events: none; 
  transition: all 150ms; 
  background: transparent; 
}
.input:focus + .floating-label,
.input:not(:placeholder-shown) + .floating-label,
.textarea:focus + .floating-label,
.textarea:not(:placeholder-shown) + .floating-label { 
  top: 0.15rem; 
  transform: translateY(0); 
  font-size: 0.75rem; 
  color: var(--secondary); 
  padding: 0 0.25rem; 
  background: #fff; 
}

.form-actions { 
  margin-top: .5rem; 
}
.w-full { width: 100%;
  
  font-size: 1.2rem;
} 

.form-hint { 
  margin-top: .5rem; 
  font-size: .875rem; 
  color: var(--gray-600); 
  min-height: 1.25rem; 
}
.form-hint.error { 
  color: #ef4444; 
}
.form-hint.success { 
  color: var(--green-600); 
}

/* Input validation states */
.input.invalid { 
  border-color: #ef4444; 
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12); 
}
.input.valid { 
  border-color: var(--green-600); 
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12); 
}

.contact-info-col { 
  display: grid; 
  gap: 1.5rem; 
  align-content: start; 
}
.info-intro h3 { 
  font-size: 1.5rem; 
  font-weight: 700; 
  margin: 0 0 .25rem; 
  color: #111827; 
}
.info-intro p { 
  margin: 0; 
  color: var(--gray-700); 
}
@media (min-width: 1024px) {
  /* Nudge the info column down to align with the form card title */
  .contact-info-col { 
    margin-top: 2.25rem; 
  }
}

/* Mobile nav: centered primary links on nav background */
@media (max-width: 767.98px) {
  /* Ensure the mobile menu uses the nav background */
  .mobile-menu.open,
  .mobile-menu.active {
    background: var(--nav-bg) !important;
  }

  /* Center each link, use primary text, and nav background */
  .mobile-menu.open a,
  .mobile-menu.active a {
    text-align: center !important;
    width: 100% !important;
    color: var(--primary) !important;
    background: var(--nav-bg) !important;
  }

  /* Keep interactive states consistent */
  .mobile-menu.open a:hover,
  .mobile-menu.open a:focus,
  .mobile-menu.open a:active,
  .mobile-menu.active a:hover,
  .mobile-menu.active a:focus,
  .mobile-menu.active a:active {
    color: var(--primary) !important;
    background: var(--nav-bg) !important;
  }
}
.info-intro h3 { 
  font-size: 1.5rem; 
  font-weight: 700; 
  margin: 0 0 .25rem; 
  color: #111827; 
}
.info-intro p { 
  margin: 0; 
  color: var(--gray-700); 
}

.info-list { 
  display: grid; 
  gap: 0.9rem; 
}
.info-item { 
  display: grid; 
  grid-template-columns: auto 1fr; 
  gap: 1rem; align-items: start; 
  padding: 1rem; 
  background: #fff; 
  border: 1px solid #e5e7eb; 
  border-radius: 0.75rem; 
}
.info-badge { 
  width: 2.75rem; height: 2.75rem; border-radius: 0.75rem; 
  display: grid; place-items: center; color: #fff; 
  background: linear-gradient(135deg, var(--secondary), var(--primary));
}
.info-item h4 { 
  margin: 0 0 0.15rem; 
  font-size: 1rem; 
  line-height: 1.3; 
  color: var(--gray-900); 
}
.info-item p { 
  margin: 0; 
  line-height: 1.4; 
}
.info-item a { 
  color: inherit; 
  text-decoration: none; 
}
.info-item a:hover { 
  color: var(--secondary); 
  text-decoration: underline; 
}

.socials-block h4 { 
  margin: .25rem 0 .5rem; 
}
.socials { 
  display: flex; 
  gap: 1rem; 
}
.socials.modern a { 
  width: 2.75rem; 
  height: 2.75rem; 
  border-radius: 0.75rem; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: #f3f4f6; 
  color: #000; 
  text-decoration: none; 
  border: 1px solid #e5e7eb; 
  transition: transform 150ms, background-color 150ms, color 150ms; 
}
.socials.modern a:hover { 
  background: var(--secondary); 
  color: #fff; 
  transform: translateY(-2px); 
}

/* Footer */
.site-footer { 
  background: #111827; 
  color: #fff; 
  padding: 0 0 3rem; 
  position: relative;
  overflow: hidden;
}
/* Wave separator at top of footer */
.footer-wave { line-height: 0; height: 110px; color: #111827; }
.footer-wave svg { display: block; width: 100%; height: 100%; }
@media (min-width: 768px) { .footer-wave { height: 150px; } }
/* Accessibility utility for hidden headings */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Ambient animated accents using theme colors */
@media (prefers-reduced-motion: no-preference) {
  .site-footer::before,
  .site-footer::after {
    content: "";
    position: absolute;
    width: 28rem; height: 28rem;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    pointer-events: none;
    transform: translate3d(0,0,0);
  }
  .site-footer::before {
    background: radial-gradient(closest-side, var(--secondary), transparent 70%);
    left: -6rem; bottom: -10rem;
    animation: orbFloat 14s ease-in-out infinite;
  }
  .site-footer::after {
    background: radial-gradient(closest-side, var(--primary), transparent 70%);
    right: -8rem; top: -12rem;
    animation: orbFloatAlt 18s ease-in-out infinite;
  }
  @keyframes orbFloat { 0%, 100% { transform: translate(0, 0) scale(1); }  50% { transform: translate(40px, -30px) scale(1.05); } }
  @keyframes orbFloatAlt { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-30px, 40px) scale(1.07); } }
}
.footer-grid { 
  display: grid; 
  gap: 2rem; 
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; justify-items: stretch; column-gap: 1.5rem; } }

/* Make all footer columns equal width */
.footer-grid .span-2 { grid-column: auto; }
@media (min-width: 1024px) {
  /* Desktop: 5 columns; Versolix spans 2, Follow us sits below Versolix */
  .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); column-gap: 2.5rem; row-gap: 2rem; }
  .footer-grid .span-2 { grid-column: span 2; }
  .footer-grid .follow-col { grid-column: 1 / span 2; grid-row: 2; }
}
.site-footer h3 { 
  font-size: 2rem; 
  font-weight: 700; 
  margin: 0 0 1rem; 
}
.site-footer h4 { 
  font-size: 1.25rem; 
  font-weight: 600; 
  margin: 0 0 1rem; 
}
.site-footer p { 
  color: var(--gray-400); 
}
.site-footer a { 
  color: var(--gray-400); 
  text-decoration: none; 
  transition: color 150ms, background-size 200ms ease;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
}
.site-footer a:hover { 
  color: white; 
  background-size: 100% 2px;
}

.site-footer .socials {
  font-size: x-large;
}
.site-footer .socials.modern {
  font-size: 1rem;
}
.site-footer .socials.modern a {
  background: #f3f4f6;
  color: #000;
  border-color: #e5e7eb;
}
.site-footer .socials.modern a:hover {
  background: var(--primary);
  color: #fff;
  border: none;
  transform: translateY(-3px) scale(1.03) rotate(-1deg);
}
.site-footer .links { 
  color: var(--gray-400); 
  list-style: none; 
  padding-left: 0; 
  margin: 0; 
}
.site-footer .links li { 
  margin: 0.5rem 0; 
}
.site-footer .links a.nav-link { padding: 0; }
.site-footer .bottom { 
  border-top: 1px solid #1f2937; 
  margin-top: 3rem; 
  padding-top: 2rem; 
  color: var(--gray-400); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 1rem; 
  flex-wrap: wrap;
}

/* Footer reveal animation */
@media (prefers-reduced-motion: no-preference) {
  .footer-grid > div { opacity: 0; transform: translateY(24px); transition: transform 600ms cubic-bezier(0.22,1,0.36,1), opacity 600ms ease; will-change: transform, opacity; }
  .site-footer.in-view .footer-grid > div { opacity: 1; transform: none; }
  .site-footer.in-view .footer-grid > div:nth-child(1) { transition-delay: 0ms; }
  .site-footer.in-view .footer-grid > div:nth-child(2) { transition-delay: 80ms; }
  .site-footer.in-view .footer-grid > div:nth-child(3) { transition-delay: 160ms; }
  .site-footer.in-view .footer-grid > div:nth-child(4) { transition-delay: 240ms; }
  .site-footer.in-view .footer-grid > div:nth-child(5) { transition-delay: 320ms; }
}

/* Back-to-top button */
.footer-actions { 
  margin-top: 0; 
  margin-left: auto; 
  display: flex; 
  justify-content: flex-end; 
}
.to-top { 
  display: inline-grid; 
  place-items: center;
  width: 2.75rem; 
  height: 2.75rem;
  background: #fff;
  color: black;
  font-size: 1.1rem; 
  line-height: 1; 
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  text-decoration: none;
  transition: background-color 150ms, color 150ms, border-color 150ms, transform 150ms;
}

.to-top i { color: #000; font-size: 1.25rem; line-height: 1; }
.to-top:hover i { color: #fff; }

.to-top:hover { 
  background: var(--primary); 
  color: white;
  border-color: var(--primary); 
  transform: translateY(-2px); 
}

/* Modal (generic) */
.modal { position: fixed; inset: 0; display: none; z-index: 1000; }
.modal.open { display: block; }
.modal[aria-hidden="false"] { display: block; }
.modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.modal-dialog { 
  position: relative; 
  max-width: 56rem; 
  margin: 4rem auto; 
  background: #fff; 
  color: #000; 
  border-radius: 1rem; 
  border: 1px solid #e5e7eb; 
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  padding: 1rem 1rem 1.5rem; 
}
@media (min-width: 640px) { .modal-dialog { padding: 1.25rem 1.5rem 2rem; margin: 6rem auto; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #e5e7eb; padding-bottom: .75rem; }
.modal-header h3 { margin: 0; font-size: 1.5rem; font-weight: 700; color: #111827; }
.modal-close { background: #f3f4f6; border: 1px solid #e5e7eb; color: #111827; width: 2.25rem; height: 2.25rem; border-radius: .5rem; display: grid; place-items: center; cursor: pointer; }
.modal-close:hover { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.modal-body { max-height: min(70vh, 32rem); overflow: auto; padding-top: 1rem; }
.modal-body h4 { margin: 1rem 0 .25rem; font-size: 1.125rem; font-weight: 700; color: #111827; }
.modal-body p { margin: 0 0 .75rem; color: #111827; }
.modal-body ul { margin: 0 0 .75rem 1rem; color: #111827; }


/* === Mobile Nav Override: Force Full-Screen Overlay (<= 767px) === */
@media (max-width: 767.98px) {
  .nav-menu.open,
  .nav-menu.active,
  .navbar-nav.open,
  .navbar-nav.active,
  .mobile-menu.open,
  .mobile-menu.active,
  nav.open .nav-menu,
  nav.active .nav-menu,
  header.nav-open .nav-menu,
  .header.nav-open .nav-menu,
  body.menu-open .nav-menu,
  body.nav-open .nav-menu {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    background: #ffffff !important;
    box-shadow: none !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    padding: 56px 20px 24px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}
/* === Mobile Nav: Right-align items (full-screen) (<= 767px) === */
@media (max-width: 767.98px) {
  .nav-menu.open,
  .nav-menu.active,
  .navbar-nav.open,
  .navbar-nav.active,
  .mobile-menu.open,
  .mobile-menu.active,
  nav.open .nav-menu,
  nav.active .nav-menu,
  header.nav-open .nav-menu,
  .header.nav-open .nav-menu,
  body.menu-open .nav-menu,
  body.nav-open .nav-menu {
    align-items: flex-end !important;   /* right side for column layout */
    justify-content: flex-start !important; /* start from top */
    padding: 56px 20px 24px !important;    /* keep top-right padding */
  }

  /* Make links align to the right edge */
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    text-align: center !important;
    width: 100%;
  }
}
/* === Mobile Nav: Pin close (×) to top-right === */
@media (max-width: 767.98px) {
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    position: fixed !important;
    top: 12px !important;
    right: 12px !important;
    z-index: 10000 !important; /* above overlay */
    pointer-events: auto !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: #f5f5f5 !important;
    color: #111 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15) !important;
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease !important;
    backdrop-filter: saturate(140%) blur(2px);
  }

  /* Subtle entrance animation when menu opens */
  .nav-menu.open .nav-close,
  .nav-menu.active .nav-close,
  .mobile-menu.open .nav-close,
  .mobile-menu.active .nav-close,
  .navbar-nav.open .nav-close,
  .navbar-nav.active .nav-close,
  nav.open .nav-menu .nav-close,
  nav.active .nav-menu .nav-close,
  header.nav-open .nav-menu .nav-close,
  .header.nav-open .nav-menu .nav-close,
  body.menu-open .nav-menu .nav-close,
  body.nav-open .nav-menu .nav-close {
    animation: navClosePopIn 240ms cubic-bezier(.2,.8,.2,1) both;
  }

  .nav-menu.open .nav-close,
  .nav-menu.active .nav-close,
  .mobile-menu.open .nav-close,
  .mobile-menu.active .nav-close,
  .navbar-nav.open .nav-close,
  .navbar-nav.active .nav-close,
  nav.open .nav-menu .nav-close,
  nav.active .nav-menu .nav-close,
  header.nav-open .nav-menu .nav-close,
  .header.nav-open .nav-menu .nav-close,
  body.menu-open .nav-menu .nav-close,
  body.nav-open .nav-menu .nav-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hover/active effects for a stylish feel */
  .nav-menu .nav-close:hover,
  .mobile-menu .nav-close:hover,
  .navbar-nav .nav-close:hover {
    transform: scale(1.07) rotate(90deg);
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18) !important;
  }

  .nav-menu .nav-close:active,
  .mobile-menu .nav-close:active,
  .navbar-nav .nav-close:active {
    transform: scale(0.97) rotate(90deg);
  }

  /* Focus ring for accessibility */
  .nav-menu .nav-close:focus-visible,
  .mobile-menu .nav-close:focus-visible,
  .navbar-nav .nav-close:focus-visible {
    outline: 2px solid #111 !important;
    outline-offset: 2px !important;
  }

  /* Optional subtle ripple/highlight */
  .nav-menu .nav-close::after,
  .mobile-menu .nav-close::after,
  .navbar-nav .nav-close::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: radial-gradient(closest-side, rgba(0,0,0,0.06), transparent 70%);
    transform: scale(0.8);
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
  }

  .nav-menu .nav-close:hover::after,
  .mobile-menu .nav-close:hover::after,
  .navbar-nav .nav-close:hover::after {
    transform: scale(1);
    opacity: 1;
  }

  @keyframes navClosePopIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Respect reduced motion preferences */
  @media (prefers-reduced-motion: reduce) {
    .nav-menu .nav-close,
    .mobile-menu .nav-close,
    .navbar-nav .nav-close { transition: none !important; }
    .nav-menu .nav-close:hover,
    .mobile-menu .nav-close:hover,
    .navbar-nav .nav-close:hover { transform: none !important; }
    .nav-menu.open .nav-close,
    .nav-menu.active .nav-close,
    .mobile-menu.open .nav-close,
    .mobile-menu.active .nav-close,
    .navbar-nav.open .nav-close,
    .navbar-nav.active .nav-close { animation: none !important; }
  }
}
/* === Mobile Nav: Remove text underline on links === */
@media (max-width: 575.98px) {
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a,
  .nav-menu.open a:hover,
  .nav-menu.active a:hover,
  .navbar-nav.open a:hover,
  .navbar-nav.active a:hover,
  .mobile-menu.open a:hover,
  .mobile-menu.active a:hover,
  nav.open .nav-menu a:hover,
  nav.active .nav-menu a:hover,
  header.nav-open .nav-menu a:hover,
  .header.nav-open .nav-menu a:hover,
  body.menu-open .nav-menu a:hover,
  body.nav-open .nav-menu a:hover,
  .nav-menu.open a:focus,
  .nav-menu.active a:focus,
  .navbar-nav.open a:focus,
  .navbar-nav.active a:focus,
  .mobile-menu.open a:focus,
  .mobile-menu.active a:focus,
  nav.open .nav-menu a:focus,
  nav.active .nav-menu a:focus,
  header.nav-open .nav-menu a:focus,
  .header.nav-open .nav-menu a:focus,
  body.menu-open .nav-menu a:focus,
  body.nav-open .nav-menu a:focus,
  .nav-menu.open a:active,
  .nav-menu.active a:active,
  .navbar-nav.open a:active,
  .navbar-nav.active a:active,
  .mobile-menu.open a:active,
  .mobile-menu.active a:active,
  nav.open .nav-menu a:active,
  nav.active .nav-menu a:active,
  header.nav-open .nav-menu a:active,
  .header.nav-open .nav-menu a:active,
  body.menu-open .nav-menu a:active,
  body.nav-open .nav-menu a:active {
    text-decoration: none !important;
  }
}
/* === Mobile Nav: Larger black link text === */
@media (max-width: 575.98px) {
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    color: #000 !important;
    font-size: clamp(22px, 6vw, 30px) !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
  }

  /* Keep black color on hover/focus/active as well */
  .nav-menu.open a:hover,
  .nav-menu.active a:hover,
  .navbar-nav.open a:hover,
  .navbar-nav.active a:hover,
  .mobile-menu.open a:hover,
  .mobile-menu.active a:hover,
  nav.open .nav-menu a:hover,
  nav.active .nav-menu a:hover,
  header.nav-open .nav-menu a:hover,
  .header.nav-open .nav-menu a:hover,
  body.menu-open .nav-menu a:hover,
  body.nav-open .nav-menu a:hover,
  .nav-menu.open a:focus,
  .nav-menu.active a:focus,
  .navbar-nav.open a:focus,
  .navbar-nav.active a:focus,
  .mobile-menu.open a:focus,
  .mobile-menu.active a:focus,
  nav.open .nav-menu a:focus,
  nav.active .nav-menu a:focus,
  header.nav-open .nav-menu a:focus,
  .header.nav-open .nav-menu a:focus,
  body.menu-open .nav-menu a:focus,
  body.nav-open .nav-menu a:focus,
  .nav-menu.open a:active,
  .nav-menu.active a:active,
  .navbar-nav.open a:active,
  .navbar-nav.active a:active,
  .mobile-menu.open a:active,
  .mobile-menu.active a:active,
  nav.open .nav-menu a:active,
  nav.active .nav-menu a:active,
  header.nav-open .nav-menu a:active,
  .header.nav-open .nav-menu a:active,
  body.menu-open .nav-menu a:active,
  body.nav-open .nav-menu a:active {
    color: #000 !important;
    background-color: white;
  }
}
/* === Mobile Nav: Larger, bolder close (×) === */
@media (max-width: 575.98px) {
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    font-size: 30px !important; /* larger × */
    font-weight: 800 !important; /* bold × */
    line-height: 1 !important;
  }
}
/* === Mobile Nav: Extra spacing below close (×) === */
@media (max-width: 575.98px) {
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    top: 20px !important;           /* nudge down for more space */
    margin-bottom: 5px !important; /* additional visual spacing */
  }
}
/* === Mobile Nav: More spacing around close (×) === */
@media (max-width: 575.98px) {
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    top: 28px !important;
    right: 20px !important;
    margin: 12px !important;
  }
}
/* === Mobile Nav: Separate close button and menu links (no overlap) === */
@media (max-width: 575.98px) {
  /* Add safe top padding equal to close button area */
  .nav-menu.open,
  .nav-menu.active,
  .navbar-nav.open,
  .navbar-nav.active,
  .mobile-menu.open,
  .mobile-menu.active,
  nav.open .nav-menu,
  nav.active .nav-menu,
  header.nav-open .nav-menu,
  .header.nav-open .nav-menu,
  body.menu-open .nav-menu,
  body.nav-open .nav-menu {
    box-sizing: border-box !important;
    padding-top: 96px !important; /* close btn top (≈28px) + size (≈44px) + extra spacing */
    gap: 20px !important; /* consistent vertical rhythm between items */
  }

  /* Ensure first link doesn’t sit too close to the top */
  .nav-menu.open a:first-of-type,
  .nav-menu.active a:first-of-type,
  .navbar-nav.open a:first-of-type,
  .navbar-nav.active a:first-of-type,
  .mobile-menu.open a:first-of-type,
  .mobile-menu.active a:first-of-type,
  nav.open .nav-menu a:first-of-type,
  nav.active .nav-menu a:first-of-type,
  header.nav-open .nav-menu a:first-of-type,
  .header.nav-open .nav-menu a:first-of-type,
  body.menu-open .nav-menu a:first-of-type,
  body.nav-open .nav-menu a:first-of-type {
    margin-top: 8px !important;
  }

  /* Add a little spacing between each link for readability */
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    margin: 6px 0 !important;
  }
}
/* === Mobile Nav: Always white background, black text on link click === */
@media (max-width: 575.98px) {
  /* Base link style inside open mobile menu */
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    background: transparent !important;     /* let overlay white show through */
    background-color: transparent !important;
    color: #000 !important;                 /* always black text */
  }

  /* Interactive states: keep background clear and text black */
  .nav-menu.open a:hover,
  .nav-menu.open a:focus,
  .nav-menu.open a:active,
  .nav-menu.active a:hover,
  .nav-menu.active a:focus,
  .nav-menu.active a:active,
  .navbar-nav.open a:hover,
  .navbar-nav.open a:focus,
  .navbar-nav.open a:active,
  .navbar-nav.active a:hover,
  .navbar-nav.active a:focus,
  .navbar-nav.active a:active,
  .mobile-menu.open a:hover,
  .mobile-menu.open a:focus,
  .mobile-menu.open a:active,
  .mobile-menu.active a:hover,
  .mobile-menu.active a:focus,
  .mobile-menu.active a:active,
  nav.open .nav-menu a:hover,
  nav.open .nav-menu a:focus,
  nav.open .nav-menu a:active,
  nav.active .nav-menu a:hover,
  nav.active .nav-menu a:focus,
  nav.active .nav-menu a:active,
  header.nav-open .nav-menu a:hover,
  header.nav-open .nav-menu a:focus,
  header.nav-open .nav-menu a:active,
  .header.nav-open .nav-menu a:hover,
  .header.nav-open .nav-menu a:focus,
  .header.nav-open .nav-menu a:active,
  body.menu-open .nav-menu a:hover,
  body.menu-open .nav-menu a:focus,
  body.menu-open .nav-menu a:active,
  body.nav-open .nav-menu a:hover,
  body.nav-open .nav-menu a:focus,
  body.nav-open .nav-menu a:active,
  /* common active class variants */
  .nav-menu.open a.active,
  .nav-menu.active a.active,
  .navbar-nav.open a.active,
  .navbar-nav.active a.active,
  .mobile-menu.open a.active,
  .mobile-menu.active a.active,
  .nav-menu.open li.active > a,
  .nav-menu.active li.active > a,
  .navbar-nav.open li.active > a,
  .navbar-nav.active li.active > a,
  .mobile-menu.open li.active > a,
  .mobile-menu.active li.active > a {
    background: transparent !important;
    background-color: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }
}
/* === Responsive Nav: Normalize for tablet/desktop and prevent mobile overlay bleed === */
@media (min-width: 576px) {
  .nav-menu.open,
  .nav-menu.active,
  .navbar-nav.open,
  .navbar-nav.active,
  .mobile-menu.open,
  .mobile-menu.active,
  nav.open .nav-menu,
  nav.active .nav-menu,
  header.nav-open .nav-menu,
  .header.nav-open .nav-menu,
  body.menu-open .nav-menu,
  body.nav-open .nav-menu {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    z-index: auto !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 16px !important;
    padding: 0 !important;
    overflow: visible !important;
  }

  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit !important;
    text-align: left !important;
    width: auto !important;
    margin: 0 !important;
    color: inherit !important;
    background: transparent !important;
  }

  /* Hide mobile-only close button on larger screens */
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    display: none !important;
  }
}
/* === Tablet Support: Treat up to 768px as mobile overlay === */
@media (max-width: 767.98px) {
  /* Force full-screen overlay for open menus (wins over earlier desktop reset) */
  .nav-menu.open,
  .nav-menu.active,
  .navbar-nav.open,
  .navbar-nav.active,
  .mobile-menu.open,
  .mobile-menu.active,
  nav.open .nav-menu,
  nav.active .nav-menu,
  header.nav-open .nav-menu,
  .header.nav-open .nav-menu,
  body.menu-open .nav-menu,
  body.nav-open .nav-menu {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    min-height: 100dvh !important;
    background: #ffffff !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;   /* right-align items */
    justify-content: flex-start !important;
    padding: 96px 20px 24px !important; /* leave space for close (×) */
    gap: 20px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: none !important;
  }

  /* Show and pin the close (×) button */
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    position: fixed !important;
    top: 28px !important;
    right: 20px !important;
    display: inline-flex !important;
    z-index: 10000 !important;
  }

  /* Link typography and alignment (always black text on white background) */
  .nav-menu.open a,
  .nav-menu.active a,
  .navbar-nav.open a,
  .navbar-nav.active a,
  .mobile-menu.open a,
  .mobile-menu.active a,
  nav.open .nav-menu a,
  nav.active .nav-menu a,
  header.nav-open .nav-menu a,
  .header.nav-open .nav-menu a,
  body.menu-open .nav-menu a,
  body.nav-open .nav-menu a {
    color: #000 !important;
    background: transparent !important;
    text-decoration: none !important;
    text-align: right !important;
    width: 100% !important;
    font-size: clamp(20px, 5.5vw, 28px) !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    margin: 6px 0 !important;
  }

  /* Keep interactive states clean */
  .nav-menu.open a:hover,
  .nav-menu.open a:focus,
  .nav-menu.open a:active,
  .nav-menu.active a:hover,
  .nav-menu.active a:focus,
  .nav-menu.active a:active,
  .navbar-nav.open a:hover,
  .navbar-nav.open a:focus,
  .navbar-nav.open a:active,
  .navbar-nav.active a:hover,
  .navbar-nav.active a:focus,
  .navbar-nav.active a:active,
  .mobile-menu.open a:hover,
  .mobile-menu.open a:focus,
  .mobile-menu.open a:active,
  .mobile-menu.active a:hover,
  .mobile-menu.active a:focus,
  .mobile-menu.active a:active {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
}
/* === Tablet Nav (<=768px): Close (×) same as mobile === */
@media (max-width: 767.98px) {
  .nav-menu .nav-close,
  .mobile-menu .nav-close,
  .navbar-nav .nav-close {
    position: fixed !important;
    top: 28px !important;
    right: 20px !important;
    z-index: 10000 !important;
    pointer-events: auto !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    background: #f5f5f5 !important;
    color: #111 !important;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15) !important;
    transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease !important;
    backdrop-filter: saturate(140%) blur(2px);
    font-size: 30px !important; /* larger × */
    font-weight: 800 !important; /* bold × */
    line-height: 1 !important;
  }

  .nav-menu.open .nav-close,
  .nav-menu.active .nav-close,
  .mobile-menu.open .nav-close,
  .mobile-menu.active .nav-close,
  .navbar-nav.open .nav-close,
  .navbar-nav.active .nav-close,
  nav.open .nav-menu .nav-close,
  nav.active .nav-menu .nav-close,
  header.nav-open .nav-menu .nav-close,
  .header.nav-open .nav-menu .nav-close,
  body.menu-open .nav-menu .nav-close,
  body.nav-open .nav-menu .nav-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    animation: navClosePopIn 240ms cubic-bezier(.2,.8,.2,1) both;
  }

  .nav-menu .nav-close:hover,
  .mobile-menu .nav-close:hover,
  .navbar-nav .nav-close:hover { 
    transform: scale(1.07) rotate(90deg);
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18) !important; 
  }

  .nav-menu .nav-close:active,
  .mobile-menu .nav-close:active,
  .navbar-nav .nav-close:active { 
    transform: scale(0.97) rotate(90deg);
  }

  .nav-menu .nav-close:focus-visible,
  .mobile-menu .nav-close:focus-visible,
  .navbar-nav .nav-close:focus-visible {
    outline: 2px solid #111 !important;
    outline-offset: 2px !important;
  }

  @keyframes navClosePopIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.9); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  @media (prefers-reduced-motion: reduce) {
    .nav-menu .nav-close,
    .mobile-menu .nav-close,
    .navbar-nav .nav-close { transition: none !important; }
    .nav-menu .nav-close:hover,
    .mobile-menu .nav-close:hover,
    .navbar-nav .nav-close:hover { transform: none !important; }
    .nav-menu.open .nav-close,
    .nav-menu.active .nav-close,
    .mobile-menu.open .nav-close,
    .mobile-menu.active .nav-close,
    .navbar-nav.open .nav-close,
    .navbar-nav.active .nav-close { animation: none !important; }
  }
}
