/* ══════════════════════════════════════════════════════════
   MEGAWAH — COMPREHENSIVE RESPONSIVE STYLES
   Professional mobile & tablet breakpoints
   ══════════════════════════════════════════════════════════ */

/* ── Viewport meta safety ───────────────────────────────── */
:root {
  --nav-height-mobile: 80px;
}

/* ══════════════════════════════════════════════════════════
   TABLET — max 1024px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* Navbar logo */
  .nav-logo-img { height: 100px; }

  /* Hero canvas section */
  .hero-wash-section { min-height: 60vh; }

  /* Hero content */
  .hero-content-section { padding: 5rem 2rem 4rem; }
  .hero-title { font-size: clamp(2.4rem, 6vw, 3.8rem); }

  /* Detailing section */
  .detailing-shine-section { min-height: 60vh; }
  .detail-overlay-content { padding: 2rem; }
  .detail-title { font-size: clamp(2rem, 5vw, 3rem); }

  /* Services */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

  /* Detailing info grid */
  .craft-item { grid-template-columns: 1fr; gap: 2rem; }
  .craft-item.reverse { direction: ltr; }
  .craft-visual { min-height: 280px; }

  /* About */
  .about-container { grid-template-columns: 1fr; gap: 3rem; }
  .about-visual { max-width: 600px; margin: 0 auto; }

  /* Before/after */
  .ba-section .section-header { margin-bottom: 2.5rem; }

  /* Pricing */
  .pricing-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .pricing-featured { transform: none; }

  /* Testimonials */
  .testimonial-card { min-width: 340px; }

  /* Contact */
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .booking-wrapper { grid-template-columns: 1fr; padding: 2.5rem; }

  /* Footer */
  .footer-top { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
  .footer-logo-img { height: 100px; }
}

/* ══════════════════════════════════════════════════════════
   MOBILE — max 768px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Base spacing ── */
  :root { --section-padding: 3.5rem 0; }
  .section { padding: 3.5rem 0; }

  /* ── Navbar ── */
  .navbar { padding: 0; }
  .nav-container { padding: 0 1rem; height: 70px; }
  .nav-logo-img { height: 90px; }

  /* Mobile nav drawer */
  .nav-links {
    position: fixed;
    top: 0; right: -100%;
    height: 100dvh;
    width: min(300px, 85vw);
    background: rgba(7, 11, 23, 0.98);
    border-left: 1px solid rgba(0, 168, 255, 0.15);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 2rem;
    gap: 0;
    z-index: 9999;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
  }
  .nav-links.open { right: 0; }
  .nav-link {
    font-size: 1.2rem;
    font-weight: 600;
    padding: 3rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
    color: #f0f4ff;
  }
  .nav-link:last-child { border-bottom: none; }
  .nav-link::after { display: none; }
  .nav-cta { display: none; }
  .hamburger { display: flex; }

  /* ── Hero canvas ── */
  /* Height = 16:9 frame rendered at full viewport width — no black letterbox bars */
  .hero-wash-section {
    height: calc(100vw * 9 / 16);
    min-height: 220px;
    max-height: 70vh;
  }
  #hero-wash { object-fit: cover; }

  /* ── Hero content ── */
  .hero-content-section {
    padding: 5rem 1.25rem 3.5rem;
    text-align: center;
  }
  .hero-badge { margin: 0 auto 1.5rem; }
  .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-subtitle { font-size: 1rem; margin: 0 auto; max-width: 90%; }
  .hero-stats {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    width: 100%;
  }
  .stat-item { flex: 1 1 120px; text-align: center; }
  .hero-stat-divider { display: none; }
  .stat-number { font-size: 1.8rem; }

  /* ── Canvas animations — replace with static on mobile ── */
  .detailing-shine-section {
    min-height: 70vw;
    max-height: 60vh;
  }
  #detailing-shine { object-fit: cover; }

  /* Detailing overlay text */
  .detail-overlay-content {
    padding: 1.5rem 1.25rem;
    bottom: 0;
    top: auto;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  }
  .detail-eyebrow { font-size: 0.65rem; }
  .detail-title { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .detail-desc { font-size: 0.88rem; display: none; }
  .detail-features { gap: 0.5rem; }
  .detail-feature-item { font-size: 0.82rem; }

  /* ── Services ── */
  .services-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .service-card { padding: 1.75rem 1.5rem; }
  .service-icon { width: 52px; height: 52px; font-size: 1.4rem; }

  /* ── Detailing info (craft items) ── */
  .craft-item { grid-template-columns: 1fr; gap: 1.5rem; }
  .craft-item.reverse { direction: ltr; }
  .craft-visual { min-height: 220px; border-radius: 16px; }
  .craft-content { padding: 0 0.25rem; }
  .craft-title { font-size: 1.5rem; }
  .craft-features { gap: 0.5rem; }

  /* ── Pricing ── */
  .pricing-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .pricing-featured { transform: none; box-shadow: none; }
  .pricing-card { padding: 1.75rem 1.5rem; }
  .pricing-price { font-size: 2rem; }

  /* ── Before / After ── */
  .ba-slider { border-radius: 12px; }

  /* ── Testimonials ── */
  .testimonials-track { gap: 1rem; }
  .testimonial-card {
    min-width: min(85vw, 320px);
    padding: 1.5rem;
  }

  /* ── About ── */
  .about-container { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-visual { max-width: 100%; }
  .about-image { border-radius: 16px; }
  .about-stats { flex-wrap: wrap; gap: 1rem; }
  .about-stat { flex: 1 1 120px; }
  .about-badge-float {
    right: 0.5rem;
    bottom: -0.5rem;
    font-size: 0.78rem;
    padding: 0.6rem 1rem;
  }

  /* ── Contact / Booking ── */
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .booking-wrapper { padding: 1.75rem 1.25rem; border-radius: 16px; }
  .book-row { grid-template-columns: 1fr; }
  .contact-info-item { gap: 1rem; }
  .contact-form { padding: 1.5rem 1.25rem; }
  .form-row { grid-template-columns: 1fr; }

  /* ── Gallery ── */
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .gallery-wide  { grid-column: span 2; }
  .gallery-large { grid-column: span 2; grid-row: span 1; }

  /* ── Buttons ── */
  .btn { min-height: 48px; padding: 0.85rem 1.5rem; font-size: 0.9rem; }

  /* ── Section headers ── */
  .section-header { margin-bottom: 2.5rem; }
  .section-title { font-size: clamp(1.75rem, 8vw, 2.5rem); }
  .section-subtitle { font-size: 0.95rem; }

  /* ── Footer ── */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
  .footer-brand { display: flex; flex-direction: column; align-items: center; }
  .footer-logo-img { height: 80px; }
  .footer-social { justify-content: center; }
  .footer-links { text-align: center; }
  .footer-contact { text-align: center; }
  .footer-contact p { justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 1rem; text-align: center; }
  .footer-legal { justify-content: center; }

  /* ── Floating CTA ── */
  .floating-cta {
    display: flex;
    right: 1.25rem;
    bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  }

  /* ── Water rings (hero particles) ── */
  .ring-1 { width: 180px; height: 180px; }
  .ring-2 { width: 300px; height: 300px; }
  .ring-3 { width: 440px; height: 440px; }
}

/* ══════════════════════════════════════════════════════════
   SMALL MOBILE — max 480px
   ══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

  .nav-logo-img { height: 90px; }
  .nav-container { height: 64px; }

  .hero-title { font-size: clamp(1.85rem, 11vw, 2.6rem); }
  .section-title { font-size: clamp(1.6rem, 9vw, 2.2rem); }

  /* Stats inline on very small screens */
  .hero-stats { gap: 0.5rem; padding: 0.9rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }

  /* Gallery single column */
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-wide, .gallery-large { grid-column: span 1; }

  /* About stats wrap */
  .about-stats { flex-direction: column; align-items: flex-start; }

  /* Services full width */
  .service-card { padding: 1.5rem 1.25rem; }

  /* Pricing */
  .pricing-features li { font-size: 0.85rem; }
  .pricing-price { font-size: 1.8rem; }

  /* Testimonials */
  .testimonial-card { min-width: 90vw; }

  /* Booking form */
  .booking-wrapper { padding: 1.25rem 1rem; }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 16px; /* prevents iOS zoom on focus */
  }

  /* Footer */
  .footer-logo-img { height: 70px; }
  .footer-legal a { font-size: 0.8rem; }
}

/* ══════════════════════════════════════════════════════════
   VERY SMALL — max 390px (iPhone SE, Galaxy A series)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 390px) {
  .hero-content-section { padding: 4.5rem 1rem 3rem; }
  .hero-title { font-size: clamp(1.7rem, 12vw, 2.4rem); }
  .nav-logo-img { height: 90px; }
  .container { padding: 0 1rem; }
  .detail-title { font-size: 1.4rem; }
  .btn { padding: 0.8rem 1.25rem; font-size: 0.88rem; }
}

/* ══════════════════════════════════════════════════════════
   TOUCH DEVICE ENHANCEMENTS
   ══════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover-only effects that feel broken on touch */
  .service-card:hover { transform: none; }
  .pricing-card:hover { transform: none; }
  .gallery-item:hover .gallery-overlay { opacity: 1; }

  /* Larger touch targets */
  .nav-link { padding: 1rem 0; }
  .hamburger { padding: 0.75rem; }
  .btn { min-height: 52px; }
  .form-group input,
  .form-group select,
  .form-group textarea { min-height: 48px; }

  /* iOS momentum scrolling for testimonials track */
  .testimonials-track { -webkit-overflow-scrolling: touch; }
}

/* ══════════════════════════════════════════════════════════
   LANDSCAPE MOBILE (rotated phones)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero-wash-section { height: 100svh; min-height: 300px; }
  .hero-content-section { padding: 4rem 2rem 2rem; }
  .hero-title { font-size: clamp(1.5rem, 5vw, 2.4rem); }
  .hero-stats { flex-direction: row; gap: 1rem; }
  .hero-stat-divider { display: block; }
  .nav-logo-img { height: 90px; }
}
