/* Header */
.header {
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: #a4bfcfbc;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 25px;
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    padding: 4px 8px;
    font-size: 0.9rem;
    color: #333;
    width: 200px;
}

.search-box input::placeholder {
    color: #94a3b8;
}

.search-box button {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* User Authentication Styles */
.user-auth {
    margin-left: 20px;
    position: relative;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.login-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.login-btn i {
    font-size: 16px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.user-info:hover {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
}

.user-name {
    color: #2563eb;
    font-weight: 500;
    font-size: 14px;
}

.user-info i {
    color: #2563eb;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-info.active i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.dropdown-item:hover {
    background: #f9fafb;
    color: #2563eb;
}

.dropdown-item:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #f3f4f6;
}

.dropdown-item i {
    font-size: 14px;
    width: 16px;
    text-align: center;
}

/* Styles for non-index pages header structure */
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu .user-name {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
}

.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    border: none;
}

.auth-btn.login-btn {
    background: #2563eb;
    color: white;
}

.auth-btn.login-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.auth-btn.logout-btn {
    background: #ef4444;
    color: white;
}

.auth-btn.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.auth-btn i {
    font-size: 16px;
}

/* Responsive adjustments for both header structures */
@media (max-width: 768px) {
    .nav-menu,
    .nav-list {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 20px;
        z-index: 999;
    }
    
    .nav-menu.active,
    .nav-list.active {
        display: flex;
    }
    
    .nav-menu li,
    .nav-list li {
        margin: 10px 0;
        width: 100%;
    }
    
    .nav-menu a,
    .nav-list a {
        display: block;
        padding: 10px;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }
    
    .nav-menu a:hover,
    .nav-list a:hover {
        background-color: #f8fafc;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .search-box {
        display: none;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .user-menu .user-name {
        display: none;
    }
    
    .nav-container {
        padding: 0 15px;
    }
}