/* Modern Header Styles */
.modern-header {
    background: white !important;
    border-radius: 15px;
    margin: 15px auto;
    max-width: 1200px;
    padding: 0;
    position: sticky;
    top: 20px;
    z-index: 1000;
    box-shadow: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 15px;
    position: relative;
}

/* Logo Styles */
.header-logo {
    order: 3; /* Right side in RTL */
}

.header-logo .logo img {
    height: 32px;
    width: auto;
}

/* Navigation Styles */
.header-nav {
    order: 2; /* Center */
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 40px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 8px 0;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #4CAF50;
}

/* Active page indicator */
.nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: #4CAF50;
    border-radius: 2px;
}

/* Header Actions (Login/Register Button) */
.header-actions {
    order: 1; /* Left side in RTL */
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn-login {
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-login:hover {
    background: #45a049;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-logout {
    background: transparent;
    color: #666;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
}

.btn-logout:hover {
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    order: 4;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: white;
    border-radius: 0 0 15px 15px;
    padding: 20px 30px;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    margin-bottom: 15px;
}

.mobile-nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    transition: color 0.3s ease;
}

.mobile-nav-link:hover {
    color: #4CAF50;
}

.mobile-nav-item.active .mobile-nav-link {
    color: #4CAF50;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-header {
        margin: 10px;
        border-radius: 10px;
    }
    
    .header-content {
        padding: 15px 20px;
    }
    
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        gap: 20px;
    }
    
    .btn-login {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .header-logo .logo img {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px 15px;
    }
    
    .btn-login {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .header-logo .logo img {
        height: 24px;
    }
    
    .mobile-menu {
        padding: 15px 20px;
    }
}

/* RTL Support */
[dir="rtl"] .header-content {
    direction: rtl;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

/* Smooth transitions */
.modern-header * {
    transition: all 0.3s ease;
}

/* Focus states for accessibility */
.btn-login:focus,
.btn-logout:focus,
.nav-link:focus,
.mobile-nav-link:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* Loading state */
.modern-header.loading {
    opacity: 0.7;
    pointer-events: none;
}
