/* --- HEADER SPECIFIC CSS --- */

/* Font implementation */
.font-general-sans {
    font-family: 'Google Sans Flex', ui-sans-serif, system-ui, sans-serif;
}

.vanguard-navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03); /* Subtle shadow like Arkahub */
}

/* Base Nav Link Styling */
.navbar-nav .nav-item {
    margin: 0 0.4rem;
}
.navbar-nav .nav-link {
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    color: #1a1a1a; 
    font-size: 16px;
    padding: 10px 5px !important;
}

/* Remove default bootstrap caret */
.navbar-nav .dropdown-toggle::after {
    display: none; 
}

/* Font Awesome Icon Transition */
.nav-icon {
    font-size: 11px;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

/* Custom Dropdown Card Styling */
.custom-dropdown {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* Soft, premium shadow */
    padding: 10px;
    margin-top: 5px;
}

/* SVG Icon sizing for dropdown items */
.dropdown-svg {
    width: 40px;
    height: 40px;
    margin-right: 12px;
    object-fit: contain;
}

/* Dropdown Items Smooth Hover */
.custom-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease; /* Smooth background change */
}

.custom-dropdown .dropdown-item:hover {
    background-color: #f4f6f8; /* Soft gray hover */
    color: #000;
}

/* --- OUR LOCATIONS GRID STYLING --- */
.locations-menu {
    width: 450px; /* Wider box for cities */
    padding: 15px;
}
.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.location-item {
    background-color: #f8f9fa;
    color: #333;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}
.location-item:hover {
    background-color: #e9ecef;
    color: #000;
    transform: translateY(-2px);
}

/* --- PREMIUM GRADIENT CTA BUTTON --- */
.btn-gradient {
    background-image: linear-gradient(to right, #000000 0%, #20b038 51%, #000000 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 8px;
    transition: 0.5s;
    box-shadow: 0 4px 15px rgba(32, 176, 56, 0.2);
}
.btn-gradient:hover {
    background-position: right center; /* Slides the gradient on hover */
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(32, 176, 56, 0.4);
    transform: translateY(-1px);
}

/* --- DESKTOP HOVER LOGIC --- */
@media (min-width: 992px) {
    /* Make dropdown open on hover */
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.3s ease;
    }
    
    /* Rotate icon on hover */
    .nav-item.dropdown:hover .nav-icon {
        transform: rotate(180deg);
    }
}

/* Dropdown Fade-in Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* --- THE INVISIBLE BRIDGE (Fixes dropdown closing on hover) --- */
.custom-dropdown::before {
    content: "";
    position: absolute;
    top: -15px; /* This matches your margin-top */
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

/* --- RESPONSIVE LOGO AND MOBILE FIXES --- */
/* Mobile First: Smaller logo and button */
.brand-logo {
    height: 32px; 
    width: auto;
}

.mobile-cta {
    font-size: 13px;
    padding: 6px 12px;
}

/* Desktop: Restore standard sizes */
@media (min-width: 992px) {
    .brand-logo {
        height: 40px; 
    }
}

/* --- MOBILE & TABLET (OFFCANVAS & ACCORDION MENU) --- */
@media (max-width: 991.98px) {
    .locations-menu {
        width: 100%; 
    }
    .locations-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
    
    /* Override Bootstrap's instant dropdown to make it a smooth accordion */
    .navbar-nav .dropdown-menu {
        display: block !important; 
        max-height: 0;
        overflow: hidden;
        padding: 0;
        margin: 0;
        border: none;
        opacity: 0;
        transition: all 0.4s ease-in-out; /* Smooth sliding transition */
    }
    
    /* When clicked, expand it smoothly */
    .navbar-nav .dropdown-menu.show {
        max-height: 800px; /* Large enough to fit any sub-menu */
        padding: 10px 0 10px 15px;
        opacity: 1;
        margin-top: 5px;
    }

    /* Keep the sleek mobile styling for the dropdown container */
    .custom-dropdown.show {
        box-shadow: none; 
        border-left: 2px solid #20b038; 
        border-radius: 0;
    }

    /* Flip the Font Awesome icon when the mobile accordion is open */
    .nav-item.dropdown .nav-link.show .nav-icon {
        transform: rotate(180deg);
    }
}
