/* ==========================================================================
   Talayar Gallery - Header & Navigation Architecture
   ========================================================================== */

.talayar-site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--talayar-header-height, 96px);
    z-index: 1000;
    transition: all var(--talayar-transition-smooth);
}

.talayar-header-glass {
    background: var(--talayar-glass-header);
    backdrop-filter: var(--talayar-glass-blur);
    -webkit-backdrop-filter: var(--talayar-glass-blur);
    border-bottom: var(--talayar-glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.talayar-header-container {
    max-width: 1440px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Brand Identity & Signature
   -------------------------------------------------------------------------- */
.talayar-header-branding {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.talayar-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    border-radius: 12px;
}

.talayar-header-branding .talayar-logo-img {
    height: var(--talayar-header-logo-height, 58px);
    max-height: calc(var(--talayar-header-height, 96px) - 20px);
    width: auto;
    max-width: 280px;
    object-fit: contain;
    display: inline-block;
    transition: transform 0.25s ease, opacity 0.25s ease, filter 0.3s ease;
}

.talayar-header-branding .talayar-brand-link:hover .talayar-logo-img {
    transform: scale(1.03);
}

/* Header Logo Glow Pulse Effect */
.talayar-brand-link.has-glow .talayar-logo-img,
.talayar-brand-link.has-glow .talayar-brand-signature {
    animation: talayar-header-glow-dark var(--talayar-header-glow-speed, 3s) ease-in-out infinite alternate;
}

@keyframes talayar-header-glow-dark {
    0% {
        filter: drop-shadow(0 0 3px rgba(201, 162, 75, 0.25)) drop-shadow(0 0 8px rgba(201, 162, 75, 0.15));
    }
    100% {
        filter: drop-shadow(0 0 14px rgba(201, 162, 75, 0.8)) drop-shadow(0 0 26px rgba(201, 162, 75, 0.45));
    }
}

html[data-theme="light"] .talayar-brand-link.has-glow .talayar-logo-img,
body.talayar-theme-light .talayar-brand-link.has-glow .talayar-logo-img,
html[data-theme="light"] .talayar-brand-link.has-glow .talayar-brand-signature,
body.talayar-theme-light .talayar-brand-link.has-glow .talayar-brand-signature {
    animation-name: talayar-header-glow-light;
}

@keyframes talayar-header-glow-light {
    0% {
        filter: drop-shadow(0 2px 5px rgba(154, 116, 36, 0.2)) drop-shadow(0 0 6px rgba(201, 162, 75, 0.12));
    }
    100% {
        filter: drop-shadow(0 3px 12px rgba(154, 116, 36, 0.6)) drop-shadow(0 0 20px rgba(201, 162, 75, 0.35));
    }
}

/* Header Logo Light Sweep Sheen Effect */
.talayar-brand-sweep-flare {
    position: absolute;
    inset: -4px;
    pointer-events: none;
    overflow: hidden;
    border-radius: inherit;
    z-index: 4;
}

.talayar-brand-sweep-flare::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0.75) 50%, rgba(201, 162, 75, 0.5) 62%, transparent 85%);
    transform: translateX(-160%) skewX(-25deg);
    animation: talayar-header-sweep var(--talayar-header-sweep-total, 6.5s) ease-in-out infinite;
}

html[data-theme="light"] .talayar-brand-sweep-flare::before,
body.talayar-theme-light .talayar-brand-sweep-flare::before {
    background: linear-gradient(115deg, transparent 15%, rgba(255, 255, 255, 0.2) 30%, rgba(255, 255, 255, 0.95) 50%, rgba(154, 116, 36, 0.45) 62%, transparent 85%);
}


.talayar-brand-signature {
    font-family: var(--talayar-font-display, serif);
    font-size: clamp(26px, calc(var(--talayar-header-logo-height, 58px) * 0.72), 44px);
    font-weight: 700;
    color: var(--talayar-gold, #C9A24B);
    line-height: 1;
    letter-spacing: 1px;
}

.talayar-brand-name {
    font-family: var(--talayar-font-display, serif);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 2.5px;
    color: var(--talayar-text-primary, #F7F8F9);
    text-transform: uppercase;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Main Desktop Navigation
   -------------------------------------------------------------------------- */
.talayar-main-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}

.talayar-nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.talayar-nav-link,
.talayar-nav-list a {
    color: var(--talayar-text-secondary, #D1D5DB);
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 0 14px;
    height: 38px;
    line-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--talayar-radius-button, 999px);
    border: 1px solid transparent;
    position: relative;
    outline: none;
    white-space: nowrap !important;
    text-overflow: clip;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.talayar-nav-link::after,
.talayar-nav-list a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 14px;
    height: 2px;
    background: var(--talayar-gold-gradient);
    border-radius: 2px;
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
}

.talayar-nav-link:hover,
.talayar-nav-list a:hover {
    color: var(--talayar-gold, #C9A24B);
    background: rgba(201, 162, 75, 0.06);
    border-color: rgba(201, 162, 75, 0.16);
}

.talayar-nav-link.active,
.talayar-nav-list a.active {
    color: var(--talayar-gold, #C9A24B) !important;
    background: rgba(201, 162, 75, 0.1) !important;
    border-color: rgba(201, 162, 75, 0.28) !important;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 2px 14px rgba(201, 162, 75, 0.16) !important;
    font-weight: 600;
}

.talayar-nav-link.active::after,
.talayar-nav-list a.active::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

html[data-theme="light"] .talayar-nav-link.active,
html[data-theme="light"] .talayar-nav-list a.active {
    color: var(--talayar-gold-dark, #8A6517) !important;
    background: rgba(184, 142, 53, 0.12) !important;
    border-color: rgba(154, 116, 36, 0.28) !important;
    box-shadow: 0 2px 12px rgba(154, 116, 36, 0.12) !important;
}

.talayar-nav-link:focus,
.talayar-nav-list a:focus {
    outline: none;
}

/* --------------------------------------------------------------------------
   Header Actions (Lang Switcher, Theme Toggle, CTA)
   -------------------------------------------------------------------------- */
.talayar-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Language Switcher Pill */
.talayar-lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 38px;
    padding: 0 12px;
    border-radius: var(--talayar-radius-button, 999px);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all var(--talayar-transition-fast);
    box-sizing: border-box;
}

.talayar-lang-switch:hover {
    border-color: var(--talayar-gold);
    background: rgba(201, 162, 75, 0.06);
}

.talayar-lang-item {
    color: var(--talayar-text-muted);
    transition: color var(--talayar-transition-fast);
}

.talayar-lang-item.active {
    color: var(--talayar-gold);
}

.talayar-lang-sep {
    color: rgba(255, 255, 255, 0.2);
}

/* Theme Switcher Toggle Button */
.talayar-theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--talayar-text-primary);
    flex-shrink: 0;
    transition: all var(--talayar-transition-fast);
    box-sizing: border-box;
}

/* Luxury User Club / Auth Portal Button */
.talayar-user-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--talayar-text-primary);
    text-decoration: none;
    flex-shrink: 0;
    transition: all var(--talayar-transition-fast);
    box-sizing: border-box;
}

html[data-theme="light"] .talayar-user-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(154, 116, 36, 0.2);
    color: #18191B;
}

.talayar-user-btn:hover {
    border-color: var(--talayar-gold);
    color: var(--talayar-gold);
    box-shadow: var(--talayar-glow-gold);
    transform: scale(1.05);
}

.talayar-theme-toggle-btn:hover {
    border-color: var(--talayar-gold);
    color: var(--talayar-gold);
    box-shadow: var(--talayar-glow-gold);
    transform: rotate(15deg);
}

.talayar-theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.talayar-icon-sun { display: none; }
.talayar-icon-moon { display: flex; }

html[data-theme="light"] .talayar-icon-sun { display: flex; }
html[data-theme="light"] .talayar-icon-moon { display: none; }

/* Header CTA Button */
.talayar-header-cta {
    padding: 0 20px;
    height: 38px;
    line-height: 38px;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Mobile Hamburger Toggle */
.talayar-mobile-toggle-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 9px;
    cursor: pointer;
    flex-shrink: 0;
}

.talayar-hamburger-line {
    width: 100%;
    height: 2px;
    background: var(--talayar-text-primary);
    border-radius: 2px;
    transition: all var(--talayar-transition-fast);
}

/* --------------------------------------------------------------------------
   Responsive Screen Size Scalers
   -------------------------------------------------------------------------- */
/* Compact Desktop & Laptops (1081px - 1280px) */
@media (min-width: 1081px) and (max-width: 1280px) {
    .talayar-header-container {
        padding: 0 16px;
        gap: 10px;
    }
    .talayar-brand-signature {
        font-size: 32px;
    }
    .talayar-brand-name {
        font-size: 10px;
        letter-spacing: 1.5px;
    }
    .talayar-nav-list {
        gap: 2px;
    }
    .talayar-nav-link,
    .talayar-nav-list a {
        font-size: 12.5px;
        padding: 0 8px;
        height: 34px;
        line-height: 34px;
    }
    .talayar-header-actions {
        gap: 8px;
    }
    .talayar-header-cta {
        padding: 0 14px;
        font-size: 12.5px;
        height: 34px;
        line-height: 34px;
    }
    .talayar-theme-toggle-btn {
        width: 34px;
        height: 34px;
    }
    .talayar-lang-switch {
        height: 34px;
        padding: 0 8px;
        font-size: 11px;
    }
}

/* Tablets & Mobile Screens (<= 1080px) */
@media (max-width: 1080px) {
    .talayar-main-navigation {
        display: none !important;
    }
    .talayar-header-cta {
        display: none !important;
    }
    .talayar-mobile-toggle-btn {
        display: flex !important;
    }
    .talayar-brand-name {
        display: none !important;
    }
}

/* Mobile Screens (<= 768px) */
@media (max-width: 768px) {
    .talayar-site-header {
        height: min(var(--talayar-header-height, 96px), 74px) !important;
    }
    .talayar-header-container {
        padding: 0 14px !important;
        gap: 8px !important;
    }
    .talayar-lang-switch {
        display: none !important;
    }
    .talayar-user-btn {
        display: none !important;
    }
    .talayar-header-actions {
        gap: 8px !important;
    }
    .talayar-header-branding .talayar-logo-img {
        height: clamp(32px, calc(var(--talayar-header-logo-height, 58px) * 0.72), 42px) !important;
        max-width: 160px !important;
    }
    .talayar-brand-signature {
        font-size: 26px !important;
    }
}

/* --------------------------------------------------------------------------
   Mobile Fullscreen Drawer Menu
   -------------------------------------------------------------------------- */
.talayar-mobile-drawer {
    position: fixed;
    top: var(--talayar-header-height, 96px);
    left: 0;
    width: 100vw;
    height: calc(100vh - var(--talayar-header-height, 96px));
    height: calc(100dvh - var(--talayar-header-height, 96px));
    background: var(--talayar-bg-base);
    z-index: 999;
    padding: 30px 24px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--talayar-transition-smooth);
}

@media (max-width: 768px) {
    .talayar-mobile-drawer {
        top: min(var(--talayar-header-height, 96px), 74px) !important;
        height: calc(100vh - min(var(--talayar-header-height, 96px), 74px)) !important;
        height: calc(100dvh - min(var(--talayar-header-height, 96px), 74px)) !important;
    }
}

.talayar-mobile-drawer.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.talayar-mobile-drawer-inner {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.talayar-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.talayar-mobile-nav-link {
    font-size: 20px;
    font-weight: 600;
    color: var(--talayar-text-primary);
    text-decoration: none;
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: right;
    transition: color var(--talayar-transition-fast);
}

html[dir="ltr"] .talayar-mobile-nav-link {
    text-align: left;
}

.talayar-mobile-nav-link:hover {
    color: var(--talayar-gold);
}

.talayar-mobile-cta {
    width: 100%;
    padding: 14px 20px;
}
