/* ============================================
   PREMIUM HEADER REDESIGN
   Two-State Scroll System with Glassmorphism
   Dark Luxury Theme
   ============================================ */

:root {
    /* Legacy compatibility */
    --primary-orange: #d86c06;
    --secondary-blue: #6995b1;
    --text-dark: #1a1a1a;
    --text-light: #ffffff;
    --bg-light: #f5f5f5;
    --bg-lighter: #fafafa;
    --border-color: #e0e0e0;

    /* Dark Luxury Theme */
    --header-bg-hero: rgba(8, 8, 6, 0.72);
    --header-bg-scrolled: rgba(12, 12, 10, 0.97);
    --header-border: rgba(200, 133, 42, 0.15);
    --header-gold: #c8852a;
    --header-gold-glow: rgba(200, 133, 42, 0.25);
    --text-hero: #f5f0e8;
    --text-scrolled: #f0ebe0;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --transition-smooth: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* ============================================
   HEADER - STATE 1: HERO/TRANSPARENT
   ============================================ */

.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 998;
    transition: all 0.6s var(--transition-smooth);
    backdrop-filter: blur(0px);
    background: transparent;
    border-bottom: 1px solid transparent;
    padding: 16px 0;
    height: auto;
}

.premium-header.hero {
    /* Before scroll state - Dark luxury */
    background: linear-gradient(rgba(8, 8, 6,1) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px 0 24px 0;
    border-bottom: 1px solid rgba(200, 133, 42, 0.12);
}

.premium-header.scrolled {
    /* After scroll state - Dark luxury */
    background: var(--header-bg-scrolled);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--header-border);
    padding: 12px 0;
}

.premium-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    height: 100%;
    transition: gap 0.6s var(--transition-smooth);
}

/* ============================================
   LOGO SECTION
   ============================================ */

.premium-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    transition: all 0.6s var(--transition-smooth);
}

.premium-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.premium-logo:hover {
    transform: translateY(-2px);
}

.premium-logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: all 0.6s var(--transition-smooth);
}

.premium-header.hero .premium-logo-img {
    filter: brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.premium-logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--text-hero);
    letter-spacing: 0.06em;
    transition: all 0.6s var(--transition-smooth);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.premium-header.scrolled .premium-logo-text {
    color: var(--text-scrolled);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Logo hover gold underline */
.premium-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: transform 0.3s ease;
    position: relative;
}

.premium-logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--header-gold);
    transition: width 0.4s ease;
}

.premium-logo:hover::after {
    width: 100%;
}

.premium-logo:hover {
    transform: translateY(-2px);
}

/* ============================================
   SEARCH BAR - HERO STATE
   ============================================ */

.premium-search-wrapper {
    flex: 1;
    max-width: 600px;
    display: flex;
    justify-content: center;
    transition: all 0.6s var(--transition-smooth);
}

.premium-search-form {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
    transition: all 0.6s var(--transition-smooth);
}

.premium-search-input-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(200, 133, 42, 0.2);
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.premium-header.hero .premium-search-input-wrapper {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(200, 133, 42, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.premium-search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--header-gold);
    box-shadow: 0 0 0 3px rgba(200, 133, 42, 0.15);
    transform: translateY(-2px);
}

.premium-search-icon {
    font-size: 16px;
    color: var(--header-gold);
    transition: all 0.3s ease;
    animation: searchPulse 2s ease-in-out infinite;
}

.premium-search-input-wrapper:focus-within .premium-search-icon {
    animation: none;
    transform: scale(1.1);
}

@keyframes searchPulse {

    0%,
    100% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

.premium-search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-scrolled);
    outline: none;
    box-shadow: none;
    font-family: 'DM Sans', 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.premium-search-input:focus {
    outline: none;
    box-shadow: none;
}

.premium-search-input::placeholder {
    color: rgba(240, 235, 224, 0.35);
    font-style: italic;
}

.premium-search-submit {
    background: var(--header-gold);
    color: #0a0a08;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
}

.premium-search-submit:hover {
    background: #d9a358;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 133, 42, 0.35);
}

/* ============================================
   ACTIONS SECTION
   ============================================ */

.premium-actions-section {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    transition: all 0.6s var(--transition-smooth);
}

.premium-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 0.5px solid rgba(200, 133, 42, 0);
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    color: rgba(240, 235, 224, 0.75);
    font-size: 18px;
}

.premium-header.scrolled .premium-action-btn {
    color: rgba(240, 235, 224, 0.75);
    background: transparent;
}

.premium-action-btn:hover {
    background: rgba(200, 133, 42, 0.12);
    color: var(--header-gold);
    border-color: rgba(200, 133, 42, 0.25);
    transform: translateY(-3px);
}

.premium-header.scrolled .premium-action-btn:hover {
    background: rgba(200, 133, 42, 0.12);
    color: var(--header-gold);
}

.premium-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-orange);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: badgePop 0.3s ease;
}

@keyframes badgePop {
    0% {
        transform: scale(0.5);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   USER MENU
   ============================================ */

.premium-user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(240, 235, 224, 0.75);
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 8px;
}

.premium-header.scrolled .premium-user-btn {
    color: rgba(240, 235, 224, 0.75);
}

.premium-user-btn:hover {
    background: rgba(200, 133, 42, 0.1);
}

.premium-header.scrolled .premium-user-btn:hover {
    background: rgba(200, 133, 42, 0.1);
}

.premium-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(200, 133, 42, 0.3);
    transition: border-color 0.3s ease;
}

.premium-user-btn:hover .premium-user-avatar {
    border-color: var(--header-gold);
}

.premium-user-name {
    font-size: 13px;
    font-weight: 600;
    display: none;
}

/* ============================================
   HAMBURGER MENU
   ============================================ */

.premium-mobile-menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.premium-menu-line {
    width: 24px;
    height: 2px;
    background: rgba(240, 235, 224, 0.8);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-header.scrolled .premium-menu-line {
    background: rgba(240, 235, 224, 0.8);
}

.premium-mobile-menu-btn.active .premium-menu-line:nth-child(1) {
    transform: rotate(45deg) translateY(10px);
}

.premium-mobile-menu-btn.active .premium-menu-line:nth-child(2) {
    opacity: 0;
}

.premium-mobile-menu-btn.active .premium-menu-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-10px);
}

/* ============================================
   NAVIGATION BAR
   ============================================ */

.premium-navbar {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    background: #0d0d0b;
    border-top: 1px solid rgba(200, 133, 42, 0.12);
    z-index: 997;
    transition: all 0.6s var(--transition-smooth);
    height: 60px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.premium-header.scrolled~.premium-navbar {
    top: 60px;
    border-top: none;
}

.premium-navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 60px;
    overflow-x: auto;
    overflow-y: hidden;
}

.premium-nav-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 100%;
    width: 100%;
}

.premium-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 100%;
    text-decoration: none;
    color: rgba(240, 235, 224, 0.6);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
}

.premium-nav-item:hover {
    color: var(--header-gold);
    border-bottom-color: var(--header-gold);
    background: rgba(200, 133, 42, 0.06);
}

.premium-nav-item.active {
    color: var(--header-gold);
    border-bottom-color: var(--header-gold);
    font-weight: 600;
}

.premium-nav-item i {
    font-size: 16px;
}

/* ============================================
   RESPONSIVE - TABLET (768px - 991px)
   ============================================ */

@media (max-width: 991px) {
    .premium-logo-text {
        display: none;
    }

    .premium-search-wrapper {
        max-width: 400px;
    }

    .premium-user-name {
        display: none;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (<768px)
   ============================================ */

@media (max-width: 767px) {
    .premium-header {
        padding: 12px 0;
    }

    .premium-header.hero {
        padding: 12px 0 16px 0;
    }

    .premium-header-container {
        gap: 12px;
        padding: 0 12px;
    }

    .premium-logo-img {
        height: 32px;
    }

    .premium-logo-text {
        display: none;
    }

    .premium-search-wrapper {
        display: none;
    }

    .premium-actions-section {
        gap: 8px;
    }

    .premium-mobile-menu-btn {
        display: flex;
    }

    .premium-user-btn {
        padding: 4px 8px;
        gap: 4px;
    }

    .premium-user-avatar {
        width: 28px;
        height: 28px;
    }

    .premium-action-btn {
        width: 36px;
        height: 36px;
    }

    /* Show mobile search button */
    .premium-mobile-search-btn {
        display: flex;
    }

    /* Hide desktop navbar on mobile */
    .premium-navbar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        max-width: none;
        background: #0d0d0b;
        border-top: none;
        border-right: 1px solid rgba(200, 133, 42, 0.15);
        height: 100vh;
        max-height: 100vh;
        flex-direction: column;
        padding: 0;
        align-items: flex-start;
        gap: 0;
        z-index: 999;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .premium-navbar.active {
        left: 0;
        max-width: 280px;
    }

    .premium-navbar-container {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
        gap: 0;
        width: 100%;
    }

    .premium-nav-wrapper {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        height: 100%;
        width: 100%;
    }

    .premium-nav-item {
        width: 100%;
        padding: 12px 20px;
        border-bottom: none;
        border-left: 3px solid transparent;
        justify-content: flex-start;
        height: auto;
    }

    .premium-nav-item:hover {
        border-left-color: var(--header-gold);
        background-color: rgba(200, 133, 42, 0.08);
    }

    .premium-nav-item.active {
        border-left-color: var(--header-gold);
        background-color: rgba(200, 133, 42, 0.08);
    }
}

/* ============================================
   MOBILE - SEARCH EXPANDED
   ============================================ */

.premium-mobile-search-expanded {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
}

.premium-mobile-search-expanded.active {
    display: flex;
}

.premium-mobile-search-full {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1a1a14;
    padding: 12px 16px;
    border-radius: 12px;
    margin-top: 20px;
    border: 1px solid rgba(200, 133, 42, 0.2);
}

.premium-mobile-search-full input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    font-family: 'DM Sans', 'Inter', sans-serif;
    background: transparent;
    color: var(--text-scrolled);
}

.premium-mobile-search-full input::placeholder {
    color: rgba(240, 235, 224, 0.4);
}

.premium-mobile-search-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: rgba(240, 235, 224, 0.7);
}

/* ============================================
   OVERLAY FOR MOBILE MENU
   ============================================ */

.premium-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 996;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none;
}

@media (max-width: 767px) {
    .premium-menu-overlay {
        display: block;
    }

    .premium-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */

.premium-header * {
    transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

button:focus,
a:focus {
    outline: 2px solid var(--header-gold);
    outline-offset: 2px;
}

.premium-search-input:focus,
.premium-search-input:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.premium-header-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {

    .premium-header,
    .premium-navbar {
        display: none;
    }
}