/* =====================================================
   IPTVZUP v4 — Responsive
   Every section. Audited. Mobile-first.
   ===================================================== */

/* ── Tablet ≤ 1024px ─────────────────────────────────── */
@media (max-width: 1024px) {
    :root { --sv: 72px; }

    /* Hero */
    .hero-inner { gap: 36px; }

    /* Benefits — 2 columns on tablet */
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }

    /* Pricing — 2 columns, star card still stands out */
    .pricing-grid  { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .pricing-card.is-star { transform: scale(1.03); }
    .pricing-card.is-star:hover { transform: scale(1.03) translateY(-7px); }

    /* Stats */
    .stats-grid    { grid-template-columns: repeat(2, 1fr); }

    /* Footer */
    .footer-top    { grid-template-columns: 1fr 1fr; gap: 28px; }

    /* FAQ */
    .faq-wrapper   { grid-template-columns: 1fr; gap: 36px; }
    .faq-contact   { position: static; }

    /* Comparison */
    .comp-grid     { grid-template-columns: 1fr !important; gap: 0; }
    .comp-vs       { flex-direction: row; padding-top: 0; padding: 22px 0; }
    .vs-line       { flex: 1; width: auto; height: 2px; max-height: none; }
    .vs-circle     { flex-shrink: 0; }

    /* Setup guide */
    .steps-grid    { gap: 18px; }
    .device-steps  { grid-template-columns: repeat(2, 1fr); }

    /* 8 device tabs — wrap to 2 rows */
    .device-tabs-nav--8 .device-tab-btn { min-width: 100px; font-size: .8rem; }

    /* Movie carousel */
    .poster-card     { width: 140px; }
    .poster-img-wrap { width: 140px; height: 210px; }
}

/* ── Mobile ≤ 768px ──────────────────────────────────── */
@media (max-width: 768px) {
    :root { --sv: 60px; }

    /* ── Header ── */
    .primary-nav, .header-cta { display: none; }
    .mobile-toggle { display: flex; }

    /* ── Hero ── */
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
        text-align: center;
    }
    .hero-visual   { order: -1; justify-content: center; }
    .hero-screen   { max-width: 320px; margin: 0 auto; }
    .hero-kicker, .hero-badges, .hero-cta-group { justify-content: center; }
    .hero-guarantee { justify-content: center; flex-wrap: wrap; }
    .hero-subtitle  { margin: 0 auto 24px; }
    .hero-float-badge.badge-top    { left: -8px; }
    .hero-float-badge.badge-bottom { right: -8px; }
    .scroll-indicator { display: none; }

    /* ── Steps (3-step intro) ── */
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    /* ── Benefits — 2 CARDS PER ROW on mobile (critical UX fix) ── */
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    /* Tighter card sizing to avoid cramping on 2-col */
    .benefit-card {
        padding: 18px 14px;
    }
    .benefit-icon {
        width: 42px;
        height: 42px;
        margin-bottom: 12px;
    }
    .benefit-icon svg {
        width: 20px;
        height: 20px;
    }
    .benefit-card h3 {
        font-size: .85rem;
        margin-bottom: 6px;
    }
    .benefit-card p {
        font-size: .78rem;
        line-height: 1.55;
    }

    /* ── Device cards ── */
    .device-card       { width: 120px; height: 130px; padding: 16px 10px 12px; gap: 10px; }
    .device-card svg   { width: 36px; height: 36px; }
    .device-card-name  { font-size: .72rem; }
    .device-card-sub   { font-size: .58rem; }
    .devices-track     { gap: 12px; }

    /* ── Movie Carousel ── */
    .poster-card     { width: 120px; }
    .poster-img-wrap { width: 120px; height: 180px; }
    .poster-title    { font-size: .74rem; }
    .poster-info     { padding: 8px 9px 10px; }
    .movies-cta      { flex-direction: column; text-align: center; }
    .movies-cta .btn { width: 100%; justify-content: center; }

    /* ── PRICING — CRITICAL MOBILE ORDER TRICK ──
       Flexbox enables order property.
       12-month (.card-yearly) appears first.         */
    .pricing-grid {
        display: flex;
        flex-direction: column;
        max-width: 400px;
        margin: 0 auto 36px;
        gap: 16px;
    }
    .pricing-card.card-yearly { order: -1; }

    /* Reset star/popular scale on mobile */
    .pricing-card.is-star,
    .pricing-card.is-star:hover {
        transform: none;
        animation: none;
        box-shadow: 0 0 28px rgba(229,9,20,.28), 0 12px 36px rgba(229,9,20,.2);
    }

    /* Trust strip */
    .pricing-trust-strip {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }
    .pts-sep { display: none; }

    /* ── Comparison ── */
    .comp-grid { grid-template-columns: 1fr !important; gap: 0; }
    .comp-vs   { flex-direction: row; padding: 20px 0; }
    .vs-line   { flex: 1; width: auto; height: 2px; max-height: none; }
    .vs-circle { flex-shrink: 0; }

    /* ── Testimonials ── */
    .testimonial-card {
        min-width: calc(100% - 16px);
        max-width: calc(100% - 16px);
    }
    .testimonials-slider { margin: 0; padding: 10px 0; }

    /* ── Setup guide — 8 device tabs ── */
    .device-tabs-nav,
    .device-tabs-nav--8 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
        padding: 4px;
    }
    .device-tab-btn,
    .device-tabs-nav--8 .device-tab-btn {
        min-width: 0;
        padding: 9px 6px;
        font-size: .72rem;
        gap: 4px;
        flex-direction: column;
    }
    .device-tab-btn svg,
    .device-tabs-nav--8 .device-tab-btn svg { width: 14px; height: 14px; }
    .device-steps { grid-template-columns: 1fr; }
    .setup-help-note { flex-direction: column; align-items: flex-start; }
    .setup-wa-btn    { margin-left: 0; width: 100%; justify-content: center; }

    /* ── FAQ ── */
    .faq-trust-stats   { gap: 8px; }
    .faq-contact-btns  { flex-direction: column; gap: 10px; }

    /* ── Footer — ALL columns visible and stacked ── */
    .footer-top {
        grid-template-columns: 1fr;
        gap: 28px;
        text-align: center;
    }
    .footer-tagline { margin: 0 auto 18px; max-width: none; }
    .footer-social  { justify-content: center; }
    .footer-links ul   { align-items: center; }
    .contact-item      { justify-content: center; }
    .footer-badges     { align-items: center; }
    .guarantee-inner   { flex-direction: column; text-align: center; }

    /* ── Footer Payments — mobile fix ── */
    .footer-payments {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 20px 16px 24px;
        text-align: center;
    }
    .payment-label {
        font-size: .82rem;
        color: var(--gray);
        font-weight: 600;
    }
    .payment-icons {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .payment-icon {
        padding: 6px 14px;
        font-size: .78rem;
    }
}

/* ── Small Mobile ≤ 480px ────────────────────────────── */
@media (max-width: 480px) {
    :root { --sv: 52px; }
    .container { padding: 0 16px; }

    /* Header */
    .header-inner { height: 60px; }
    .mobile-menu  { top: 60px; height: calc(100vh - 60px); width: 100%; }

    /* Hero */
    .hero-section  { padding: 76px 0 40px; min-height: auto; }
    .hero-title    { font-size: 1.9rem; }
    .hero-cta-group { flex-direction: column; }
    .btn-lg        { padding: 14px 26px; font-size: .95rem; min-height: 52px; }
    .hero-float-badge { display: none; }
    .hero-screen-wrapper { animation: none; }

    /* All buttons: minimum tap target */
    .btn     { min-height: 48px; padding: 12px 22px; font-size: .9rem; }
    .btn-full { min-height: 52px; }

    /* Benefits — keep 2-per-row but extra compact */
    .benefits-grid { gap: 8px; }
    .benefit-card  { padding: 14px 10px; }
    .benefit-icon  { width: 36px; height: 36px; margin-bottom: 10px; }
    .benefit-icon svg { width: 18px; height: 18px; }
    .benefit-card h3 { font-size: .8rem; }
    .benefit-card p  { font-size: .73rem; }

    /* Movie carousel */
    .poster-card     { width: 100px; border-radius: 7px; }
    .poster-img-wrap { width: 100px; height: 150px; }
    .poster-title    { font-size: .68rem; }
    .poster-info     { padding: 7px 8px 9px; }
    .poster-badge    { font-size: .52rem; padding: 2px 5px; }
    .poster-play-btn { width: 32px; height: 32px; }
    .poster-play-btn svg { width: 14px; height: 14px; }
    .movies-cta      { gap: 12px; }

    /* Pricing */
    .pricing-card  { padding: 22px 14px; }
    .price-amount  { font-size: 2.3rem; }
    .pricing-grid  { max-width: 100%; }
    .star-badge    { font-size: .64rem; padding: 4px 12px; }
    .plan-devices-display { padding: 8px 10px; gap: 6px; }
    .plan-devices-count   { font-size: .88rem; }

    /* Stats */
    .stats-grid    { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card     { padding: 20px 12px; }

    /* Footer — ALL sections always visible */
    .footer-top    { gap: 22px; }
    .footer-top .footer-links,
    .footer-top .footer-contact { display: block !important; }
    .footer-links ul   { gap: 10px; }
    .footer-links a,
    .contact-item a,
    .footer-bottom p { font-size: .82rem; }
    .footer-disclaimer { font-size: .72rem !important; }

    /* Device cards — extra compact */
    .device-card       { width: 100px; height: 112px; padding: 14px 8px 10px; gap: 8px; }
    .device-card svg   { width: 30px; height: 30px; }
    .device-card-name  { font-size: .66rem; }
    .device-card-sub   { display: none; }
    .devices-track     { gap: 10px; }
    .devices-track-wrapper--gap { margin-top: 10px; }

    /* Footer payments — extra compact */
    .footer-payments { padding: 16px 12px 28px; }
    .payment-icons   { gap: 8px; }
    .payment-icon    { padding: 5px 11px; font-size: .73rem; }

    /* WhatsApp float */
    .whatsapp-float { bottom: 16px; right: 16px; width: 52px; height: 52px; }
    .wa-tooltip    { display: none; }

    /* 8-device tabs — 4 per row stays, but even more compact */
    .device-tabs-nav,
    .device-tabs-nav--8 {
        grid-template-columns: repeat(4, 1fr);
    }
    .device-tab-btn,
    .device-tabs-nav--8 .device-tab-btn {
        padding: 7px 4px;
        font-size: .65rem;
        gap: 3px;
    }
    .device-tab-btn svg,
    .device-tabs-nav--8 .device-tab-btn svg { width: 12px; height: 12px; }

    /* Section text */
    .section-title { font-size: clamp(1.5rem, 7vw, 2.4rem); }
    .setup-devices-heading { font-size: 1.1rem; }
}

/* ── Accessibility: Reduce motion ───────────────────── */
@media (prefers-reduced-motion: reduce) {
    .channels-track, .devices-track,
    .hero-screen-wrapper,
    .posters-track { animation: none !important; }
    .hero-content, .hero-visual, .section-header { animation-duration: .01ms !important; }
    .pricing-card.is-star { animation: none !important; }
}

/* ── Touch: Remove hover-only tricks ────────────────── */
@media (hover: none) {
    .btn-primary::after { display: none; }
    .pricing-card:hover,
    .pricing-card.is-star:hover,
    .step-card:hover,
    .benefit-card:hover,
    .poster-card:hover { transform: none; }
    .poster-overlay    { opacity: 1; transform: none; }
    .poster-play       { opacity: 0; }
}

/* ── Landscape Mobile helper ────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section  { min-height: auto; padding: 80px 0 44px; }
    .hero-inner    { gap: 24px; }
}
