/* ==========================================================================
   Waqt Al-Hadhara - header.css
   Glassmorphic Header, Navigation Links, and Hamburger Toggle
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-speed) var(--transition-ease);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

html.light-mode .site-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.site-header.scrolled {
    background-color: rgba(12, 13, 14, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

html.light-mode .site-header.scrolled {
    background-color: rgba(250, 248, 244, 0.95);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: all var(--transition-speed) var(--transition-ease);
}

.site-header.scrolled .container {
    height: 60px;
}

.logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Vision 2030 badge beside logo */
.header-vision-badge {
    height: 52px;
    width: auto;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.3s ease;
    margin-inline-start: 18px;
}

.header-vision-badge:hover {
    opacity: 1;
}

/* Desktop Navigation Link styles */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-speed) var(--transition-ease);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-gold);
    transition: width var(--transition-speed) var(--transition-ease);
}

.nav-link:hover, .nav-link.active {
    color: var(--color-text-primary);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Header CTA wrap */
.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Enforce uniform height across all header CTA elements */
.header-cta > .btn,
.header-cta > .btn-icon,
.header-cta > .lang-toggle {
    height: 48px;
}

/* Language Toggle — clean flag icons, no wrapper chrome */
.lang-toggle {
    position: relative;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.lang-toggle:hover {
    transform: scale(1.08);
}

.lang-flag {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    outline: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: scale(0.92);
    pointer-events: none;
}

.lang-flag.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* Theme Toggle Icon Button */
.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 184, 105, 0.15);
    color: var(--color-gold);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-ease);
    border-radius: 4px;
}

.btn-icon:hover {
    background: rgba(229, 184, 105, 0.1);
    border-color: var(--color-gold);
    transform: translateY(-2px);
}

html.light-mode .btn-icon {
    background: rgba(184, 134, 11, 0.06);
    border-color: rgba(184, 134, 11, 0.25);
}

html.light-mode .btn-icon:hover {
    background: rgba(184, 134, 11, 0.12);
}

/* Mobile Toggle Hamburger icon */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1010;
}

.mobile-nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--color-text-primary);
    margin-bottom: 6px;
    transition: all var(--transition-speed) var(--transition-ease);
}

.mobile-nav-toggle span:last-child {
    margin-bottom: 0;
}

/* Responsive configurations */
@media (max-width: 768px) {
    .d-none-mobile {
        display: none !important;
    }

    .site-header .container {
        height: 64px;
        gap: 10px;
    }

    .site-header.scrolled .container {
        height: 56px;
    }

    /* Logo + Vision 2030: enlarged, aligned to right (RTL flex-start = right side) */
    .logo-link {
        flex: 1;
        justify-content: flex-start;
    }

    .logo-img {
        height: 44px;
    }

    .header-vision-badge {
        height: 42px;
        margin-inline-start: 8px;
    }

    /* CTA group: compact, no extra padding */
    .header-cta {
        gap: 8px;
        flex-shrink: 0;
    }

    .header-cta > .btn-icon,
    .header-cta > .lang-toggle {
        width: 40px;
        height: 40px;
    }

    /* Show hamburger on mobile */
    .mobile-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 8px;
    }

    .mobile-nav-toggle span {
        width: 22px;
        margin-bottom: 0;
    }
}
