/* ========== GOLD THEME VARIABLES ========== */
:root {
    --gold-primary: #d4a574;
    --gold-secondary: #f5e6d3;
    --gold-dark: #b8956a;
    --gold-glow: rgba(212, 165, 116, 0.3);
    --dark-bg: #0d0d0d;
    --dark-secondary: #1a1a1a;
    --dark-card: rgba(30, 30, 30, 0.95);
    --text-primary: #e8e8e8;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-gold: rgba(212, 165, 116, 0.3);
}

/* ========== UNIFIED DARK HEADER ========== */
.unified-header {
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid var(--border-gold);
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 30px;
    gap: 20px;
}

/* Brand Section */
.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.header-brand-logo {
    width: 155px;
    height: 51px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px;
    filter: brightness(1.2);
}

.header-brand-text {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
}

/* Navigation Links */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.header-nav-link:hover {
    color: var(--gold-primary);
    background: var(--gold-glow);
}

.header-nav-link.active {
    color: var(--gold-primary);
    background: var(--gold-glow);
}

.header-nav-link i {
    font-size: 1rem;
}

/* Language Switcher */
.header-lang {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-lang-btn {
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.header-lang-btn:hover {
    color: var(--gold-primary);
    background: var(--gold-glow);
}

.header-lang-btn.active {
    color: var(--dark-bg);
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
}

/* Auth Buttons */
.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-btn-login {
    padding: 8px 20px;
    border: 1px solid var(--gold-primary);
    background: transparent;
    color: var(--gold-primary);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-btn-login:hover {
    background: var(--gold-glow);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--gold-glow);
}

.header-btn-register {
    padding: 8px 20px;
    border: none;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--dark-bg);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--gold-glow);
}

/* User Dropdown (when logged in) */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: rgba(212, 165, 116, 0.1);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.header-user:hover {
    background: var(--gold-glow);
    border-color: var(--gold-primary);
}

.header-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-size: 0.8rem;
    font-weight: 700;
}

.header-user-name {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.header-user-dropdown {
    color: var(--gold-primary);
}

/* Mobile Toggle */
.header-mobile-toggle {
    display: none;
    padding: 8px;
    background: var(--gold-glow);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    color: var(--gold-primary);
    font-size: 1.3rem;
    cursor: pointer;
}

/* Mobile Menu */
.header-mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
    padding: 20px;
    border-top: 1px solid var(--border-gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-mobile-menu.show {
    display: block;
}

.header-mobile-menu .header-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    margin-bottom: 15px;
}

.header-mobile-menu .header-nav-link {
    padding: 12px 15px;
}

.header-mobile-menu .header-lang {
    justify-content: center;
    margin-bottom: 15px;
}

.header-mobile-menu .header-auth {
    flex-direction: column;
}

.header-mobile-menu .header-btn-login,
.header-mobile-menu .header-btn-register {
    width: 100%;
    justify-content: center;
}

/* Dropdown menu styling */
.dropdown-menu {
    background: var(--dark-card);
    border: 1px solid var(--border-gold);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
    color: var(--text-primary);
    transition: all 0.3s;
}

.dropdown-item:hover {
    background: var(--gold-glow);
    color: var(--gold-primary);
}

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.dropdown-divider {
    border-color: var(--border-gold);
}

/* ========== MAIN CONTENT ========== */
main {
    background: var(--dark-bg);
    min-height: calc(100vh - 200px);
}

/* ========== FOOTER ========== */
.public-footer {
    background: linear-gradient(135deg, var(--dark-secondary) 0%, var(--dark-bg) 100%);
    color: var(--text-secondary);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-gold);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-brand-logo {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: contain;
}

.footer-brand-logo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-bg);
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand-text {
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gold-glow);
    border: 1px solid var(--border-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-primary);
    font-size: 1.1rem;
    transition: all 0.3s;
}

.footer-social a:hover {
    background: var(--gold-primary);
    color: var(--dark-bg);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px var(--gold-glow);
}

.footer-title {
    color: var(--gold-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold-primary), transparent);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--gold-primary);
    padding-left: 5px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.footer-contact i {
    color: var(--gold-primary);
    font-size: 1.1rem;
    width: 20px;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-gold);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-bottom-links a:hover {
    color: var(--gold-primary);
}

/* ========== AUTH MODALS ========== */
.auth-modal .modal-content {
    background: var(--dark-card);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.auth-modal .modal-header {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

.auth-modal .modal-title {
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 1.2rem;
}

.auth-modal .btn-close {
    filter: brightness(0);
}

.auth-modal .modal-body {
    padding: 30px;
}

.auth-form .form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-form .input-group {
    position: relative;
}

.auth-form .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-primary);
    z-index: 10;
    pointer-events: none;
}

.auth-form .form-control {
    padding: 12px 15px 12px 45px;
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transition: all 0.3s;
}

.auth-form .form-control:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px var(--gold-glow);
    background: rgba(255, 255, 255, 0.08);
}

    .auth-form .form-control::placeholder {
        color: rgba(255, 255, 255, 0.35);
        font-style: italic;
    }

.auth-form .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
}

.auth-form .password-toggle:hover {
    color: var(--gold-primary);
}

.auth-form .form-check-input {
    background-color: transparent;
    border-color: var(--border-gold);
}

.auth-form .form-check-input:checked {
    background-color: var(--gold-primary);
    border-color: var(--gold-primary);
}

.auth-form .form-check-label {
    color: var(--text-secondary);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
    color: var(--dark-bg);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--gold-glow);
}

.auth-btn.register-btn {
    background: linear-gradient(135deg, var(--gold-primary), var(--gold-dark));
}

.auth-modal .text-muted {
    color: var(--text-secondary) !important;
}

.auth-modal a {
    color: var(--gold-primary);
    text-decoration: none;
}

.auth-modal a:hover {
    color: var(--gold-secondary);
}

/* ========== RTL FIX FOR AUTH FORMS ========== */
[dir="rtl"] .auth-form .input-icon {
    left: auto;
    right: 15px;
}

[dir="rtl"] .auth-form .form-control {
    padding: 12px 45px 12px 15px;
}

[dir="rtl"] .auth-form .password-toggle {
    right: auto;
    left: 15px;
}

/* ========== RTL FIX FOR FOOTER ========== */
[dir="rtl"] .footer-title::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .footer-links a:hover {
    padding-left: 0;
    padding-right: 5px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
    .header-container {
        padding: 12px 20px;
    }
}

@media (max-width: 991px) {
    .header-container {
        padding: 12px 15px;
    }

    .header-container > .header-nav,
    .header-container > .header-lang,
    .header-container > .header-auth {
        display: none;
    }

    .header-mobile-toggle {
        display: block;
    }

    .header-mobile-menu .header-lang {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .header-mobile-menu .header-auth {
        display: flex;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-bottom-links {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .header-brand-text {
        font-size: 1rem;
    }

    .header-brand-logo {
        width: 38px;
        height: 38px;
    }
}

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.header-mobile-menu .header-lang {
    flex-wrap: wrap;
    justify-content: center;
}

.header-mobile-menu .header-lang-btn {
    flex: 0 0 auto;
    min-width: 50px;
}
