/* =====================================================
   VIAMIKRO V2 - RESPONSIVE STYLES
   Complete Mobile & Tablet Optimization
   ===================================================== */

/* ===================================
   MOBILE FIRST (≤ 600px)
   =================================== */
@media (max-width: 600px) {

    /* GLOBAL MOBILE SAFETY */
    * {
        word-wrap: break-word;
        /* Prevent long words from breaking layout */
    }

    img,
    video,
    iframe,
    svg {
        max-width: 100%;
        height: auto;
    }

    section {
        padding: 4rem 0;
        /* Reduce gap between sections */
    }

    /* Typography Scaling */
    html {
        font-size: 14px;
    }

    h1,
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2,
    .section-title {
        font-size: 1.75rem !important;
        margin-bottom: 2rem;
    }

    p,
    .section-subtitle {
        font-size: 0.95rem;
    }

    .container {
        padding: 0 1.25rem;
        /* Slightly more breathing room */
    }

    /* Navigation */
    .mobile-toggle {
        display: flex !important;
    }

    .nav-menu {
        display: none !important;
    }

    .nav-menu.mobile-active {
        display: flex !important;
        flex-direction: column !important;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #0B0F19 !important;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.mobile-active .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .nav-actions {
        display: flex !important;
    }

    .nav-actions .btn {
        display: none !important;
    }

    /* HERO */
    .hero {
        padding-top: 6rem;
        /* Avoid navbar overlap */
        padding-bottom: 3rem;
    }

    .hero-grid,
    .mkh-hero-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        text-align: center;
    }

    .hero-cta-group,
    .mkh-hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .hero-cta-group .btn,
    .mkh-hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-visual,
    .mkh-hero-visual {
        display: flex !important;
        justify-content: center;
        width: 100%;
        max-width: 320px;
        margin: 0 auto 2rem;
        transform: scale(0.9) !important;
    }

    .hero-visual img,
    .mkh-hero-visual img {
        width: 100%;
        height: auto;
    }

    /* GRIDS - FORCE 1 COLUMN EVERYWHERE */
    .dashboard-grid,
    .features-grid,
    .pricing-cards,
    .referral-grid,
    .spotlight-grid,
    .mkh-grid,
    .gallery-grid,
    .faq-wrapper,
    .faq-grid,
    .feature-list-large {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* CARDS */
    .dash-tile,
    .feature-card,
    .price-card,
    .testi-card,
    .mkh-card,
    .faq-item,
    .feature-item {
        padding: 1.5rem !important;
        min-height: auto;
    }

    /* Feature Items (Spotlight) */
    .feature-item {
        width: 100%;
        box-sizing: border-box;
    }

    /* Spotlight Specifics */
    .spotlight-custom {
        padding: 2rem 0;
        overflow-x: hidden;
    }

    .spotlight-image-container {
        margin-top: 0;
        padding: 0;
    }

    /* IMAGES */
    .spotlight-image-container img,
    .passiwifi-card img {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }

    /* PassiWifi Restoration */
    .passiwifi-card {
        padding: 2rem !important;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .passiwifi-visual {
        display: block !important;
        width: 100%;
        max-width: 250px;
        margin: 2rem auto 0;
        position: static;
        transform: none !important;
    }

    /* TESTIMONIALS - VERTICAL SCROLLABLE BOX */
    .testimonial-marquee {
        height: 500px;
        /* Fixed height for contained scrolling */
        overflow-y: auto;
        /* Allow manual vertical scroll */
        padding: 1rem 0;
        mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent) !important;
        -webkit-mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent) !important;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .marquee-track {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        animation: none !important;
        padding: 2rem 0;
        /* Inner padding for scroll content */
    }

    .testi-card {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        transform: none !important;
        margin: 0;
        flex-shrink: 0;
        /* Prevent squishing */
    }

    /* REFERRAL SIMULATOR */
    .simulator-body {
        padding: 0;
    }

    .simulator-results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* FOOTER */
    .footer-minimal {
        padding: 3rem 0 2rem;
    }

    /* BUTTONS */
    .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem;
    }
}

/* ===================================
   TABLET (601px - 900px)
   =================================== */
@media (min-width: 601px) and (max-width: 900px) {
    html {
        font-size: 15px;
    }

    /* Navigation */
    .nav-menu {
        gap: 1.5rem;
        padding: 0.5rem 1rem;
    }

    /* Hero */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
        text-align: center;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .hero-visual {
        transform: scale(1.05);
        max-width: 600px;
        margin: 0 auto;
    }

    .floating-router {
        width: 150px;
        height: 150px;
        right: -40px;
        bottom: -30px;
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    /* Pricing */
    .pricing-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Referral */
    .referral-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* PassiWifi */
    .passiwifi-card {
        flex-direction: column;
        text-align: center;
        padding: 3rem;
    }

    .passiwifi-visual {
        position: static;
        width: 100%;
        height: 200px;
        margin-top: 2rem;
    }
}

/* ===================================
   DESKTOP POLISH (> 900px)
   =================================== */
@media (min-width: 901px) {

    /* Hide mobile toggle */
    .mobile-toggle {
        display: none !important;
    }

    /* Ensure desktop nav is visible */
    .nav-menu {
        display: flex !important;
    }

    .nav-actions {
        display: flex;
    }
}

/* ===================================
   LANDSCAPE MODE FIXES
   =================================== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        padding: 5rem 0 3rem;
        min-height: auto;
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .floating-badge {
        display: none;
        /* Hide badges in landscape to save space */
    }
}

/* ===================================
   VERY SMALL SCREENS (≤ 360px)
   =================================== */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.75rem !important;
    }
}