/* ── Santric Technologies — Global Stylesheet ── */

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ── CSS Variables ── */
:root {
  --brand: #ae3200;
  --brand-light: #fd591e;
  --navy: #0d1c32;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --text: #191c1e;
  --text-muted: #44474d;
  --border: #e6e8ea;
}
:root.dark, html.dark {
  --bg: #0a0f1a;
  --surface: #111827;
  --text: #e8eaec;
  --text-muted: #9ca3af;
  --border: #1f2937;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
.dark body { background: var(--bg); color: var(--text); }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 { color: #fff; }
p { line-height: 1.7; color: var(--text-muted); }
a { text-decoration: none; color: inherit; }

/* ── Material Icons ── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--brand); border-radius: 3px; }

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 8rem 0; }

/* ── Surface & Cards ── */
.surface-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: background 0.3s, border 0.3s;
}
.bento-card {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}
.bento-card:hover { transform: translateY(-8px); }

/* ── Glass ── */
.glass {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.glass-light {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.07);
}
.dark .glass-light {
  background: rgba(17, 24, 39, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 40px rgba(174, 50, 0, 0.4);
}
.btn-ghost {
  background: transparent;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--brand);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  border: 1.5px solid var(--brand);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-outline:hover { background: var(--brand); color: #fff; transform: translateY(-2px); }

/* ── Tag Pills ── */
.tag-pill {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.tag-brand { background: rgba(174, 50, 0, 0.1); color: var(--brand); }

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #ae3200, #fd591e, #ff8c42);
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Grid Background ── */
.grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Orbit Ring ── */
.orbit-ring {
  border: 1px solid rgba(174, 50, 0, 0.15);
  border-radius: 50%;
  position: absolute;
  animation: spin-slow 30s linear infinite;
}

/* ── Glow ── */
.glow:hover { box-shadow: 0 0 40px rgba(174, 50, 0, 0.35); }

/* ── Nav Link Underline ── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand);
  transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.on, .reveal-left.on, .reveal-right.on {
  opacity: 1;
  transform: none;
}

/* ── Dark mode overrides ── */
.dark .surface-card { background: #111827; border-color: #1f2937; }
.dark input, .dark select, .dark textarea {
  background: #1f2937!important;
  color: #e8eaec!important;
  border-color: #374151!important;
}

/* ── Animations ── */
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-16px)} }
@keyframes gradient-shift { 0%,100%{background-position:0% 50%} 50%{background-position:100% 50%} }
@keyframes blob-move { 0%,100%{border-radius:60% 40% 30% 70%/60% 30% 70% 40%} 50%{border-radius:30% 60% 70% 40%/50% 60% 30% 60%} }
@keyframes spin-slow { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes fade-up { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }

/* ── Animation Utility Classes ── */
.floating { animation: float 6s ease-in-out infinite; }
.blob { animation: blob-move 8s ease-in-out infinite; }
.ticker { display: flex; white-space: nowrap; animation: ticker 40s linear infinite; }
.ticker-wrap { width: 100%; overflow: hidden; }

/* ── Section Headings ── */
.section-label {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  background: rgba(174, 50, 0, 0.1);
  color: var(--brand);
  margin-bottom: 1rem;
}
.section-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.dark .section-title { color: #fff; }
.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Form Inputs ── */
.form-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 20px;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(174, 50, 0, 0.1);
}
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ── Hero specific ── */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.hero-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.0;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  background: var(--navy);
  padding: 10rem 0 6rem;
  position: relative;
  overflow: hidden;
}
.page-hero-title {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
}

/* ── Stat Numbers ── */
.stat-number {
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  line-height: 1;
}

/* ── Blog Card ── */
.blog-card { transition: transform 0.3s, box-shadow 0.3s; }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.dark .blog-card:hover { box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-padding { padding: 5rem 0; }
  .container { padding: 0 1.25rem; }
  .hero-title { font-size: 2.5rem; }
}

/* ── Premium Image Treatments ── */
.img-premium {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
}
.img-premium img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.22,1,0.36,1);
}
.img-premium:hover img { transform: scale(1.05); }
.img-premium::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,28,50,0.6), transparent 60%);
  pointer-events: none;
}

/* ── Blog card image ── */
.blog-card .blog-img {
  height: 200px;
  overflow: hidden;
}
.blog-card .blog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-img img { transform: scale(1.08); }

/* ── Team member card ── */
.team-card { position: relative; overflow: hidden; border-radius: 24px; }
.team-card img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.5s ease; }
.team-card:hover img { transform: scale(1.05); }
.team-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(13,28,50,0.95), transparent);
}

/* ── Service card hover ── */
.service-card-hover {
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.service-card-hover:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

/* ── Prose styling for blog content ── */
.prose h1,.prose h2,.prose h3 { font-family: 'Hanken Grotesk', sans-serif; font-weight: 700; color: var(--navy); margin: 2rem 0 1rem; }
.dark .prose h1,.dark .prose h2,.dark .prose h3 { color: #fff; }
.prose p { margin-bottom: 1.5rem; line-height: 1.8; color: var(--text-muted); }
.prose ul,.prose ol { margin: 1.5rem 0; padding-left: 2rem; color: var(--text-muted); }
.prose li { margin-bottom: 0.5rem; }
.prose blockquote { border-left: 4px solid var(--brand); padding: 1rem 1.5rem; margin: 2rem 0; background: rgba(174,50,0,0.05); border-radius: 0 12px 12px 0; }
.prose code { background: rgba(174,50,0,0.1); color: var(--brand); padding: 2px 8px; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--navy); color: #e8eaec; padding: 1.5rem; border-radius: 12px; overflow-x: auto; margin: 2rem 0; }
.prose img { border-radius: 12px; margin: 2rem 0; width: 100%; }

/* ── Critical: Force backgrounds to show ── */
body { background-color: #f7f9fb !important; color: #191c1e !important; }
.dark body { background-color: #0a0f1a !important; color: #e8eaec !important; }

section { position: relative; }

/* Force section backgrounds */
[style*="background:var(--bg)"] { background-color: #f7f9fb !important; }
[style*="background:var(--surface)"] { background-color: #ffffff !important; }
[style*="background:var(--navy)"] { background-color: #0d1c32 !important; }
[style*="background:var(--brand)"] { background-color: #ae3200 !important; }

.dark [style*="background:var(--bg)"] { background-color: #0a0f1a !important; }
.dark [style*="background:var(--surface)"] { background-color: #111827 !important; }

/* Force text colors */
[style*="color:var(--navy)"] { color: #0d1c32 !important; }
[style*="color:var(--text-muted)"] { color: #44474d !important; }
[style*="color:var(--brand)"] { color: #ae3200 !important; }
[style*="color:var(--brand-light)"] { color: #fd591e !important; }
[style*="color:var(--text)"] { color: #191c1e !important; }

.dark [style*="color:var(--navy)"] { color: #ffffff !important; }
.dark [style*="color:var(--text-muted)"] { color: #9ca3af !important; }
.dark [style*="color:var(--text)"] { color: #e8eaec !important; }

/* Surface cards */
.surface-card { background-color: #ffffff !important; border: 1px solid #e6e8ea !important; }
.dark .surface-card { background-color: #111827 !important; border-color: #1f2937 !important; }

/* Section title colors */
.section-title { color: #0d1c32 !important; }
.dark .section-title { color: #ffffff !important; }
.section-subtitle { color: #44474d !important; }
.section-label { background: rgba(174,50,0,0.1) !important; color: #ae3200 !important; }

/* Force border colors */
[style*="border-color:var(--border)"] { border-color: #e6e8ea !important; }
.dark [style*="border-color:var(--border)"] { border-color: #1f2937 !important; }

/* Form inputs */
.form-input { 
  background-color: #f7f9fb !important; 
  border: 1px solid #e6e8ea !important; 
  color: #191c1e !important;
  border-radius: 12px;
  padding: 14px 20px;
  width: 100%;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: #ae3200 !important; box-shadow: 0 0 0 3px rgba(174,50,0,0.1) !important; }
.dark .form-input { background-color: #1f2937 !important; border-color: #374151 !important; color: #e8eaec !important; }

/* ── Dark Mode Complete Fix ── */
.dark body { background-color: #0a0f1a !important; color: #e8eaec !important; }
.dark .glass-light { background: rgba(17,24,39,0.92) !important; border-color: rgba(255,255,255,0.08) !important; }
.dark .surface-card { background: #111827 !important; border-color: #1f2937 !important; }
.dark .section-title { color: #ffffff !important; }
.dark .section-subtitle { color: #9ca3af !important; }
.dark h1,.dark h2,.dark h3,.dark h4 { color: #ffffff !important; }
.dark p { color: #9ca3af; }
.dark [style*="background-color:#ffffff"] { background-color: #111827 !important; }
.dark [style*="background-color:#f7f9fb"] { background-color: #0a0f1a !important; }
.dark [style*="color:var(--navy)"] { color: #ffffff !important; }
.dark [style*="color:var(--text-muted)"] { color: #9ca3af !important; }
.dark .nav-link { color: #e8eaec !important; }
.dark input, .dark select, .dark textarea {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #e8eaec !important;
}
.dark .form-input { background-color: #1f2937 !important; border-color: #374151 !important; color: #e8eaec !important; }

/* ── Mobile Responsive Fixes ── */
@media (max-width: 768px) {
    .hero-title { font-size: 2.2rem !important; line-height: 1.1 !important; }
    .page-hero-title { font-size: 2rem !important; }
    .section-title { font-size: 1.75rem !important; }
    .container { padding: 0 1.25rem !important; }
    .section-padding { padding: 4rem 0 !important; }
    .stat-number { font-size: 2rem !important; }
    .btn-primary, .btn-ghost, .btn-outline { padding: 12px 20px !important; font-size: 12px !important; }
    .grid { gap: 1rem !important; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 1.8rem !important; }
    .page-hero-title { font-size: 1.6rem !important; }
}

/* ── Floating WhatsApp pulse ── */
.whatsapp-float { animation: whatsapp-pulse 2s infinite; }
@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37,211,102,0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

/* ══════════════════════════════════════
   CRITICAL MOBILE & THEME FIXES
══════════════════════════════════════ */

/* Force all section backgrounds to be visible */
section { position: relative; z-index: 1; }
section * { position: relative; z-index: 2; }

/* Remove any accidental overlays */
section::before, section::after { display: none !important; }

/* Fix white text on light backgrounds - CRITICAL */
[style*="background-color:#f7f9fb"] *,
[style*="background-color:#ffffff"] *,
[style*="background:var(--bg)"] *,
[style*="background:var(--surface)"] * {
    color: #191c1e;
}

/* But keep intentional white text in dark sections */
[style*="background-color:#0d1c32"] *,
[style*="background:var(--navy)"] *,
[style*="background:linear-gradient(135deg,var(--brand)"] *,
[style*="background:linear-gradient(135deg,#ae3200"] * {
    color: #ffffff;
}

/* Service page specific fixes */
.surface-card { color: #191c1e !important; }
.surface-card h1,.surface-card h2,.surface-card h3,.surface-card h4 { color: #0d1c32 !important; }
.surface-card p { color: #44474d !important; }
.surface-card .text-white { color: #ffffff !important; }

/* Section title always dark on light bg */
.section-title { color: #0d1c32 !important; }
.section-subtitle { color: #44474d !important; }

/* Fix hero sections - ensure grid-bg doesn't cover content */
.hero-section .grid-bg,
.page-hero .grid-bg,
[style*="padding:10rem"] .grid-bg {
    position: absolute !important;
    inset: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* Fix blob animations covering content */
.blob {
    position: absolute !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

/* Container relative positioning fix */
.container { position: relative; z-index: 10; }

/* Fix glass-light in dark mode */
.dark .glass-light {
    background: rgba(10, 15, 26, 0.92) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

/* Fix nav z-index */
header { z-index: 9999 !important; }
#mobmenu { z-index: 9998 !important; }

/* ── MOBILE FIXES ── */
@media (max-width: 1024px) {
    /* Fix hero on mobile */
    .hero-section {
        min-height: 100vh;
        padding-top: 6rem !important;
        padding-bottom: 8rem !important;
    }

    /* Fix overflow hidden issues */
    .orbit-ring { display: none !important; }

    /* Fix bento grid on mobile */
    [class*="col-span"] { grid-column: span 12 / span 12 !important; }
}

@media (max-width: 768px) {
    /* Typography */
    .hero-title { font-size: 2rem !important; line-height: 1.15 !important; }
    .page-hero-title { font-size: 1.8rem !important; line-height: 1.2 !important; }
    .section-title { font-size: 1.6rem !important; line-height: 1.2 !important; }
    .gradient-text { font-size: inherit !important; }
    .stat-number { font-size: 2.2rem !important; }

    /* Spacing */
    .section-padding { padding: 3.5rem 0 !important; }
    .container { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }

    /* Buttons */
    .btn-primary, .btn-ghost, .btn-outline {
        padding: 12px 20px !important;
        font-size: 11px !important;
        border-radius: 10px !important;
    }

    /* Hide desktop mega menu on mobile */
    .group .absolute.w-\[560px\] { display: none !important; }

    /* Fix grid gaps */
    .gap-20 { gap: 2rem !important; }
    .gap-16 { gap: 1.5rem !important; }
    .gap-12 { gap: 1rem !important; }

    /* Fix padding on cards */
    .rounded-3xl.p-10 { padding: 1.5rem !important; }
    .rounded-3xl.p-12 { padding: 1.5rem !important; }

    /* Fix hero section padding */
    [style*="padding:10rem 0 6rem"] { padding: 7rem 0 3rem !important; }
    [style*="padding:10rem 0 5rem"] { padding: 7rem 0 3rem !important; }

    /* Fix floating elements on mobile */
    .floating { animation: none !important; }
    .-top-5.-right-5 { top: auto !important; right: 0 !important; bottom: -20px !important; }
    .-bottom-5.-left-5 { display: none !important; }

    /* Fix about page image */
    .img-premium { height: 200px !important; }

    /* Ticker on mobile */
    .ticker-wrap { display: none; }

    /* WhatsApp button position on mobile */
    .fixed.bottom-6.right-6 { bottom: 1rem !important; right: 1rem !important; width: 48px !important; height: 48px !important; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.7rem !important; }
    .page-hero-title { font-size: 1.5rem !important; }
    .section-title { font-size: 1.4rem !important; }

    /* Stack buttons vertically */
    .flex.flex-col.sm\\:flex-row { flex-direction: column !important; }
    .flex.flex-col.sm\\:flex-row a,
    .flex.flex-col.sm\\:flex-row button { width: 100% !important; justify-content: center !important; }

    /* Fix stat grid */
    .grid.grid-cols-2.md\\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ── DARK MODE COMPLETE FIX ── */
.dark {
    --bg: #0a0f1a;
    --surface: #111827;
    --text: #e8eaec;
    --text-muted: #9ca3af;
    --border: #1f2937;
    --navy: #0d1c32;
    --brand: #ae3200;
    --brand-light: #fd591e;
}

.dark body { background: #0a0f1a !important; color: #e8eaec !important; }

/* Dark surface cards */
.dark .surface-card {
    background: #111827 !important;
    border-color: #1f2937 !important;
    color: #e8eaec !important;
}
.dark .surface-card h1,
.dark .surface-card h2,
.dark .surface-card h3,
.dark .surface-card h4 { color: #ffffff !important; }
.dark .surface-card p { color: #9ca3af !important; }

/* Dark section backgrounds */
.dark [style*="background-color:#f7f9fb"],
.dark [style*="background-color: #f7f9fb"] { background-color: #0a0f1a !important; }
.dark [style*="background-color:#ffffff"],
.dark [style*="background-color: #ffffff"] { background-color: #111827 !important; }

/* Dark text */
.dark .section-title { color: #ffffff !important; }
.dark .section-subtitle { color: #9ca3af !important; }
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 { color: #ffffff !important; }
.dark p { color: #9ca3af !important; }

/* Dark nav */
.dark header { background: rgba(10,15,26,0.95) !important; }
.dark .nav-link { color: #e8eaec !important; }
.dark [style*="color:var(--navy)"] { color: #ffffff !important; }
.dark [style*="color:var(--text-muted)"] { color: #9ca3af !important; }

/* Dark form inputs */
.dark .form-input,
.dark input:not([type=submit]):not([type=button]),
.dark select,
.dark textarea {
    background: #1f2937 !important;
    border-color: #374151 !important;
    color: #e8eaec !important;
}
.dark input::placeholder,
.dark textarea::placeholder { color: #6b7280 !important; }

/* Dark footer links */
.dark a:not(.btn-primary):not(.btn-ghost):not(.btn-outline) {
    color: inherit;
}

/* Prevent flash of unstyled content */
html { background: #f7f9fb; }
html.dark { background: #0a0f1a !important; }

/* ── FIX: Invisible text on service detail pages ── */
.service-bg-img ~ * .surface-card,
.services-bg-img ~ * .surface-card {
    background: #ffffff !important;
    color: #191c1e !important;
}

/* Fix any remaining white-on-white issues */
[style*="color:#fff"] { color: #ffffff !important; }
[style*="color:white"] { color: #ffffff !important; }
[style*="color:rgba(255,255,255"] { color: rgba(255,255,255,var(--tw-text-opacity,1)) !important; }

/* Fix section with inline white bg that has white text children from dark sections */
.section-padding .text-white { color: #ffffff; }

/* ══════════════════════════════════════
   CRITICAL FIXES v3
══════════════════════════════════════ */

/* Fix horizontal scroll */
html, body { overflow-x: hidden !important; max-width: 100vw !important; }
* { max-width: 100%; }
.container { overflow: hidden; }

/* Fix hero sections - force navy background always */
section[style*="padding:10rem"],
section[style*="padding:10rem 0 6rem"],
section[style*="padding:10rem 0 5rem"] {
    background-color: #0d1c32 !important;
    color: #ffffff !important;
}

/* All text inside dark hero must be white or transparent white */
section[style*="padding:10rem"] h1,
section[style*="padding:10rem"] h2,
section[style*="padding:10rem"] p,
section[style*="padding:10rem"] span:not(.material-symbols-outlined),
section[style*="padding:10rem 0 6rem"] h1,
section[style*="padding:10rem 0 6rem"] h2,
section[style*="padding:10rem 0 6rem"] p,
section[style*="padding:10rem 0 5rem"] h1,
section[style*="padding:10rem 0 5rem"] h2,
section[style*="padding:10rem 0 5rem"] p {
    color: #ffffff !important;
}

/* Fix classes applied by bg image classes */
.service-bg-img,
.services-bg-img,
.contact-bg-img,
.blog-bg-img,
.about-bg-img {
    background-color: #0d1c32 !important;
    color: #ffffff !important;
}

.service-bg-img *,
.services-bg-img *,
.contact-bg-img *,
.blog-bg-img *,
.about-bg-img * {
    color: #ffffff !important;
}

/* But fix cards inside those sections */
.service-bg-img .glass,
.services-bg-img .glass,
.contact-bg-img .glass,
.service-bg-img .glass * { color: #ffffff !important; }

/* Fix section label in dark hero */
section[style*="padding:10rem"] .section-label { color: #fd591e !important; }

/* Fix page hero title */
.page-hero-title { color: #ffffff !important; font-family: 'Hanken Grotesk', sans-serif; font-weight: 900; }

/* Fix gradient text always */
.gradient-text {
    background: linear-gradient(135deg, #ae3200, #fd591e, #ff8c42) !important;
    background-size: 200% 200% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Fix light section text */
section[style*="background-color:#f7f9fb"] h1,
section[style*="background-color:#f7f9fb"] h2,
section[style*="background-color:#f7f9fb"] h3,
section[style*="background-color:#f7f9fb"] h4 { color: #0d1c32 !important; }
section[style*="background-color:#f7f9fb"] p { color: #44474d !important; }
section[style*="background-color:#ffffff"] h1,
section[style*="background-color:#ffffff"] h2,
section[style*="background-color:#ffffff"] h3,
section[style*="background-color:#ffffff"] h4 { color: #0d1c32 !important; }
section[style*="background-color:#ffffff"] p { color: #44474d !important; }

/* Fix tech stack section in services page */
section[style*="background:var(--navy)"] { background-color: #0d1c32 !important; }
section[style*="background:var(--navy)"] * { color: #ffffff !important; }
section[style*="background:var(--navy)"] .glass * { color: #ffffff !important; }

/* Fix blank white sections - force visibility */
.section-padding {
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
}

/* Fix overflow causing horizontal scroll */
.orbit-ring { display: none !important; }
.blob { max-width: none; overflow: hidden; }

@media (max-width: 768px) {
    /* Prevent any element from causing overflow */
    section { overflow: hidden !important; }
    .absolute { max-width: 100vw; }

    /* Fix hero padding on mobile */
    section[style*="padding:10rem 0 6rem"],
    section[style*="padding:10rem 0 5rem"] {
        padding: 7rem 1.25rem 3rem !important;
    }

    /* Fix grid on mobile - force single column */
    .grid.grid-cols-1.lg\\:grid-cols-2 { grid-template-columns: 1fr !important; }
    .grid.grid-cols-1.md\\:grid-cols-2 { grid-template-columns: 1fr !important; }
    .grid.grid-cols-1.md\\:grid-cols-12 { grid-template-columns: 1fr !important; }

    /* Fix col-span on mobile */
    .md\\:col-span-8, .md\\:col-span-4,
    .md\\:col-span-6, .md\\:col-span-3,
    .lg\\:col-span-2, .lg\\:col-span-3 {
        grid-column: span 1 !important;
    }

    /* Fix floating badges */
    .absolute.-top-5, .absolute.-bottom-5,
    .absolute.-top-6, .absolute.-bottom-6 { display: none !important; }

    /* Fix code block on mobile */
    .font-mono { font-size: 11px !important; }

    /* Fix map height */
    iframe { height: 250px !important; }

    /* Fix button groups */
    .flex.gap-4.flex-col,
    .flex.flex-col.sm\\:flex-row.gap-4 {
        flex-direction: column !important;
    }
    .flex.flex-col.sm\\:flex-row.gap-4 a,
    .flex.flex-col.sm\\:flex-row.gap-4 button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
    }
}

/* ══════════════════════════════════════
   HORIZONTAL SCROLL NUCLEAR FIX
══════════════════════════════════════ */
html { overflow-x: hidden !important; }
body { overflow-x: hidden !important; width: 100% !important; }

/* Fix all absolute positioned elements */
.absolute { max-width: 100vw; }

/* Fix wide elements */
.ticker-wrap { display: none !important; }
.orbit-ring { display: none !important; }
.blob { display: none !important; }
.grid-bg { width: 100% !important; overflow: hidden !important; }

/* Fix all sections */
section { overflow: hidden !important; width: 100% !important; }
header { overflow: hidden !important; }
footer { overflow: hidden !important; }

/* Fix negative margins */
.-mr-10 { margin-right: 0 !important; }
.-mt-10 { margin-top: 0 !important; }
.-top-20 { top: 0 !important; }
.-right-20 { right: 0 !important; }
.-bottom-10 { bottom: 0 !important; }
.-left-10 { left: 0 !important; }

/* Fix wide absolute blobs */
.absolute.w-\[500px\],
.absolute.w-\[600px\],
.absolute.w-\[700px\],
.absolute.w-\[400px\],
.absolute.w-48,
.absolute.w-40 {
    max-width: 60vw !important;
    overflow: hidden !important;
}

/* Fix mega dropdown causing width issues */
.w-\[560px\] { max-width: 95vw !important; }
.w-\[580px\] { max-width: 95vw !important; }

/* Fix container overflow */
.container { max-width: 100% !important; overflow: hidden !important; }

@media (max-width: 1024px) {
    /* Hide all absolute decorative elements */
    .absolute.blob,
    .absolute.orbit-ring,
    .absolute.grid-bg,
    .absolute.w-\[500px\],
    .absolute.w-\[600px\],
    .absolute.w-\[700px\],
    .absolute.w-48,
    .absolute.w-40,
    .absolute.inset-0.grid-bg { overflow: hidden !important; }

    /* Force all grids to respect viewport */
    .grid { width: 100% !important; }
    .max-w-\[1280px\] { max-width: 100% !important; padding: 0 1.25rem !important; }
}

/* ══════════════════════════════════════
   PREMIUM CLIENT LOGOS MARQUEE
══════════════════════════════════════ */
.clients-track-wrapper {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: marquee-scroll 30s linear infinite;
}

.clients-track:hover { animation-play-state: paused; }

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid #e6e8ea;
    transition: all 0.4s ease;
    cursor: pointer;
    min-width: 140px;
    height: 72px;
}

.client-logo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: rgba(174,50,0,0.3);
}

.client-logo-item img {
    height: 36px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.6);
    transition: filter 0.4s ease;
}

.client-logo-item:hover img {
    filter: grayscale(0%) opacity(1);
}

.client-text-fallback {
    font-family: 'Hanken Grotesk', sans-serif;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: #c8cacc;
    transition: color 0.4s ease;
    text-transform: uppercase;
    white-space: nowrap;
}

.client-logo-item:hover .client-text-fallback {
    color: #ae3200;
}

/* Dark mode client logos */
.dark .client-logo-item {
    background: #111827;
    border-color: #1f2937;
}
.dark .client-logo-item:hover {
    border-color: rgba(174,50,0,0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.dark .client-text-fallback { color: #374151; }
.dark .client-logo-item:hover .client-text-fallback { color: #fd591e; }

/* Mobile */
@media (max-width: 768px) {
    .clients-track { gap: 1.5rem; }
    .client-logo-item { min-width: 110px; height: 60px; padding: 0.75rem 1rem; }
    .client-logo-item img { height: 28px; }
    .client-text-fallback { font-size: 13px; }
}

/* ══════════════════════════════════════
   HOME PAGE PREMIUM GRIDS
══════════════════════════════════════ */

/* Services Bento Grid */
.home-services-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto;
    gap: 1.5rem;
}
.home-service-featured { grid-column: span 8; min-height: 280px; }
.home-service-dark { grid-column: span 4; min-height: 280px; }
.home-services-grid > a:nth-child(3),
.home-services-grid > a:nth-child(4),
.home-services-grid > a:nth-child(5) { grid-column: span 4; }
.home-service-hr { grid-column: span 6; }
.home-service-erp { grid-column: span 6; }

/* Products Grid */
.home-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Testimonials Grid */
.home-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Two column layout */
.home-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

/* Stats grid */
.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

/* ── TABLET ── */
@media (max-width: 1024px) {
    .home-services-grid { grid-template-columns: 1fr 1fr; }
    .home-service-featured { grid-column: span 2; }
    .home-service-dark { grid-column: span 1; }
    .home-services-grid > a:nth-child(3),
    .home-services-grid > a:nth-child(4),
    .home-services-grid > a:nth-child(5) { grid-column: span 1; }
    .home-service-hr { grid-column: span 1; }
    .home-service-erp { grid-column: span 1; }
    .home-products-grid { grid-template-columns: repeat(2, 1fr); }
    .home-testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .home-two-col { grid-template-columns: 1fr; gap: 3rem; }
}

/* ── MOBILE ── */
@media (max-width: 640px) {
    .home-services-grid { grid-template-columns: 1fr; }
    .home-service-featured { grid-column: span 1; }
    .home-service-dark { grid-column: span 1; }
    .home-services-grid > a:nth-child(3),
    .home-services-grid > a:nth-child(4),
    .home-services-grid > a:nth-child(5) { grid-column: span 1; }
    .home-service-hr { grid-column: span 1; }
    .home-service-erp { grid-column: span 1; }
    .home-products-grid { grid-template-columns: 1fr; }
    .home-testimonials-grid { grid-template-columns: 1fr; }
    .home-two-col { gap: 2rem; }

    /* Stats 2 col on mobile */
    [style*="grid-template-columns:repeat(4,1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Contact form full width inputs */
    [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── Mobile Hero Fix ── */
@media(max-width:768px){
  section[style*="min-height:100vh"] {
    min-height: auto !important;
    padding-top: 100px !important;
    padding-bottom: 3rem !important;
  }
  section[style*="min-height:100vh"] .wrap {
    padding-top: 1rem !important;
    padding-bottom: 2rem !important;
  }
  /* Fix stat cards on mobile */
  .sr { grid-template-columns: repeat(2,1fr) !important; gap: 12px !important; }
  /* Fix hero font on mobile */
  [style*="font-size:clamp(3rem,7vw,6.5rem)"] { font-size: clamp(2rem,9vw,3rem) !important; }
}

/* ── Tech Stack Grid ── */
.tech-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 16px; }
.tech-card svg { width: 100%; height: 100%; }
.tech-card:hover { border-color: rgba(174,50,0,.3) !important; }
.tech-card:hover svg { transform: scale(1.1); transition: transform .3s; }

@media(max-width:1024px) { .tech-grid { grid-template-columns: repeat(4,1fr); } }
@media(max-width:640px) { .tech-grid { grid-template-columns: repeat(3,1fr); gap:12px; } .tech-card { padding: 1rem !important; } }

/* Tech Stack Responsive */
.tech-stack-grid { display:grid !important; grid-template-columns:repeat(6,1fr) !important; gap:16px !important; }
@media(max-width:1024px){ .tech-stack-grid{ grid-template-columns:repeat(4,1fr) !important; } }
@media(max-width:640px){ .tech-stack-grid{ grid-template-columns:repeat(3,1fr) !important; gap:10px !important; } }

/* Tech Stack Responsive */
.tech-stack-grid { display:grid !important; grid-template-columns:repeat(6,1fr) !important; gap:16px !important; }
@media(max-width:1024px){ .tech-stack-grid{ grid-template-columns:repeat(4,1fr) !important; } }
@media(max-width:640px){ .tech-stack-grid{ grid-template-columns:repeat(3,1fr) !important; gap:10px !important; } }

/* Tech Stack Responsive */
.tech-stack-grid { display:grid !important; grid-template-columns:repeat(6,1fr) !important; gap:16px !important; }
@media(max-width:1024px){ .tech-stack-grid{ grid-template-columns:repeat(4,1fr) !important; } }
@media(max-width:640px){ .tech-stack-grid{ grid-template-columns:repeat(3,1fr) !important; gap:10px !important; } }

/* ── Tech Stack Marquee ── */
.tech-marquee-wrap {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right,transparent,black 6%,black 94%,transparent);
  mask-image: linear-gradient(to right,transparent,black 6%,black 94%,transparent);
  padding: 1rem 0;
}
.tech-marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marqueeScroll 30s linear infinite;
}
.tech-marquee-track:hover { animation-play-state: paused; }
.tech-marquee-card {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--page-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  width: 110px;
  height: 110px;
  transition: all .3s ease;
  cursor: default;
}
.tech-marquee-card:hover {
  transform: translateY(-6px);
  border-color: rgba(174,50,0,.35);
  box-shadow: 0 16px 30px rgba(0,0,0,.08);
  background: var(--card-bg);
}
html.dark .tech-marquee-card { background: #111827; border-color: #1f2937; }
html.dark .tech-marquee-card:hover { border-color: rgba(174,50,0,.4); box-shadow: 0 16px 30px rgba(0,0,0,.3); }

/* ── Tech Marquee Critical Fix ── */
.tech-marquee-wrap { width: 100%; overflow: hidden !important; }
.tech-marquee-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  min-width: max-content !important;
  gap: 16px !important;
  animation: marqueeScroll 30s linear infinite !important;
}
.tech-marquee-card {
  flex-shrink: 0 !important;
  flex-grow: 0 !important;
  width: 110px !important;
  min-width: 110px !important;
}

/* ── Mobile Menu Premium Fix ── */
#mobmenu { background: var(--card-bg) !important; }
#mobmenu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .2s;
  font-family: 'Inter', sans-serif;
}
#mobmenu a:hover,
#mobmenu a.active-mobile {
  background: rgba(174,50,0,.08);
  color: #ae3200 !important;
}
#mobmenu a.font-semibold { color: var(--text-primary) !important; font-weight: 700; }
#mobmenu a[href*="whatsapp"],
#mobmenu a[href*="wa.me"] { color: #25d366 !important; }

/* Mobile App Hero Grid */
.ma-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media(max-width:1024px) { .ma-hero-grid { grid-template-columns: 1fr !important; } .ma-hero-grid > div:last-child { display: none !important; } }

/* Chatbot root fix */
#sc-root {
  position: fixed !important;
  bottom: 20px !important;
  right: 20px !important;
  left: auto !important;
  top: auto !important;
  z-index: 999999 !important;
  width: auto !important;
  height: auto !important;
  pointer-events: none;
}
#sc-root * { pointer-events: auto; }


.sc-fab {
  position: relative !important;
  top: auto !important;
  right: auto !important;
}
.sc-win {
  position: relative !important;
  top: auto !important;
  right: auto !important;
}

/* ── Page Builder Responsive ── */
.pb-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media(max-width:1024px) { .pb-two-col { grid-template-columns: 1fr !important; gap: 2.5rem !important; } }

/* Font Display Optimization */
@font-face { font-display: swap; }
.material-symbols-outlined { font-display: swap; }

/* ══════════════════════════════════════
   DARK MODE — Service Pages & All Pages
   ══════════════════════════════════════ */
html.dark body { background:#0f172a !important; color:#e2e8f0 !important; }

/* Nav dark */
html.dark nav { background:rgba(15,23,42,.95) !important; border-color:rgba(255,255,255,.06) !important; }
html.dark .nav-link { color:rgba(255,255,255,.6) !important; }
html.dark .nav-link:hover { color:#fff !important; }
html.dark .nav-link.active { color:#fd591e !important; }

/* White backgrounds → dark */
html.dark section[style*="background:#fff"],
html.dark section[style*="background: #fff"],
html.dark section[style*="background:#ffffff"],
html.dark section[style*="background: #ffffff"] {
  background:#1e293b !important;
}

/* Light grey backgrounds → dark */
html.dark section[style*="background:#f7f9fb"],
html.dark section[style*="background: #f7f9fb"] {
  background:#0f172a !important;
}

/* Cards → dark */
html.dark [style*="background:#fff;border"],
html.dark [style*="background:#fff; border"],
html.dark [style*="background: #fff;border"] {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.08) !important;
}
html.dark [style*="background:#f7f9fb;border"],
html.dark [style*="background: #f7f9fb;border"],
html.dark [style*="background:#f7f9fb; border"] {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.08) !important;
}

/* Text colours */
html.dark [style*="color:#0d1c32"] { color:#f1f5f9 !important; }
html.dark [style*="color:#44474d"] { color:#94a3b8 !important; }
html.dark [style*="color:#374151"] { color:#cbd5e1 !important; }
html.dark [style*="color:#0d1c32;"] { color:#f1f5f9 !important; }
html.dark h1,html.dark h2,html.dark h3,html.dark h4 { color:#f1f5f9; }
html.dark p { color:#94a3b8; }

/* Stats bars border */
html.dark [style*="border-bottom:1px solid #e6e8ea"] {
  border-bottom-color:rgba(255,255,255,.06) !important;
}
html.dark [style*="border:1px solid #e6e8ea"] {
  border-color:rgba(255,255,255,.08) !important;
}
html.dark [style*="border-top:1px solid #f0f2f4"] {
  border-top-color:rgba(255,255,255,.06) !important;
}
html.dark [style*="border-bottom:1px solid #f0f2f4"] {
  border-bottom-color:rgba(255,255,255,.06) !important;
}

/* Industry pills */
html.dark [style*="background:#fff;border:1px solid #e6e8ea;font-family"] {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.08) !important;
  color:#e2e8f0 !important;
}

/* Process step cards */
html.dark [style*="background:#f7f9fb;border:1px solid #e6e8ea;border-radius:20px"] {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.08) !important;
}

/* Blog cards */
html.dark .blg-content { color:#cbd5e1; }
html.dark .blg-content h1,
html.dark .blg-content h2,
html.dark .blg-content h3 { color:#f1f5f9; }
html.dark .blg-content blockquote { background:#1e293b; color:#94a3b8; }
html.dark article[style*="background:#fff"] { background:#1e293b !important; }

/* Footer always dark - already dark bg so no change needed */

/* Inputs in dark mode */
html.dark input,html.dark textarea,html.dark select {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.1) !important;
  color:#e2e8f0 !important;
}

/* Who We Are / About page */
html.dark .abt-h2 { color:#f1f5f9; }
html.dark .fu-l h2,html.dark .fu-r h2 { color:#f1f5f9; }

/* Mobile menu dark */
html.dark #mobile-menu { background:#0f172a !important; border-color:rgba(255,255,255,.06) !important; }

/* Dropdown dark */
html.dark .dropdown-menu,
html.dark [id*="dropdown"] { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }

/* Chatbot dark handled by its own JS */

/* ══════════════════════════════════════
   DARK MODE — JavaScript-powered override
   ══════════════════════════════════════ */
html.dark { color-scheme: dark; }

/* Override ALL white/light backgrounds site-wide */
html.dark section { background-color:#0f172a !important; }
html.dark section[style*="#f7f9fb"] { background-color:#111827 !important; }
html.dark section[style*="#fff"] { background-color:#1e293b !important; }
html.dark section[style*="#ffffff"] { background-color:#1e293b !important; }
html.dark section[style*="white"] { background-color:#1e293b !important; }

/* But keep the dark hero sections as-is */
html.dark section[style*="#0d1c32"],
html.dark section[style*="linear-gradient(135deg,#0d1c32"] { background:#0d1c32 !important; }

/* All divs with white/light bg */
html.dark div[style*="background:#fff"],
html.dark div[style*="background: #fff"],
html.dark div[style*="background:#ffffff"],
html.dark div[style*="background:#f7f9fb"],
html.dark div[style*="background: #f7f9fb"] {
  background-color:#1e293b !important;
}

/* Keep dark cards dark */
html.dark div[style*="background:#111827"],
html.dark div[style*="background:#1f2937"],
html.dark div[style*="background:#0d1c32"] {
  background-color:inherit !important;
}

/* All text */
html.dark div[style*="color:#0d1c32"],
html.dark span[style*="color:#0d1c32"],
html.dark h1[style*="color:#0d1c32"],
html.dark h2[style*="color:#0d1c32"],
html.dark h3[style*="color:#0d1c32"],
html.dark h4[style*="color:#0d1c32"],
html.dark a[style*="color:#0d1c32"] { color:#f1f5f9 !important; }

html.dark div[style*="color:#44474d"],
html.dark p[style*="color:#44474d"],
html.dark span[style*="color:#44474d"] { color:#94a3b8 !important; }

html.dark div[style*="color:#374151"],
html.dark p[style*="color:#374151"] { color:#94a3b8 !important; }

/* Borders */
html.dark *[style*="border:1px solid #e6e8ea"] { border-color:rgba(255,255,255,.08) !important; }
html.dark *[style*="border-bottom:1px solid #e6e8ea"] { border-bottom-color:rgba(255,255,255,.08) !important; }
html.dark *[style*="border-top:1px solid #e6e8ea"] { border-top-color:rgba(255,255,255,.08) !important; }
html.dark *[style*="border:1px solid #f0f2f4"] { border-color:rgba(255,255,255,.06) !important; }
html.dark *[style*="border-top:1px solid #f0f2f4"] { border-top-color:rgba(255,255,255,.06) !important; }
html.dark *[style*="border-bottom:1px solid #f0f2f4"] { border-bottom-color:rgba(255,255,255,.06) !important; }
html.dark *[style*="border:1px solid #e5e7eb"] { border-color:rgba(255,255,255,.08) !important; }

/* ═══════════════════════════════════════
   GLOBAL DARK MODE — ALL PAGES
   ═══════════════════════════════════════ */

/* Body background */
html.dark body { background:#0f172a !important; }

/* ── Sections ── */
html.dark section { background-color:#0f172a !important; }

/* Keep intentionally dark sections */
html.dark section[style*="background:#0d1c32"],
html.dark section[style*="background:#111827"],
html.dark section[style*="background:#1e293b"],
html.dark section[style*="linear-gradient(135deg,#0d1c32"],
html.dark section[style*="linear-gradient(135deg,#1a"],
html.dark section[style*="linear-gradient(135deg,#0f"] { background:revert !important; }

/* ── All divs white/light → dark ── */
html.dark div { background-color:transparent; }

html.dark div[style*="background:#fff;"],
html.dark div[style*="background:#fff "],
html.dark div[style*="background: #fff"],
html.dark div[style*="background:#ffffff"] { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }

html.dark div[style*="background:#f7f9fb"] { background:#111827 !important; border-color:rgba(255,255,255,.06) !important; }
html.dark div[style*="background:#f8fafc"] { background:#111827 !important; }
html.dark div[style*="background:#fafafa"] { background:#111827 !important; }
html.dark div[style*="background:#f1f5f9"] { background:#1e293b !important; }

/* ── Text ── */
html.dark h1,html.dark h2,html.dark h3,html.dark h4,html.dark h5 { color:#f1f5f9 !important; }
html.dark p { color:#94a3b8 !important; }

html.dark *[style*="color:#0d1c32"] { color:#f1f5f9 !important; }
html.dark *[style*="color: #0d1c32"] { color:#f1f5f9 !important; }
html.dark *[style*="color:#44474d"] { color:#94a3b8 !important; }
html.dark *[style*="color: #44474d"] { color:#94a3b8 !important; }
html.dark *[style*="color:#374151"] { color:#94a3b8 !important; }
html.dark *[style*="color:#1f2937"] { color:#cbd5e1 !important; }
html.dark *[style*="color:#0f172a"] { color:#f1f5f9 !important; }

/* ── Borders ── */
html.dark *[style*="#e6e8ea"] { border-color:rgba(255,255,255,.08) !important; }
html.dark *[style*="#e5e7eb"] { border-color:rgba(255,255,255,.08) !important; }
html.dark *[style*="#f0f2f4"] { border-color:rgba(255,255,255,.06) !important; }
html.dark *[style*="#d1d5db"] { border-color:rgba(255,255,255,.1) !important; }

/* ── Cards & service cards ── */
html.dark .cld-service-card,
html.dark .csd-service-card,
html.dark .hr-service-card,
html.dark .erp-module-card,
html.dark .uux-service-card { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }

html.dark .cld-service-card:hover,
html.dark .csd-service-card:hover,
html.dark .hr-service-card:hover,
html.dark .erp-module-card:hover,
html.dark .uux-service-card:hover { border-color:rgba(255,255,255,.2) !important; }

/* ── Nav dropdown ── */
html.dark .dropdown-menu,
html.dark [class*="dropdown"] div { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }

/* ── Inputs ── */
html.dark input,
html.dark textarea,
html.dark select { background:#1e293b !important; border-color:rgba(255,255,255,.1) !important; color:#e2e8f0 !important; }
html.dark input::placeholder,
html.dark textarea::placeholder { color:rgba(255,255,255,.3) !important; }

/* ── Links on light pages ── */
html.dark a[style*="color:#0d1c32"] { color:#e2e8f0 !important; }

/* ── Industry pills ── */
html.dark div[style*="background:#fff;border:1px solid #e6e8ea;font-family"] {
  background:#1e293b !important;
  border-color:rgba(255,255,255,.08) !important;
  color:#e2e8f0 !important;
}

/* ── Stats bar ── */
html.dark .abt-stats-grid div,
html.dark .cld-stats > div,
html.dark .csd-stats > div,
html.dark .hr-stats > div { color:#e2e8f0; }

/* ── Blog ── */
html.dark article { background:#1e293b !important; }
html.dark .blg-content { color:#cbd5e1 !important; }
html.dark .blg-content h1,
html.dark .blg-content h2,
html.dark .blg-content h3,
html.dark .blg-content h4 { color:#f1f5f9 !important; }
html.dark .blg-content p { color:#94a3b8 !important; }
html.dark .blg-content a { color:#f97316 !important; }
html.dark .blg-content blockquote { background:#1e293b !important; border-left-color:#ae3200 !important; }
html.dark .blg-content table td { border-color:rgba(255,255,255,.06) !important; }
html.dark .blg-content tr:nth-child(even) td { background:#0f172a !important; }

/* ── Products page ── */
html.dark .prod-why-grid > div { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }

/* ── About/Who We Are ── */
html.dark .abt-h2 { color:#f1f5f9 !important; }

/* ── Mobile menu ── */
html.dark #mobile-menu { background:#0f172a !important; }

/* ── Surface cards (Tailwind) ── */
html.dark .surface-card { background:#1e293b !important; border-color:rgba(255,255,255,.08) !important; }
html.dark .surface-card * { color:#94a3b8; }
html.dark .surface-card h3 { color:#f1f5f9 !important; }

/* ── Prose text ── */
html.dark .prose { color:#94a3b8 !important; }
html.dark .prose h1,html.dark .prose h2,html.dark .prose h3 { color:#f1f5f9 !important; }

/* ── Contact form ── */
html.dark .contact-form,
html.dark form { background:#1e293b !important; }

/* ── Page builder sections ── */
html.dark .pb-two-col div[style*="background:#fff"] { background:#1e293b !important; }

/* ── Content Protection ── */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* Allow selection in input fields */
input, textarea, [contenteditable] {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  user-select: text !important;
}

/* ── Content Protection ── */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}

/* ══════════════════════════════════════
   DARK MODE FINAL FIX — All Pages
   ══════════════════════════════════════ */

/* Fix white gaps between sections */
html.dark div[style*="background:#fff"],
html.dark div[style*="background: #fff"],
html.dark div[style*="background:#ffffff"],
html.dark div[style*="background: #ffffff"],
html.dark div[style*="background:#f7f9fb"],
html.dark div[style*="background: #f7f9fb"],
html.dark div[style*="background:#f8fafc"],
html.dark div[style*="background:#fafafa"] {
  background:#1e293b !important;
}

/* Fix all inline white/light section backgrounds */
html.dark section[style*="background:#fff"],
html.dark section[style*="background: #fff"],
html.dark section[style*="background:#ffffff"],
html.dark section[style*="background: #ffffff"],
html.dark section[style*="background:#f7f9fb"],
html.dark section[style*="background: #f7f9fb"],
html.dark section[style*="background-color:#fff"],
html.dark section[style*="background-color: #fff"],
html.dark section[style*="background-color:#ffffff"],
html.dark section[style*="background-color:#f7f9fb"] {
  background:#0f172a !important;
}

/* Fix sections with no inline bg (default body bg) */
html.dark section:not([style*="background:#0d1c32"]):not([style*="linear-gradient"]):not([style*="#1e293b"]):not([style*="#111827"]) {
  background-color:#0f172a !important;
}

/* Fix page gaps / wrapper divs */
html.dark main,
html.dark .page-content,
html.dark #page-content {
  background:#0f172a !important;
}

/* ── Active Nav Link Fix ── */
.nav-link.active {
  color: var(--brand) !important;
  font-weight: 700 !important;
}
.nav-link.active::after {
  width: 100% !important;
  background: var(--brand) !important;
}
html.dark .nav-link.active { color: #fd591e !important; font-weight: 700 !important; }

/* ── White Section Dark Mode Fix ── */
html.dark section[style*="background:#fff"],
html.dark section[style*="background: #fff"],
html.dark section[style*="background:#f7f9fb"],
html.dark div[style*="background:#fff"],
html.dark div[style*="background: #fff"],
html.dark div[style*="background:#f7f9fb"] {
  background: #111827 !important;
  border-color: #1f2937 !important;
}
html.dark a[style*="background:#fff"] {
  background: #1e293b !important;
  border-color: #374151 !important;
}
