/* ============================================
   StreamsWave Mobile Navigation Fix
   Matching iptvcentral.net pattern
   ============================================ */

/* Nav Toggle Hamburger (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: none;
    border: none;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-light, #fff);
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

/* Hamburger → X animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hide old mobile toggle button (if any remnant in CSS) */
.mobile-menu-toggle {
    display: none !important;
}

/* Hide old mobile-nav (if any remnant) */
.mobile-nav {
    display: none !important;
}

/* Nav CTA button in menu (WhatsApp) */
.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-cta.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.nav-cta.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ============================================
   MOBILE RESPONSIVE (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Show hamburger toggle */
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Hide the desktop nav wrapper label, but keep the ul */
    .main-nav {
        display: block !important;
        position: static;
    }

    /* Convert nav-menu to fullscreen overlay */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        z-index: 1000;
        padding: 20px;
        list-style: none;
        margin: 0;
    }

    /* Show nav when active */
    .nav-menu.active {
        display: flex;
    }

    /* Style nav links for mobile */
    .nav-menu .nav-link,
    .nav-menu li a {
        font-size: 1.2rem;
        padding: 14px 24px;
        display: block;
        text-align: center;
        color: var(--text-light, #fff);
        text-decoration: none;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
        transition: all 0.3s ease;
        border-radius: 8px;
        min-height: 48px;
        line-height: 1.4;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active,
    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(255, 107, 53, 0.15);
        color: var(--primary-color, #ff6b35);
    }

    /* Mobile CTA button */
    .nav-menu .nav-cta,
    .nav-menu .nav-cta.btn-whatsapp {
        margin-top: 20px;
        padding: 14px 30px;
        font-size: 1rem;
        border-radius: 50px;
        min-height: 48px;
    }

    /* Header layout fix */
    .header-content {
        position: relative;
    }

    /* Currency selector adjustment for mobile */
    .currency-selector {
        position: fixed;
        bottom: 80px;
        right: 15px;
        z-index: 998;
    }

    /* Prevent body scroll when nav is open */
    body.nav-open {
        overflow: hidden;
    }
}

/* ============================================
   TABLET RESPONSIVE (max-width: 992px)
   ============================================ */
@media (max-width: 992px) and (min-width: 769px) {
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
    }

    .main-nav {
        display: block !important;
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 26, 46, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        z-index: 1000;
        padding: 20px;
        list-style: none;
        margin: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu .nav-link,
    .nav-menu li a {
        font-size: 1.1rem;
        padding: 12px 24px;
        text-align: center;
        color: var(--text-light, #fff);
        text-decoration: none;
    }

    .header-content {
        position: relative;
    }
}

/* ============================================
   GENERAL MOBILE IMPROVEMENTS
   ============================================ */

/* Better touch targets */
@media (max-width: 768px) {
    /* Ensure all interactive elements have min 48px touch target */
    .btn, button, a.btn, .nav-link, input[type="submit"] {
        min-height: 48px;
    }

    /* Fix hero section for mobile */
    .hero-content {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 30px !important;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    /* Fix section padding for mobile */
    .section {
        padding: 60px 0 !important;
    }

    .section-title {
        font-size: 1.8rem !important;
    }

    /* Fix cards grid for mobile */
    .pricing-grid,
    .features-grid,
    .devices-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    /* Fix footer for mobile */
    .footer-content {
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        display: block;
        padding: 8px 0;
    }

    /* Container padding on mobile */
    .container {
        padding: 0 15px;
    }

    /* Fix FAQ items for mobile */
    .faq-question {
        padding: 15px !important;
        font-size: 0.95rem !important;
    }

    .faq-answer {
        padding: 0 15px 15px !important;
        font-size: 0.9rem !important;
    }

    /* Fix contact form */
    .contact-form {
        padding: 20px !important;
    }

    /* Channel grid mobile */
    .channel-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }

    /* Table responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Image responsive */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
    }
}

/* Small mobile (max-width: 400px) */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.6rem !important;
    }

    .nav-menu .nav-link,
    .nav-menu li a {
        font-size: 1rem;
        padding: 12px 20px;
    }

    .channel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .section-title {
        font-size: 1.4rem !important;
    }

    .btn {
        padding: 10px 18px;
        font-size: 13px;
    }
}
