:root {
    --brand-navy: #022e47;
    --brand-orange: #f68f1d;
    --brand-pink: #ea3b60;
    
    /* Dedicated Dark Theme Variables strictly enforced */
    --text-main: #e6e6e6;
    --nav-bg-scrolled: rgba(1, 26, 42, 0.95);
    --nav-mobile-bg: #022e47;
    
    --vf-grad: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange) 65%, var(--brand-pink) 100%);
    --font-body: 'Work Sans', sans-serif;
}

/* --- 1. NAVBAR STYLING --- */
.navbar-prestige {
    background: transparent; 
    padding: 1.5rem 0;
    transition: all 0.4s ease-in-out;
    position: fixed !important; /* CRITICAL FIX: Make the entire navbar the absolute positioning anchor */
    width: 100%;
}

.navbar-prestige.scrolled {
    padding: 15px 0;
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); 
    box-shadow: 0 4px 20px rgba(0,0,0, 0.3);
}

.nav-link {
    font-family: var(--font-body); 
    font-weight: 700; 
    color: var(--text-main) !important;
    margin: 0 8px; 
    position: relative; 
    transition: color 0.3s ease-in-out;
    padding-bottom: 5px; 
    white-space: nowrap; 
}

.nav-link:hover, .nav-link.active { color: #f68f1d !important; }

.nav-link::after {
    content: '';
    position: absolute;
    width: 0; 
    height: 3px; 
    bottom: 0;
    left: 0;
    background: var(--vf-grad);
    transition: width 0.3s ease-in-out;
    border-radius: 2px; 
}

.nav-link:hover::after, .nav-link.active::after { width: 100%; }

/* --- 2. NAVBAR CONTACT BUTTON --- */
.btn-nav-contact {
    background: var(--vf-grad); 
    color: white !important; 
    padding: 8px 22px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-family: var(--font-body);
    font-weight: 700; 
    font-size: 0.8rem; 
    letter-spacing: 1px;
    text-transform: uppercase; 
    display: inline-flex; 
    align-items: center; 
    border: none; 
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 10px rgba(246, 143, 29, 0.2);
    white-space: nowrap; 
}

.btn-nav-contact:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 20px rgba(246, 143, 29, 0.4); 
}

/* --- 3. BRAND LOGO --- */
.navbar-brand .brand-logo {
    height: auto; 
    max-height: 70px !important; /* Forcefully shrunk for desktop */
    max-width: 100%; 
    width: auto !important;
    object-fit: contain;
    display: block;
    transition: all 0.3s ease;
}

/* --- 4. ARROW FIX & ALIGNMENT --- */
.genz-nav-link { display: inline-flex !important; align-items: center; gap: 6px; }
.genz-nav-link::after { display: none !important; }
.nav-arrow { font-size: 0.7rem; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-link.show .nav-arrow, .dropdown:hover .nav-arrow { transform: rotate(180deg); }

/* --- 5. DESKTOP & TABLET DROPDOWN --- */
@media (min-width: 992px) {
    .custom-nav-dropdown {
        position: relative; 
    }
    
    .genz-dropdown {
        position: absolute !important;
        top: calc(100% + 5px) !important; 
        left: 50%;
        transform: translateX(-50%) scale(0.9) translateY(-10px); 
        background: rgba(2, 46, 71, 0.95); 
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 20px; 
        padding: 12px;
        min-width: 240px;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6); 
        margin-top: 0 !important;
        animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }
}

@keyframes popIn {
    100% { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

.genz-drop-item {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main) !important;
    padding: 10px 18px;
    border-radius: 14px; 
    margin-bottom: 4px;
    transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1); 
    background: transparent;
}
.genz-drop-item:last-child { margin-bottom: 0; }
.genz-drop-item:hover, .genz-drop-item.active {
    background: var(--vf-grad);
    color: white !important;
    transform: scale(0.97); 
}

/* --- 6. UNIFIED MOBILE RESPONSIVENESS --- */
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile & iPad Portrait View (Up to 991px) */
@media (max-width: 991px) {
    .navbar-brand .brand-logo { 
        max-height: 80px !important; /* Forcefully shrunk for mobile */
        height: 80px !important;
    }
    
    .btn-nav-contact {
        padding: 7px 15px; 
        font-size: 0.75rem; 
    }

    /* CRITICAL FIX: Clear the anchor from container, let the parent .navbar-prestige handle it */
    .navbar > .container-fluid, 
    .navbar > .container-lg {
        position: static !important;
    }

    .navbar-collapse {
        position: absolute !important;
        top: 100% !important; /* Safely clears the bottom of the entire navbar */
        right: 1.5rem !important; /* Pins it to the right, aligning with container padding */
        left: auto !important; 
        width: 250px !important; 
        max-width: 90vw; 
        margin-top: 5px !important; /* Slight breathing room below nav */
        
        background: var(--nav-mobile-bg) !important; 
        padding: 15px 20px;
        border-radius: 12px !important; 
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.8); 
        border: 1px solid rgba(246, 143, 29, 0.3); 
        z-index: 9999 !important; /* Forces it above all other content */
    }

    .navbar-collapse:not(.show) { display: none !important; }
    .navbar-collapse.collapsing, 
    .navbar-collapse.show {
        display: block !important;
        height: auto !important; 
        transform-origin: top right; 
        animation: popDownRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    .nav-item { 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
        padding: 10px 0; 
        width: 100%; 
    }
    .nav-item:last-child { border-bottom: none; }
    
    .navbar-nav { 
        align-items: flex-end !important; 
        text-align: right; 
    }

    .genz-dropdown {
        position: static !important; /* Prevents nested absolute position bugs */
        background: rgba(0, 0, 0, 0.2); 
        border: none;
        box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
        border-radius: 12px;
        padding: 8px;
        margin-top: 10px !important;
        width: 100%;
        min-width: auto;
    }
    
    .genz-drop-item {
        padding: 8px 12px;
        font-size: 0.9rem;
        text-align: right; 
    }
    
    .genz-drop-item:hover, .genz-drop-item.active {
        transform: scale(1);
        background: rgba(246, 143, 29, 0.15); 
        color: #f68f1d !important;
    }
}

/* Micro-Mobile Fixes (Extremely narrow phones like iPhone SE) */
@media (max-width: 480px) {
    .navbar-brand .brand-logo { 
        max-height: 50px !important; 
        height: 50px !important;
        min-width: auto; 
    }
    
    .btn-nav-contact {
        padding: 6px 12px; 
        font-size: 0.7rem; 
    }
    
    .navbar-toggler-icon {
        width: 1.3em; 
        height: 1.3em;
    }
    
    .navbar-collapse {
        right: 1rem !important; /* Adjust padding for smaller screens */
    }
}

/* Right-aligned Dropdown Animation */
@keyframes popDownRight {
    0% { opacity: 0; transform: scale(0.9) translateY(-10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}