/* ══════════════════════════════════════════════════
   MOBILE OVERFLOW FIX — stops left/right shake
   Root cause: elements wider than 100vw
══════════════════════════════════════════════════ */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw;
}

/* Catch all absolute/fixed elements that may overflow */
.hero-float,
.hero-bg-grid,
.sc-glow,
.emi-bg-pattern,
.footer-glow-top {
  pointer-events: none;
}

/* Marquee — prevent it from stretching page */
.marquee-strip {
  overflow: hidden;
  max-width: 100vw;
}

/* Hero canvas should never exceed viewport */
#particleCanvas {
  max-width: 100vw;
  overflow: hidden;
}

/* Prevent any child from stretching body */
section,
.container,
nav,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* ============================================================
   SPEED ZONE – responsive.css
   Media queries for tablet, mobile & tiny screens
   ============================================================ */

/* ── Large Desktop: 1280px+ – already handled in style.css ── */

/* ── Tablet Landscape: max 1024px ── */
@media (max-width: 1024px) {

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: start;
  }

  .footer-tagline { max-width: 100%; }

  .emi-content {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }
  .emi-icon-wrap { margin: 0 auto; }
  .emi-steps { max-width: 480px; margin: 0 auto 36px; }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .whyus-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Tablet Portrait: max 768px ── */
@media (max-width: 768px) {

  /* Cursor – disable custom cursor on touch */
  .cursor-dot,
  .cursor-ring { display: none; }
  body { cursor: auto; }
  button { cursor: pointer; }

  /* Nav */
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: rgba(7,7,9,0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 80px 40px;
    gap: 28px;
    border-left: 1px solid rgba(255,68,0,0.15);
    transition: right 0.4s cubic-bezier(0.76, 0, 0.24, 1);
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-link {
    font-size: 0.8rem;
    letter-spacing: 3px;
  }
  .nav-cta { display: none; }
  .nav-burger { display: flex; z-index: 1000; }

  /* Hero */
  .hero-title {
    font-size: clamp(2.8rem, 14vw, 5rem);
  }
  .hero-subtitle { font-size: 0.85rem; letter-spacing: 3px; }
  .hsp-num { font-size: 1.4rem; }
  .hsp-label { font-size: 0.6rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .hero-btns .btn { width: 100%; max-width: 300px; justify-content: center; }
  .hero-float { display: none; }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .stat-num { font-size: 2.2rem; }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .service-card {
    padding: 28px 24px;
  }

  /* Products */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .product-filters {
    gap: 8px;
  }
  .filter-btn {
    font-size: 0.55rem;
    padding: 8px 16px;
  }

  /* EMI */
  .emi-icon-wrap {
    width: 160px; height: 160px;
  }
  .emi-main-icon { font-size: 4rem; }
  .emi-title { font-size: 1.8rem; }

  /* Why Us */
  .whyus-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .wu-card { padding: 28px 24px; }

  /* Contact */
  .contact-grid { gap: 32px; }
  .map-frame iframe { height: 300px; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-brand {
    grid-column: auto;
    display: block;
  }
  .footer-logo { font-size: 1.5rem; }

  /* Sections */
  .services-section,
  .products-section,
  .emi-section,
  .whyus-section,
  .contact-section { padding: 70px 0; }
  .stats-section { padding: 60px 0; }

  /* Section headers */
  .section-title { font-size: 1.8rem; }
  .section-header { margin-bottom: 40px; }

  /* Modal */
  .modal-body { padding: 28px 20px; }
  .modal-name { font-size: 1.1rem; }

  /* WhatsApp float */
  .whatsapp-float {
    bottom: 20px; right: 20px;
    width: 52px; height: 52px;
    font-size: 1.5rem;
  }
}

/* ── Mobile: max 480px ── */
@media (max-width: 480px) {

  html { font-size: 15px; }

  .container { padding: 0 16px; }

  .hero-title {
    font-size: clamp(2.2rem, 16vw, 3.5rem);
  }
  .hero-badge {
    font-size: 0.55rem;
    padding: 6px 14px;
  }
  .hero-stat-pill {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 14px 24px;
  }

  /* Stats – single column on tiny screens */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat-card { padding: 28px 16px; }
  .stat-num { font-size: 1.8rem; }

  /* Products – single column */
  .products-grid {
    grid-template-columns: 1fr;
  }
  .product-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .product-filters::-webkit-scrollbar { display: none; }
  .filter-btn { flex-shrink: 0; }

  /* Marquee */
  .marquee-track span {
    font-size: 0.6rem;
  }

  /* Preloader */
  .preloader-logo { font-size: 1.8rem; }
  .preloader-bar { width: 220px; }

  /* Nav logo */
  .nav-logo-img { height: 36px; }

  /* Hero logo */
  .hero-logo-img { height: 85px; }
  @media (max-width: 768px) {
  
  /* 1. Prevent desktop hover rules on mobile */
  .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* 2. Format the dropdown menu to stack naturally inside the mobile list */
  .dropdown-menu {
    position: relative; /* Removes floating layout */
    top: 0;
    left: 0;
    transform: none;
    background: rgba(20, 20, 20, 0.6); /* Slightly darker tint for contrast */
    border: none;
    border-left: 2px solid #ff3b00; /* Orange accent line on the left */
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: 100%; /* Spans full width of mobile menu */
    max-height: 0; /* Hidden by default for accordion toggle */
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
  }

  /* 3. Class that activates when clicked on mobile */
  .dropdown.mobile-active .dropdown-menu {
    max-height: 150px; /* Expands smoothly */
    opacity: 1;
    visibility: visible;
    padding: 5px 0;
  }

  /* 4. Fix padding for mobile dropdown links */
  .dropdown-menu li a {
    padding: 10px 30px !important; /* Indented further right than standard menu items */
    font-size: 0.9rem;
  }

  /* 5. Rotate mobile arrow indicator when open */
  .dropdown.mobile-active .dropdown-caret {
    transform: rotate(180deg);
    color: #ff3b00;
  }
}

  /* Service card */
  .sc-icon { width: 52px; height: 52px; font-size: 1.3rem; }
  .sc-title { font-size: 0.9rem; }

  /* EMI steps */
  .emi-step { flex-direction: column; gap: 12px; }
  .es-num { width: 36px; height: 36px; font-size: 0.7rem; }

  /* Contact */
  .ci-card { flex-direction: column; gap: 12px; }
  .ci-icon { width: 36px; height: 36px; font-size: 1rem; }

  /* Footer */
  .footer { padding-top: 60px; }
  .footer-bottom p { font-size: 0.72rem; }

  /* Section spacing */
  .services-section,
  .products-section,
  .emi-section,
  .whyus-section,
  .contact-section { padding: 60px 0; }

  /* Buttons */
  .btn { padding: 12px 24px; font-size: 0.72rem; }
}

/* ── Very small: max 360px ── */
@media (max-width: 360px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.5rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-num { font-size: 1.5rem; }
  .emi-icon-wrap { width: 120px; height: 120px; }
  .emi-main-icon { font-size: 3rem; }
  .footer-social { flex-wrap: wrap; }
}

/* ── Print ── */
@media print {
  .navbar,
  .hero,
  .marquee-strip,
  .preloader,
  .cursor-dot,
  .cursor-ring,
  .whatsapp-float,
  #particleCanvas { display: none !important; }
  body { background: white; color: black; }
  .section-title,
  .stat-num { color: black; text-shadow: none; }
  .accent { color: #cc3300; }
}

/* ── Reduced motion ── */
@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;
  }
  .marquee-track { animation: none; }
  .hero-float    { display: none; }
  .wf-pulse      { animation: none; }
}

/* ── Dark mode tweak (already dark, but for system color-scheme awareness) ── */
@media (prefers-color-scheme: light) {
  /* Site is intentionally dark-only — keep all variables as-is */
  :root {
    color-scheme: dark;
  }
}

/* ── Focus visible for accessibility ── */
:focus-visible {
  outline: 2px solid var(--fire);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb {
  background: var(--fire);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--fire-light); }
* { scrollbar-width: thin; scrollbar-color: var(--fire) var(--dark); }

/* ── Selection ── */
::selection {
  background: rgba(255, 68, 0, 0.35);
  color: #fff;
}

/* ══════════════════════════════════════════════════
   MOBILE HERO — reduce spacing, fit logo properly
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-content {
    padding: 70px 16px 0;
    gap: 8px;
  }
  .hero-logo-wrap {
    margin-bottom: 4px;
  }
  .hero-logo-img {
    width: min(300px, 85vw);
  }
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    margin-bottom: 6px;
  }
  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 6px;
  }
  .hero-stat-pill {
    padding: 8px 18px;
    gap: 8px;
    margin-bottom: 8px;
  }
  .hsp-num  { font-size: 1.3rem; }
  .hsp-label { font-size: 0.58rem; }
  .hero-badge {
    font-size: 0.55rem;
    padding: 6px 14px;
    margin-bottom: 6px;
  }
  .hero-vehicle-btns {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-vehicle-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
  .hero-btns {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  .hero-btns .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 60px 12px 0;
    gap: 6px;
  }
  .hero-logo-img {
    width: min(260px, 88vw);
  }
  .hero-title {
    font-size: clamp(2rem, 13vw, 3rem);
  }
  .hero-subtitle {
    font-size: 0.7rem;
    letter-spacing: 1px;
  }
}

/* ══════════════════════════════════════════════════
   MOBILE NAV — logo sizing
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .nav-logo-img {
    height: 32px;
    max-width: 120px;
  }
  .logo-tag {
    font-size: 0.38rem;
    letter-spacing: 2px;
  }
}

/* ══════════════════════════════════════════════════
   MOBILE FOOTER LOGO
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .footer-logo-img {
    width: 140px;
  }
}

/* ══════════════════════════════════════════════════
   MOBILE EXPLORE BUTTONS
══════════════════════════════════════════════════ */
@media (max-width: 480px) {
  .btn-explore-bike,
  .btn-explore-car {
    font-size: 0.62rem;
    padding: 13px 22px;
    gap: 8px;
  }
  .explore-more-wrap {
    margin-top: 32px;
    padding-top: 24px;
  }
}

/* ══════════════════════════════════════════════════
   PREVENT HORIZONTAL SCROLL — all edge cases
══════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero-float   { display: none !important; }
  .ht-accent, .hero-title {
    word-break: break-word;
  }
  .marquee-strip {
    overflow: hidden !important;
  }
  .marquee-track {
    animation-duration: 18s;
  }
}
