/* ============================================================
   HEADER.CSS - Complete Styles for AmaderFTP Header
   ============================================================ */

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

body {
    background: #0a0a0a;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
}

/* ========== HEADER - FULLY TRANSPARENT, NO BACKGROUND LAYER ========== */
/* CRITICAL: No background color, no gradient, no backdrop-filter on header container */
.header {
    background: transparent !important;  /* COMPLETE TRANSPARENCY */
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    /* No background, no border, no shadow - fully transparent */
    box-shadow: none;
    backdrop-filter: none;
    border-bottom: none;
}

/* Logo container - no background */
.logo {
    flex-shrink: 0;
    background: transparent;
}

.logo img {
    height: 50px;
    width: auto;
    transition: all 0.3s ease;
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); /* keep visibility on any background */
}

.logo img:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

/* ========== STYLE ATTACHED SQUARE BOX MENU ========== */
/* Desktop Button Group — no gaps, attached boxes, FULLY TRANSPARENT background */
.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0;           /* NO gaps - attached boxes */
    justify-content: center;
    align-items: center;
    background: transparent !important;  /* COMPLETE TRANSPARENCY - NO BACKGROUND UNDER MENU ITEMS */
    margin: 0;
    padding: 0;
}

/* Professional Square Box Menu Items — NO border-radius, sharp 90° corners */
/* Each menu item has its OWN distinct gradient background (colors restored), shadow, and visible styling */
.menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    color: white;
    text-decoration: none;
    border-radius: 0px !important;      /* Sharp 90° corner — no rounding */
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    letter-spacing: 0.3px;
    margin: 0;               /* no spacing between items */
    border-right: 1px solid rgba(255, 255, 255, 0.2); /* thin divider line between items */
    /* Bottom shadow effect - ensures visibility against any background */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

/* Remove border-right from last child */
.button-group .menu-btn:last-child {
    border-right: none;
}

/* Hover effect — subtle lift + scale + enhanced shadow */
.menu-btn:hover {
    transform: translateY(-3px) scale(1.02);
    filter: brightness(1.08);
    z-index: 2;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
    border-right-color: transparent;
}

.menu-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* ========== ORIGINAL VIBRANT MENU COLORS - FULLY RESTORED ========== */
.menu-btn.hindi {
    background: linear-gradient(135deg, #e67e22, #d35400);
}
.menu-btn.english {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.menu-btn.bangla {
    background: linear-gradient(135deg, #27ae60, #1e8449);
}
.menu-btn.tamil {
    background: linear-gradient(135deg, #8e44ad, #6c3483);
}
.menu-btn.korean {
    background: linear-gradient(135deg, #00bcd4, #0097a7);
}
.menu-btn.japanese {
    background: linear-gradient(135deg, #ff6b81, #ff4757);
}
.menu-btn.russian {
    background: linear-gradient(135deg, #5dade2, #2c3e50);
}
.menu-btn.other {
    background: linear-gradient(135deg, #3b5998, #2d4373);
}
.menu-btn.partner {
    background: linear-gradient(135deg, #f39c12, #e67e22);
}
.menu-btn.series {
    background: linear-gradient(135deg, #1abc9c, #16a085);
}
.menu-btn.livetv {
    background: linear-gradient(135deg, #e84118, #c23616);
    animation: pulseGlow 2s infinite;
}
.menu-btn.livetv:hover {
    animation: none;
    box-shadow: 0 4px 14px rgba(232, 65, 24, 0.6);
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(232, 65, 24, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(232, 65, 24, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 65, 24, 0); }
}

/* No pseudo elements interfering */
.menu-btn::after {
    display: none;
}

.menu-btn:focus-visible {
    outline: 2px solid rgba(255,255,240,0.8);
    outline-offset: -1px;
}

/* ========== MOBILE HAMBURGER MENU - ATTACHED SQUARE BOX STYLE ========== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 36px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 6px;
    transition: all 0.3s ease;
    transform-origin: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Mobile Menu Container: glass dark overlay - but menu items themselves have gradient backgrounds */
.mobile-menu-container {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(8, 8, 12, 0.96);
    backdrop-filter: blur(20px);
    z-index: 999;
    padding-top: 100px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-container.active {
    display: block;
    opacity: 1;
    visibility: visible;
    animation: fadeSlideIn 0.35s ease forwards;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile Buttons Container — attached block style, no gaps, COMPLETELY TRANSPARENT background */
.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 0;           /* no gaps — attached boxes vertically */
    padding: 0;
    max-width: 500px;
    margin: 0 auto;
    background: transparent !important;  /* NO BACKGROUND — fully transparent */
}

/* Mobile menu items — sharp square boxes with thin bottom dividers (attached) */
/* Mobile items keep their ORIGINAL COLORS because they inherit the class styles */
.mobile-buttons .menu-btn {
    width: 100%;
    justify-content: center;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 0px !important;       /* sharp corners */
    gap: 12px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.mobile-buttons .menu-btn:last-child {
    border-bottom: none;
}

.mobile-buttons .menu-btn:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

/* Close Button — sharp square */
.close-menu {
    position: absolute;
    top: 20px;
    right: 22px;
    background: rgba(30,30,40,0.9);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 28px;
    width: 48px;
    height: 48px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1002;
    backdrop-filter: blur(8px);
}
.close-menu:hover {
    background: #e74c3c;
    transform: rotate(90deg) scale(1.02);
}

/* Responsive: Hide desktop group on tablet/mobile, show hamburger */
@media (max-width: 900px) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.8rem 1.2rem;
    }
    .button-group {
        display: none;
    }
    .hamburger {
        display: flex;
    }
    .logo img {
        height: 44px;
    }
    .mobile-buttons .menu-btn {
        padding: 0.9rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 0.7rem 1rem;
    }
    .logo img {
        height: 38px;
    }
    .mobile-buttons .menu-btn {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    .close-menu {
        width: 42px;
        height: 42px;
        font-size: 26px;
        top: 14px;
        right: 16px;
    }
}

/* Desktop small adjustments */
@media (max-width: 1200px) {
    .button-group {
        gap: 0;
    }
    .menu-btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Scrollbar beauty */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 0px;
}

/* Loading state for menu items */
.menu-btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}
.menu-btn.loading::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    right: 16px;
    top: 50%;
    margin-top: -9px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    z-index: 5;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

body.menu-open {
    overflow: hidden;
}

/* Critical overrides: ensure header and all child containers have NO background */
.header,
.header .logo,
.header .button-group,
.header .hamburger,
.logo a,
.logo img {
    background: transparent !important;
}

/* Ensure button-group divider lines visible and no container background */
.button-group {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Mobile buttons container transparent */
.mobile-buttons {
    background: transparent !important;
}

/* Safety: menu items retain their gradient backgrounds - no override */
.menu-btn {
    backdrop-filter: none;
}

/* ============================================================
   ADDITIONAL FORCE STYLES (injected via JS in header.php)
   These ensure maximum compatibility and consistency
   ============================================================ */
.header-force-transparent .header,
.header-force-transparent .header * {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
}
.header-force-transparent .button-group,
.header-force-transparent .mobile-buttons,
.header-force-transparent .logo,
.header-force-transparent .hamburger {
    background: transparent !important;
    background-color: transparent !important;
}