:root {
    --primary: #0B1F3A;
    --secondary: #D4AF37;
    --accent: #2563EB;
    --bg-color: #F8FAFC;
    --text-color: #111827;
}

[data-theme="dark"] {
    --bg-color: #050d18;
    --text-color: #F8FAFC;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.font-manrope { font-family: 'Manrope', sans-serif; }
.font-inter { font-family: 'Inter', sans-serif; }

/* Loading screen */
#loader-wrapper {
    position: fixed; inset: 0; background: #0B1F3A; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* =========================================
   ROBUST MOBILE RESPONSIVENESS FIXES
   ========================================= */

/* Prevent horizontal overflow globally */
html, body {
    max-width: 100%;
    overflow-x: hidden !important;
}

/* Ensure images and canvas elements scale inside parent containers */
img, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Mobile Header & Navbar Fixes */
@media (max-width: 991.98px) {
    .glassmorphism-nav {
        background: rgba(255, 255, 255, 0.95);
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    [data-theme="dark"] .glassmorphism-nav {
        background: rgba(11, 31, 58, 0.95);
    }
    .hero-section {
        min-height: 100vh;
        height: auto !important;
        padding-top: 7rem !important;
        padding-bottom: 5rem !important;
    }
    /* Hide custom cursor on touch/mobile devices for performance */
    .custom-cursor-dot, .custom-cursor-outline {
        display: none !important;
    }
}
/* Strict Header & Logo Constraints to Fix Overflow */
.navbar-brand {
    max-height: 70px;
    display: flex;
    align-items: center;
}

.site-logo {
    height: 45px !important;
    width: auto !important;
    max-width: 180px !important;
    object-fit: contain;
    display: block;
}

@media (max-width: 991.98px) {
    .site-logo {
        height: 38px !important;
        max-width: 140px !important;
    }
}

@media (max-width: 575.98px) {
    .site-logo {
        height: 32px !important;
        max-width: 110px !important;
    }
}
/* Compact Smartphone Adjustments (Max 575.98px) */
@media (max-width: 575.98px) {
    .display-3 {
        font-size: 2.25rem !important;
        line-height: 1.15 !important;
    }
    .display-4 {
        font-size: 2rem !important;
    }
    .display-5 {
        font-size: 1.85rem !important;
    }
    
    /* Force stack buttons and take full width */
    .hero-section .d-flex.flex-wrap {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }
    .hero-section .d-flex.flex-wrap > * {
        width: 100% !important;
        margin: 0 !important;
        text-align: center !important;
    }

    /* Padding adjustments for tight mobile screens */
    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Floating CTA positioning for mobile */
    .floating-cta-group {
        bottom: 15px;
        right: 15px;
    }
    .floating-cta-group .btn {
        width: 42px !important;
        height: 42px !important;
    }
    
    /* Make calculator ranges fit comfortably */
    .form-range {
        width: 100%;
    }
}

/* Tablet adjustments */
@media (min-width: 576px) and (max-width: 991.98px) {
    .hero-section {
        padding-top: 6rem !important;
    }
}

/* Navbar Brand & Toggler Responsiveness */
.navbar-toggler:focus {
    box-shadow: none;
}

.offcanvas {
    max-width: 300px;
}

/* Swiper Slides Fixes on Mobile */
.swiper-slide {
    height: auto;
}

/* Form inputs & ranges auto-scaling */
.form-range {
    width: 100%;
}
/* Custom Scroll Progress */
#scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; background: var(--secondary);
    width: 0%; z-index: 10000; transition: width 0.1s ease;
}

/* Glassmorphism Classes */
.glassmorphism-nav {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.3s ease;
}
[data-theme="dark"] .glassmorphism-nav {
    background: rgba(11, 31, 58, 0.75);
}

.glassmorphism-card {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.glassmorphism-dark {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
/* Ultimate Force White Text Fix */
body .bg-primary p, 
body .bg-primary span, 
body .bg-primary li, 
body .bg-primary a,
body footer p, 
body footer span, 
body footer li, 
body footer a,
body .glassmorphism-dark p, 
body .glassmorphism-dark span, 
body .glassmorphism-dark li, 
body .glassmorphism-dark a {
    color: #FFFFFF !important;
}
/* Optional soft muted tone for secondary descriptions inside dark panels */
.bg-primary .text-muted, 
footer .text-muted, 
.glassmorphism-dark .text-muted, 
.offcanvas .text-muted {
    color: #E2E8F0 !important;
}

/* Accent gold on hover */
.bg-primary a:hover, 
footer a:hover, 
.glassmorphism-dark a:hover, 
.offcanvas a:hover {
    color: #D4AF37 !important;
}
/* Typography Colors */
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.btn-primary { background-color: var(--primary); border-color: var(--primary); color: #fff; }
.btn-secondary { background-color: var(--secondary); border-color: var(--secondary); color: var(--primary); }
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Floating Elements & CTAs */
.floating-cta-group {
    position: fixed; bottom: 25px; right: 25px; z-index: 1000;
    display: flex; flex-direction: column; align-items: center;
}
.logo-box { width: 38px; height: 38px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-12 { font-size: 12px; }

/* Interactive Hover States */
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: translateY(-3px); }
.service-card { transition: all 0.3s ease; }
.service-card:hover { transform: translateY(-5px); border-color: var(--secondary); box-shadow: 0 15px 30px rgba(0,0,0,0.05); }

/* Custom Cursor */
.custom-cursor-dot {
    width: 6px; height: 6px; background: var(--secondary); position: fixed;
    pointer-events: none; border-radius: 50%; z-index: 99999; transition: transform 0.1s ease;
}
.custom-cursor-outline {
    width: 32px; height: 32px; border: 1px solid var(--secondary); position: fixed;
    pointer-events: none; border-radius: 50%; z-index: 99998; transition: transform 0.15s ease-out;
}