:root {
            --alpha-red: #BF1E2E;
            --alpha-red-glow: rgba(191, 30, 46, 0.08);
            --alpha-dark: #0F172A;
            --alpha-slate: #64748B;
            --alpha-bg: #F8FAFC;
            --glass-bg: rgba(255, 255, 255, 0.96);
            --glass-border: rgba(226, 232, 240, 0.8);
            --radius-lg: 24px;
            --radius-md: 16px;
            --radius-sm: 8px;
        }

        /* --- IMMUTABLE VIEWPORT SAFEGUARDS --- */
        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            background-color: var(--alpha-bg);
            color: var(--alpha-dark);
            font-family: 'Plus Jakarta Sans', sans-serif;
            -webkit-font-smoothing: antialiased;
            scroll-behavior: smooth;
        }

        body { 
           font-family: 'Plus Jakarta Sans', sans-serif;
            background-color: #fff;
            overflow-x: hidden;
            padding-bottom: 0;
                    
        }
        
        @media (min-width: 992px) {
            body { 
               padding-top: 75px;
                padding-bottom: 0px;
            }

            .mobile-bottom-nav {
                position: fixed;

                left: 0;
                right: 0;
                bottom: 0;

                width: 100%;

                z-index: 9999;


                padding: 10px 0 calc(10px + env(safe-area-inset-bottom));

                box-shadow: 0 -5px 20px rgba(0,0,0,0.06);

                border-top: 1px solid rgba(0,0,0,0.05);

                transform: translateZ(0);
                -webkit-transform: translateZ(0);
            }
        }

        /* --- HARDWARE-ACCELERATED IN-OUT VIEWPORT ANIMATIONS --- */
        .reveal-section {
            opacity: 0;
            transform: scale(0.96) translateY(40px);
            transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                        transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
            will-change: transform, opacity;
        }

        .reveal-section.visible {
            opacity: 1;
            transform: scale(1) translateY(0);
        }

        .reveal-section.exit-out {
            opacity: 0;
            transform: scale(0.96) translateY(-40px);
        }

        /* --- IMMOVABLE TOP NAVBAR HEADER --- */
        .navbar {
            position: fixed !important;
            top: 0 !important;
            left: 0 !important;
            right: 0 !important;
            width: 100% !important;
            height: 72px;
            margin: 0 !important;
            background: var(--glass-bg) !important;
            border-bottom: 1px solid var(--glass-border) !important;
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            z-index: 9999 !important; 
            display: flex;
            align-items: center;
        }
        .navbar-brand { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.5px; }
        .nav-link {
            font-weight: 600;
            color: #475569 !important;
            font-size: 0.92rem;
            padding: 8px 16px !important;
            border-radius: var(--radius-sm);
            transition: all 0.25s ease;
        }
        .nav-link:hover { 
            color: var(--alpha-red) !important; 
            background: var(--alpha-red-glow);
        }
        .btn-header-join {
            background-color: var(--alpha-dark);
            color: #ffffff !important;
            font-weight: 700;
            border-radius: 30px;
            padding: 8px 20px;
            font-size: 0.85rem;
            border: 1px solid transparent;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .btn-header-join:hover {
            background-color: var(--alpha-red);
            transform: scale(1.03);
            box-shadow: 0 6px 20px rgba(191, 30, 46, 0.25);
        }

        /* --- RESPONSIVE APP-STYLE BOTTOM NAVIGATION --- */
        .mobile-bottom-nav {
            position: fixed !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
            width: 100% !important;
            height: 80px; 
            background: rgba(255, 255, 255, 0.98) !important;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-top: 1px solid var(--glass-border);
            z-index: 9999 !important; 
            box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.04);
            display: flex !important;
            justify-content: space-around;
            align-items: flex-end; 
            padding: 0 8px 8px 8px; 
        }
        .mobile-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-decoration: none !important;
            color: var(--alpha-slate);
            font-size: 0.72rem;
            font-weight: 600;
            width: 20%;
            height: 100%;
            padding-bottom: 6px;
            transition: color 0.2s ease;
        }
        .mobile-nav-item i { font-size: 1.25rem; margin-bottom: 4px; transition: transform 0.2s ease; }
        .mobile-nav-item:hover i { transform: translateY(-2px); }
        .mobile-nav-item.active, .mobile-nav-item:hover { color: var(--alpha-red); }
        
        .mobile-nav-center-wrap {
            position: relative;
            width: 20%;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-end;
        }
        .mobile-nav-center-btn {
            width: 54px;
            height: 54px;
            background: var(--alpha-red);
            color: #fff !important;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 16px rgba(191, 30, 46, 0.35);
            border: 4px solid #fff;
            position: absolute;
            top: -20px; 
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .mobile-nav-center-btn:hover { transform: scale(1.1) rotate(15deg); }
        .mobile-center-label { font-size: 0.72rem; font-weight: 600; color: var(--alpha-slate); padding-bottom: 6px; }

        /* --- HERO SPLIT & 3D GALLERY ENGINE --- */
        .hero-section { 
            padding: 40px 0 60px 0; 
            background: radial-gradient(120% 80% at 50% 0%, rgba(247, 147, 30, 0.05) 0%, rgba(255,255,255,0) 100%);
        }
        @media (min-width: 992px) { .hero-section { padding: 80px 0 100px 0; } }
        
        .hero-title {
            font-size: calc(2.2rem + 1.6vw);
            font-weight: 800;
            line-height: 1.1;
            letter-spacing: -1.5px;
        }
        .hero-subtitle { color: var(--alpha-slate); font-size: 1.05rem; line-height: 1.6; max-width: 540px; }

        .btn-alpha-primary {
            background: var(--alpha-red);
            color: white !important;
            padding: 14px 28px;
            font-weight: 700;
            border-radius: 30px;
            border: none;
            box-shadow: 0 4px 12px rgba(191, 30, 46, 0.2);
            transition: all 0.25s ease;
        }
        .btn-alpha-primary:hover { background: #9E1925; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(191, 30, 46, 0.3); }
        .btn-alpha-secondary {
            background: #fff;
            color: var(--alpha-dark) !important;
            padding: 14px 28px;
            font-weight: 700;
            border-radius: 30px;
            border: 1px solid #E2E8F0;
            transition: all 0.25s ease;
        }
        .btn-alpha-secondary:hover { background: var(--alpha-bg); transform: translateY(-1px); }

        /* ADVANCED 3D SPACE HOVER MECHANICS */
        .split-collection-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            perspective: 1000px;
        }
        .collection-wrapper {
            position: relative;
            border-radius: var(--radius-md);
            overflow: hidden;
            box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
            aspect-ratio: 4 / 5;
            background-color: #E2E8F0;
            transform-style: preserve-3d;
            transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s ease;
        }
        .collection-wrapper:nth-child(2) { margin-top: 24px; }
        .collection-wrapper:hover {
            transform: rotateX(6deg) rotateY(-6deg) translate3d(0, -8px, 15px);
            box-shadow: -10px 25px 40px rgba(15, 23, 42, 0.15);
        }
        .collection-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .collection-wrapper:hover .collection-img { transform: scale(1.03); }
        .collection-badge {
            position: absolute;
            bottom: 16px;
            left: 16px;
            background: rgba(15, 23, 42, 0.85);
            color: #fff;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            padding: 6px 16px;
            font-size: 0.72rem;
            font-weight: 700;
            border-radius: 30px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
            transform: translateZ(20px);
        }

        /* --- BRAND PARTNER STRIP --- */
        .brand-strip {
            padding: 30px 0;
            background-color: #ffffff;
            border-top: 1px solid #EEF0F4;
            border-bottom: 1px solid #EEF0F4;
        }
        .brand-item { font-weight: 800; text-transform: uppercase; letter-spacing: 1.5px; color: #94A3B8; font-size: 0.85rem; }

        /* --- STEP MATRIX BLOCKS & INTERACTION --- */
        .step-card {
            border: 1px solid #E2E8F0;
            border-radius: var(--radius-md);
            background: #fff;
            padding: 35px 24px;
            height: 100%;
            position: relative;
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .step-card:hover {
            border-color: var(--alpha-red);
            box-shadow: 0 15px 35px var(--alpha-red-glow);
            transform: translateY(-6px);
        }
        .step-number { position: absolute; top: 24px; right: 24px; font-size: 0.85rem; font-weight: 800; color: #CBD5E1; transition: color 0.3s; }
        .step-card:hover .step-number { color: var(--alpha-red); }
        .step-icon-box {
            width: 48px;
            height: 48px;
            background: var(--alpha-red-glow);
            color: var(--alpha-red);
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            margin-bottom: 24px;
            font-size: 1.25rem;
            transition: transform 0.3s ease;
        }
        .step-card:hover .step-icon-box { transform: scale(1.1) rotate(-8deg); }

        /* --- PLATFORM STATS STRIP --- */
        .stat-card {
            background: #ffffff;
            border: 1px solid #E2E8F0;
            border-radius: var(--radius-md);
            padding: 30px;
            text-align: center;
            box-shadow: 0 4px 20px rgba(0,0,0,0.01);
            transition: border-color 0.3s;
        }
        .stat-card:hover { border-color: var(--alpha-red); }
        .stat-number { font-size: 2.2rem; font-weight: 800; color: var(--alpha-dark); letter-spacing: -1px; }

        /* --- LEVEL 1 TO 9 DATASHEET ARCHITECTURE --- */
        .matrix-container-box {
            background: #ffffff;
            border: 1px solid #E2E8F0;
            border-radius: var(--radius-lg);
            padding: 35px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.02);
        }
        .table-matrix-alpha { margin-bottom: 0; }
        .table-matrix-alpha th {
            background: var(--alpha-bg);
            color: var(--alpha-slate);
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 16px 20px;
            border: none;
        }
        .table-matrix-alpha td {
            padding: 18px 20px;
            font-size: 0.92rem;
            vertical-align: middle;
            border-bottom: 1px solid #F1F5F9;
        }
        .table-matrix-alpha tr:last-child td { border-bottom: none; }
        .level-badge-pill {
            background: var(--alpha-dark);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 4px 12px;
            border-radius: 30px;
        }
        .level-badge-pill.top-tier { background: var(--alpha-red); }

        /* --- ESTIMATOR INTERACTIVE MODULE --- */
        .estimator-card {
            background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
            color: #fff;
            border-radius: var(--radius-lg);
            padding: 40px;
            position: relative;
            overflow: hidden;
        }
        .estimator-card::after {
            content: ''; position: absolute; bottom: -30%; left: -10%; width: 300px; height: 300px; background: var(--alpha-red); filter: blur(120px); opacity: 0.12;
        }

        /* --- ACCORDION FAQ SYSTEM --- */
        .accordion-item { border: 1px solid #E2E8F0 !important; border-radius: var(--radius-md) !important; margin-bottom: 14px; overflow: hidden; background: #fff; transition: border-color 0.3s; }
        .accordion-item:hover { border-color: #CBD5E1 !important; }
        .accordion-button { padding: 20px; font-weight: 700; color: var(--alpha-dark); background: #fff; box-shadow: none !important; }
        .accordion-button:not(.collapsed) { background-color: var(--alpha-bg); color: var(--alpha-red); }

        /* --- CORPORATE FOOTER BLOCK --- */
        .corporate-footer {
            background-color: #0B0F19;
            color: #94A3B8;
            border-top: 1px solid #1E293B;
            padding: 70px 0 35px 0;
            font-size: 0.9rem;
        }
        .footer-heading { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 20px; color: #ffffff; }
        .footer-links a { color: #94A3B8; text-decoration: none; transition: color 0.2s ease; }
        .footer-links a:hover { color: #fff; }

        /* --- AUTH MODAL DUAL FLIP --- */
        .auth-modal-dialog { max-width: 420px; margin: 1.75rem auto; }
        .auth-modal-content { background: transparent; border: none; }
        .flip-card { perspective: 1200px; width: 100%; min-height: 560px; }
        .flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d; }
        .flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
        .card-front, .card-back { position: absolute; width: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #ffffff; border-radius: var(--radius-lg); padding: 40px 32px; box-shadow: 0 25px 50px rgba(15, 23, 42, 0.15); }
        .card-back { transform: rotateY(180deg); }
        .btn-google { background: #ffffff; color: #334155; border: 1px solid #E2E8F0; font-weight: 600; font-size: 0.9rem; padding: 11px 16px; border-radius: 30px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background 0.2s, transform 0.2s; }
        .btn-google:hover { background: var(--alpha-bg); transform: scale(0.99); }
        .auth-divider { display: flex; align-items: center; text-align: center; color: #94A3B8; font-size: 0.75rem; margin: 24px 0; }
        .auth-divider::before, .auth-divider::after { content: ''; flex: 1; border-bottom: 1px solid #E2E8F0; }
        .auth-divider:not(:empty)::before { margin-right: 1em; }
        .auth-divider:not(:empty)::after { margin-left: 1em; }
        .form-control { border-radius: var(--radius-sm); padding: 11px 16px; border: 1px solid #CBD5E1; font-size: 0.92rem; transition: all 0.2s; }
        .form-control:focus { border-color: var(--alpha-red); box-shadow: 0 0 0 4px var(--alpha-red-glow); }


        @media (min-width: 992px) {

    .mobile-bottom-nav {
        display: none !important;
    }
}

/* Fix for Modal Stability and Mobile Scrolling */
.auth-modal-dialog {
    /* Ensures the modal doesn't get pushed around by background scrolling */
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
    margin: 1.75rem auto;
}

@media (max-width: 576px) {
    .auth-modal-dialog {
        margin: 0.5rem; /* Smaller margins on mobile */
        min-height: calc(100% - 1rem);
    }

    .auth-modal-content {
        /* Limits height to 90% of the screen height */
        max-height: 90vh;
        overflow-y: auto; /* Makes the content scrollable */
        overflow-x: hidden;
        border-radius: 20px;
    }

    /* Adjust the flip card to work with the scrollable container */
    .flip-card, 
    .flip-card-inner, 
    .card-front, 
    .card-back {
        height: auto !important;
        min-height: 100%;
    }
    
    .card-front, .card-back {
        position: relative !important; /* Standard flow for scrolling */
        backface-visibility: hidden;
        padding: 20px;
    }

    /* Ensure the back face is hidden correctly during scroll */
    .card-back {
        display: none; 
    }
    
    .flipped .card-front {
        display: none;
    }
    
    .flipped .card-back {
        display: block;
    }
}

/* Base Modal Styling Fixes */
.modal-content {
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}