/* Navbar Base Styles */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(0px);
    background-color: transparent !important; /* Force transparency initially */
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Scrolled State (Glassmorphism) */
.navbar.scrolled {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dark Mode Scrolled State */
[data-bs-theme="dark"] .navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.85) !important; /* Slate-900 with opacity */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

/* Logo Styles */
#logo {
    width: 70px;
    height: 50px;
    background-image: url("../../images/sliders/ygn-blue.png");
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] #logo {
    background-image: url("../../images/sliders/ygn-white.png");
}

/* Nav Link Animations */
.nav-link {
    position: relative;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

/* Underline Animation */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    opacity: 0;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
    opacity: 1;
}

/* Dropdown Menu Premium Styles */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    margin-top: 1rem !important; /* Spacing from navbar */
    animation: fadeInUp 0.2s ease-out forwards;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: rgba(30, 41, 59, 0.95); /* Slate-800 */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.2s ease;
    font-weight: 400;
}

.dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    transform: translateX(5px);
    color: var(--bs-primary);
}

.dropdown-item i {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dropdown-item:hover i {
    opacity: 1;
}

/* Mobile Toggler */
.navbar-toggler {
    border: none;
    box-shadow: none !important;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrolled Text Colors and Brand Adaptation */
/* When transparent (top), if hero is dark, we might want light text. 
   But currently bootstrap handles text color via navbar-light/dark classes.
   We will rely on JS to toggle navbar-dark/light if we want dynamic contrast. 
   For now, assuming navbar-light (dark text) is default, which works on white/glass.
   For dark mode, bootstrap handles it. */