﻿/* Navbar CSS */
/* Fixed navbar that stays at top of viewport */
:root {
    --site-max-width: 1200px;
    --site-padding: 24px;
}
.navbar {
    background: transparent;
    border: none;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 1;
    z-index: 1000
}

/* The nav box */
.nav-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: 80px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    max-width: var(--site-max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--site-padding);
}

/* Mobile: full width, no rounding */
@media (max-width: 768px) {
    .nav-container {
        width: 100%;
        max-width: none;
        border-radius: 0;
        padding: 0 16px;
    }
}

/* When scrolling - just reduce opacity by 30% */
.navbar.scrolled {
    opacity: 0.8;
}

    .navbar.scrolled .nav-container {
        /* No changes to container when scrolled */
    }

/* Logo styling */
.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .nav-logo:hover {
        color: #007bff;
        text-decoration: none;
    }

/* Desktop menu */
.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
}

/* Navigation links */
.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .nav-link:hover {
        background: #f8f9fa;
        color: #333;
        text-decoration: none;
        transform: translateY(-1px);
    }

/* User section */
.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

@media (max-width: 480px) {
    .nav-user {
        gap: 10px;
    }
}

/* User dropdown */
.user-dropdown {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

    .user-btn:hover {
        background: #f8f9fa;
        color: #333;
    }

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100%);
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1001;
    overflow: hidden;
}

.user-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content a,
.logout-btn {
    display: block;
    padding: 12px 16px;
    color: #666;
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    border-bottom: 1px solid #f8f9fa;
}

    .dropdown-content a:last-child,
    .logout-btn:last-child {
        border-bottom: none;
    }

    .dropdown-content a:hover,
    .logout-btn:hover {
        background: #f8f9fa;
        color: #333;
    }

/* Login/Signup buttons */
.login-btn {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap;
}

    .login-btn:hover {
        background: #f8f9fa;
        color: #333;
        text-decoration: none;
    }

@media (max-width: 768px) {
    .login-btn {
        display: none;
    }
}

.signup-btn {
    background: #007bff;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: 2px solid #007bff;
}

    .signup-btn:hover {
        background: #0056b3;
        border-color: #0056b3;
        color: white;
        text-decoration: none;
        transform: translateY(-1px);
    }

@media (max-width: 768px) {
    .signup-btn {
        display: none;
    }
}

/* Mobile toggle button */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    color: #666;
}

    .mobile-toggle:hover {
        background: #f8f9fa;
    }

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
}

/* Mobile menu */
.mobile-menu {
    display: none;
    background: white;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px;
    position: relative;
    z-index: 999;
}

    .mobile-menu a,
    .mobile-logout {
        display: block;
        padding: 15px 0;
        color: #666;
        text-decoration: none;
        border-bottom: 1px solid #f8f9fa;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
        font-size: 16px;
        cursor: pointer;
        transition: color 0.2s ease;
    }

        .mobile-menu a:last-child,
        .mobile-logout:last-child {
            border-bottom: none;
        }

        .mobile-menu a:hover,
        .mobile-logout:hover {
            color: #333;
        }

/* Responsive adjustments */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 12px;
    }

    .nav-logo {
        font-size: 1.3rem;
    }

    .mobile-menu {
        padding: 16px 12px;
    }
}

@media (max-width: 350px) {
    .nav-container {
        padding: 0 8px;
    }

    .nav-logo {
        font-size: 1.2rem;
    }
}
