/* =========================================================
   Throttle Motors - Responsive (mobile-first overrides)
   ========================================================= */

/* ---------- Small mobile ---------- */
@media (max-width: 374px) {
  :root { --gutter: 16px; --fs-h1: 30px; --fs-h2: 26px; }
  .topbar { font-size: 10.5px; }
  .site-logo img { height: 42px; }
  .hero-features li { font-size: 12px; }
}

@media (max-width: 575px) {
  .topbar { font-size: 11.5px; }
  .payments ul { gap: 6px; }
  .payments img { height: 26px; }
  .product-card-body { gap: 12px; padding: 16px; }
  .product-card h4 { font-size: 14px; }
  .product-card .price { font-size: 17px; }
  .product-card .product-foot { padding-top: 12px; }
  .product-card .product-foot .icon { width: 32px; height: 32px; padding: 8px; }
}

@media (max-width: 767px) {
  .container { max-width: 100%; }

  /* stronger overlay so service text stays readable on small cards */
  .service-card::before { background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 55%, rgba(0, 0, 0, 0.15) 100%); }
  .service-card-lg::before { background: linear-gradient(0deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(0, 0, 0, 0.35) 100%); }
  .service-card-body { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
  .service-card-text, .service-card-lg p { color: rgba(255, 255, 255, 0.9); }
  .card-thumb { aspect-ratio: 16 / 10; }

  /* one row, swipe, next card peeking (reviews, gallery) */
  .mobile-slider {
    flex-wrap: nowrap; overflow-x: auto;
    margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter);
    scroll-snap-type: x mandatory; scroll-padding-left: calc(var(--bs-gutter-x) * 0.5);
    scrollbar-width: none;
  }
  .mobile-slider::-webkit-scrollbar { display: none; }
  .mobile-slider > * { flex: 0 0 85%; scroll-snap-align: start; }
}

@media (max-width: 991px) {
  .topbar .container { justify-content: center; }
  .topbar-phone { display: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 576px) {
  .slider-item { flex-basis: calc((100% - 16px) / 2); }
  .hero-media { height: 340px; }
  .hero-btns { grid-template-columns: repeat(2, 1fr); }
  .performance-media { height: 340px; }
  .visit-media { height: 300px; }
  .cta .btn-theme { display: inline-flex; width: auto; min-width: 320px; }
  .cta-inner { text-align: center; }
  .cta .text-muted-light { margin-left: auto; margin-right: auto; }
}

@media (min-width: 768px) {
  :root { --fs-h1: 42px; --fs-h2: 36px; --section-py: 80px; }
  .topbar { font-size: var(--fs-sm); }
  .topbar-phone { font-size: 15px; }
  .hero-features li { font-size: var(--fs-sm); }
  .service-card-text { font-size: var(--fs-sm); }
  .reviews-head { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 24px; }
  .hero-media { height: 420px; }
  .service-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .service-card { min-height: 200px; }
  .service-card-lg { grid-column: span 2; grid-row: span 2; }
  .combo .section-title { font-size: 36px; }
  .performance .section-title, .cta .section-title { font-size: 40px; }
  .security-head .section-title { font-size: 32px; }
  .performance-media { height: 420px; }
  .visit-media { height: 360px; }

  /* Inner pages */
  .page-hero { padding: 64px 0 60px; }
  .page-hero::before { width: 60%; }
  .form-card { padding: 40px 36px; }
  .highlight-band { flex-direction: row; align-items: flex-start; gap: 24px; padding: 40px; }
  .hero-price h2 { font-size: 34px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 992px) {
  :root { --fs-h1: 50px; --fs-h2: 40px; --header-h: 88px; --section-py: 96px; }

  /* Header */
  .site-logo img { height: 56px; }
  .header-main .container { gap: 24px; }
  .header-call, .menu-toggle, .nav-panel-head, .nav-panel-foot, .sub-toggle { display: none !important; }
  .header-book { display: inline-flex; min-height: 48px; font-size: 14px; }

  .nav-panel {
    position: static; inset: auto; flex: 1;
    flex-direction: row; justify-content: center;
    background: none; clip-path: none; visibility: visible;
  }

  /* Desktop menu */
  .main-nav { flex: none; overflow: visible; padding: 0; }
  .main-nav > ul { flex-direction: row; align-items: center; gap: 6px; }
  .main-nav li { position: relative; }
  .main-nav > ul > li,
  .main-nav > ul > li:has(> ul) { border: 0; padding: 0; order: 0; }

  .main-nav > ul > li > a,
  .main-nav > ul > li:has(> ul) > a {
    min-height: var(--header-h); padding: 0 14px; gap: 8px;
    font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none;
    color: var(--heading); pointer-events: auto;
  }
  .main-nav > ul > li > a::after { display: none; }
  .main-nav > ul > li:has(> ul) > a::after {
    display: block; width: 6px; height: 6px; margin: -3px 0 0;
    border: 0; border-right: 2px solid var(--red); border-bottom: 2px solid var(--red);
    transform: rotate(45deg);
  }
  .main-nav > ul > li:hover > a,
  .main-nav > ul > li.active > a,
  .main-nav > ul > li.current-menu-item > a { color: var(--red); background: none; }

  /* Dropdown (level 2) */
  .main-nav > ul > li > ul {
    position: absolute; top: 100%; left: 0; z-index: 10;
    width: 440px; padding: 14px;
    background: var(--white); border: 0; border-top: 2px solid var(--red);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .main-nav li:hover > ul,
  .main-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: none; }
  .main-nav > ul > li > ul > li > a { min-height: 48px; background: var(--grey); color: var(--heading); }
  .main-nav > ul > li > ul > li > a:hover,
  .main-nav > ul > li > ul > li.active > a,
  .main-nav > ul > li > ul > li.current-menu-item > a { background: var(--red); color: var(--white); }

  /* Fly-outs (level 3+) */
  .main-nav ul ul li:has(> ul) { grid-column: auto; }
  .main-nav ul ul li:has(> ul) > a { padding-right: 14px; justify-content: space-between; }
  .main-nav ul ul li:has(> ul) > a::after {
    content: ''; width: 6px; height: 6px;
    border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg);
  }
  .main-nav ul ul ul {
    display: block; position: absolute; top: 0; left: calc(100% + 8px); z-index: 11;
    width: 220px; padding: 8px 14px;
    background: var(--white); border: 0; border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0; visibility: hidden; transform: translateX(10px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  }
  .main-nav ul ul ul a { color: var(--heading); border-color: var(--border-light); }
  .main-nav ul ul ul a:hover { color: var(--red); }
  .main-nav ul ul ul li:last-child > a { border-bottom: 0; }

  /* Hero */
  .hero { padding: 0; }
  .hero-media { position: absolute; top: 0; right: 0; bottom: 0; width: 52%; height: auto; }
  .hero-media::after {
    background: linear-gradient(90deg, var(--dark) 0%, rgba(14, 16, 16, 0.6) 25%, rgba(14, 16, 16, 0) 60%),
                linear-gradient(180deg, rgba(14, 16, 16, 0) 70%, rgba(14, 16, 16, 0.8) 100%);
  }
  .hero-content { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 80px; }
  .hero h1 { margin-bottom: 26px; }
  .lead-text { font-size: 16px; max-width: 600px; }
  .hero-btns { grid-template-columns: auto auto; justify-content: start; }
  .hero-btns .btn-theme { padding-left: 28px; padding-right: 28px; }
  .hero-features { margin-top: 48px; max-width: 600px; }

  /* Highlights */
  .highlights { padding: 18px 0; }
  .highlights li { padding: 6px 24px 6px 0; }

  /* Services */
  .section-head { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin-bottom: 40px; }
  .section-head .section-title { margin: 0; }
  .section-head p { flex: 0 0 420px; }
  .service-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .service-card { min-height: 220px; padding: 20px; }
  .service-card h3 { font-size: 17px; }
  .service-card-lg { padding: 30px; }
  .service-card-lg h3 { font-size: 40px; }
  .service-card-lg .read-more { font-size: 15px; }

  /* MOT + Service */
  .combo .section-title { font-size: 44px; }
  .combo p { margin-bottom: 0; max-width: 620px; }
  .combo::after { width: 40%; height: 100%; }

  /* Performance */
  .performance-media { position: absolute; top: 0; left: 0; bottom: 0; width: 50%; height: auto; }
  .performance-media::after { background: linear-gradient(90deg, rgba(14, 16, 16, 0) 60%, var(--dark) 100%); }
  .performance-content { padding-top: var(--section-py); padding-left: 56px; }
  .performance .section-title { font-size: 46px; }
  .performance .text-muted-light { font-size: 16px; }

  /* Security */
  .security { padding-bottom: calc(var(--section-py) - 16px); }
  .security .text-muted-theme { margin-bottom: 0; }
  .info-card { padding: 28px 24px; }
  .info-card h4 { font-size: 20px; }

  /* Reviews */
  .review-card { padding: 26px 24px; }

  /* Visit */
  .visit .section-title { margin-bottom: 40px; }
  .visit-media { height: 100%; min-height: 420px; }
  .visit-media .btn-map { right: 20px; bottom: 20px; }

  /* CTA */
  .cta .section-title { font-size: 46px; }

  /* Footer */
  .site-footer { padding-top: 80px; }
  .footer-about { max-width: 340px; margin-bottom: 26px; }
  .footer-contact { margin-bottom: 0; }
  .footer-bottom { flex-direction: row; justify-content: space-between; margin-top: 64px; padding-top: 24px; text-align: left; }
  .payments { flex-direction: row; gap: 14px; }
  .footer-legal { justify-content: flex-start; }

  /* Inner pages */
  .slider-track { gap: 24px; }
  .slider-item { flex-basis: calc((100% - 48px) / 3); }
  .slider-4 .slider-item { flex-basis: calc((100% - 72px) / 4); }
  .page-hero { padding: 72px 0 68px; }
  .page-hero::before { width: 55%; }
  .page-hero.has-media { padding: 0; }
  .page-hero.has-media::before { display: none; }
  .page-hero .hero-media { display: block; height: auto; }
  .page-hero.has-media .hero-content { padding-top: 76px; padding-bottom: 84px; }
  .contact-side { display: flex; flex-direction: column; }
  .contact-side .map-frame { flex: 1; min-height: 220px; }
  .contact-side .map-frame iframe { height: 100%; }
  .prose h2 { font-size: 28px; }
  .sticky-lg { position: sticky; top: 150px; }
  .card-soft { padding: 34px 30px; }
}

@media (min-width: 1200px) {
  :root { --fs-h1: 50px; --fs-h2: 44px; }
  .main-nav > ul > li > a,
  .main-nav > ul > li:has(> ul) > a { padding: 0 18px; }
  .hero-content { padding-top: 110px; padding-bottom: 96px; }
}

@media (min-width: 1400px) {
  .hero-media, .performance-media { width: 50%; }
  .section-head .section-title { flex-shrink: 0; }
  .section-head p { flex: 0 1 420px; }
  .performance-content { padding-left: 24px; }
}

/* hover-less devices: keep desktop dropdown usable via JS .open */
@media (min-width: 992px) and (hover: none) {
  .main-nav li.open > ul { opacity: 1; visibility: visible; transform: none; }
}
