/**
 * Mobile Header Optimization
 * Perfect alignment and sizing for mobile devices
 */

/* ===== FIX DOUBLE-TAP ISSUE ON MOBILE ===== */
a, button, .btn, input[type="submit"], input[type="button"],
[role="button"], .clickable, .nav-link, .menu-toggle,
.pricing-select-btn, .contact-option, .lang-btn {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Remove hover delay on touch devices */
@media (hover: none) and (pointer: coarse) {
    * {
        -webkit-tap-highlight-color: transparent !important;
    }
    
    a:hover, button:hover, .btn:hover {
        transition-delay: 0s !important;
    }
}


/* ===== HIDE SECTIONS ON MOBILE ===== */
@media (max-width: 767px) {
    /* Hide hero features list */
    .hero-features {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    /* Hide WHY CHOOSE US / Features section */
    .features-section {
        display: none !important;
    }
    
    /* Make hero-stats more prominent on mobile */
    .hero-stats {
        display: flex !important;
        justify-content: center !important;
        gap: 15px !important;
        margin-top: 20px !important;
        padding: 15px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 12px !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    
    .hero-stats .stat {
        text-align: center !important;
        flex: 1 !important;
    }
    
    .hero-stats .stat-value {
        font-size: 1.4rem !important;
        font-weight: 700 !important;
        color: #ff0000 !important;
    }
    
    .hero-stats .stat-label {
        font-size: 0.7rem !important;
        color: rgba(255, 255, 255, 0.7) !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
    }
}
/* ===== MOBILE HEADER IMPROVEMENTS ===== */
@media (max-width: 992px) {
    /* Header container */
    .navbar,
    header.navbar,
    .header {
        padding: 10px 15px !important;
        min-height: 60px !important;
        display: flex !important;
        align-items: center !important;
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Main container inside header */
    .navbar-container,
    .nav-container,
    .header-container {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 10px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* ===== LOGO SECTION ===== */
    .logo-area,
    .navbar-brand,
    .header-logo {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        text-decoration: none !important;
        height: 40px !important;
    }
    
    /* Logo icon */
    .logo-icon,
    .logo-area img,
    .navbar-brand img {
        width: 32px !important;
        height: 32px !important;
        object-fit: contain !important;
    }
    
    /* Logo text */
    .logo-text {
        font-family: 'Bebas Neue', sans-serif !important;
        font-size: 1.3rem !important;
        line-height: 1 !important;
        letter-spacing: -0.02em !important;
        display: flex !important;
        align-items: baseline !important;
        gap: 2px !important;
    }
    
    .logo-text .super {
        color: #fff !important;
    }
    
    .logo-text .iptv {
        color: #ff0000 !important;
    }
    
    .logo-text .plus {
        color: #ff0000 !important;
        font-weight: bold !important;
        font-size: 1rem !important;
    }
    
    /* ===== RIGHT SIDE ACTIONS ===== */
    .nav-actions,
    .header-actions,
    .navbar-actions {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-shrink: 0 !important;
        height: 40px !important;
    }
    
    /* Hide Sign In button on mobile */
    .nav-actions .btn-outline,
    .nav-actions a[href*="login"],
    .nav-actions a[href*="sign-in"],
    .nav-actions a[href*="account"],
    .header-actions .btn-outline,
    .header-actions a[href*="login"],
    .header-actions a[href*="sign-in"],
    .header-actions a[href*="account"],
    .navbar-actions .btn-outline {
        display: none !important;
    }
    
    /* Get Started button - optimized */
    .nav-actions .btn-primary,
    .header-actions .btn-primary,
    .navbar-actions .btn-primary {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 18px !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        height: 40px !important;
        border-radius: 8px !important;
        background: #ff0000 !important;
        color: white !important;
        border: none !important;
        white-space: nowrap !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }
    
    /* Language switcher - compact */
    .lang-switcher {
        position: relative !important;
        height: 40px !important;
        margin: 0 !important;
    }
    
    .lang-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;
        padding: 8px 12px !important;
        height: 40px !important;
        font-size: 0.85rem !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        color: white !important;
        cursor: pointer !important;
        white-space: nowrap !important;
    }
    
    .lang-btn i {
        font-size: 0.8rem !important;
    }
    
    /* Menu toggle button */
    .menu-toggle,
    .hamburger,
    .mobile-menu-btn,
    .nav-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        flex-shrink: 0 !important;
        color: white !important;
        font-size: 1.2rem !important;
        transition: all 0.3s ease !important;
    }
    
    .menu-toggle:hover,
    .hamburger:hover,
    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Hamburger icon */
    .hamburger-icon,
    .menu-icon {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        width: 20px !important;
    }
    
    .hamburger-icon span,
    .menu-icon span {
        display: block !important;
        width: 100% !important;
        height: 2px !important;
        background: white !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
    }
}

/* ===== EXTRA SMALL DEVICES (< 480px) ===== */
@media (max-width: 480px) {
    .navbar,
    header.navbar,
    .header {
        padding: 8px 12px !important;
        min-height: 56px !important;
    }
    
    /* Logo - smaller */
    .logo-area,
    .navbar-brand {
        height: 36px !important;
    }
    
    .logo-icon,
    .logo-area img,
    .navbar-brand img {
        width: 28px !important;
        height: 28px !important;
    }
    
    .logo-text {
        font-size: 1.15rem !important;
    }
    
    .logo-text .plus {
        font-size: 0.9rem !important;
    }
    
    /* Actions - smaller */
    .nav-actions,
    .header-actions,
    .navbar-actions {
        gap: 6px !important;
        height: 36px !important;
    }
    
    .nav-actions .btn-primary,
    .header-actions .btn-primary,
    .navbar-actions .btn-primary {
        padding: 8px 14px !important;
        font-size: 0.85rem !important;
        height: 36px !important;
    }
    
    .lang-btn {
        padding: 6px 10px !important;
        height: 36px !important;
        font-size: 0.8rem !important;
    }
    
    .menu-toggle,
    .hamburger,
    .mobile-menu-btn,
    .nav-toggle {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.1rem !important;
    }
    
    .hamburger-icon,
    .menu-icon {
        width: 18px !important;
        gap: 3px !important;
    }
}

/* ===== VERY SMALL DEVICES (< 360px) ===== */
@media (max-width: 360px) {
    .navbar,
    header.navbar,
    .header {
        padding: 8px 10px !important;
    }
    
    /* Hide language switcher on very small screens */
    .lang-switcher {
        display: none !important;
    }
    
    /* Logo - even smaller */
    .logo-text {
        font-size: 1.05rem !important;
    }
    
    .logo-text .plus {
        font-size: 0.85rem !important;
    }
    
    /* Get Started button - compact */
    .nav-actions .btn-primary,
    .header-actions .btn-primary {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }
}

/* ===== TABLET SIZE (768px - 992px) ===== */
@media (min-width: 768px) and (max-width: 992px) {
    /* Show Sign In button on tablets */
    .nav-actions .btn-outline,
    .header-actions .btn-outline {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        height: 40px !important;
        border-radius: 8px !important;
        background: transparent !important;
        color: white !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        white-space: nowrap !important;
    }
    
    .nav-actions,
    .header-actions {
        gap: 10px !important;
    }
}

/* ===== STICKY HEADER ===== */
@media (max-width: 992px) {
    .navbar.sticky,
    header.navbar.sticky,
    .header.sticky {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(15px) !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    }
}

/* ===== MOBILE MENU ===== */
@media (max-width: 992px) {
    .nav-menu,
    .mobile-menu {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        padding: 20px !important;
        max-height: calc(100vh - 60px) !important;
        overflow-y: auto !important;
        display: none !important;
        z-index: 999 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    }
    
    .nav-menu.active,
    .mobile-menu.active {
        display: block !important;
    }
    
    .nav-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .nav-link {
        display: block !important;
        padding: 14px 20px !important;
        text-align: center !important;
        color: white !important;
        text-decoration: none !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: 8px !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 0, 0, 0.1) !important;
        color: #ff0000 !important;
    }
}

/* ===== FIX ALIGNMENT ISSUES ===== */
@media (max-width: 992px) {
    /* Ensure everything is vertically centered */
    .navbar *,
    .header * {
        box-sizing: border-box !important;
    }
    
    /* Remove any conflicting margins/paddings */
    .logo-area *,
    .nav-actions *,
    .header-actions * {
        margin: 0 !important;
    }
    
    /* Ensure buttons don't wrap */
    .btn,
    button,
    a.btn {
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
}

/* ===== ACTIVE STATES ===== */
@media (max-width: 992px) {
    .btn-primary:active,
    .lang-btn:active,
    .menu-toggle:active {
        transform: scale(0.95) !important;
        opacity: 0.9 !important;
    }
}
