/*
* =========================================
* CUSTOM NAVBAR STYLES
* =========================================
*/

/* --- 1. Root Variables --- */
:root {
    --navbar-bg: #000000;
    /* --brand-primary: #ec73fc; */
    --text-light: #f8f9fa;
    --text-muted: #adb5bd;
    --dropdown-bg: rgba(33, 37, 41, 0.85); /* The semi-transparent dropdown color */
    --font-navigation: 'Poppins', sans-serif;
}

/* --- 2. General Navbar Layout --- */
#mainNavbar {
    background-color: var(--navbar-bg);
    padding: 20px 0;
    transition: background-color 0.4s ease, padding 0.4s ease;
    font-family: var(--font-navigation);
}

#mainNavbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* --- 3. Navigation Links --- */
/* Combined styles for nav links into one block */
.nav-link {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 16px;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--text-light); /* Keep text color same, let underline do the work */
}

/* Underline animation on hover/focus */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--brand-primary);
    transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 60%;
}

/* Active & Open Dropdown Link Styles */
.nav-link.active,
.nav-link.dropdown-toggle.show {
    color: var(--brand-primary);
}

.nav-link.active::after,
.nav-link.dropdown-toggle.show::after {
    width: 60%;
}

/* --- 4. Dropdown Menu --- */
.dropdown-menu {
    background-color: var(--dropdown-bg);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 0.75rem 0;
    animation: fadeInDown 0.4s ease-out;
}

.dropdown-item {
    color: var(--text-muted);
    padding: 0.6rem 1.5rem;
    transition: color 0.3s ease;
    background-color: transparent !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--brand-primary);
}

/* Hides the default Bootstrap dropdown arrow */
/* .dropdown-toggle::after {
    display: none;
} */

/* Underline animation on hover/focus */
.dropdown-toggle::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--brand-primary);
    transition: width 0.4s ease;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    border-bottom: 0;

}

/* --- 5. Social Icons --- */
.navbar-social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icon:hover {
    color: var(--brand-primary);
    transform: translateY(-2px);
}

/* --- 6. Animations --- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
MOBILE NAVIGATION FIX
========================================= */
#mainNavbar .navbar-toggler-icon {
    background-image: var(--bs-navbar-toggler-icon-bg) !important;
}

@media all and (min-width: 768px) { 
    .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0; 
    }

    .dropdown > .dropdown-toggle:active {
        /* Prevents the link from being clicked on hover */
        pointer-events: none;
    }
}

@media (max-width: 767.98px) {
    /*
    This targets the nav links ONLY when the navbar is collapsed on mobile.
    */
    .navbar-collapse .nav-link {
        display: inline-block;
        padding-left: 0;
        padding-right: 0;
    }

    .navbar .navbar-toggler {
        box-shadow: none !important;
        background: #000000;
        border: none;
        border-radius: 0;
    }
}