/**
 * public/assets/css/v2/header-v2.css
 * Unified Premium Header & Mobile Overlay
 * Final Precision Fixes: Button Symmetry & Visibility
 */

:root {
    --h-bg: #ffffff;
    --h-text: #0d0d0a;
    --h-muted: #6b6b66;
    --h-accent: #C9A84C;
    --h-border: rgba(0, 0, 0, 0.1);
    --h-radius: 12px;
    --h-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --h-bg: #0d0d0a;
    --h-text: #ffffff;
    --h-muted: #a0a09c;
    --h-border: rgba(255, 255, 255, 0.15);
}

.v2-header * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    padding-top: 72px !important;
}

.v2-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    height: 72px;
    display: flex;
    align-items: center;
    background: var(--h-bg);
    border-bottom: 1px solid var(--h-border);
    backdrop-filter: blur(12px);
    font-family: 'Manrope', 'Cairo', sans-serif;
    transition: all 0.4s ease;
}

.v2-header .container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    height: 44px;
    width: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
}

.brand-name {
    color: var(--h-text);
    font-size: 1.4rem;
    font-weight: 800;
}

/* Desktop Links */
.nav-links {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--h-muted);
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.4s var(--h-ease);
    position: relative;
    padding: 8px 0;
}

.nav-link:hover { color: var(--h-accent); transform: translateY(-2px); }

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--h-accent);
    transition: width 0.4s var(--h-ease);
}

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

.nav-cta {
    background: var(--h-accent);
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 99px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.2);
}

/* --- MOBILE OVERLAY (Final Precision Styling) --- */

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--h-bg);
    display: none;
    flex-direction: column;
    padding: 24px;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.5s var(--h-ease);
    font-family: 'Cairo', 'Manrope', sans-serif;
}

.mobile-overlay.is-active {
    display: flex !important;
    transform: translateY(0);
    opacity: 1;
}

.overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--h-border);
}

/* Close Button Visibility Fix */
#close-mobile-menu {
    background: transparent;
    border: none;
    color: var(--h-text); /* Matches theme color automatically */
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#close-mobile-menu span {
    font-size: 32px; /* Slightly larger for usability */
}

/* Unified Mobile Item Highlight */
.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.mobile-link {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--h-text);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 12px;
    transition: all 0.4s var(--h-ease);
}

[dir="rtl"] .mobile-link { text-align: right; }

.mobile-link:hover, .mobile-link:active {
    background: rgba(201, 168, 76, 0.08); 
    color: var(--h-accent);
    padding-inline-start: 24px;
}

.mobile-nav-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--h-border);
}

/* UNIFIED BUTTON SIZE SYSTEM */
.mobile-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    width: 100%;
}

.v2-theme-btn {
    flex: 1;
    height: 56px; /* FIXED HEIGHT for symmetry */
    background: var(--h-bg) !important;
    color: var(--h-text) !important;
    border: 1px solid var(--h-border) !important;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 800;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s var(--h-ease);
}

.v2-theme-btn:hover {
    border-color: var(--h-accent) !important;
    transform: translateY(-2px);
    background: rgba(201, 168, 76, 0.03) !important;
}

.v2-theme-btn span { font-size: 24px !important; }

.mobile-overlay .main-cta {
    background: var(--h-accent) !important;
    color: #ffffff !important;
    padding: 20px;
    text-align: center;
    border-radius: 14px;
    font-weight: 900;
    text-decoration: none;
    display: block;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.2);
}

/* Icon Support */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
}

[data-theme="light"] .dark-icon { display: block; }
[data-theme="light"] .light-icon { display: none; }
[data-theme="dark"] .dark-icon { display: none; }
[data-theme="dark"] .light-icon { display: block; }

@media (max-width: 1024px) {
    .v2-header .nav-desktop, .v2-header .nav-meta, .v2-header .nav-cta { display: none; }
    .v2-header .mobile-toggle { color: var(--h-text); cursor: pointer; }
}
