/* ==========================================================================
   Blueshore Technologies — Light Theme Overrides
   Active when: <html> does NOT have class "dark"
   Strategy: Override hard-coded dark colors using attribute selectors
             and element-specific rules so light mode looks polished.
   ========================================================================== */

/* ===========================================================================
   THEME TOGGLE BUTTON — works in both dark and light modes
   =========================================================================== */
/* Global Image Toggling */
html.dark .light-img { display: none !important; }
html:not(.dark) .dark-img { display: none !important; }

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    flex-shrink: 0;
    outline: none;
}

html:not(.dark) .theme-toggle-btn {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #374151 !important;
}

.theme-toggle-btn:hover {
    background: rgba(55,144,255, 0.12) !important;
    border-color: #3790ff !important;
    color: #3790ff !important;
}

/* ===========================================================================
   BASE — HTML & BODY
   =========================================================================== */
html:not(.dark) {
    color-scheme: light;
}

html:not(.dark) body {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

/* ===========================================================================
   DARK BACKGROUND OVERRIDES
   Using [class*="..."] attribute substring selectors to catch Tailwind
   arbitrary values like bg-[#030816], bg-[#030816]/90, etc.
   =========================================================================== */

/* Deepest dark → light blue-gray */
html:not(.dark) [class*="bg-[#030816]"] {
    background-color: #f8fafc !important;
}

/* Card dark bg → white */
html:not(.dark) [class*="bg-[#0B1221]"],
html:not(.dark) [class*="bg-[#0b1221]"] {
    background-color: #ffffff !important;
}

/* Elevated surfaces → slate-100 */
html:not(.dark) [class*="bg-[#131B2F]"],
html:not(.dark) [class*="bg-[#131b2f]"] {
    background-color: #f1f5f9 !important;
}

/* Dark overlay */
html:not(.dark) [class*="bg-[#1a233a]"] {
    background-color: #f1f5f9 !important;
}

/* Other dark shades used across pages */
html:not(.dark) [class*="bg-[#02040f]"],
html:not(.dark) [class*="bg-[#02050f]"],
html:not(.dark) [class*="bg-[#0b1c30]"],
html:not(.dark) [class*="bg-[#0e1f32]"],
html:not(.dark) [class*="bg-[#243448]"] {
    background-color: #f1f5f9 !important;
}

/* Semi-transparent white overlays on dark → subtle on light */
html:not(.dark) [class*="bg-white/5"],
html:not(.dark) [class*="bg-white/10"],
html:not(.dark) [class*="bg-white/20"] {
    background-color: rgba(0, 0, 0, 0.025) !important;
}

/* Fix: Prevent semi-transparent dark overlays from becoming solid opaque blocks */
html:not(.dark) [class*="bg-[#030816]/"],
html:not(.dark) [class*="bg-[#0B1221]/"], html:not(.dark) [class*="bg-[#0b1221]/"],
html:not(.dark) [class*="bg-[#131B2F]/"], html:not(.dark) [class*="bg-[#131b2f]/"],
html:not(.dark) [class*="bg-[#1a233a]/"],
html:not(.dark) [class*="bg-[#02040f]/"], html:not(.dark) [class*="bg-[#02050f]/"],
html:not(.dark) [class*="bg-[#0b1c30]/"], html:not(.dark) [class*="bg-[#0e1f32]/"],
html:not(.dark) [class*="bg-[#243448]/"] {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

/* ===========================================================================
   TEXT COLOR OVERRIDES
   =========================================================================== */

/* White text → near-black on light backgrounds */
html:not(.dark) .text-white {
    color: #0f172a !important;
}

/* Light gray → readable medium gray */
html:not(.dark) .text-slate-300 {
    color: #475569 !important;
}

html:not(.dark) .text-slate-400 {
    color: #64748b !important;
}

/* Cyan accent labels → darker for readability on white */
html:not(.dark) [class*="text-[#3790ff]"] {
    color: #3790ff !important;
}

/* Gold accent — keep as-is (warm, visible on light bg) */
/* html:not(.dark) [class*="text-[#3790ff]"] — intentionally not overriding */

/* Cyan background badges → very light cyan tint */
html:not(.dark) [class*="bg-[#3790ff]/10"],
html:not(.dark) [class*="bg-[#3790ff]/20"] {
    background-color: rgba(55, 144, 255, 0.08) !important;
}

/* ===========================================================================
   BORDER OVERRIDES
   =========================================================================== */

html:not(.dark) [class*="border-white/5"] {
    border-color: rgba(0, 0, 0, 0.05) !important;
}

html:not(.dark) [class*="border-white/10"] {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) [class*="border-white/20"] {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) [class*="border-white/30"] {
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Dividers */
html:not(.dark) [class*="divide-white/"]>*+* {
    border-color: rgba(0, 0, 0, 0.06) !important;
}

/* Ring utilities */
html:not(.dark) [class*="ring-white/"] {
    --tw-ring-color: rgba(0, 0, 0, 0.08) !important;
}

/* ===========================================================================
   NAVIGATION
   =========================================================================== */

/* Hard-coded dark nav backgrounds (about.html, services.html, etc.) */
html:not(.dark) nav[class*="bg-[#030816]"] {
    background-color: rgba(248, 250, 252, 0.96) !important;
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* Nav text that's hard-coded white */
html:not(.dark) nav .text-white {
    color: #0f172a !important;
}

html:not(.dark) nav .text-slate-300 {
    color: #374151 !important;
}

/* Nav text and icons default/hover states */
html:not(.dark) nav.fixed.top-0 .text-slate-600 {
    color: #000000 !important;
}

html:not(.dark) nav.fixed.top-0 .text-slate-600:hover,
html:not(.dark) nav.fixed.top-0 .group:hover > a {
    color: #3790ff !important;
}

/* Dropdown menus */
html:not(.dark) nav [class*="bg-[#0B1221]"],
html:not(.dark) nav [class*="bg-[#0b1221]"] {
    background-color: #ffffff !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

/* Hamburger button */
html:not(.dark) .hamburger-btn {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #374151 !important;
}

html:not(.dark) .hamburger-btn:hover {
    background: rgba(55,144,255, 0.08) !important;
}

/* ===========================================================================
   HERO SECTIONS
   Overrides inline <style> tag rules via !important + higher specificity
   =========================================================================== */

/* [Homepage Hero Overrides Removed] - Encapsulated inside index.html under class html.dark and html:not(.dark) */

/* ===========================================================================
   GRADIENT COLOR OVERRIDES
   Changes Tailwind CSS custom properties used by gradient utilities
   =========================================================================== */

html:not(.dark) [class*="from-[#030816]"] {
    --tw-gradient-from: #f8fafc !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(248, 250, 252, 0)) !important;
}

html:not(.dark) [class*="via-[#030816]"] {
    --tw-gradient-via: #f8fafc !important;
    --tw-gradient-stops: var(--tw-gradient-from), #f8fafc, var(--tw-gradient-to, rgba(248, 250, 252, 0)) !important;
}

html:not(.dark) [class*="to-[#030816]"] {
    --tw-gradient-to: #f8fafc !important;
}

html:not(.dark) [class*="from-[#0B1221]"],
html:not(.dark) [class*="from-[#0b1221]"] {
    --tw-gradient-from: #ffffff !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)) !important;
}

html:not(.dark) [class*="to-[#0B1221]"],
html:not(.dark) [class*="to-[#0b1221]"] {
    --tw-gradient-to: #ffffff !important;
}

html:not(.dark) [class*="from-[#131B2F]"],
html:not(.dark) [class*="from-[#131b2f]"] {
    --tw-gradient-from: #f1f5f9 !important;
}

html:not(.dark) [class*="to-[#131B2F]"],
html:not(.dark) [class*="to-[#131b2f]"] {
    --tw-gradient-to: #f1f5f9 !important;
}

/* Dot-pattern backgrounds (radial-gradient dots) → lighter dots */
html:not(.dark) [style*="radial-gradient(circle at center, #1f477b"] {
    background-image: radial-gradient(circle at center, rgba(30, 64, 175, 0.1) 1px, transparent 1px) !important;
}

/* ===========================================================================
   IMAGE FILTER OVERRIDES
   Blog card images have dark-mode CSS filters applied as inline styles.
   !important on author stylesheet overrides inline styles per CSS cascade.
   =========================================================================== */

html:not(.dark) img[style*="filter"],
html:not(.dark) [style*="filter: contrast"] {
    filter: none !important;
    opacity: 1 !important;
}

/* ===========================================================================
   MOBILE MENU
   =========================================================================== */

html:not(.dark) .mobile-menu-overlay {
    background: rgba(15, 23, 42, 0.4) !important;
}

html:not(.dark) .mobile-menu-drawer {
    background: #ffffff !important;
    border-left-color: rgba(0, 0, 0, 0.08) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) .mobile-menu-header {
    border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* Brand name in mobile menu (has inline style="color: white") */
html:not(.dark) .mobile-menu-header [style*="color: white"],
html:not(.dark) .mobile-menu-header [style*="color:white"] {
    color: #0f172a !important;
}

html:not(.dark) .mobile-menu-close {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #374151 !important;
}

html:not(.dark) .mobile-menu-links a,
html:not(.dark) .mobile-menu-links button {
    color: #000000 !important;
    border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

html:not(.dark) .mobile-menu-links a:hover,
html:not(.dark) .mobile-menu-links button:hover {
    color: #3790ff !important;
}

html:not(.dark) .mobile-submenu {
    background: transparent !important;
}

html:not(.dark) .mobile-submenu a {
    color: #64748b !important;
    border-bottom-color: rgba(0, 0, 0, 0.04) !important;
}

html:not(.dark) .mobile-submenu a:hover {
    color: #3790ff !important;
}

html:not(.dark) .mobile-menu-cta {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) .mobile-menu-cta .phone-link {
    color: #000000 !important;
}

/* ===========================================================================
   SPECIFIC COMPONENTS
   =========================================================================== */

/* Swiper custom navigation buttons */
html:not(.dark) .swiper-button-next-custom,
html:not(.dark) .swiper-button-prev-custom {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #374151 !important;
}

html:not(.dark) .swiper-button-next-custom:hover,
html:not(.dark) .swiper-button-prev-custom:hover {
    border-color: #3790ff !important;
    color: #3790ff !important;
}

/* Swiper pagination */
html:not(.dark) .swiper-pagination-bullet {
    background: #94a3b8 !important;
}

html:not(.dark) .swiper-pagination-bullet-active {
    background: #3790ff !important;
}

/* FAQ details/summary */
html:not(.dark) details {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) details summary {
    color: #0f172a !important;
}

html:not(.dark) details[open] summary {
    color: #3790ff !important;
}

html:not(.dark) details p,
html:not(.dark) details div {
    color: #475569 !important;
}

/* Form inputs */
html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

html:not(.dark) input::placeholder,
html:not(.dark) textarea::placeholder {
    color: #94a3b8 !important;
}

html:not(.dark) input:focus,
html:not(.dark) textarea:focus,
html:not(.dark) select:focus {
    border-color: #3790ff !important;
    box-shadow: 0 0 0 3px rgba(55,144,255, 0.15) !important;
}

 /* ===========================================================================
   FOOTER (Light Theme)
   Keep the footer in light theme until the dark theme is toggled.
   Overrides responsive.css and inline styles that force the footer dark.
   =========================================================================== */

html:not(.dark) footer,
html:not(.dark) footer.bg-slate-900 {
    background-color: #f8fafc !important;
    border-top: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html:not(.dark) footer .border-b {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) footer>div[style*="radial-gradient"] {
    opacity: 0.8 !important;
    background-image: radial-gradient(circle, rgba(0, 0, 0, 0.08) 1px, transparent 1px) !important;
}

html:not(.dark) footer h2,
html:not(.dark) footer h4,
html:not(.dark) footer .text-white,
html:not(.dark) footer .text-xl {
    color: #0f172a !important;
}

html:not(.dark) footer .text-slate-400 {
    color: #475569 !important;
}

html:not(.dark) footer .text-slate-500 {
    color: #64748b !important;
}

html:not(.dark) footer span:not(.material-symbols-outlined):not(.w-1) {
    color: #64748b !important;
}

html:not(.dark) footer ul li a,
html:not(.dark) footer .space-y-3 a {
    color: #475569 !important;
}

html:not(.dark) footer ul li a:hover,
html:not(.dark) footer .space-y-3 a:hover {
    color: #3790ff !important;
}

html:not(.dark) footer a.rounded-lg {
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #475569 !important;
}

html:not(.dark) footer a.rounded-lg:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
    color: #3790ff !important;
}

html:not(.dark) footer .border-t {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

html:not(.dark) footer .border-t a {
    color: #64748b !important;
}

html:not(.dark) footer .border-t a:hover {
    color: #3790ff !important;
}

/* Hero CTA Buttons - Theme-adaptive styling */
.hero-cta-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 50%, #1e3a8a 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 18px rgba(30, 64, 175, 0.25), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: #ffffff !important;
    box-shadow: 0 8px 24px rgba(30, 64, 175, 0.4), 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

html.dark .hero-cta-primary {
    background: linear-gradient(135deg, #3790ff 0%, #2563eb 50%, #1d4ed8 100%) !important;
    color: #030816 !important;
    box-shadow: 0 4px 20px rgba(55,144,255, 0.3), 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

html.dark .hero-cta-primary:hover {
    background: linear-gradient(135deg, #60a5fa 0%, #3790ff 100%) !important;
    color: #030816 !important;
    box-shadow: 0 8px 32px rgba(55,144,255, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.hero-cta-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: #1e293b !important;
    border: 1.5px solid rgba(15, 23, 42, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-secondary:hover {
    background: rgba(15, 23, 42, 0.09);
    color: #3790ff !important;
    border-color: rgba(55, 144, 255, 0.4);
    box-shadow: 0 4px 14px rgba(55, 144, 255, 0.1);
    transform: translateY(-2px);
}

html.dark .hero-cta-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
}

html.dark .hero-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #3790ff !important;
    border-color: rgba(55,144,255, 0.45) !important;
    box-shadow: 0 4px 20px rgba(55,144,255, 0.15) !important;
}

.hero-cta-tertiary {
    background: rgba(55,144,255, 0.05);
    color: #1e293b !important;
    border: 1.5px solid rgba(55,144,255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    letter-spacing: 0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta-tertiary:hover {
    background: rgba(55,144,255, 0.12);
    color: #3790ff !important;
    border-color: rgba(55,144,255, 0.5);
    box-shadow: 0 4px 14px rgba(55,144,255, 0.15);
    transform: translateY(-2px);
}

html.dark .hero-cta-tertiary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #e2e8f0 !important;
    border: 1.5px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12) !important;
}

html.dark .hero-cta-tertiary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #3790ff !important;
    border-color: rgba(55,144,255, 0.45) !important;
    box-shadow: 0 4px 20px rgba(55,144,255, 0.15) !important;
}

/* ===========================================================================
   CONTACT PAGE HERO (Light Theme)
   =========================================================================== */
html:not(.dark) #contact-hero { background-color: #f1f5f9 !important; }
html:not(.dark) #contact-hero h1, 
html:not(.dark) #contact-hero .text-white,
html:not(.dark) #contact-hero a.text-slate-900 { color: #0f172a !important; }
html:not(.dark) #contact-hero p.text-slate-400 { color: #64748b !important; }
html:not(.dark) #contact-hero .text-slate-200 { color: #334155 !important; }
html:not(.dark) #contact-hero .text-slate-300,
html:not(.dark) #contact-hero .text-slate-600 { color: #475569 !important; }
html:not(.dark) #contact-hero .hero-badge { background: rgba(55, 144, 255, 0.12) !important; border-color: rgba(55, 144, 255, 0.3) !important; color: #3790ff !important; }
html:not(.dark) #contact-hero [class*="text-[#3790ff]"] { color: #3790ff !important; }
html:not(.dark) #contact-hero .neural-bg-subtle { background-image: url('contact_hero_light.webp') !important; filter: none !important; opacity: 1 !important; }
html:not(.dark) #contact-hero .hero-grid-mask { background: radial-gradient(ellipse 90% 70% at 50% 50%, transparent 30%, #f1f5f9 100%) !important; }
html:not(.dark) #contact-hero .hero-grid-lines { background-image: linear-gradient(rgba(0,0,0,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.015) 1px, transparent 1px) !important; }
html:not(.dark) #contact-hero .orb-gold, html:not(.dark) #contact-hero .orb-cyan { mix-blend-mode: multiply; opacity: 0.6 !important; }
html:not(.dark) #contact-hero [class*="border-white/"],
html:not(.dark) #contact-hero [class*="border-black/"] { border-color: rgba(0, 0, 0, 0.1) !important; }
html:not(.dark) #contact-hero .stats-divider { background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.12), transparent) !important; }
html:not(.dark) #contact-hero .scroll-line { background: linear-gradient(to bottom, rgba(29,78,216,0.9), transparent) !important; }

/* Keep text color white on dark elements/buttons when in light mode */
html:not(.dark) .bg-slate-900,
html:not(.dark) .bg-slate-950,
html:not(.dark) .bg-slate-900.text-white,
html:not(.dark) .bg-slate-900 .text-white,
html:not(.dark) [class*="bg-slate-900"] .text-white,
html:not(.dark) [class*="bg-slate-900"].text-white {
    color: #ffffff !important;
}

/* Ensure footer text remains dark in light mode, overriding the .bg-slate-900 rule above */
html:not(.dark) footer h2,
html:not(.dark) footer.bg-slate-900 h2,
html:not(.dark) footer .text-white,
html:not(.dark) footer.bg-slate-900 .text-white {
    color: #0f172a !important;
}

