/* ============================================================
 * header.css — Top bar, main header, navigation, language picker,
 * mobile menu. Canonical source — overrides per-page CSS for the
 * shared chrome.
 * ============================================================ */

/* Top bar */
.top-bar {
    background: var(--navy-dark, #07111c);
    color: var(--white, #fff);
    padding: 0.4rem 0;
    font-size: 0.8rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}
.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    flex-wrap: wrap;
    gap: 1rem;
}
.top-bar-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.top-bar-info span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--white, #fff);
}
.top-bar-info i { color: var(--gold, #b8942a); }
.top-bar-info a { color: var(--white, #fff); }

/* Main header */
.header {
    background: var(--white, #fff);
    position: fixed;
    top: 32px;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.4s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid #eee;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 60px;
    height: 90px;
}
.logo img { height: 65px; width: auto; }

/* Desktop nav */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    height: 100%;
    flex: 1;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.nav-menu a {
    text-decoration: none;
    color: var(--gray, #6b7280);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: color 0.25s;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    padding: 0;
}
.nav-num {
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    margin-bottom: 2px;
    transition: color 0.25s;
}
.nav-menu a:hover { color: var(--navy, #0d1b2a); }
.nav-menu a:hover .nav-num { color: var(--navy, #0d1b2a); }
.nav-menu a.active { color: var(--navy, #0d1b2a) !important; font-weight: 600; }
.nav-menu a.active .nav-num { color: var(--navy, #0d1b2a) !important; }
.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--nav-red, #d9534f);
}

.btn-cta {
    background: var(--gold, #b8942a);
    color: var(--white, #fff) !important;
    padding: 0.6rem 1.4rem !important;
    border-radius: 2px;
    font-weight: 600;
    transition: all 0.25s;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    margin-left: 1rem;
}
.btn-cta:hover {
    background: var(--gold-light, #e8c45c);
    color: var(--navy, #0d1b2a) !important;
    transform: translateY(-2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Language dropdown */
.language-dropdown { position: relative; }
.lang-btn {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: var(--navy, #0d1b2a);
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s;
    min-height: 44px;
}
.lang-btn:hover { background: #f9fafb; }
.flag-icon {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.lang-btn i {
    font-size: 0.7rem;
    margin-left: 0.3rem;
    transition: transform 0.2s;
}
.lang-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white, #fff);
    min-width: 220px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 4px;
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(0,0,0,0.15));
    z-index: 1002;
    border: 1px solid #e5e7eb;
    margin-top: 0.5rem;
}
.lang-dropdown-content.show { display: block; }
.lang-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    cursor: pointer;
    color: var(--navy, #0d1b2a);
    font-size: 0.9rem;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
}
.lang-option:last-child { border-bottom: none; }
.lang-option:hover { background: #f9fafb; }
.lang-option.is-active {
    background: #fef9e7;
    font-weight: 600;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(0,0,0,0.1);
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--navy, #0d1b2a);
    padding: 0.4rem 0.6rem;
    border-radius: 2px;
    min-height: 44px;
    min-width: 44px;
}

#mobileMenu {
    display: none;
    position: fixed;
    top: 122px;
    left: 0;
    right: 0;
    background: var(--white, #fff);
    padding: 1rem;
    z-index: 999;
    box-shadow: var(--shadow, 0 4px 20px rgba(0,0,0,0.1));
    border-bottom: 1px solid #eee;
    max-height: calc(100vh - 122px);
    overflow-y: auto;
}
#mobileMenu.active { display: block; }
#mobileMenu a {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 0;
    color: var(--navy, #0d1b2a);
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    min-height: 44px;
}
#mobileMenu a .nav-num {
    display: inline;
    margin-right: 10px;
    margin-bottom: 0;
}

/* RTL chrome adjustments */
html[dir="rtl"] .top-bar-content,
html[dir="rtl"] .header-content { direction: rtl; }
html[dir="rtl"] .btn-cta { margin-left: 0; margin-right: 1rem; }
html[dir="rtl"] .lang-btn i { margin-left: 0; margin-right: 0.3rem; }
html[dir="rtl"] .lang-dropdown-content { right: auto; left: 0; }
html[dir="rtl"] #mobileMenu a .nav-num { margin-right: 0; margin-left: 10px; }
