﻿/* =============================================================
   GoFru TV — Responsive CSS
   Mobile-first, covers 320 px — 1920 px
   Complements theme.css (do not duplicate base styles here)
   ============================================================= */

/* ---------------------------------------------------------
   0. PERFORMANCE — Compositing, containment, rendering hints
   --------------------------------------------------------- */

/* Promote cards to their own compositor layer on hover/focus
   so hover transitions happen entirely on the GPU. */
.channel-card,
.movie-card,
.pricing-card,
.device-item,
.bento-item {
    will-change: auto;              /* off by default — save memory on 995 cards */
    contain: layout style;          /* isolate layout from the rest of the page   */
    backface-visibility: hidden;    /* prevent Chrome sub-pixel flicker            */
}
.channel-card:hover,
.movie-card:hover,
.pricing-card:hover,
.device-item:hover {
    will-change: transform, box-shadow; /* promote only when about to animate      */
}

/* Defer below-fold section rendering until near viewport.
   Provides ~10–40 ms first-paint savings on heavy pages. */
.channels-section,
.movies-section,
.device-section,
.testimonial-section,
.faq-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 600px; /* estimated height — avoids scroll-jump   */
}

/* Hero and pricing sections are above/near fold — keep normal rendering */
.hero-section,
.pricing-section,
.navbar {
    content-visibility: visible;
}

/* Smooth font rendering across browsers */
body,
.nav-link,
.btn,
.card,
h1, h2, h3, h4, h5, h6 {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---------------------------------------------------------
   1. GLOBAL RESET & BASE STYLES
   --------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    min-width: 320px;
}

img, video, iframe, canvas {
    max-width: 100%;
    height: auto;
}

p, li, td, th, label {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ---------------------------------------------------------
   2. NAVBAR — ALL BREAKPOINTS
   Base (theme.css): fixed pill, top:20px, max-width:1200px
   --------------------------------------------------------- */

/* Nav icons: hidden by default, revealed only in mobile panel */
.nav-icon { display: none !important; }

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    outline: 2px solid rgba(201,169,110,0.6);
    outline-offset: 2px;
    box-shadow: none;
}

/* ── Extra-large desktops (≥ 1400 px) ──────────────────
   Pill looks perfect at this size. Just confirm logo height.
   ─────────────────────────────────────────────────────── */
@media (min-width: 1400px) {
    .navbar {
        padding: 0.75rem 2.5rem !important;
    }

    .navbar-brand img {
        height: 44px !important;
    }
}

/* ── Standard desktop (1200 px – 1399 px) ───────────────
   Comfortable pill, all items visible.
   ─────────────────────────────────────────────────────── */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar {
        padding: 0.75rem 2rem !important;
    }

    .navbar-brand img {
        height: 42px !important;
    }
}

/* ── Small desktop / large tablet landscape (992 px – 1199 px) ──
   All nav items still show (no hamburger).
   7 links + 2 dropdowns + theme toggle can get crowded here —
   tighten spacing, reduce font a touch.
   ────────────────────────────────────────────────────────────── */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .navbar {
        width: calc(100% - 32px) !important;
        padding: 0.65rem 1.25rem !important;
    }

    .navbar-brand img {
        height: 38px !important;
    }

    .navbar-nav .nav-link {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.6rem !important;
        margin: 0 0.1rem !important;
    }

    /* Compact dropdowns at this size */
    .navbar-nav .dropdown-menu {
        font-size: 0.85rem;
    }

    /* Tighten theme-toggle spacing */
    .navbar-nav .theme-toggle {
        margin-left: 0.25rem !important;
        padding: 0.4rem 0.55rem !important;
    }
}

/* ── Tablet & mobile — hamburger visible (< 992 px) ─────
   Pill → slim rounded bar; brand + toggler on one row.
   ─────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {

    /* ── Pill bar top row ─── */
    .navbar {
        width: calc(100% - 24px) !important;
        top: 12px !important;
        padding: 0.55rem 1rem !important;
        border-radius: 16px !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        overflow: visible !important;
    }

    .navbar.scrolled {
        top: 8px !important;
        padding: 0.45rem 1rem !important;
    }

    .navbar > .container-fluid,
    .navbar > .container {
        flex-wrap: wrap !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .navbar-brand {
        flex-shrink: 0 !important;
        padding: 0 !important;
    }

    .navbar-brand img {
        height: 36px !important;
        width: auto !important;
        display: block !important;
    }

    /* Toggler — styled button, active state shows accent */
    .navbar-toggler {
        flex-shrink: 0 !important;
        margin-left: auto !important;
        padding: 7px 10px !important;
        border: 1px solid rgba(255,255,255,0.15) !important;
        border-radius: 10px !important;
        background: rgba(255,255,255,0.06) !important;
        transition: background 0.2s, border-color 0.2s;
    }

    .navbar-toggler[aria-expanded="true"] {
        background: rgba(201,169,110,0.2) !important;
        border-color: var(--accent, #c9a96e) !important;
    }

    /* ── Collapse panel — card that drops below pill ─── */
    .navbar-collapse {
        flex-basis: 100% !important;
        width: 100% !important;
        margin-top: 0.65rem !important;
        background: rgba(18, 18, 22, 0.97) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 14px !important;
        padding: 0.5rem 0.6rem 0.75rem !important;
        box-shadow: 0 16px 40px rgba(0,0,0,0.55) !important;
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
    }

    /* ── Page nav links ─── */
    .navbar-collapse .navbar-nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.1rem !important;
        padding: 0 !important;
    }

    /* Show icons only inside the mobile panel */
    .navbar-collapse .nav-icon {
        display: inline-block !important;
        width: 1.1rem;
        text-align: center;
        margin-right: 0.65rem;
        font-size: 0.85rem;
        opacity: 0.7;
        flex-shrink: 0;
    }

    .navbar-collapse .nav-link {
        display: flex !important;
        align-items: center !important;
        padding: 0.72rem 0.9rem !important;
        margin: 0 !important;
        border-radius: 10px !important;
        font-size: 0.93rem !important;
        font-weight: 600 !important;
        color: rgba(255,255,255,0.72) !important;
        white-space: nowrap;
        min-height: 44px;
        border-left: 3px solid transparent;
        transition: background 0.15s, color 0.15s, border-color 0.15s;
        letter-spacing: 0.01em;
        text-decoration: none !important;
    }

    .navbar-collapse .nav-link:hover,
    .navbar-collapse .nav-link:focus {
        background: rgba(255,255,255,0.07) !important;
        color: #fff !important;
        border-left-color: var(--accent, #c9a96e) !important;
    }

    .navbar-collapse .nav-link:hover .nav-icon,
    .navbar-collapse .nav-link:focus .nav-icon {
        opacity: 1;
        color: var(--accent, #c9a96e);
    }

    /* Kill the desktop underline pseudo--element */
    .navbar-collapse .nav-link::before {
        display: none !important;
    }

    /* ── Divider before utility row ─── */
    .navbar-collapse .navbar-nav::after {
        content: '';
        display: block;
        height: 1px;
        background: rgba(255,255,255,0.1);
        margin: 0.45rem 0.2rem;
    }

    /* ── Currency dropdown ─── */
    .navbar-collapse .dropdown-toggle {
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
    }

    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        float: none !important;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        padding: 0.35rem !important;
        margin: 0.2rem 0 0.3rem !important;
    }

    .navbar-collapse .dropdown-item {
        color: rgba(255,255,255,0.65);
        border-radius: 8px;
        padding: 0.5rem 0.9rem;
        font-size: 0.875rem;
        min-height: 40px;
        display: flex;
        align-items: center;
    }

    .navbar-collapse .dropdown-item:hover,
    .navbar-collapse .dropdown-item:focus {
        color: #fff;
        background: rgba(255,255,255,0.08) !important;
    }

    /* ── Free Trial CTA — full width ─── */
    .navbar-collapse .btn-free-trial {
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        padding: 0.78rem 1rem !important;
        border-radius: 10px !important;
        font-size: 0.95rem !important;
        margin: 0.25rem 0 0.15rem !important;
    }

    /* theme-toggle hidden on mobile via d-none d-lg-block in HTML */
}

/* ── Small phones (≤ 575 px) ── */
@media (max-width: 575.98px) {
    .navbar {
        width: calc(100% - 16px) !important;
        top: 8px !important;
        padding: 0.55rem 0.85rem !important;
        border-radius: 14px !important;
    }

    .navbar.scrolled {
        top: 6px !important;
    }

    .navbar-brand img {
        height: 32px !important;
    }
}

/* ── Very small phones (≤ 374 px) ── */
@media (max-width: 374.98px) {
    .navbar {
        width: calc(100% - 12px) !important;
        top: 6px !important;
        padding: 0.45rem 0.75rem !important;
        border-radius: 12px !important;
    }

    .navbar-brand img {
        height: 28px !important;
    }
}

/* ---------------------------------------------------------
   3. TYPOGRAPHY — FLUID SCALE
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    h1 { font-size: clamp(2rem,   6vw, 3.5rem); }
    h2 { font-size: clamp(1.6rem, 5vw, 2.75rem); }
    h3 { font-size: clamp(1.3rem, 4vw, 2rem); }
}

@media (max-width: 767.98px) {
    h1 { font-size: clamp(1.75rem, 7vw,   2.75rem); }
    h2 { font-size: clamp(1.5rem,  6vw,   2.25rem); }
    h3 { font-size: clamp(1.2rem,  4.5vw, 1.75rem); }
    h4 { font-size: clamp(1rem,    4vw,   1.4rem);  }

    .hero-title    { font-size: clamp(2.2rem,  9vw,   3.25rem) !important; }
    .hero-subtitle { font-size: clamp(1.2rem,  4.5vw, 1.5rem)  !important; }
    .section-title { font-size: clamp(1.5rem,  6.5vw, 2.25rem) !important; }
    .hero-stats-row [style*="font-size:1.8rem"] { font-size: 2.1rem !important; }
    .hero-stats-row [style*="font-size:0.8rem"]  { font-size: 0.9rem  !important; }
}

@media (max-width: 479.98px) {
    h1 { font-size: clamp(1.6rem,  8vw, 2.25rem); }
    h2 { font-size: clamp(1.35rem, 6.5vw, 1.9rem); }
    h3 { font-size: clamp(1.1rem,  5vw, 1.5rem); }

    .hero-title    { font-size: clamp(2rem,   10.5vw, 2.75rem) !important; }
    .hero-subtitle { font-size: clamp(1.15rem, 5vw,   1.35rem) !important; }
    .section-title { font-size: clamp(1.35rem,  7vw,   1.9rem)  !important; }
    .hero-stats-row [style*="font-size:1.8rem"] { font-size: clamp(1.9rem, 8vw, 2.2rem)  !important; }
    .hero-stats-row [style*="font-size:0.8rem"]  { font-size: clamp(0.8rem, 3vw, 0.9rem) !important; }
}

@media (max-width: 374.98px) {
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }

    .hero-title    { font-size: clamp(1.9rem, 11vw, 2.1rem) !important; }
    .hero-subtitle { font-size: 1.15rem !important; }
}

/* ---------------------------------------------------------
   4. INNER-PAGE HERO SECTIONS
   All heroes get padding-top accounting for fixed navbar.
   Desktop values are set in theme.css. These handle mobile.
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .checkout-hero,
    .movies-hero,
    .contact-hero,
    .faq-hero,
    .channels-hero,
    .installation-hero {
        padding-top: 85px !important;
        padding-bottom: 2.5rem !important;
    }

    .checkout-hero-title,
    .movies-hero-title,
    .contact-hero-title,
    .faq-hero-title,
    .installation-hero-title,
    .channels-hero-title {
        font-size: clamp(1.5rem, 7vw, 2.25rem) !important;
    }

    .checkout-hero-subtitle,
    .movies-hero-subtitle,
    .contact-hero-subtitle,
    .faq-hero-subtitle,
    .installation-hero-subtitle,
    .channels-hero-subtitle {
        font-size: clamp(0.875rem, 3.5vw, 1.05rem) !important;
    }
}

@media (max-width: 479.98px) {
    .checkout-hero,
    .movies-hero,
    .contact-hero,
    .faq-hero,
    .channels-hero,
    .installation-hero {
        padding-top: 75px !important;
        padding-bottom: 2rem !important;
    }
}

/* ---------------------------------------------------------
   5. INDEX HERO SECTION
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 80px !important;
        padding-bottom: 3.5rem !important;
        text-align: center;
    }

    /* "Now Live" pill badge */
    .hero-section .container > div:first-child span:last-child {
        font-size: 0.95rem !important;
    }

    /* Stats row: tighten gap so items don't orphan */
    .hero-stats-row {
        gap: 1.5rem !important;
        margin-top: 2.5rem !important;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        width: 100%;
        max-width: 320px;
        text-align: center;
        justify-content: center;
        display: block;
    }
}

@media (max-width: 479.98px) {
    .hero-section {
        padding-top: 70px !important;
    }
}

/* ---------------------------------------------------------
   6. PRICING SECTION
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 1.5rem !important;
    }

    .pricing-card.popular,
    .pricing-section .card.border-primary {
        transform: none !important;
    }
}

@media (max-width: 767.98px) {
    .pricing-grid {
        grid-template-columns: 1fr !important;
    }

    .pricing-card {
        padding: 1.75rem 1.25rem !important;
    }

    .pricing-price {
        font-size: 2.5rem !important;
    }

    .global-connection-selector {
        flex-direction: column !important;
        gap: 0.6rem !important;
        padding: 0.75rem !important;
    }

    .connection-btn {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ---------------------------------------------------------
   7. CHECKOUT PAGE
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .progress-steps {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .progress-step .step-label {
        font-size: 0.65rem !important;
    }

    .progress-step .step-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.875rem !important;
    }

    .progress-line {
        min-width: 20px !important;
    }
}

/* ---------------------------------------------------------
   8. MOVIES / CHANNELS GRIDS
   --------------------------------------------------------- */
/* Bootstrap card-based grids (.movie-grid / .channel-grid) */
@media (max-width: 991.98px) {
    .movie-grid,
    .channel-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 575.98px) {
    .movie-grid,
    .channel-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .movie-card img,
    .channel-card img {
        aspect-ratio: 2/3;
        object-fit: cover;
        border-radius: 6px;
    }
}

/* List-style grids used in movies.php (.mv-grid) and channels.php (.ch-grid)
   These live inside page <style> blocks that load AFTER this file,
   so breakpoints are defined there — this block adds global safety overrides. */
@media (max-width: 479.98px) {
    .mv-grid,
    .ch-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Genre / category tab strip - horizontal scroll (mobile only) */
@media (max-width: 767.98px) {
    .movie-genres,
    .channel-categories,
    .categories-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        flex-wrap: nowrap !important;
    }

    .movie-genres::-webkit-scrollbar,
    .channel-categories::-webkit-scrollbar,
    .categories-tabs::-webkit-scrollbar {
        display: none;
    }
}

/* ---------------------------------------------------------
   9. FAQ PAGE
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .faq-search-wrapper input {
        font-size: 16px;
        padding-left: 3rem !important;
    }

    .faq-hero-title    { font-size: clamp(1.6rem, 8vw, 2.5rem) !important; }
    .faq-hero-subtitle { font-size: clamp(0.875rem, 3.5vw, 1.1rem) !important; margin-bottom: 1.5rem !important; }

    .faq-item .accordion-button {
        padding: 1rem 1.25rem !important;
        font-size: 0.95rem !important;
    }
}

/* ---------------------------------------------------------
   10. CONTACT PAGE
   --------------------------------------------------------- */

/* ── Contact methods — 3 cols → 2 cols → 1 col ─────────── */
.contact-methods-grid {
    /* baseline already set inline (repeat(3,1fr)) —
       override at each breakpoint below                     */
}

@media (max-width: 767.98px) {
    .contact-methods-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
}

@media (max-width: 479.98px) {
    .contact-methods-grid {
        grid-template-columns: 1fr !important;
        gap: 0.875rem !important;
        max-width: 100% !important;
    }

    /* Make each contact-method card horizontal on very small phones */
    .contact-methods-grid > a,
    .contact-methods-grid > div {
        flex-direction: row !important;
        text-align: left !important;
        padding: 1.1rem 1rem !important;
        gap: 1rem !important;
        align-items: center !important;
    }

    /* Badge pill — keep on its own line */
    .contact-methods-grid .contact-badge {
        margin-top: 0 !important;
        align-self: flex-start;
        flex-shrink: 0;
    }
}

/* ── Contact form + sidebar layout ─────────────────────── */
/* Tablet: sidebar drops below form, both full-width */
@media (max-width: 991.98px) {
    .contact-main-grid {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
    }
}

/* ── Form card inner padding ───────────────────────────── */
@media (max-width: 767.98px) {
    .contact-form-section  { padding: 2rem 0 !important; }
    .contact-info-cards    { grid-template-columns: 1fr !important; }

    .contact-main-grid > div:first-child {
        padding: 1.5rem 1.1rem !important;       /* form card */
        border-radius: 18px !important;
    }

    /* Sidebar cards — tighter padding */
    .contact-main-grid > div:last-child > div {
        padding: 1.25rem !important;
        border-radius: 16px !important;
    }
}

/* ── Hero section — mobile padding ────────────────────── */
@media (max-width: 767.98px) {
    .contact-hero {
        padding: 5.5rem 0 3rem !important;
    }

    .contact-hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.75rem) !important;
    }

    .contact-hero p {
        font-size: clamp(0.9rem, 3.5vw, 1.05rem) !important;
        padding: 0 0.5rem;
    }
}

@media (max-width: 479.98px) {
    .contact-hero {
        padding: 4.75rem 0 2.5rem !important;
    }
}

/* ── Form two-column rows → single column on phones ────── */
@media (max-width: 575.98px) {
    .contact-form .form-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }
}

/* ── Submit button — full width on phones ──────────────── */
@media (max-width: 575.98px) {
    .contact-form .btn-submit,
    .contact-form button[type="submit"] {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.9rem 1rem !important;
        font-size: 1rem !important;
    }
}

/* ── Sidebar response-time dividers — better spacing ───── */
@media (max-width: 767.98px) {
    .contact-main-grid > div:last-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }
}

/* ── FAQ mini-grid on contact page ─────────────────────── */
@media (max-width: 479.98px) {
    .contact-faq-grid,
    .contact-faq-grid > * {
        grid-template-columns: 1fr !important;
    }
}

/* ---------------------------------------------------------
   11. INSTALLATION PAGE
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .installation-hero-title    { font-size: clamp(1.5rem, 8vw, 2rem) !important; }
    .installation-hero-subtitle { font-size: 0.9rem !important; }

    .installation-stats {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .installation-stats .stat-item {
        flex: 1 1 calc(50% - 0.5rem) !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        padding: 8px 10px !important;
    }

    .step-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    .guide-content { padding: 1.25rem !important; }
    .troubleshooting-grid,
    .tips-grid { grid-template-columns: 1fr !important; }

    .cta-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .btn-cta-primary,
    .btn-cta-whatsapp {
        width: 100% !important;
        justify-content: center !important;
    }
}

@media (max-width: 575.98px) {
    .app-badges,
    .download-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .app-badge,
    .download-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* ---------------------------------------------------------
   12. SUCCESS PAGE
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .success-section { padding-top: 85px !important; }
    .success-icon    { font-size: 3rem !important; }
}

/* Summary grid: 2-col is fine on tablets but goes 1-col on very narrow phones */
@media (max-width: 419.98px) {
    .summary-grid {
        grid-template-columns: 1fr !important;
    }
    .summary-cell {
        padding: 0.9rem 1rem !important;
    }
}

/* ---------------------------------------------------------
   13. FOOTER
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    footer {
        font-size: 0.875rem;
        text-align: center;
    }

    footer .row > [class*="col-"] {
        margin-bottom: 2rem;
    }

    footer .row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    footer a {
        display: inline-block;
        padding: 0.2rem 0;
        min-height: 40px;
        line-height: 40px;
    }
}

/* ---------------------------------------------------------
   14. FORMS — iOS AUTO-ZOOM FIX
   Inputs must be >= 16px to prevent iOS Safari zoom on touch devices only.
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="date"],
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* ---------------------------------------------------------
   15. TABLES — HORIZONTAL SCROLL
   --------------------------------------------------------- */
.table-responsive,
.admin-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ---------------------------------------------------------
   16. MODALS — FULL-WIDTH ON PHONES
   --------------------------------------------------------- */
@media (max-width: 575.98px) {
    .modal-dialog,
    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        margin: 0.5rem;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* ---------------------------------------------------------
   17. BENTO / FEATURE GRIDS
   --------------------------------------------------------- */
@media (max-width: 991.98px) {
    .bento-large,
    .bento-medium,
    .bento-small,
    .bento-wide {
        grid-column: span 12 !important;
    }
    .bento-item { min-height: auto !important; }
}

@media (max-width: 479.98px) {
    .bento-item { padding: 1.25rem !important; }
}

@media (max-width: 575.98px) {
    .devices-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    .device-card         { padding: 1rem 0.75rem !important; }
    .device-card .device-icon { font-size: 1.75rem !important; }
    .device-card .device-name { font-size: 0.75rem !important; }
}

/* ---------------------------------------------------------
   18. TESTIMONIALS
   --------------------------------------------------------- */
@media (max-width: 767.98px) {
    .testimonials-grid,
    .reviews-grid {
        grid-template-columns: 1fr !important;
    }
    .testimonial-card,
    .review-card {
        padding: 1.5rem 1.25rem !important;
    }
}

/* ---------------------------------------------------------
   19. THEME TOGGLE (public) & DARK MODE TOGGLE (admin)
   --------------------------------------------------------- */
.theme-toggle,
.dark-mode-toggle {
    min-width: 36px;
    min-height: 36px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ---------------------------------------------------------
   20. ACCESSIBILITY & TOUCH DEVICES
   --------------------------------------------------------- */
*:focus-visible {
    outline: 3px solid rgba(201,169,110,0.75);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (hover: none) and (pointer: coarse) {
    .btn,
    [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }

    .btn:hover,
    .card:hover {
        transform: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@media (prefers-contrast: high) {
    .btn,
    .card,
    .admin-card {
        border: 2px solid currentColor !important;
    }
}

/* ---------------------------------------------------------
   21. MICRO-INTERACTIONS & TRANSITIONS
   Subtle 0.2s–0.3s feedback on all interactive elements.
   GPU-friendly: only animates transform/opacity/box-shadow.
   --------------------------------------------------------- */

/* Buttons — lift + glow on hover/focus */
.btn,
[role="button"],
button {
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.22s ease,
                background-color 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease;
    will-change: transform;
}

.btn:hover:not(:disabled),
[role="button"]:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.015);
}

.btn:active:not(:disabled),
[role="button"]:active:not(:disabled) {
    transform: translateY(1px) scale(0.985);
    transition-duration: 0.1s;
}

/* Ensure minimum touch target on ALL buttons/links */
.btn,
[role="button"],
button,
a.nav-link,
.dropdown-item,
label[for] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
}

/* Navigation links — underline slide-in */
a:not(.btn):not([role="button"]):not(.nav-link):not(.dropdown-item) {
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

/* Cards — smooth depth lift */
.card,
.pricing-card,
.channel-card,
.movie-card,
.bento-item,
.device-item,
.testimonial-card,
.review-card,
.faq-item {
    transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1),
                box-shadow 0.28s ease;
}

/* Form inputs — focus ring expansion + subtle glow */
input,
textarea,
select {
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease;
    will-change: box-shadow;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(201,169,110,0.25), 0 0 0 1px rgba(201,169,110,0.5);
    border-color: var(--accent, #c9a96e) !important;
}

/* Lazy-loaded images — fade in on load */
img.lazy-pending {
    opacity: 0;
    transition: opacity 0.35s ease;
}

img.lazy-loaded {
    opacity: 1;
}

/* Accordion / collapsibles — smooth expand */
.accordion-collapse {
    transition: height 0.3s cubic-bezier(0.4,0,0.2,1) !important;
}

/* Navbar collapse panel */
.navbar-collapse {
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.navbar-collapse.collapsing {
    opacity: 0;
    transform: translateY(-6px);
}
.navbar-collapse.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown menus */
.dropdown-menu {
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform-origin: top center;
}
.dropdown-menu.show {
    animation: dropdownIn 0.18s ease forwards;
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* Skip transitions on reduced-motion (already handled globally in section 20,
   but restate for specificity on new rules) */
@media (prefers-reduced-motion: reduce) {
    .btn, [role="button"], button,
    .card, .pricing-card, .channel-card, .movie-card,
    input, textarea, select,
    img.lazy-pending,
    .navbar-collapse,
    .dropdown-menu {
        transition: none !important;
        animation: none !important;
        will-change: auto !important;
    }
}

/* ---------------------------------------------------------
   22. FLUID IMAGE & MEDIA HELPERS
   --------------------------------------------------------- */
img,
video,
picture > img,
source {
    max-width: 100%;
    height: auto;
    display: block;         /* removes inline baseline gap */
}

/* Responsive iframes (video embeds) */
.iframe-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.iframe-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ---------------------------------------------------------
   23. PRINT
   --------------------------------------------------------- */
@media print {
    .navbar,
    .admin-sidebar,
    footer,
    .hero-cta,
    .theme-toggle,
    .dark-mode-toggle {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .hero-section,
    .checkout-hero,
    .movies-hero,
    .contact-hero,
    .faq-hero,
    .installation-hero {
        padding-top: 1rem !important;
        background: none !important;
    }

    h1, h2, h3 {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    a {
        color: #000 !important;
        text-decoration: underline;
    }
}
