/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

/* Logo styling */
.navbar-brand {
    color: var(--text-dark) !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    text-decoration: none !important;
    font-family: 'Fredoka', cursive !important;
    letter-spacing: 1px;
}

.navbar-brand:hover {
    color: var(--imperial-red) !important;
}

/* Navigation links */
.navbar-nav {
    gap: 1rem;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500 !important;
    transition: var(--transition) !important;
    position: relative !important;
    padding: 0.5rem 1rem !important;
    text-decoration: none !important;
}

.nav-link:hover {
    color: var(--imperial-red) !important;
}

/* Underline animation */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

.nav-link.active {
    color: var(--imperial-red) !important;
}


.navbar-toggler {
    border: none !important;
    padding: 0.5rem !important;
    margin-right: 0.5rem;
    min-width: 44px;
    min-height: 44px;
}

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

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
}

.navbar.transparent {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo h1 {
    margin: 0;
    line-height: 1;
}

/* Desktop Navigation */
@media (min-width: 992px) {
    .navbar-toggler {
        display: none;
    }
    
    .navbar-collapse {
        display: flex !important;
    }
    
    .navbar-nav {
        display: flex;
        list-style: none;
        margin: 0;
        padding: 0;
        align-items: center;
        gap: 1rem;
    }
    
    .nav-link {
        color: var(--text-dark) !important;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        padding: 0.5rem 1rem;
        border-radius: 25px;
    }
    
    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: var(--imperial-red) !important;
    }
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar .container {
        align-items: center;
        min-height: auto;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .navbar-brand {
        flex-shrink: 1;
        min-width: 0;
        margin-right: auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .navbar-toggler {
        flex-shrink: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .navbar-toggler {
        display: block !important;
        background: none;
        border: none !important;
        cursor: pointer;
        padding: 0.5rem !important;
        width: 40px;
        height: 40px;
        position: relative;
        z-index: 1001;
        margin: 0;
        align-self: center;
    }
    
    .navbar-toggler:focus {
        box-shadow: none !important;
    }
    
    /* Custom hamburger lines */
    .navbar-toggler-icon {
        display: none;
    }
    
    .navbar-toggler::before,
    .navbar-toggler::after,
    .navbar-toggler span {
        content: '';
        display: block;
        position: absolute;
        height: 2px;
        width: 22px;
        background: var(--text-dark);
        border-radius: 2px;
        left: 50%;
        transform: translateX(-50%);
        transition: 0.3s ease-in-out;
    }
    
    .navbar-toggler::before {
        top: 12px;
    }
    
    .navbar-toggler span {
        top: 18px;
    }
    
    .navbar-toggler::after {
        top: 24px;
    }
    
    /* X animation when open */
    .navbar-toggler[aria-expanded="true"]::before {
        top: 18px;
        transform: translateX(-50%) rotate(45deg);
    }
    
    .navbar-toggler[aria-expanded="true"] span {
        opacity: 0;
    }
    
    .navbar-toggler[aria-expanded="true"]::after {
        top: 18px;
        transform: translateX(-50%) rotate(-45deg);
    }
    
    /* Mobile menu with proper closing animation */
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        padding: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
        display: block !important;
    }

    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-item {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .navbar-collapse.show .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    /* Staggered delays only on opening */
    .navbar-collapse.show .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .navbar-collapse.show .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .navbar-collapse.show .nav-item:nth-child(3) { transition-delay: 0.2s; }
    .navbar-collapse.show .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .navbar-collapse.show .nav-item:nth-child(5) { transition-delay: 0.3s; }

    /* When closing, remove delays immediately */
    .navbar-collapse:not(.show) .nav-item {
        transition-delay: 0s !important;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        text-align: left;
        color: var(--text-dark) !important;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.3s ease;
        border-radius: 8px;
        position: relative;
    }

    .nav-link:hover,
    .nav-link.active {
        background: rgba(248, 150, 30, 0.1);
        color: var(--imperial-red) !important;
        transform: translateX(5px);
    }

    /* Remove underline animation on mobile */
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 576px) {
    .navbar .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 375px) {
    .navbar .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem !important;
    }
}














