/* ============================================================
   VAIBHAVI STUDIOS — HEADER STYLES
   File: css/header.css
   ============================================================ */

/* Scoped reset */
.site-header *,
.site-header *::before,
.site-header *::after,
.mobile-menu *,
.mobile-menu *::before,
.mobile-menu *::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============ HEADER BAR ============ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 9999;
    background: rgba(8, 8, 8, 0.55);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.4s ease, border-color 0.4s ease;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    letter-spacing: -0.022em;
}

.site-header.scrolled {
    background: rgba(5, 5, 5, 0.85);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.header-inner {
    max-width: 1400px;
    height: 100%;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* ============ LOGO ============ */
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f5f5f7;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.03em;
    flex-shrink: 0;
    transition: opacity 0.25s;
}

.header-logo:hover { opacity: 0.85; }

.header-logo .mark {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: linear-gradient(135deg, #E50914 0%, #ff3a44 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.05em;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
    position: relative;
    overflow: hidden;
}

.header-logo .mark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.25) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.header-logo:hover .mark::before {
    transform: translateX(100%);
}

.header-logo .name {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.header-logo .name .sub {
    font-size: 9px;
    font-weight: 700;
    color: #E50914;
    letter-spacing: 2px;
    text-transform: uppercase;
    transform: translateY(-4px);
}

/* ============ NAV ============ */
.header-nav {
    display: flex;
    list-style: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.header-nav li { position: relative; }

.header-nav a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    color: #d2d2d7;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: -0.01em;
    border-radius: 100px;
    transition: color 0.25s, background 0.25s;
    position: relative;
}

.header-nav a:hover {
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.06);
}

.header-nav a.active { color: #f5f5f7; }

.header-nav a.active::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #E50914;
    box-shadow: 0 0 10px #E50914;
}

.header-nav a .badge {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 2px 6px;
    border-radius: 100px;
    background: rgba(57, 255, 20, 0.15);
    color: #39FF14;
    border: 1px solid rgba(57, 255, 20, 0.3);
    text-transform: uppercase;
    line-height: 1;
}

/* ============ RIGHT ACTIONS ============ */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #6e6e73;
    letter-spacing: 0.05em;
    font-weight: 500;
    text-transform: uppercase;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.header-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #39FF14;
    box-shadow: 0 0 8px #39FF14;
    animation: headerPulse 2s infinite;
}

@keyframes headerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.header-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: #f5f5f7;
    color: #000;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 100px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.header-cta:hover {
    background: #E50914;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.35);
}

.header-cta svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

/* ============ MOBILE MENU BTN ============ */
.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 0;
    position: relative;
    transition: all 0.25s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.menu-toggle span {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 1.5px;
    background: #f5f5f7;
    border-radius: 2px;
    transition: all 0.35s cubic-bezier(0.65, 0, 0.35, 1);
}

.menu-toggle span:nth-child(1) { top: 14px; }
.menu-toggle span:nth-child(2) { top: 19px; }
.menu-toggle span:nth-child(3) { top: 24px; }

.menu-toggle.open span:nth-child(1) {
    top: 19px;
    transform: translateX(-50%) rotate(45deg);
}
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) {
    top: 19px;
    transform: translateX(-50%) rotate(-45deg);
}

/* ============ MOBILE MENU PANEL ============ */
.mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(5, 5, 5, 0.96);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 24px 20px 32px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.65, 0, 0.35, 1);
    z-index: 9998;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.022em;
}

.mobile-menu.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu li:last-child {
    border-bottom: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    color: #f5f5f7;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-menu a:hover { color: #E50914; }

.mobile-menu a .arrow {
    font-size: 12px;
    color: #6e6e73;
}

.mobile-menu .mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: #E50914;
    color: #fff;
    border-radius: 100px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s;
}

.mobile-menu .mobile-cta:hover {
    background: #ff1a25;
    color: #fff;
    box-shadow: 0 8px 24px rgba(229, 9, 20, 0.4);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .header-inner { padding: 0 24px; }
    .header-nav { gap: 2px; }
    .header-nav a { padding: 8px 12px; font-size: 12.5px; }
    .header-status { display: none; }
}

@media (max-width: 860px) {
    .header-nav { display: none; }
    .menu-toggle { display: block; }
    .header-cta { display: none; }
    .header-inner {
        padding: 0 20px;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .site-header { height: 58px; }
    .mobile-menu { top: 58px; }
    .header-logo { font-size: 16px; }
    .header-logo .mark { width: 24px; height: 24px; font-size: 12px; }
    .header-logo .name .sub { font-size: 8px; letter-spacing: 1.5px; }
}

/* ============ THEME AWARE ============ */
/* NOTE: Logo "Studios" text hamesha RED rahega (dono themes mein) */

body[data-theme="green"] .header-logo .mark {
    background: linear-gradient(135deg, #39FF14 0%, #00c853 100%);
    box-shadow: 0 4px 14px rgba(57, 255, 20, 0.35);
}
body[data-theme="green"] .header-nav a.active::before {
    background: #39FF14;
    box-shadow: 0 0 10px #39FF14;
}
body[data-theme="green"] .header-cta:hover {
    background: #39FF14;
    color: #000;
    box-shadow: 0 8px 24px rgba(57, 255, 20, 0.4);
}
body[data-theme="green"] .mobile-menu a:hover { color: #39FF14; }
body[data-theme="green"] .mobile-menu .mobile-cta { background: #39FF14; color: #000; }
body[data-theme="green"] .mobile-menu .mobile-cta:hover {
    background: #5aff2e;
    color: #000;
    box-shadow: 0 8px 24px rgba(57, 255, 20, 0.4);
}