/* ═══════════════════════════════════════════════════════════════
   NetMirror Hub — Responsive Breakpoints
   Mobile-First Approach
   ═══════════════════════════════════════════════════════════════ */

/* ─── Small Tablets (≥640px) ─────────────────────────────────── */
@media (min-width: 640px) {
    h1 {
        font-size: var(--text-5xl);
    }

    h2 {
        font-size: var(--text-4xl);
    }

    .hero h1 {
        font-size: var(--text-5xl);
    }

    .hero-stats {
        gap: var(--space-10);
    }

    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pros-cons {
        grid-template-columns: 1fr 1fr;
    }

    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── Tablets (≥768px) ───────────────────────────────────────── */
@media (min-width: 768px) {
    .hero h1 {
        font-size: var(--text-6xl);
    }

    .hero-description {
        font-size: var(--text-xl);
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-top {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-card-body {
        padding: var(--space-6);
    }

    .author-box {
        flex-direction: row;
    }
}

/* ─── Small Laptops (≥1024px) ────────────────────────────────── */
@media (min-width: 1024px) {

    /* Header desktop nav visible */
    .nav-desktop {
        display: block;
    }

    .header-cta {
        display: inline-flex;
    }

    .menu-toggle {
        display: none;
    }

    .nav-mobile {
        display: none;
    }

    /* Hero Layout */
    .hero {
        min-height: 100vh;
    }

    .hero h1 {
        font-size: var(--text-6xl);
    }

    /* Footer */
    .footer-top {
        grid-template-columns: 1.5fr repeat(4, 1fr);
    }

    /* Cards */
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .card-grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Page Header */
    .page-header h1 {
        font-size: var(--text-5xl);
    }

    /* Section spacing */
    .section {
        padding: var(--space-24) 0;
    }
}

/* ─── Desktops (≥1280px) ─────────────────────────────────────── */
@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-8);
    }

    .hero-content {
        max-width: 800px;
    }

    .card-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ─── Large Screens (≥1536px) ────────────────────────────────── */
@media (min-width: 1536px) {
    .container {
        max-width: 1440px;
    }
}

/* ─── Mobile-Specific (≤639px) ───────────────────────────────── */
@media (max-width: 639px) {
    h1 {
        font-size: var(--text-3xl);
    }

    h2 {
        font-size: var(--text-2xl);
    }

    h3 {
        font-size: var(--text-xl);
    }

    h4 {
        font-size: var(--text-lg);
    }

    .container {
        padding: 0 var(--space-4);
    }

    .hero {
        min-height: auto;
        padding: var(--space-20) 0 var(--space-12);
    }

    .hero h1 {
        font-size: var(--text-3xl);
    }

    .hero-description {
        font-size: var(--text-base);
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--space-4);
    }

    .hero-decoration {
        display: none;
    }

    .section {
        padding: var(--space-12) 0;
    }

    .section-header h2 {
        font-size: var(--text-2xl);
    }

    .card-grid,
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }

    .page-header {
        padding: var(--space-20) 0 var(--space-8);
    }

    .page-header h1 {
        font-size: var(--text-3xl);
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .cta-section h2 {
        font-size: var(--text-2xl);
    }

    .download-box {
        padding: var(--space-6);
    }

    .download-meta {
        flex-direction: column;
        align-items: center;
        gap: var(--space-2);
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }

    .author-links {
        justify-content: center;
    }

    .error-code {
        font-size: 5rem;
    }

    .accordion-header {
        font-size: var(--text-base);
        min-height: 44px;
    }

    /* Touch-friendly mobile nav items */
    .nav-menu-mobile li a {
        display: block;
        padding: 14px 20px;
        min-height: 44px;
    }

    /* Social icons wrap on very small screens */
    .social-links {
        flex-wrap: wrap;
        gap: 12px;
    }

    /* Contact page responsive grid */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Hide hero SVG illustration on mobile */
    .svg-illustration {
        display: none;
    }

    table {
        font-size: var(--text-sm);
    }

    th,
    td {
        padding: var(--space-2) var(--space-3);
    }
}

/* ─── Table Responsive Wrapper ──────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─── Page Loader ───────────────────────────────────────────── */
.page-loader {
    transition: opacity 0.3s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ─── Dropdown Accessibility ────────────────────────────────── */
.dropdown-menu {
    visibility: hidden;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    visibility: visible;
}

/* ─── Print Styles ───────────────────────────────────────────── */
@media print {

    .header,
    .footer,
    .nav-mobile,
    .btn,
    .hero-decoration,
    .social-links {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }

    .page-header,
    .section {
        padding: 1rem 0;
    }
}

/* ═══════════════════════════════════════════════════════════════
   STICKY BOTTOM BAR — Mobile navigation for internal links
   ═══════════════════════════════════════════════════════════════ */
.sticky-bottom-bar {
    display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
    .sticky-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(229, 9, 20, 0.3);
        padding: 8px 4px;
        gap: 4px;
        justify-content: space-around;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    }

    .sticky-bar-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        text-decoration: none;
        color: rgba(255, 255, 255, 0.8);
        font-size: 12px;
        font-weight: 500;
        padding: 6px 12px;
        border-radius: 8px;
        transition: all 0.2s ease;
        min-width: 70px;
        min-height: 48px;
        justify-content: center;
    }

    .sticky-bar-item:hover,
    .sticky-bar-item:active {
        color: #E50914;
        background: rgba(229, 9, 20, 0.1);
    }

    .sticky-bar-item svg {
        opacity: 0.8;
    }

    /* Push footer content above sticky bar */
    .footer {
        padding-bottom: 70px;
    }

    /* Cookie consent mobile stacking */
    .cookie-consent-inner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════
   EXIT-INTENT BAR — Catches bouncing users
   ═══════════════════════════════════════════════════════════════ */
.exit-intent-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1005;
    background: linear-gradient(135deg, var(--netflix-red), var(--netflix-red-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    gap: 12px;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(229, 9, 20, 0.4);
}

.exit-intent-bar.visible {
    transform: translateY(0);
}

.exit-intent-content {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    max-width: calc(100% - 60px);
}

.exit-intent-content a {
    color: #fff;
    text-decoration: underline;
    font-weight: 700;
}

.exit-intent-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.exit-intent-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* ═══════════════════════════════════════════════════════════════
   SOCIAL SHARE FAB — Floating action button
   ═══════════════════════════════════════════════════════════════ */
.share-fab {
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 998;
}

@media (max-width: 768px) {
    .share-fab {
        bottom: 75px; /* above sticky bar */
        right: 16px;
    }
}

.share-fab-trigger {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E50914, #b20710);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(229, 9, 20, 0.4);
    transition: all 0.3s ease;
}

.share-fab-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(229, 9, 20, 0.5);
}

.share-fab-menu {
    position: absolute;
    bottom: 56px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-fab.open .share-fab-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.share-fab-item {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.share-fab-item:hover {
    transform: scale(1.15);
}

.share-whatsapp { background: #25D366; }
.share-telegram { background: #0088cc; }
.share-twitter { background: #1DA1F2; }
.share-copy { background: #555; }

/* ─── FAQ Accordion (iOS/TV pages) ───────────────────────────── */
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--netflix-dark);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--netflix-white);
    transition: all 0.2s ease;
    min-height: 48px;
}

.faq-question:hover {
    background: rgba(229, 9, 20, 0.08);
    border-color: rgba(229, 9, 20, 0.3);
}

.faq-question svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer p {
    padding: var(--space-4) var(--space-5);
    color: var(--netflix-gray-light);
    line-height: 1.7;
}

.faq-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* ═══════════════════════════════════════════════════════════════
   DOWNLOAD PAGE — New Component Styles
   ═══════════════════════════════════════════════════════════════ */

/* Device Nav Buttons */
.nm-device-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Tab buttons horizontal scroll on mobile */
.nm-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.nm-tabs::-webkit-scrollbar {
    display: none;
}

/* Info bar responsive */
@media (max-width: 639px) {
    .nm-info-bar {
        gap: var(--space-4) !important;
    }
    .nm-info-item {
        min-width: 80px;
    }

    /* Device buttons 2-column on mobile */
    [id="choose-device"] div[style*="grid-template-columns"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Tabs scroll horizontal */
    .nm-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        justify-content: flex-start !important;
        padding-bottom: var(--space-2);
    }
    .nm-tab {
        flex-shrink: 0;
        font-size: var(--text-sm) !important;
        padding: var(--space-2) var(--space-4) !important;
    }

    /* Android page 2-col layout becomes single column */
    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Ensure all buttons minimum 48px touch target */
    .nm-device-btn,
    .nm-tab,
    .btn {
        min-height: 48px;
    }

    /* Ensure no text below 14px */
    body {
        font-size: max(var(--text-base), 14px);
    }
    .card-text,
    .text-small,
    p {
        font-size: max(var(--text-sm), 14px);
    }
}

/* ─── Alert/Info Box ────────────────────────────────────────── */
.alert {
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
}
.alert-info {
    background: rgba(0, 113, 235, 0.1);
    border: 1px solid rgba(0, 113, 235, 0.3);
    color: var(--netflix-gray-light);
}

/* ─── Article body text styling ─────────────────────────────── */
.article-body p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--netflix-gray-light);
    margin-bottom: var(--space-4);
}
.article-body h2 {
    color: var(--netflix-white);
    margin-bottom: var(--space-4);
}
.article-body h3 {
    color: var(--netflix-white);
}
.article-body code {
    background: rgba(229, 9, 20, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.95em;
    color: var(--netflix-red);
}

/* ─── Badge styles ──────────────────────────────────────────── */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-green {
    background: rgba(70, 211, 105, 0.2);
    color: #46D369;
}

/* ─── Lead paragraph ────────────────────────────────────────── */
.lead {
    font-size: var(--text-lg);
    color: var(--netflix-gray-light);
    line-height: 1.7;
    max-width: 700px;
}