/* ====================
   NAVBAR STYLES
   ==================== */
.main-navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    /* Zero padding for maximum slimness */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 50px;
    /* Force specific low height */
    display: flex;
    align-items: center;
}

.main-navbar.scrolled {
    height: 40px;
    /* Even smaller on scroll */
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px -1px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.nav-logo img {
    height: 32px;
    /* Small logo */
    width: auto;
    transition: height 0.3s ease;
    padding: 2px 0;
}

/* Shrink logo on scroll */
.main-navbar.scrolled .nav-logo img {
    height: 26px;
    /* Tiny logo on scroll */
}

.logo-text {
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2563eb;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1e293b;
    cursor: pointer;
}

/* Mobile Menu Overlay - Global Hide */
.mobile-menu-overlay {
    display: none;
}

/* Responsive Navbar */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
        padding: 0;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: transparent;
    }

    .mobile-menu-btn:active {
        background: #f1f5f9;
    }

    /* Mobile Menu Overlay - Active on Mobile */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 0;
        overflow-y: auto;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Header inside Menu */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem 2rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-logo img {
        height: 36px;
    }

    .close-menu-btn {
        background: #f1f5f9;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #1e293b;
        cursor: pointer;
        transition: transform 0.2s, background 0.2s;
    }

    .close-menu-btn:active {
        transform: scale(0.9);
        background: #e2e8f0;
    }

    /* Mobile Search */
    .mobile-search-container {
        padding: 1.5rem 2rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-search-form {
        position: relative;
        width: 100%;
    }

    .mobile-search-input {
        width: 100%;
        padding: 16px 20px;
        padding-left: 50px;
        border-radius: 16px;
        border: 1px solid #e2e8f0;
        background: #f8fafc;
        font-size: 1rem;
        font-family: 'Work Sans', sans-serif;
        color: #1e293b;
        transition: all 0.3s;
        box-sizing: border-box;
        -webkit-appearance: none;
    }

    .mobile-search-input:focus {
        background: #fff;
        border-color: #2563eb;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
        outline: none;
    }

    .mobile-search-icon {
        position: absolute;
        left: 20px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 1.1rem;
        pointer-events: none;
    }

    /* Menu Links */
    .mobile-links {
        display: flex;
        flex-direction: column;
        padding: 2rem;
        gap: 0.5rem;
    }

    .mobile-link {
        font-family: 'Merriweather', serif;
        font-size: 1.5rem;
        font-weight: 500;
        color: #1e293b;
        text-decoration: none;
        padding: 10px 0;
        transition: color 0.2s, transform 0.2s;
        display: block;
        transform: translateX(-10px);
        opacity: 0;
    }

    .mobile-menu-overlay.active .mobile-link {
        transform: translateX(0);
        opacity: 1;
    }

    /* Staggered Animation Delays */
    .mobile-menu-overlay.active .mobile-link:nth-child(1) {
        transition-delay: 0.1s;
    }

    .mobile-menu-overlay.active .mobile-link:nth-child(2) {
        transition-delay: 0.15s;
    }

    .mobile-menu-overlay.active .mobile-link:nth-child(3) {
        transition-delay: 0.2s;
    }

    .mobile-menu-overlay.active .mobile-link:nth-child(4) {
        transition-delay: 0.25s;
    }

    .mobile-menu-overlay.active .mobile-link:nth-child(5) {
        transition-delay: 0.3s;
    }

    .mobile-menu-overlay.active .mobile-link:nth-child(6) {
        transition-delay: 0.35s;
    }

    .mobile-link:active {
        color: #2563eb;
        transform: scale(0.98);
    }

    .mobile-divider {
        height: 1px;
        background: rgba(0, 0, 0, 0.05);
        margin: 1rem 0;
        width: 100%;
    }

    /* Social & Footer */
    .mobile-footer {
        margin-top: auto;
        padding: 2rem;
        background: #f8fafc;
        border-top: 1px solid #e2e8f0;
    }

    .mobile-social {
        display: flex;
        gap: 1.5rem;
        justify-content: center;
        margin-bottom: 2rem;
    }

    .social-icon {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #1e293b;
        font-size: 1.2rem;
        text-decoration: none;
        border: 1px solid #e2e8f0;
        transition: all 0.2s;
    }

    .social-icon:active {
        transform: scale(0.95);
        border-color: #2563eb;
        color: #2563eb;
    }
}