/* =======================================
   NOVA THEME - COMPLETE HEADER CSS
   File: themes/nova/assets/css/header.css
   ======================================= */

/* =======================================
   CSS VARIABLES
   ======================================= */

/* Remove ALL borders between header and content */
.nova-premium-header,
.nova-premium-header.scrolled,
body.light .nova-premium-header,
body.light .nova-premium-header.scrolled {
    border-bottom: none !important;
    border: none !important;
}

/* Remove mobile menu border */
.nova-mobile-menu,
body.light .nova-mobile-menu {
    border-top: none !important;
    border: none !important;
}

/* Remove any borders from slider */
.nova-trending-slider-fullwidth {
    border-top: none !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove borders from main content */
.nova-main {
    border-top: none !important;
}


:root {
    --nova-primary: #7C3AED;
    --nova-primary-hover: #6D28D9;
    --nova-text: #ffffff;
    --nova-text-dim: rgba(255, 255, 255, 0.7);
    --nova-border: rgba(255, 255, 255, 0.1);
    --nova-header-nav-bg: rgba(255, 255, 255, 0.05);
}

/* =======================================
   HEADER CONTAINER
   ======================================= */

.nova-premium-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

body.light .nova-premium-header {
    background: transparent;
    border-bottom: none;
}

.nova-premium-header.scrolled {
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0.98) 0%, rgba(26, 26, 26, 0.95) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 0.625rem 0;
}

body.light .nova-premium-header.scrolled {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--nova-border);
}

.nova-header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

/* =======================================
   LOGO / BRAND
   ======================================= */

.nova-brand {
    flex-shrink: 0;
}

.nova-brand-link {
    text-decoration: none;
    display: block;
}

.nova-brand-text {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -1px;
    margin: 0;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.brand-prefix {
    color: #ffffff;
    background: var(--nova-primary);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    margin-right: 2px;
}

.brand-main {
    color: var(--nova-primary);
}

.nova-brand-img {
    max-height: 32px;
    display: block;
}

/* =======================================
   CENTERED NAVIGATION
   ======================================= */

.nova-main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nova-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--nova-header-nav-bg);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--nova-border);
}

.nova-nav-link {
    color: var(--nova-text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.4rem 1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.nova-nav-link:hover {
    color: var(--nova-text);
    background: rgba(255, 255, 255, 0.05);
}

body.light .nova-nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.nova-nav-link.active {
    color: var(--nova-text);
    font-weight: 600;
}

.nova-nav-dot {
    color: var(--nova-text-dim);
    opacity: 0.3;
    font-size: 0.7rem;
    padding: 0 0.4rem;
    user-select: none;
}

/* =======================================
   DROPDOWNS
   ======================================= */

.nova-nav-dropdown {
    position: relative;
}

.nova-nav-dropdown .bi-chevron-down {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.nova-nav-dropdown:hover .bi-chevron-down {
    transform: rotate(180deg);
}

.nova-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.875rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    background: rgba(30, 30, 30, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--nova-border);
    border-radius: 12px;
    padding: 0.625rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

body.light .nova-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.nova-nav-dropdown:hover .nova-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Genre Grid */
.nova-genre-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem;
    max-height: 400px;
    overflow-y: auto;
}

.nova-genre-link {
    padding: 0.625rem 0.875rem;
    color: var(--nova-text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-align: center;
}

.nova-genre-link:hover {
    color: var(--nova-text);
    background: rgba(229, 9, 20, 0.15);
}

/* Dropdown Items */
.nova-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    color: var(--nova-text-dim);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nova-dropdown-item:hover {
    color: var(--nova-text);
    background: rgba(229, 9, 20, 0.15);
}

.nova-dropdown-item i {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Scrollbar */
.nova-genre-grid::-webkit-scrollbar {
    width: 5px;
}

.nova-genre-grid::-webkit-scrollbar-track {
    background: transparent;
}

.nova-genre-grid::-webkit-scrollbar-thumb {
    background: var(--nova-primary);
    border-radius: 3px;
}

/* =======================================
   HEADER RIGHT ACTIONS
   ======================================= */

.nova-header-right {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-shrink: 0;
}

/* Search */
.nova-search-box {
    position: relative;
}

.nova-search-box form {
    position: relative;
}

.nova-search-input {
    width: 240px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--nova-border);
    color: var(--nova-text);
    padding: 0.625rem 2.75rem 0.625rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    outline: none;
}

body.light .nova-search-input {
    background: rgba(0, 0, 0, 0.05);
}

.nova-search-input::placeholder {
    color: var(--nova-text-dim);
}

.nova-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--nova-primary);
    width: 280px;
}

body.light .nova-search-input:focus {
    background: rgba(0, 0, 0, 0.08);
}

.nova-search-submit {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    color: var(--nova-text-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nova-search-submit:hover {
    color: var(--nova-text);
    background: rgba(255, 255, 255, 0.1);
}

/* Icon Buttons */
.nova-icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--nova-border);
    border-radius: 50%;
    color: var(--nova-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

body.light .nova-icon-btn {
    background: rgba(0, 0, 0, 0.05);
}

.nova-icon-btn:hover {
    background: rgba(229, 9, 20, 0.15);
    border-color: var(--nova-primary);
    color: var(--nova-primary);
    transform: scale(1.05);
}

/* =======================================
   MOBILE BUTTON
   ======================================= */

.nova-mobile-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--nova-border);
    border-radius: 8px;
    cursor: pointer;
    gap: 4px;
    transition: all 0.3s ease;
    padding: 0;
}

body.light .nova-mobile-btn {
    background: rgba(0, 0, 0, 0.05);
}

.nova-mobile-btn span {
    display: block;
    width: 16px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
    pointer-events: none;
}

body.light .nova-mobile-btn span {
    background: #000000;
}

.nova-mobile-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4.5px, 4.5px);
}

.nova-mobile-btn.active span:nth-child(2) {
    opacity: 0;
}

.nova-mobile-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4.5px, -4.5px);
}

/* =======================================
   MOBILE MENU
   ======================================= */

.nova-mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

body.light .nova-mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.nova-mobile-menu.open {
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nova-mobile-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nova-mobile-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    min-height: 48px;
}

body.light .nova-mobile-item {
    color: rgba(0, 0, 0, 0.9);
}

.nova-mobile-item:hover,
.nova-mobile-item.active {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.15);
}

body.light .nova-mobile-item:hover,
body.light .nova-mobile-item.active {
    color: #000000;
}

/* Mobile Dropdown */
.nova-mobile-dropdown {
    border-radius: 8px;
    overflow: hidden;
}

.nova-mobile-dropdown summary {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    transition: all 0.2s ease;
    min-height: 48px;
    user-select: none;
}

body.light .nova-mobile-dropdown summary {
    color: rgba(0, 0, 0, 0.9);
}

.nova-mobile-dropdown summary::-webkit-details-marker {
    display: none;
}

.nova-mobile-dropdown summary::marker {
    display: none;
}

.nova-mobile-dropdown summary::after {
    content: '▼';
    margin-left: auto;
    transition: transform 0.3s ease;
    font-size: 0.7rem;
}

.nova-mobile-dropdown[open] summary::after {
    transform: rotate(180deg);
}

.nova-mobile-dropdown summary:hover {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.1);
}

body.light .nova-mobile-dropdown summary:hover {
    color: #000000;
}

.nova-mobile-dropdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
}

body.light .nova-mobile-dropdown-grid {
    background: rgba(0, 0, 0, 0.05);
}

.nova-mobile-dropdown-grid a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.2s ease;
    min-height: 44px;
}

body.light .nova-mobile-dropdown-grid a {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.9);
}

.nova-mobile-dropdown-grid a:hover {
    color: #ffffff;
    background: rgba(124, 58, 237, 0.15);
    border-color: #7C3AED;
    transform: translateY(-2px);
}

body.light .nova-mobile-dropdown-grid a:hover {
    color: #000000;
}

/* =======================================
   SCROLLBAR
   ======================================= */

.nova-mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.nova-mobile-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nova-mobile-menu::-webkit-scrollbar-thumb {
    background: var(--nova-primary);
    border-radius: 3px;
}

/* =======================================
   ACCESSIBILITY
   ======================================= */

.nova-nav-link:focus,
.nova-icon-btn:focus,
.nova-mobile-btn:focus,
.nova-search-input:focus,
.nova-search-submit:focus,
.nova-mobile-item:focus,
.nova-mobile-dropdown summary:focus {
    outline: 2px solid var(--nova-primary);
    outline-offset: 2px;
}

/* =======================================
   RESPONSIVE - TABLET
   ======================================= */

@media (max-width: 1400px) {
    .nova-header-container {
        padding: 0 2rem;
        gap: 1.75rem;
    }
    
    .nova-nav-wrapper {
        padding: 0.5rem 1.25rem;
    }
    
    .nova-nav-link {
        padding: 0.4rem 0.875rem;
        font-size: 0.825rem;
    }
}

@media (max-width: 1200px) {
    .nova-nav-link {
        padding: 0.4rem 0.75rem;
    }
    
    .nova-search-input {
        width: 200px;
    }
    
    .nova-search-input:focus {
        width: 240px;
    }
}

/* =======================================
   RESPONSIVE - MOBILE TABLET
   ======================================= */

@media (max-width: 992px) {
    .nova-premium-header {
        background: rgba(26, 26, 26, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 0.5rem 0;
    }
    
    body.light .nova-premium-header {
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .nova-header-container {
        padding: 0 1.25rem;
        gap: 0.75rem;
    }
    
    .nova-brand-text {
        font-size: 1.3rem;
    }
    
    .brand-prefix {
        padding: 0.12rem 0.35rem;
    }
    
    .nova-main-nav {
        display: none;
    }
    
    .nova-mobile-btn {
        display: flex;
        width: 34px;
        height: 34px;
    }
    
    .nova-mobile-btn span {
        width: 15px;
    }
    
    .nova-search-input {
        width: 140px;
        padding: 0.55rem 2.5rem 0.55rem 0.9rem;
        font-size: 0.8rem;
    }
    
    .nova-search-input:focus {
        width: 160px;
    }
    
    .nova-search-submit {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }
    
    .nova-icon-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }
    
    .nova-mobile-menu {
        top: 52px;
    }
    
    .nova-mobile-menu.open {
        max-height: calc(100vh - 52px);
    }
}

/* =======================================
   RESPONSIVE - MOBILE PHONE
   ======================================= */

@media (max-width: 768px) {
    .nova-premium-header {
        padding: 0.4rem 0;
    }
    
    .nova-header-container {
        padding: 0 1rem;
        gap: 0.6rem;
    }
    
    .nova-brand-text {
        font-size: 1.2rem;
    }
    
    .nova-search-input {
        width: 120px;
        font-size: 0.75rem;
        padding: 0.5rem 2.3rem 0.5rem 0.8rem;
    }
    
    .nova-search-input:focus {
        width: 140px;
    }
    
    .nova-search-submit {
        width: 26px;
        height: 26px;
        font-size: 0.85rem;
        right: 5px;
    }
    
    .nova-icon-btn {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }
    
    .nova-mobile-btn {
        width: 32px;
        height: 32px;
    }
    
    .nova-mobile-menu {
        top: 48px;
    }
    
    .nova-mobile-menu.open {
        max-height: calc(100vh - 48px);
    }
    
    .nova-mobile-content {
        padding: 1.25rem;
        gap: 0.4rem;
    }
    
    .nova-mobile-item {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .nova-mobile-dropdown summary {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }
    
    .nova-mobile-dropdown-grid {
        padding: 0.875rem;
        gap: 0.4rem;
    }
}

/* =======================================
   RESPONSIVE - SMALL MOBILE
   ======================================= */

@media (max-width: 576px) {
    .nova-premium-header {
        padding: 0.35rem 0;
    }
    
    .nova-header-container {
        padding: 0 0.8rem;
        gap: 0.5rem;
    }
    
    .nova-brand-text {
        font-size: 1.1rem;
        letter-spacing: -0.5px;
    }
    
    .nova-brand-prefix {
        padding: 0.1rem 0.3rem;
        font-size: 0.9rem;
    }
    
    .nova-header-right {
        gap: 0.4rem;
    }
    
    .nova-search-input {
        width: 100px;
        font-size: 0.7rem;
        padding: 0.45rem 2.2rem 0.45rem 0.7rem;
    }
    
    .nova-search-input:focus {
        width: 120px;
    }
    
    .nova-search-input::placeholder {
        font-size: 0.7rem;
    }
    
    .nova-icon-btn,
    .nova-mobile-btn {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .nova-mobile-btn span {
        width: 14px;
        height: 1.5px;
    }
    
    .nova-mobile-menu {
        top: 44px;
    }
    
    .nova-mobile-menu.open {
        max-height: calc(100vh - 44px);
    }
    
    .nova-mobile-content {
        padding: 1rem;
    }
    
    .nova-mobile-item {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .nova-mobile-dropdown summary {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .nova-mobile-dropdown-grid {
        grid-template-columns: 1fr;
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .nova-mobile-dropdown-grid a {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* =======================================
   RESPONSIVE - EXTRA SMALL
   ======================================= */

@media (max-width: 400px) {
    .nova-brand-text {
        font-size: 1rem;
    }
    
    .nova-search-input {
        width: 120px;
    }
    
    .nova-search-input:focus {
        width: 100px;
    }
    
    .nova-icon-btn,
    .nova-mobile-btn {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }
}

/* =======================================
   Z-INDEX LAYERING
   ======================================= */

.nova-premium-header {
    z-index: 1000;
}

.nova-mobile-menu {
    z-index: 999;
}

.nova-dropdown-menu {
    z-index: 1001;
}