/* Custom Styles to extend Tailwind CSS */

:root {
    --bg-color: #1a2036;
    --bg-card: #2b354e;
    --text-color: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: rgba(206, 177, 114, 0.15);
    --glass-bg: rgba(43, 53, 78, 0.7);
    --navbar-bg: rgba(26, 32, 54, 0.9);
}

.light-theme {
    --bg-color: #f9fafb; /* gray-50 */
    --bg-card: #ffffff;
    --text-color: #1f2937; /* gray-800 */
    --text-muted: #4b5563; /* gray-600 */
    --border-color: rgba(26, 32, 54, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --navbar-bg: rgba(249, 250, 251, 0.92);
}

/* Smooth transitions for theme switching */
body, nav, div, section, footer, button, a, h1, h2, h3, p, span, i {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Background Overrides */
body.bg-brand-black {
    background-color: var(--bg-color) !important;
}
.light-theme .bg-brand-black {
    background-color: var(--bg-color) !important;
}
.light-theme .bg-brand-dark {
    background-color: #f3f4f6 !important; /* gray-100 */
}
.light-theme .bg-brand-dark\/40 {
    background-color: rgba(243, 244, 246, 0.4) !important;
}
.light-theme .bg-brand-dark\/20 {
    background-color: rgba(243, 244, 246, 0.2) !important;
}
.light-theme .bg-white\/5 {
    background-color: rgba(0, 0, 0, 0.05) !important;
}
.light-theme .bg-\[\#2b354e\] {
    background-color: #e5e7eb !important; /* gray-200 */
}
.light-theme .bg-brand-black\/90 {
    background-color: var(--navbar-bg) !important;
}
.light-theme .bg-brand-black\/98 {
    background-color: rgba(255, 255, 255, 0.98) !important;
}

/* Text Overrides */
body.text-gray-200 {
    color: var(--text-color) !important;
}
.light-theme .text-white {
    color: #111827 !important; /* gray-900 */
}
.light-theme .text-gray-200 {
    color: #1f2937 !important; /* gray-800 */
}
.light-theme .text-gray-300 {
    color: #374151 !important; /* gray-700 */
}
.light-theme .text-gray-400 {
    color: #4b5563 !important; /* gray-600 */
}
.light-theme .text-gray-500 {
    color: #6b7280 !important; /* gray-500 */
}

/* Border Overrides */
.light-theme .border-brand-gold\/20 {
    border-color: rgba(206, 177, 114, 0.3) !important;
}
.light-theme .border-brand-gold\/10 {
    border-color: rgba(206, 177, 114, 0.2) !important;
}
.light-theme .border-gray-800 {
    border-color: #e5e7eb !important;
}

/* Mobile bottom nav custom styles for light theme */
.light-theme .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.96) !important;
    border-top: 1px solid rgba(206, 177, 114, 0.5) !important;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.08) !important;
}
.light-theme .nav-item-mobile {
    color: #6b7280 !important;
}
.light-theme .nav-item-mobile.active {
    color: #ceb172 !important;
}

/* Bento card active for light theme */
.light-theme .srv-mobile-card {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(26, 32, 54, 0.1) !important;
}
.light-theme .srv-mobile-card.srv-active {
    background: rgba(206, 177, 114, 0.15) !important;
    border-color: #ceb172 !important;
}

/* Glassmorphism helpers */
.glass {
    background: var(--glass-bg, rgba(43, 53, 78, 0.7));
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color, rgba(206, 177, 114, 0.1));
}

.glass-card {
    background: linear-gradient(145deg, var(--glass-bg, rgba(43, 53, 78, 0.9)), rgba(26, 32, 54, 0.95));
    border: 1px solid var(--border-color, rgba(206, 177, 114, 0.15));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px -10px rgba(206, 177, 114, 0.2);
    border-color: rgba(206, 177, 114, 0.4);
}

/* Gradient text */
.text-gradient {
    background: linear-gradient(to right, #ceb172, #e8ce93, #ceb172);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientText 5s linear infinite;
}

@keyframes gradientText {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Full-height hero utilities */
.js-fullheight {
    height: 100vh;
}
@media (max-width: 768px) {
    .js-fullheight {
        height: 100vh; /* Adjust for mobile if needed, e.g., using dvh */
    }
}

.hero-wrap {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    z-index: 0;
}
.hero-wrap.hero-overlay::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(to right, rgba(26, 32, 54, 0.9) 0%, rgba(10,10,10, 0.6) 50%, rgba(26, 32, 54, 0.8) 100%);
    z-index: -1;
}

/* Scrollbar customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a2036; 
}
::-webkit-scrollbar-thumb {
    background: #ceb172; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #FFDF00; 
}

/* Counter Animation */
.counter-box p {
    font-variant-numeric: tabular-nums;
}

/* Dynamic Scroll Transitions */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Add a slight delay for staggering grid elements */
.reveal-stagger {
    transition-delay: calc(var(--stagger-idx, 0) * 150ms);
}

/* Reusable Components */
.btn-gold {
    background-color: #ceb172;
    color: #1a2036;
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}
.btn-gold:hover { background-color: white; }

.btn-outline {
    border: 1px solid #ceb172;
    color: #ceb172;
    padding: 0.75rem 2rem;
    border-radius: 0.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.75rem;
    transition: all 0.3s ease;
    display: inline-block;
}
.btn-outline:hover { background-color: #ceb172; color: #1a2036; }

.nav-link-desktop {
    color: #d1d5db;
    transition: color 0.3s ease;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.nav-link-desktop:hover { color: #ceb172; }

/* Mobile App-Style Enhancement (768px and below) */
@media (max-width: 768px) {
    /* Layout & Spacing */
    section { padding-top: 4rem !important; padding-bottom: 4rem !important; }
    .hero-wrap { height: auto !important; min-height: 80vh; padding-top: 6rem !important; }
    
    /* Typography Scaling */
    h1 { font-size: 2.2rem !important; line-height: 1.1 !important; margin-bottom: 1.5rem !important; }
    h2 { font-size: 1.8rem !important; line-height: 1.2 !important; }
    p { font-size: 0.95rem !important; line-height: 1.6 !important; }

    /* Premium Bottom Navigation - Pinned to bottom */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(26, 32, 54, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(206, 177, 114, 0.4);
        z-index: 100;
        display: flex;
        justify-content: space-around;
        align-items: center;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.6);
    }

    .nav-item-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: #9ca3af;
        text-decoration: none;
        font-size: 0.65rem;
        font-weight: 700;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        flex: 1;
        padding-top: 2px;
    }

    .nav-item-mobile i {
        font-size: 1.2rem;
        margin-bottom: 3px;
        transition: all 0.3s ease;
    }

    .nav-item-mobile.active {
        color: #ceb172;
    }

    .nav-item-mobile.active i {
        transform: translateY(-2px) scale(1.1);
    }

    /* Floating Action Button - Adjusted for refined nav */
    .mobile-fab {
        position: fixed;
        bottom: 4.75rem;
        right: 1.25rem;
        width: 52px;
        height: 52px;
        background: #ceb172;
        color: #1a2036;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
        z-index: 90;
        font-size: 1.4rem;
        animation: pulseFAB 2s infinite;
    }

    @keyframes pulseFAB {
        0% { box-shadow: 0 0 0 0 rgba(206, 177, 114, 0.7); }
        70% { box-shadow: 0 0 0 15px rgba(206, 177, 114, 0); }
        100% { box-shadow: 0 0 0 0 rgba(206, 177, 114, 0); }
    }

    /* Horizontal Scroll Sections */
    .mobile-scroll-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.25rem;
        padding: 0.5rem 0 1.5rem;
        -ms-overflow-style: none;
    }

    @supports (scrollbar-width: none) {
        .mobile-scroll-container {
            scrollbar-width: none;
        }
    }

    .mobile-scroll-container::-webkit-scrollbar {
        display: none;
    }

    .mobile-scroll-item {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    /* Bento-style Cards for Services */
    .srv-mobile-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .srv-mobile-card {
        background: rgba(43, 53, 78, 0.5);
        border: 1px solid rgba(206, 177, 114, 0.1);
        border-radius: 16px;
        padding: 1.25rem;
        text-align: center;
        transition: all 0.3s ease;
    }

    .srv-mobile-card.srv-active {
        background: rgba(206, 177, 114, 0.1);
        border-color: #ceb172;
    }
    
    /* Stats Horizontal UI */
    .stats-mobile-card {
        padding: 1.5rem;
        border-radius: 20px;
        background: linear-gradient(135deg, rgba(43, 53, 78, 0.6), rgba(26, 32, 54, 0.6));
        border: 1px solid rgba(206, 177, 114, 0.1);
        min-width: 140px;
    }

    /* Hide Desktop elements on mobile if needed */
    .desktop-only { display: none !important; }
}

/* Page load fade-in */
.page-transition {
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
