/*
 * KPT Production — Header, Mobile Menu & Bottom Nav v3
 * Active state with gold→purple gradient on every breakpoint.
 * Mobile: small logo left, Search + Menu top-right.
 * Mobile drawer: About info, all main pages, social icons.
 * Bottom nav: Home / Videos / Shorts / News / Live (no duplicate Menu).
 */

.kpt-header {
    height: var(--kpt-header-h);
    display: flex;
    align-items: center;
    background: var(--kpt-bg-primary);
    border-bottom: 1px solid var(--kpt-border-subtle);
    padding-top: var(--kpt-safe-top);
    position: relative;
    z-index: var(--kpt-z-sticky);
    transition: height var(--kpt-transition-normal), background var(--kpt-transition-normal);
}
.kpt-header--sticky {
    position: sticky;
    top: 0;
    transition: transform var(--kpt-transition-normal), height var(--kpt-transition-normal), background var(--kpt-transition-normal);
}
.kpt-header--sticky.is-scrolled {
    height: var(--kpt-header-h-scroll);
    background: var(--kpt-glass-bg);
    backdrop-filter: blur(var(--kpt-glass-blur));
    -webkit-backdrop-filter: blur(var(--kpt-glass-blur));
    box-shadow: var(--kpt-shadow-sm);
}
.kpt-header--sticky.is-hidden { transform: translateY(-100%); }

.kpt-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--kpt-space-md);
    width: 100%;
}

/* Logo size fixed and consistent — never stretches, never makes the
   header too tall on any breakpoint. */
.kpt-header__brand {
    display: flex;
    align-items: center;
    min-width: 0;
}
.kpt-header__brand img,
.kpt-header__brand .custom-logo {
    max-height: 36px;
    width: auto;
    height: auto;
    display: block;
}

.kpt-header__site-name {
    font-family: var(--kpt-font-display);
    font-size: var(--kpt-text-lg);
    font-weight: 700;
    background: var(--kpt-gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40vw;
}

/* Desktop nav */
.kpt-header__nav { display: none; }
.kpt-nav-menu {
    display: flex;
    align-items: center;
    gap: clamp(var(--kpt-space-md), 2vw, var(--kpt-space-xl));
}
.kpt-nav-menu > li > a {
    font-size: var(--kpt-text-sm);
    font-weight: var(--kpt-weight-medium);
    color: var(--kpt-text-secondary);
    padding: var(--kpt-space-xs) var(--kpt-space-xs);
    position: relative;
    transition: color var(--kpt-transition-fast);
}
/* Active + hover gradient underline */
.kpt-nav-menu > li > a::after {
    content: '';
    position: absolute;
    left: 50%; right: 50%; bottom: -4px;
    height: 2px;
    background: linear-gradient(90deg, var(--kpt-gold), var(--kpt-purple-light));
    transition: left var(--kpt-transition-normal), right var(--kpt-transition-normal);
    border-radius: var(--kpt-radius-full);
}
.kpt-nav-menu > li > a:hover,
.kpt-nav-menu > li.current-menu-item > a {
    color: var(--kpt-gold);
}
.kpt-nav-menu > li > a:hover::after,
.kpt-nav-menu > li.current-menu-item > a::after {
    left: 0; right: 0;
}

.kpt-header__actions {
    display: flex;
    align-items: center;
    gap: var(--kpt-space-xs);
    flex-shrink: 0;
}
.kpt-search-trigger,
.kpt-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--kpt-touch-min);
    height: var(--kpt-touch-min);
    color: var(--kpt-text-primary);
    border-radius: var(--kpt-radius-sm);
    transition: background var(--kpt-transition-fast), color var(--kpt-transition-fast);
}
.kpt-search-trigger:hover,
.kpt-menu-toggle:hover {
    background: rgba(201,168,76,0.12);
    color: var(--kpt-gold);
}

/* Header hamburger visible on mobile (top-right beside search) */
.kpt-header .kpt-menu-toggle--header {
    display: flex;
}
.kpt-header__live-link { text-decoration: none; }

/* Hamburger */
.kpt-menu-toggle {
    flex-direction: column;
    gap: 4px;
}
.kpt-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform var(--kpt-transition-fast), opacity var(--kpt-transition-fast);
}
.kpt-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.kpt-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.kpt-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── MOBILE DRAWER ───────────────────────────────────────── */
.kpt-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--kpt-transition-normal);
    z-index: var(--kpt-z-overlay);
}
.kpt-mobile-menu-overlay.is-visible { opacity: 1; pointer-events: auto; }

.kpt-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 84vw);
    background: var(--kpt-bg-secondary);
    border-left: 1px solid var(--kpt-border-subtle);
    transform: translateX(100%);
    transition: transform var(--kpt-transition-normal);
    z-index: var(--kpt-z-modal);
    overflow-y: auto;
    padding: calc(var(--kpt-space-lg) + var(--kpt-safe-top)) var(--kpt-space-lg) calc(var(--kpt-space-lg) + var(--kpt-safe-bottom));
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
}
.kpt-mobile-menu.is-open { transform: translateX(0); }

/* Drawer About section */
.kpt-mobile-menu__about {
    padding: var(--kpt-space-md);
    margin-bottom: var(--kpt-space-sm);
    background: linear-gradient(145deg, var(--kpt-surface) 0%, var(--kpt-surface-elevated) 100%);
    border: 1px solid var(--kpt-border-subtle);
    border-radius: var(--kpt-radius-md);
}
.kpt-mobile-menu__brand {
    display: block;
    font-family: var(--kpt-font-display);
    font-size: var(--kpt-text-lg);
    font-weight: 700;
    background: var(--kpt-gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}
.kpt-mobile-menu__tagline {
    font-size: var(--kpt-text-xs);
    color: var(--kpt-text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Drawer social icons */
.kpt-mobile-menu__socials {
    display: flex;
    flex-wrap: wrap;
    gap: var(--kpt-space-xs);
    padding: var(--kpt-space-md) var(--kpt-space-sm) 0;
    margin-top: var(--kpt-space-sm);
    border-top: 1px solid var(--kpt-border-subtle);
}

/* Shared social icon (drawer + footer) */
.kpt-social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--kpt-surface);
    border: 1px solid var(--kpt-border-mid);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kpt-text-secondary);
    transition: all var(--kpt-transition-fast);
}
.kpt-social-icon:hover {
    background: var(--kpt-gold-gradient);
    border-color: transparent;
    color: var(--kpt-bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(201,168,76,0.35);
}
/* Per-network subtle glow accents */
.kpt-social-icon--youtube:hover { background: #ff0000; box-shadow: 0 4px 16px rgba(255,0,0,0.4); }
.kpt-social-icon--facebook:hover { background: #1877f2; box-shadow: 0 4px 16px rgba(24,119,242,0.4); }
.kpt-social-icon--instagram:hover { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.kpt-social-icon--tiktok:hover { background: #010101; box-shadow: 0 4px 16px rgba(255,0,80,0.4); }
.kpt-social-icon--twitter:hover { background: #1d9bf0; }
.kpt-social-icon--whatsapp:hover { background: #25d366; box-shadow: 0 4px 16px rgba(37,211,102,0.4); }
.kpt-social-icon--email:hover { background: var(--kpt-purple-mid); }
.kpt-social-icon--phone:hover { background: var(--kpt-blue-mid); }

.kpt-mobile-nav-menu li { border-bottom: 1px solid var(--kpt-border-subtle); }
.kpt-mobile-nav-menu li:last-child { border-bottom: none; }
/* Mobile drawer active item gradient highlight */
.kpt-mobile-nav-menu a {
    display: flex;
    align-items: center;
    padding: var(--kpt-space-md) var(--kpt-space-md);
    font-size: var(--kpt-text-md);
    font-weight: var(--kpt-weight-medium);
    color: var(--kpt-text-primary);
    min-height: var(--kpt-touch-min);
    position: relative;
    transition: background var(--kpt-transition-fast), color var(--kpt-transition-fast);
}
.kpt-mobile-nav-menu a:hover,
.kpt-mobile-nav-menu .current-menu-item > a {
    background: linear-gradient(90deg, rgba(201,168,76,0.18), rgba(124,93,224,0.10));
    color: var(--kpt-gold);
}
.kpt-mobile-nav-menu .current-menu-item > a::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 4px; height: 60%;
    background: var(--kpt-gold-gradient);
    border-radius: var(--kpt-radius-full);
}

.menu-item-has-children { position: relative; }
.kpt-submenu-caret {
    position: absolute;
    right: 0;
    top: 6px;
    width: var(--kpt-touch-min);
    height: var(--kpt-touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kpt-text-muted);
}
.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--kpt-transition-normal);
    padding-left: var(--kpt-space-md);
}
.sub-menu.is-open { max-height: 500px; }

/* ── DESKTOP: full nav + hide hamburger/header ──────────── */
@media (min-width: 960px) {
    .kpt-header { height: 64px; }
    .kpt-header__nav { display: block; }
    .kpt-header .kpt-menu-toggle--header { display: none; }
}

/* ── BOTTOM MOBILE NAV (no duplicate Menu button) ───────── */
.kpt-bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: calc(var(--kpt-bottom-nav-h) + var(--kpt-safe-bottom));
    padding-bottom: var(--kpt-safe-bottom);
    background: var(--kpt-glass-bg);
    backdrop-filter: blur(var(--kpt-glass-blur));
    -webkit-backdrop-filter: blur(var(--kpt-glass-blur));
    border-top: 1px solid var(--kpt-border-mid);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: var(--kpt-z-sticky);
}
.kpt-bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--kpt-text-muted);
    font-size: 10px;
    font-weight: var(--kpt-weight-medium);
    min-width: var(--kpt-touch-min);
    min-height: var(--kpt-touch-min);
    justify-content: center;
    position: relative;
    transition: color var(--kpt-transition-fast), transform var(--kpt-transition-fast);
}
/* Bottom nav active pill highlight */
.kpt-bottom-nav__item.is-active {
    color: var(--kpt-gold);
}
.kpt-bottom-nav__item.is-active::before {
    content: '';
    position: absolute;
    top: 6px;
    width: 28px; height: 28px;
    background: linear-gradient(135deg, rgba(201,168,76,0.18), rgba(124,93,224,0.18));
    border-radius: 50%;
    z-index: -1;
}
.kpt-bottom-nav__item:hover { color: var(--kpt-gold-light); transform: translateY(-1px); }
.kpt-bottom-nav__item--shorts .kpt-icon {
    background: var(--kpt-gradient-accent);
    border-radius: var(--kpt-radius-sm);
    color: #fff;
    width: 28px;
    height: 20px;
}

@media (min-width: 960px) {
    .kpt-bottom-nav { display: none; }
}
