/* ============================================================
   TWISHA INFOTECH — MOBILE & TABLET RESPONSIVE
   /wp-content/themes/astra-child/css/twisha-mobile.css
   Mobile-first breakpoints: <768px mobile, 768-1024px tablet
   ============================================================ */

/* ── TABLET (768–1024px) ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .ti-section { padding: 60px 32px; }
  .ti-section-full { padding: 60px 32px; }
  .footer-widget-area { padding: 48px 32px 32px !important; }

  .ti-plans-grid { grid-template-columns: repeat(2, 1fr); }
  .ti-plan-card.featured { transform: none; }
  .ti-plan-card.featured:hover { transform: translateY(-6px) !important; }

  .ti-services-grid { grid-template-columns: repeat(2, 1fr); }
  .ti-blog-grid { grid-template-columns: repeat(2, 1fr); }
  .ti-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .ti-steps-grid { grid-template-columns: repeat(2, 1fr); }
  .ti-review-grid, .ti-review-track { grid-template-columns: repeat(2, 1fr); }

  /* Pinned scroll — no sticky on tablet */
  #ti-pinned-section { height: auto; }
  #ti-pinned-sticky { position: relative; height: auto; flex-direction: column; }
  .ti-pin-left, .ti-pin-right { width: 100%; padding: 40px 32px; }
  .ti-pin-right { flex-direction: row; flex-wrap: wrap; gap: 12px; }
  .ti-pin-feature { opacity: 1 !important; transform: none !important; flex: 1 1 calc(50% - 6px); }

  /* Horizontal scroll — 2.5 cards showing */
  #ti-hscroll-track { padding: 0 32px; }
  .ti-area-card { width: 240px; }

  /* Sidebar collapses */
  .ti-sticky-sidebar { position: relative; top: auto; }

  /* Nav padding */
  .main-header-bar { padding-left: 32px !important; padding-right: 32px !important; }
}

/* ── MOBILE (<768px) ─────────────────────────────────────────── */
@media (max-width: 767px) {

  /* Disable custom cursor */
  body { cursor: auto !important; }
  #ti-cursor-dot, #ti-cursor-ring { display: none !important; }

  /* Disable scanline on mobile (battery) */
  #ti-scanline { display: none; }

  /* Section padding */
  .ti-section { padding: 48px 20px; }
  .ti-section-full { padding: 48px 20px; }
  .footer-widget-area { padding: 40px 20px 28px !important; }

  /* Typography scale */
  h1.ti-hero-title,
  #twisha-main-shield h1.ti-hero-title {
    font-size: clamp(28px, 8vw, 44px) !important;
    letter-spacing: 0.02em !important;
  }
  .ti-section-title { font-size: clamp(1.4rem, 6vw, 1.8rem) !important; }
  h2 { font-size: clamp(1.2rem, 5vw, 1.6rem) !important; }
  body, p, li { font-size: 15px !important; }

  /* Hero */
  #ti-hero { padding: 100px 20px 60px; min-height: 100svh; }
  .ti-hero-sub { font-size: 14px !important; }
  .ti-hero-buttons { flex-direction: column; align-items: center; }
  .ti-hero-buttons .ti-btn-primary,
  .ti-hero-buttons .ti-btn-outline { width: 100%; max-width: 320px; justify-content: center; }
  .ti-trust-badges { gap: 12px; }
  .ti-trust-badge-item { font-size: 9px; }
  .ti-orb-1 { width: 200px; height: 200px; }
  .ti-orb-2 { width: 150px; height: 150px; }

  /* Ticker */
  #ti-ticker { height: 28px; }
  #ti-ticker-track { font-size: 10px; }

  /* Stats — 2×2 grid */
  .ti-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .ti-stat-number { font-size: clamp(2rem, 8vw, 2.6rem) !important; }

  /* All grids → single column */
  .ti-services-grid { grid-template-columns: 1fr; }
  .ti-plans-grid { grid-template-columns: 1fr; }
  .ti-blog-grid { grid-template-columns: 1fr; }
  .ti-steps-grid { grid-template-columns: 1fr; }
  .ti-review-grid, .ti-review-track { grid-template-columns: 1fr; }

  /* Plans — remove featured elevation on mobile */
  .ti-plan-card.featured { transform: none !important; }

  /* Pinned scroll → stacked cards (no sticky) */
  #ti-pinned-section { height: auto !important; }
  #ti-pinned-sticky { position: relative !important; height: auto !important; flex-direction: column; }
  .ti-pin-left { width: 100%; padding: 40px 20px 20px; }
  .ti-pin-right { width: 100%; padding: 0 20px 40px; }
  .ti-pin-feature { opacity: 1 !important; transform: none !important; }
  .ti-pin-dots { display: none; }

  /* Horizontal scroll → CSS scroll-snap (touch swipe) */
  #ti-hscroll-wrapper { height: auto; overflow: visible; }
  #ti-hscroll-track {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 20px;
    scrollbar-width: none;
    will-change: unset !important;
    transform: none !important;
  }
  #ti-hscroll-track::-webkit-scrollbar { display: none; }
  .ti-area-card {
    flex-shrink: 0;
    width: 240px;
    scroll-snap-align: start;
  }

  /* Buttons full width on mobile */
  .ti-btn-primary, .ti-btn-outline,
  .ti-plan-cta, .ti-plan-cta-filled, .ti-plan-cta-outline {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Nav */
  .main-header-bar { padding: 12px 20px !important; }

  /* Footer */
  .footer-widget-area .widget { margin-bottom: 28px !important; }

  /* Calculator */
  #ti-calc-wrap { padding: 24px 20px !important; }

  /* Sidebar */
  .ti-sticky-sidebar { position: relative; top: auto; margin-top: 32px; }

  /* FAQ */
  .ti-faq-question { font-size: 13px !important; }

  /* CTA strip */
  .ti-cta-strip { padding: 48px 20px; }
  .ti-cta-phone { font-size: clamp(1.4rem, 7vw, 2rem); }

  /* FAB chat button */
  #ti-fab-chat-btn { width: 50px !important; height: 50px !important; bottom: 14px !important; right: 10px !important; }
  #ti-scroll-top { width: 36px !important; height: 36px !important; bottom: 74px !important; right: 10px !important; font-size: 18px !important; }

  /* Ticker bar height */
  #ti-ticker { height: 30px; }

  /* Touch target minimum */
  a, button { min-height: 44px; min-width: 44px; }
  .ti-service-link, .ti-read-more { min-height: unset; min-width: unset; }

  /* Review cards 1 col */
  .ti-review-card { padding: 18px; }

  /* Blog single */
  .single .entry-content { padding: 24px 20px 40px; }
  .ti-author-box { flex-direction: column; text-align: center; }

  /* Trust badges row */
  #ti-trust-bar-new { display: none; } /* hidden on mobile — too cluttered */

  /* Process steps */
  .ti-steps-grid { grid-template-columns: 1fr; gap: 16px; }

  /* WooCommerce */
  .woocommerce ul.products { grid-template-columns: 1fr !important; }

  /* Disable parallax orbs on mobile */
  .ti-orb { animation: none !important; }
}

/* ── REDUCED MOTION ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .ti-reveal, .ti-service-card, .ti-plan-card, .ti-review-card,
  .ti-blog-card, .ti-area-card, .ti-reveal-left, .ti-reveal-right {
    opacity: 1 !important;
    transform: none !important;
  }
  #ti-scanline { display: none; }
  #ti-cursor-dot, #ti-cursor-ring { display: none; }
  body { cursor: auto !important; }
}

/* ── NO HORIZONTAL OVERFLOW ──────────────────────────────────── */
@media (max-width: 767px) {
  body, html { overflow-x: hidden !important; max-width: 100vw; }
  * { max-width: 100%; }
  img, video, canvas { max-width: 100%; height: auto; }
  table { display: block; overflow-x: auto; }
}
