/**
 * Redesigned Header Styles
 * Clean, semantic structure with proper z-index
 * Fonts loaded via reset.css
 */

/* ========== VARIABLES ========== */
:root {
    --h-red: var(--kx-action);
    --h-red-dark: var(--kx-action-ink);
    --h-black: var(--kx-ink);
    --h-white: var(--kx-panel);
    --h-gray: var(--kx-ground);
    --h-dark-gray: var(--kx-ink-2);
    --h-border: var(--kx-rule);
    /* Teko and Rajdhani were the old faces; Blueprint is Bebas Neue + Barlow. */
    --h-font-title: var(--kx-display);
    --h-font-nav: var(--kx-label);
    --h-font-body: var(--kx-body);
    --h-transition: 0.3s ease;
    --h-container: 1600px;
}

/* ========== CONTAINER ========== */
.header-container {
    width: 100%;
    max-width: var(--h-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== UTILITY BAR ========== */
.header-utility-bar {
    background: var(--h-black);
    padding: 6px 0;
}

.utility-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.utility-menu a {
    color: var(--h-white);
    text-decoration: none;
    font-size: 13px;
    font-family: var(--h-font-body);
    transition: color var(--h-transition);
}

.utility-menu a:hover{
    color: var(--h-red);
}

/* ========== SLOGAN BAR ========== */
.header-slogan-bar {
    background: var(--h-red);
    text-align: center;
    padding: 8px 0;
}

.slogan-text {
    font-family: var(--h-font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--h-white);
    font-style: italic;
    letter-spacing: 1px;
}

.slogan-text strong {
    font-weight: 800;
    text-transform: uppercase;
}

/* ========== MAIN HEADER ========== */
.site-header {
    background: var(--h-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--h-border);
}

.site-header .header-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

/* Contact Info */
.header-contact {
    display: flex;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--h-dark-gray);
    text-decoration: none;
    font-family: var(--h-font-nav);
    font-size: 14px;
    font-weight: 600;
    transition: color var(--h-transition);
}

.contact-link svg {
    color: var(--h-red);
}

.contact-link:hover{
    color: var(--h-red);
}

/* Logo */
.header-logo {
    text-align: center;
}

.header-logo img {
    max-height: 45px;
    width: auto;
    transition: transform var(--h-transition);
}

.header-logo a:hover img{
    transform: scale(1.02);
}

/* Header Actions (Right Side) */
.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

/* Shop by Club Button - Prominent CTA */
.btn-shop-club {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--h-red);
    color: var(--h-white);
    padding: 0 20px;
    height: 40px;
    font-family: var(--h-font-nav);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.5px;
    border: 2px solid var(--h-red);
    position: relative;
    overflow: hidden;
    transition: all var(--h-transition);
    box-shadow: none;
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-shop-club::before{
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.3);
    transition: left 0.5s ease;
}

.btn-shop-club:hover::before{
    left: 100%;
}

.btn-shop-club:hover{
    background: var(--h-black);
    border-color: var(--h-black);
    color: var(--h-white);
    transform: translateY(-2px);
    box-shadow: none;
    animation: none;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: none; }
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 8px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--h-gray);
    color: var(--h-dark-gray);
    transition: all var(--h-transition);
}

.social-icons a:hover{
    background: var(--h-red);
    color: var(--h-white);
    transform: translateY(-2px);
}

/* ========== MAIN NAVIGATION ========== */
.main-navigation {
    background: var(--h-gray);
    border-bottom: 1px solid var(--h-border);
    position: relative;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 50px;
}

.desktop-menu {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Primary Menu */
.primary-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

/* Hide "Shop by Club" from nav menu */
.primary-menu > li > a[href*="stores.kinexasportswear.com"],
.primary-menu > li > a[href*="shop-by-club"],
.primary-menu > li > a[href*="stores."],
.primary-menu > li:has(> a[href*="stores."]){
    display: none !important;
}

.primary-menu > li {
    position: relative;
}

.primary-menu > li > a {
    display: block;
    padding: 8px 12px;
    color: var(--h-black);
    text-decoration: none;
    font-family: var(--h-font-nav);
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--h-transition);
    position: relative;
}

.primary-menu > li > a::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--h-red);
    transform: scaleX(0);
    transition: transform var(--h-transition);
}

.primary-menu > li > a:hover{
    color: var(--h-red);
}

.primary-menu > li > a:hover::after{
    transform: scaleX(1);
}

.primary-menu > li.current-menu-item > a,
.primary-menu > li.current-menu-parent > a {
    color: var(--h-red);
}

.primary-menu > li.current-menu-item > a::after{
    transform: scaleX(1);
}

/* Dropdown Menus */
.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--h-white);
    min-width: 220px;
    box-shadow: none;
    border-top: 3px solid var(--h-red);
    border-radius: 2px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all var(--h-transition);
    z-index: 1000;
}

.primary-menu > li:hover > .sub-menu{
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.primary-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--h-dark-gray);
    text-decoration: none;
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all var(--h-transition);
}

.primary-menu .sub-menu a:hover{
    background: var(--kx-panel-2);
    border-left-color: var(--h-red);
    padding-left: 25px;
    color: var(--h-red);
}

/* ========== HAMBURGER ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--h-black);
    border-radius: 2px;
    transition: all var(--h-transition);
}

.hamburger-line:nth-child(2){
    width: 70%;
    margin-left: auto;
}

.hamburger.is-active .hamburger-line:nth-child(1){
    transform: rotate(45deg) translate(6px, 6px);
    background: var(--h-red);
}

.hamburger.is-active .hamburger-line:nth-child(2){
    opacity: 0;
    width: 0;
}

.hamburger.is-active .hamburger-line:nth-child(3){
    transform: rotate(-45deg) translate(6px, -6px);
    background: var(--h-red);
}

/* ========== MOBILE MENU PANEL ========== */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--h-white);
    box-shadow: none;
    z-index: 10000;
    overflow-y: auto;
    transition: right var(--h-transition);
    display: flex;
    flex-direction: column;
}

.mobile-menu-panel.is-open {
    right: 0;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--h-border);
}

.mobile-logo img {
    max-height: 35px;
    width: auto;
}

.mobile-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    border-radius: 50%;
    background: var(--h-gray);
    border: none;
    padding: 0;
    margin: 0;
    color: var(--h-black);
    line-height: 1;
    transition: all var(--h-transition);
}

.mobile-close:hover{
    background: var(--h-red);
    color: var(--h-white);
}

/* Mobile Contact Bar */
.mobile-contact-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--h-border);
}

.mobile-contact-bar a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--h-dark-gray);
    text-decoration: none;
    font-family: var(--h-font-nav);
    font-size: 15px;
    font-weight: 600;
}

.mobile-contact-bar svg {
    color: var(--h-red);
}

/* Mobile Shop Button */
.mobile-shop-btn {
    display: block;
    margin: 15px 20px;
    padding: 14px 20px;
    background: var(--h-red);
    color: var(--h-white);
    text-align: center;
    text-decoration: none;
    font-family: var(--h-font-nav);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    box-shadow: none;
    transition: all var(--h-transition);
}

.mobile-shop-btn:hover{
    background: var(--h-black);
}

/* Mobile Menu */
.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 10px 0;
    flex: 1;
}

.mobile-menu > li > a[href*="stores.kinexasportswear.com"],
.mobile-menu > li > a[href*="shop-by-club"],
.mobile-menu > li:has(> a[href*="stores."]){
    display: none !important;
}

.mobile-menu > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--h-black);
    text-decoration: none;
    font-family: var(--h-font-nav);
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
    border-bottom: 1px solid var(--h-border);
    transition: all var(--h-transition);
}

.mobile-menu > li > a:hover{
    color: var(--h-red);
    padding-left: 25px;
}

.mobile-menu > li.menu-item-has-children > a {
    position: relative;
}

.mobile-menu > li.menu-item-has-children > a::after{
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 20px;
    font-weight: 400;
}

.mobile-menu > li.menu-item-has-children.submenu-open > a::after{
    content: '-';
}

.mobile-menu .sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--h-gray);
    border-left: 3px solid var(--h-red);
    margin-left: 20px;
}

.mobile-menu > li.menu-item-has-children.submenu-open > .sub-menu {
    display: block;
}

.mobile-menu .sub-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--h-dark-gray);
    text-decoration: none;
    font-size: 15px;
    border-bottom: 1px dashed var(--h-border);
}

.mobile-menu .sub-menu a:hover{
    color: var(--h-red);
}

/* Mobile Social Icons */
.mobile-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 20px;
    margin-top: auto;
    border-top: 1px solid var(--h-border);
}

.mobile-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--h-gray);
    color: var(--h-dark-gray);
    transition: all var(--h-transition);
}

.mobile-social a:hover{
    background: var(--h-red);
    color: var(--h-white);
}

/* ========== MOBILE OVERLAY ========== */
.mobile-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--h-transition);
    cursor: pointer;
}

.mobile-overlay-bg.is-open {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* ========== STICKY NAVIGATION ========== */
.main-navigation.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    box-shadow: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

body.admin-bar .main-navigation.sticky {
    top: 32px;
}

@media (max-width: 782px){
    body.admin-bar .main-navigation.sticky {
        top: 46px;
    }
}

/* ========== NAVIGATION CONTAINER FIX ========== */
.nav-container {
    overflow: hidden;
}

.desktop-menu {
    max-width: 100%;
    overflow: hidden;
}

.primary-menu {
    flex-wrap: nowrap;
    max-width: 100%;
}

/* ========== RESPONSIVE - EXTRA LARGE (1600px) ========== */
@media (max-width: 1600px){
    .primary-menu {
        gap: 25px;
    }

    .primary-menu > li > a {
        font-size: 16px;
        padding: 8px 8px;
    }
}

/* ========== RESPONSIVE - LARGE LAPTOPS (1400px) ========== */
@media (max-width: 1400px){
    .primary-menu {
        gap: 15px;
    }

    .primary-menu > li > a {
        font-size: 15px;
        padding: 8px 5px;
        letter-spacing: 0.3px;
    }

    .btn-shop-club {
        padding: 0 14px;
        font-size: 15px;
        height: 36px;
    }

    .header-contact {
        gap: 12px;
    }

    .contact-link {
        font-size: 12px;
    }

    .contact-link span {
        display: none;
    }

    .contact-link svg {
        width: 18px;
        height: 18px;
    }
}

/* ========== RESPONSIVE - MEDIUM LAPTOPS (1280px) ========== */
@media (max-width: 1280px){
    .primary-menu {
        gap: 10px;
    }

    .primary-menu > li > a {
        font-size: 14px;
        padding: 8px 4px;
        letter-spacing: 0.2px;
    }

    .btn-shop-club {
        padding: 0 12px;
        font-size: 14px;
        height: 34px;
    }

    .social-icons {
        display: none;
    }

    .header-actions {
        gap: 10px;
    }

    .header-logo img {
        max-height: 40px;
    }
}

/* ========== RESPONSIVE - SMALL LAPTOPS (1150px) - SWITCH TO HAMBURGER ========== */
@media (max-width: 1150px){
    .hamburger {
        display: flex;
    }

    .desktop-menu {
        display: none;
    }

    .header-contact {
        display: none;
    }

    .header-actions {
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
    }

    .btn-shop-club {
        padding: 0 12px;
        font-size: 13px;
        height: 32px;
    }

    .site-header .header-container {
        position: relative;
    }

    .header-logo {
        margin: 0 auto;
    }

    .header-logo img {
        max-height: 38px;
    }
}

/* ========== RESPONSIVE - TABLETS (992px) ========== */
@media (max-width: 992px){
    .header-actions {
        display: none;
    }

    .site-header .header-container {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .utility-menu {
        gap: 15px;
    }

    .utility-menu a {
        font-size: 12px;
    }
}

/* ========== RESPONSIVE - SMALL TABLETS (900px) ========== */
@media (max-width: 900px){
    .utility-menu {
        gap: 12px;
    }

    .utility-menu a {
        font-size: 11px;
    }

    .slogan-text {
        font-size: 16px;
    }
}

/* ========== MOBILE ========== */
@media (max-width: 768px){
    .utility-menu {
        gap: 10px;
    }

    .utility-menu a {
        font-size: 11px;
    }

    .slogan-text {
        font-size: 14px;
    }

    .header-logo img {
        max-height: 38px;
    }

    .site-header {
        padding: 10px 0;
    }

    .nav-container {
        min-height: 45px;
    }
}

/* ========== MOBILE SMALL ========== */
@media (max-width: 480px){
    .header-utility-bar {
        padding: 5px 0;
    }

    .utility-menu {
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .utility-menu a {
        font-size: 10px;
    }

    .header-slogan-bar {
        padding: 6px 0;
    }

    .slogan-text {
        font-size: 12px;
        letter-spacing: 0.5px;
    }

    .header-logo img {
        max-height: 32px;
    }

    .site-header {
        padding: 8px 0;
    }

    .nav-container {
        min-height: 40px;
    }

    .hamburger {
        width: 24px;
        height: 18px;
        right: 15px;
    }

    .hamburger-line {
        height: 2px;
    }

    .mobile-menu-panel {
        max-width: 280px;
    }

    .mobile-menu-header {
        padding: 12px 15px;
    }

    .mobile-logo img {
        max-height: 30px;
    }

    .mobile-close {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .mobile-contact-bar {
        padding: 12px 15px;
        gap: 10px;
    }

    .mobile-contact-bar a {
        font-size: 13px;
    }

    .mobile-shop-btn {
        margin: 12px 15px;
        padding: 12px 15px;
        font-size: 16px;
    }

    .mobile-menu > li > a {
        padding: 10px 15px;
        font-size: 15px;
    }

    .mobile-menu .sub-menu {
        margin-left: 15px;
    }

    .mobile-menu .sub-menu a {
        padding: 8px 15px;
        font-size: 14px;
    }

    .mobile-social {
        padding: 15px;
        gap: 12px;
    }

    .mobile-social a {
        width: 36px;
        height: 36px;
    }
}
