/* =====================================================================
   iOSSpecialist Expert — MOBILE RESPONSIVE SUPPLEMENT
   Patches for style.css · header.css · animations.css
   All breakpoints: 480px · 768px · 992px · 1200px
   ===================================================================== */

/* =====================================================================
   GLOBAL MOBILE FIXES
   ===================================================================== */

/* Prevent overflow on any screen */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100vw; }

/* Touch-friendly tap targets */
@media (max-width: 767px) {
    .btn { min-height: 44px; }
    a, button { -webkit-tap-highlight-color: transparent; }
}

/* =====================================================================
   HEADER — MOBILE
   ===================================================================== */

/* Shrink header pill on mobile */
@media (max-width: 991px) {
    .header-nav-wrapper {
        margin: 8px 10px;
        padding: 8px 14px;
        border-radius: 20px;
    }
    .navbar-brand { font-size: 1rem; }
    .brand-icon   { width: 28px; height: 28px; font-size: 0.8rem; border-radius: 7px; }

    /* Hide search bar on mobile (use offcanvas instead) */
    .header-search-bar { display: none; }
    body { padding-top: 86px; } /* Increased to prevent overlap */
}

@media (max-width: 480px) {
    .header-nav-wrapper { margin: 6px 8px; padding: 7px 12px; }
    .navbar-brand span  { display: none; } /* show only icon on tiny screens */
}

/* =====================================================================
   HERO SECTION — MOBILE
   ===================================================================== */

@media (max-width: 991px) {
    .hero-wrap { padding-top: 64px; min-height: auto; padding-bottom: 60px; }
    .hero-title { font-size: clamp(2rem, 8vw, 3.5rem); }
    .hero-sub   { font-size: 0.95rem; }
    .hero-cta-row { flex-direction: column; }
    .hero-cta-row .btn { justify-content: center; width: 100%; }
    .hero-trust-row { gap: 12px; }
    .hero-trust-item { font-size: 0.8rem; }
}

@media (max-width: 767px) {
    .hero-title  { font-size: clamp(1.8rem, 9vw, 3rem); margin-bottom: 16px; }
    .hero-sub    { font-size: 0.9rem; max-width: 100%; }
    .hero-eyebrow { font-size: 0.72rem; }
    .hero-trust-row { flex-direction: column; gap: 8px; padding-top: 16px; }
}

/* =====================================================================
   STATS BAR — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .stats-bar { padding: 20px 0; }
    .stats-bar > .container > div { gap: 0; flex-wrap: wrap; }
    .stat-item  { flex: 1 1 50%; padding: 14px 10px; }
    .stat-num   { font-size: 1.8rem; }
    .stat-label { font-size: 0.72rem; }
    .stat-divider { display: none; }
}

@media (max-width: 480px) {
    .stat-item { flex: 1 1 50%; padding: 12px 8px; }
    .stat-num  { font-size: 1.5rem; }
}

/* =====================================================================
   SERVICE CARDS — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .service-card { padding: 22px 18px; border-radius: 18px; }
    .service-icon { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 13px; }
    .service-card h4 { font-size: 1rem; }
    .service-card p  { font-size: 0.82rem; }
}

/* =====================================================================
   HOW IT WORKS — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .step-line::after { display: none; }
    .step-circle { margin-bottom: 10px; }
    .step-title  { font-size: 0.9rem; }
    .step-desc   { font-size: 0.8rem; }
}

/* =====================================================================
   FEATURE GRID — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .feature-chip { padding: 12px 14px; }
    .feature-chip span { font-size: 0.82rem; }
}

/* =====================================================================
   TESTIMONIALS — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .testimonial-card { padding: 20px; border-radius: 16px; }
    .testimonial-quote { font-size: 0.85rem; }
    .testimonial-name  { font-size: 0.85rem; }
}

/* =====================================================================
   AUTH PAGES (Login / Register) — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .auth-page { padding: 80px 12px 40px; }
    .auth-card  { padding: 28px 20px; border-radius: 22px; }
    .auth-logo-icon { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; }
    .auth-title { font-size: 1.3rem; }
    .auth-sub   { font-size: 0.8rem; }
    .step-indicator { margin-bottom: 20px; }
    .step-dot { width: 28px; height: 28px; font-size: 0.7rem; }
}

@media (max-width: 480px) {
    .auth-card { padding: 22px 16px; border-radius: 18px; }
    .auth-logo-icon { width: 46px; height: 46px; font-size: 1.3rem; }
}

/* =====================================================================
   GLASS CARDS / TILT — MOBILE (disable 3D on touch)
   ===================================================================== */

@media (hover: none) {
    .tilt-card        { transform: none !important; }
    .tilt-card:hover  { transform: translateY(-4px) !important; }
    .tilt-shine       { display: none; }
    #ios-cursor, #ios-cursor-ring { display: none !important; }
}

/* =====================================================================
   FOOTER — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .footer-top { padding: 40px 0 30px; }
    .footer-brand-name { font-size: 1.15rem; }
    .footer-tagline    { font-size: 0.83rem; max-width: 100%; }
    .footer-col-title  { margin-top: 4px; margin-bottom: 12px; }
    .footer-links li a { font-size: 0.85rem; }
    .footer-contact-icon { width: 30px; height: 30px; font-size: 0.8rem; }
    .footer-contact-text { font-size: 0.82rem; }
    .footer-newsletter-input { flex-direction: column; }
    .footer-newsletter-input input  { width: 100%; }
    .footer-newsletter-input button { width: 100%; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 12px; padding: 18px 0; }
    .footer-legal-links { justify-content: center; flex-wrap: wrap; gap: 12px; }
    .footer-payment-icons { justify-content: center; }
    .footer-social { justify-content: flex-start; flex-wrap: wrap; }
}

/* =====================================================================
   MODAL — MOBILE
   ===================================================================== */

@media (max-width: 575px) {
    .modal-content  { border-radius: 20px 20px 0 0; margin: auto 0 0; }
    .modal-dialog   { margin: 0; display: flex; align-items: flex-end; min-height: 100vh; }
    .modal-body     { padding: 20px; }
    .modal-header   { padding: 20px; }
    .modal-footer   { padding: 14px 20px; }
}

/* =====================================================================
   OFFCANVAS — MOBILE  (already mobile, ensure body height)
   ===================================================================== */

@media (max-width: 767px) {
    .offcanvas.mobile-menu { width: 88vw !important; max-width: 320px !important; }
    .mobile-menu-header    { padding: 20px 16px; }
    .mobile-user-card      { margin: 12px; padding: 14px; }
    .mobile-auth-buttons   { padding: 14px; }
    .mobile-nav-list       { padding: 6px 8px; }
    .mobile-nav-item a, .mobile-nav-item button { padding: 11px 12px; }
}

/* =====================================================================
   SECTION PADDING — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .section-pad    { padding: 50px 0; }
    .section-pad-sm { padding: 30px 0; }
    .section-title  { font-size: clamp(1.5rem, 6vw, 2rem); }
    .section-sub    { font-size: 0.9rem; }
    .section-eyebrow { font-size: 0.72rem; }

    /* Container horizontal padding */
    .container { padding-left: 16px; padding-right: 16px; }
}

@media (max-width: 480px) {
    .section-pad { padding: 40px 0; }
    .container   { padding-left: 12px; padding-right: 12px; }
}

/* =====================================================================
   DROPDOWN MENUS — MOBILE-SAFE
   ===================================================================== */

@media (max-width: 767px) {
    .dropdown-menu {
        min-width: 180px !important;
        font-size: 0.85rem !important;
    }
    .dropdown-item { padding: 9px 12px !important; }
}

/* =====================================================================
   BUTTONS — MOBILE
   ===================================================================== */

@media (max-width: 480px) {
    .btn { font-size: 0.875rem; padding: 11px 20px; }
    .btn-ios-primary, .btn-ios-ghost { border-radius: 14px; }
}

/* =====================================================================
   CTA SECTION — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .cta-section .d-flex { flex-direction: column; align-items: stretch; }
    .cta-section .btn    { justify-content: center; }
}

/* =====================================================================
   IOS BADGE — MOBILE
   ===================================================================== */

@media (max-width: 480px) {
    .ios-badge { font-size: 0.7rem; padding: 4px 10px; }
}

/* =====================================================================
   SMOOTH SCROLL SNAP for mobile service cards
   ===================================================================== */

@media (max-width: 767px) {
    .mobile-scroll-snap {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 14px;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .mobile-scroll-snap > * {
        scroll-snap-align: start;
        flex: 0 0 85%;
        max-width: 85%;
    }
    /* Hide scrollbar but keep scroll */
    .mobile-scroll-snap::-webkit-scrollbar { display: none; }
}

/* =====================================================================
   IMEI / ORDER INPUT FORMS — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .form-control, .form-select { font-size: 0.9rem; padding: 11px 14px; }
    .input-group-text { padding: 10px 12px; font-size: 0.9rem; }
}

/* =====================================================================
   TABLE: CARD MODE on very small screens (optional)
   ===================================================================== */

@media (max-width: 480px) {
    .ios-table-card-mode thead { display: none; }
    .ios-table-card-mode tbody tr {
        display: block;
        background: rgba(255,255,255,0.03);
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 14px;
        margin-bottom: 12px;
        padding: 12px;
    }
    .ios-table-card-mode tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255,255,255,0.04);
        font-size: 0.8rem;
    }
    .ios-table-card-mode tbody td:last-child { border-bottom: none; padding-bottom: 0; }
    .ios-table-card-mode tbody td::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: rgba(255,255,255,0.3);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        margin-right: 10px;
    }
}

/* =====================================================================
   PROFILE / ADD FUNDS PAGES — MOBILE
   ===================================================================== */

@media (max-width: 767px) {
    .ios-panel { border-radius: 16px; }
    .ios-form-label { font-size: 0.78rem; }
}

/* =====================================================================
   ANIMATION PERFORMANCE — MOBILE
   ===================================================================== */

/* Reduce animations on low-power devices */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
