.navbar-blur {
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.85);
}

nav ul {
    position: relative;
}

.nav-indicator {
    position: absolute;
    bottom: -8px;
    left: 0;
    height: 2px;
    background-color: #FFD700;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px #FFD700;
    margin: 0 !important;
}

.nav-link.active {
    color: #FFD700;
}

/* Mobile Menu Styles */
#mobile-menu {
    height: auto;
    max-height: 0;
    overflow: hidden;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.92);
    /* Slightly smaller blur for mobile menu to make content clearer */
    backdrop-filter: blur(5px);
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
    z-index: 60;
}

#mobile-menu ul {
    padding: 1rem 1rem;
    align-items: flex-start !important;
    /* reduce vertical spacing between items (override Tailwind space-y-6) */
    gap: 0.25rem;
}

#mobile-menu ul > li {
    margin: 0.25rem 0 !important;
}

#mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

#menu-icon {
    position: relative;
    transition: all 0.3s ease;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    /* override larger Tailwind text classes on mobile */
    font-size: 1rem !important;
    /* default color for mobile links (override Tailwind text-gold) */
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
}

/* Dot before each mobile nav link. Uses currentColor so it follows active/inactive color. */
.mobile-nav-link::before {
    content: '• ';
    margin-right: 0.3rem;
    color: currentColor;
}

/* Active mobile link styling: gold color and underline */
.mobile-nav-link.active {
    color: #FFD700 !important;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.mobile-nav-link.active::after {
    content: '';
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, #FFD700, transparent);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.mobile-nav-link:hover::before {
    transform: scaleY(1);
}

.mobile-nav-link:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateX(8px);
    color: #FFD700 !important;
}

#mobile-menu.active {
    /* Use viewport-relative height so the menu doesn't cover more than ~48% */
    max-height: 48vh;
    opacity: 1;
    border-top: 2px solid #FFD700;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

/* Overlay used to dim the page when mobile menu is open. It sits under the navbar and mobile menu. */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 45;
    pointer-events: none;
}
.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Dim the navbar slightly when menu is open to give focus to menu/navbar */
.navbar.dimmed {
    filter: brightness(0.85);
}

#mobile-menu.active .mobile-nav-link {
    animation: slideInLeft 0.4s ease forwards;
}

#mobile-menu.active .mobile-nav-link:nth-child(1) {
    animation-delay: 0.05s;
}

#mobile-menu.active .mobile-nav-link:nth-child(2) {
    animation-delay: 0.1s;
}

#mobile-menu.active .mobile-nav-link:nth-child(3) {
    animation-delay: 0.15s;
}

#mobile-menu.active .mobile-nav-link:nth-child(4) {
    animation-delay: 0.2s;
}

#mobile-menu.active .mobile-nav-link:nth-child(5) {
    animation-delay: 0.25s;
}

#mobile-menu.active .mobile-nav-link:nth-child(6) {
    animation-delay: 0.3s;
}

#mobile-menu.active .mobile-nav-link:nth-child(7) {
    animation-delay: 0.35s;
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}