/* Navigation Styles - Extracted from header.php */

/* Main Header */
.main-header {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    gap: 2rem;
}

/* Logo takes fixed space */
.nav-brand {
    flex: 0 0 auto;
}

.nav-brand .brand-link {
    text-decoration: none;
    color: #333;
    display: block;
    transition: transform 0.3s ease;
}

.nav-brand .brand-link:hover {
    transform: translateY(-2px);
}

.nav-brand h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 0.15rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Menu centered in remaining space */
.nav-menu {
    flex: 1 1 auto;
    justify-content: center;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 6px;
    white-space: nowrap;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 2px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    transform: translateY(-2px);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Dropdown Menu */
.dropdown-arrow {
    margin-left: 0.5rem;
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.nav-item-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1001;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.nav-item-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.2s ease;
    position: relative;
    letter-spacing: 0.3px;
}

.dropdown-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: height 0.2s ease;
}

.dropdown-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    color: #667eea;
    padding-left: 1.75rem;
}

.dropdown-link:hover::before {
    height: 70%;
}

/* Right side container: Search + Auth */
.nav-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-search {
    flex: 0 0 auto;
}

.nav-auth {
    flex: 0 0 auto;
}

/* Hide mobile-only items on desktop */
.mobile-only {
    display: none;
}

/* Search Box Styles */
.search-form-header {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 0.25rem 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-form-header:focus-within {
    background: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    outline: none;
    width: 200px;
    transition: width 0.3s ease;
    box-shadow: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-input:focus {
    width: 280px;
    border: none;
    outline: none;
    box-shadow: none;
}

.search-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    transition: transform 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.search-button:hover {
    transform: scale(1.1);
    background: none;
}

.search-button:focus {
    outline: none;
}

.search-button svg {
    display: block;
}

/* Login/Logout Button Styles */
.nav-link-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.6rem 1.2rem !important;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-link-login:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.nav-link-logout {
    background: #dc3545;
    color: white !important;
    font-weight: 600;
    border-radius: 4px;
    padding: 0.6rem 1.2rem !important;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-link-logout:hover {
    background: #c82333 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    position: relative;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: #333;
    margin: 5px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem !important;
        flex-wrap: nowrap !important;
        min-height: 70px !important;
        gap: 0.5rem !important;
        display: flex !important;
    }
    
    .nav-toggle {
        display: flex !important;
        order: 3 !important;
        flex-shrink: 0 !important;
        margin-left: auto !important;
    }
    
    .nav-brand {
        order: 1 !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
    }
    
    .nav-brand h1 {
        font-size: 1.2rem !important;
    }
    
    .brand-subtitle {
        font-size: 0.5rem !important;
    }
    
    /* Hide menu by default - JavaScript will show it */
    .nav-menu {
        display: none;
    }
    
    /* When menu is active (opened by JavaScript) */
    .nav-menu.active {
        display: flex !important;
    }
    
    /* Mobile search - compact, fits between logo and hamburger */
    .nav-search {
        order: 2 !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
        max-width: none !important;
        width: auto !important;
    }
    
    .nav-right {
        order: 2 !important;
        flex: 0 0 auto !important;
        gap: 0.5rem !important;
    }
    
    .search-form-header {
        width: 110px !important;
        position: relative !important;
        overflow: visible !important;
        display: flex !important;
        align-items: center !important;
        height: 36px !important;
        padding: 0.15rem 0.35rem !important;
    }
    
    .search-input {
        width: 35px !important;
        height: 100% !important;
        padding: 0.4rem 32px 0.4rem 0.4rem !important;
        transition: width 0.3s ease, padding 0.3s ease !important;
        font-size: 0.85rem !important;
    }
    
    .search-input:focus {
        width: 140px !important;
        padding: 0.4rem 32px 0.4rem 0.8rem !important;
    }
    
    .search-button {
        position: absolute !important;
        right: 0.25rem !important;
        height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
        pointer-events: auto !important;
        padding: 0.25rem !important;
    }
    
    .search-button svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .search-input::placeholder {
        opacity: 0;
        transition: opacity 0.2s;
    }
    
    .search-input:focus::placeholder {
        opacity: 1;
    }
    
    /* Hide auth button on mobile - it is in the hamburger menu */
    .nav-auth {
        display: none !important;
    }
    
    /* Show mobile-only items in hamburger menu */
    .mobile-only {
        display: block !important;
    }
    
    /* Mobile menu login/logout buttons */
    .mobile-only .nav-link-login,
    .mobile-only .nav-link-logout {
        margin: 0.5rem 1.5rem !important;
        text-align: center !important;
        border-radius: 4px !important;
        padding: 0.75rem 1rem !important;
        text-transform: none !important;
        font-size: 0.9rem !important;
        letter-spacing: 0 !important;
        display: block !important;
        width: calc(100% - 3rem) !important;
    }
    
    .mobile-only .nav-link-login:hover,
    .mobile-only .nav-link-logout:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .nav-item {
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100% !important;
    }
    
    .nav-link {
        padding: 1rem 1.5rem !important;
        border-radius: 0 !important;
        justify-content: space-between !important;
        font-size: 0.9rem !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        width: 100% !important;
        display: flex !important;
    }
    
    .nav-link::after {
        display: none !important;
    }
    
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        background: #f8f9fa !important;
        display: none;
        border-radius: 0 !important;
        border: none !important;
        padding: 0 !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .nav-item-dropdown.active .dropdown-menu {
        display: block !important;
        width: 100% !important;
    }
    
    .nav-item-dropdown.active .dropdown-arrow {
        transform: rotate(180deg) !important;
    }
    
    .dropdown-link {
        padding: 0.75rem 2.5rem !important;
        font-size: 0.85rem !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }
    
    .dropdown-link::before {
        display: none !important;
    }
    
    .dropdown-link:hover {
        padding-left: 2.5rem !important;
        background: #e9ecef !important;
    }
    
    /* Hamburger Animation */
    .nav-toggle.active .hamburger:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .nav-toggle.active .hamburger:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .hamburger:nth-child(3) {
        transform: rotate(45deg) translate(-7px, -6px);
    }
}
