/*============================================================
  ShriRam Taxi Services – Modern Premium Design System
  ✦ Glassmorphism · Gradients · Micro-animations
  ✦ Fully responsive: 1024 / 768 / 480 breakpoints
============================================================*/

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --brand: #f5a623;
  --brand-hover: #e08b10;
  --brand-glow: rgba(245, 166, 35, 0.25);
  --ink: #0f172a;
  --ink-light: #1e293b;
  --mist: #f8fafc;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-800: #1e293b;
  --slate-900: #0f172a;
  --slate-950: #020617;
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-body: 'Manrope', 'Inter', sans-serif;
  --radius-sm: 1rem;
  --radius-md: 1.5rem;
  --radius-lg: 2rem;
  --radius-xl: 2.5rem;
  --radius-2xl: 3rem;
  --radius-full: 9999px;
  --shadow-glow: 0 18px 45px rgba(245, 166, 35, 0.24);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Global Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  background: radial-gradient(circle at top, rgba(245,166,35,.08), transparent 25%),
              linear-gradient(180deg, #0f172a 0%, #111c31 40%, #0b1220 100%);
  color: var(--mist);
  overflow-x: hidden;
  width: 100%;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* ── Selection ─────────────────────────────────────────── */
::selection { background: var(--brand); color: var(--ink); }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #334155; }

/* ── Glass Utility ─────────────────────────────────────── */
.glass {
  background: rgba(30, 41, 59, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── Navbar ────────────────────────────────────────────── */
.nav-solid {
  background: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 10px 40px -10px rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ── Road SVG Overlay (Hero) ───────────────────────────── */
.road-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900'%3E%3Cpath d='M580 0h280l240 900H340L580 0Z' fill='%231e293b'/%3E%3Cpath d='M705 0h30v70h-30Zm0 120h30v70h-30Zm0 120h30v70h-30Zm0 120h30v70h-30Zm0 120h30v70h-30Zm0 120h30v70h-30Zm0 120h30v70h-30Z' fill='%23f5a623' fill-opacity='0.6'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center;
  pointer-events: none;
  z-index: 0;
}

/* ── Section Title Underline ───────────────────────────── */
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 15px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--brand), transparent);
}

/* ── Hover Glow Card Effect ────────────────────────────── */
.hover-glow {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-glow:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -10px rgba(245, 166, 35, 0.15);
  border-color: rgba(245, 166, 35, 0.3);
}

/* ── Typewriter Cursor ─────────────────────────────────── */
.type-cursor::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1em;
  margin-left: 6px;
  background-color: var(--brand);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}
@keyframes blink { from, to { opacity: 1; } 50% { opacity: 0; } }

/* ── Car SVG ───────────────────────────────────────────── */
.car-svg { filter: drop-shadow(0 20px 30px rgba(0,0,0,0.5)); }
.car-body { fill: var(--brand); }

/* ── Form – Floating Labels ───────────────────────────── */
.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label,
.floating-label textarea:focus + label,
.floating-label textarea:not(:placeholder-shown) + label {
  transform: translateY(-1.6rem) scale(.9);
  color: var(--brand);
}
.floating-label label {
  transition: all var(--transition);
  transform-origin: left;
}

/* ── Utility Overrides (Tailwind compat) ───────────────── */
.bg-brand { background-color: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.border-brand { border-color: var(--brand) !important; }
.text-ink { color: var(--ink) !important; }

/* ── Mobile Menu ───────────────────────────────────────── */
#mobile-menu {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95)) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  box-shadow: -15px 0 50px rgba(0, 0, 0, 0.8) !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  width: 85%;
  max-width: 20rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12) !important;
  height: 100dvh !important;
}

#menu-toggle {
  background: var(--brand) !important;
  color: var(--ink) !important;
  box-shadow: 0 4px 15px var(--brand-glow) !important;
  border: none !important;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

#menu-toggle:active {
  transform: scale(0.92);
}

@media (min-width: 1024px) {
  #menu-toggle {
    display: none !important;
  }
}

.mobile-link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.875rem 1.25rem;
  margin-bottom: 0.5rem;
  border-radius: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700 !important;
  color: var(--mist) !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-link::after {
  content: '→';
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
  color: var(--brand);
}
.mobile-link:hover,
.mobile-link:active,
.mobile-link.active-nav-link {
  background: rgba(245, 166, 35, 0.15) !important;
  color: var(--brand) !important;
  border-color: rgba(245, 166, 35, 0.4) !important;
  transform: translateX(4px);
}
.mobile-link:hover::after,
.mobile-link:active::after,
.mobile-link.active-nav-link::after {
  opacity: 1;
  transform: translateX(0);
}

#mobile-menu:not(.translate-x-full) {
  transform: translateX(0) !important;
}

#mobile-menu-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(2, 6, 23, 0.85) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9998 !important;
}

/* ── Pulse Dot Animation ───────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.75; transform: scale(1); }
  50% { opacity: 0; transform: scale(2.2); }
}

/* ── Scroll Arrow ──────────────────────────────────────── */
.scroll-arrow { transition: opacity var(--transition); }

/*============================================================
  RESPONSIVE – MOBILE-FIRST FIXES
  Fixes text overflow, padding, typography, layout
============================================================*/

/* ── Tablet & Small Desktop (≤ 1024px) ─────────────────── */
@media (max-width: 1024px) {
  .hero-grid-gap { gap: 2rem !important; }
  .scroll-arrow { display: none !important; }
  #home {
    padding-bottom: 3rem !important;
    height: auto !important;
    min-height: auto !important;
  }
}

/* ── Tablet (≤ 768px) ──────────────────────────────────── */
@media (max-width: 768px) {
  /* ✦ Global text sizing */
  h1 { font-size: 2rem !important; line-height: 1.2 !important; }
  h2 { font-size: 1.75rem !important; line-height: 1.3 !important; }
  h3 { font-size: 1.35rem !important; }

  /* ✦ Hero section */
  .hero-title {
    font-size: 2rem !important;
    line-height: 1.2 !important;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  /* ✦ Fix content overflow */
  section, main, .mx-auto {
    max-width: 100vw !important;
    overflow-x: hidden;
  }

  /* ✦ Stats cards */
  .stats-card {
    padding: 1.5rem 0.75rem !important;
  }
  .stats-card .text-4xl,
  .stats-card .sm\:text-5xl {
    font-size: 1.75rem !important;
    line-height: 2rem !important;
  }

  /* ✦ Section spacing */
  .section-padding {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* ✦ Glass panels padding */
  .glass-p-mobile {
    padding: 1.25rem !important;
  }

  /* ✦ Border radius on small screens */
  .rounded-mobile {
    border-radius: var(--radius-lg) !important;
  }

  /* ✦ Prevent horizontal scroll on all containers */
  .max-w-7xl, .max-w-3xl, .max-w-xl, .max-w-2xl {
    max-width: 100% !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

/* ── Phone (≤ 480px) ───────────────────────────────────── */
@media (max-width: 480px) {
  /* ✦ Smaller headings */
  h1 { font-size: 1.65rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.2rem !important; }

  .hero-title {
    font-size: 1.65rem !important;
    min-height: auto !important;
  }

  /* ✦ Stats */
  .stats-card .text-4xl {
    font-size: 1.5rem !important;
    line-height: 1.8rem !important;
  }
  .stats-card .text-sm {
    font-size: 0.65rem !important;
  }

  /* ✦ Small padding on glass */
  .glass-p-mobile {
    padding: 1rem !important;
  }

  /* ✦ Rounded corners on small */
  .rounded-\[3rem\],
  .rounded-\[3\.5rem\],
  .rounded-\[2\.5rem\],
  .rounded-\[2rem\] {
    border-radius: var(--radius-md) !important;
  }
}

/* ── Ultra-small phone (≤ 360px) ───────────────────────── */
@media (max-width: 360px) {
  h1 { font-size: 1.4rem !important; }
  h2 { font-size: 1.3rem !important; }

  .hero-title {
    font-size: 1.4rem !important;
  }
}

/*============================================================
  ✦ CRITICAL MOBILE OVERFLOW FIX
  Prevents ANY content from going beyond the viewport
============================================================*/
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

html.menu-open, body.menu-open {
  overflow: hidden !important;
  touch-action: none;
}

#mobile-menu {
  touch-action: pan-y !important;
  -webkit-overflow-scrolling: touch;
}

/* Ensure all top-level containers don't overflow */
main, footer, section {
  max-width: 100vw;
}

/* Fix for Tailwind px-* classes that can cause overflow on small screens */
@media (max-width: 640px) {
  .px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-8 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-10 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

  /* Fix flex items that may overflow */
  .flex-wrap { flex-wrap: wrap !important; }
  .flex-col { flex-direction: column !important; }

  /* Fix gap on small screens */
  .gap-4 { gap: 0.75rem !important; }
  .gap-6 { gap: 1rem !important; }
  .gap-8 { gap: 1rem !important; }
  .gap-10 { gap: 1.25rem !important; }
  .gap-16 { gap: 1.5rem !important; }
  .gap-20 { gap: 2rem !important; }

  /* Fix padding */
  .p-8 { padding: 1.25rem !important; }
  .p-10 { padding: 1.25rem !important; }
  .p-12 { padding: 1.5rem !important; }
  .lg\:p-20 { padding: 1.5rem !important; }

  /* Fix margin */
  .mx-4 { margin-left: 0.75rem !important; margin-right: 0.75rem !important; }
  .mt-24 { margin-top: 3rem !important; }
  .mt-20 { margin-top: 2rem !important; }
  .mb-20 { margin-bottom: 2rem !important; }
  .mb-16 { margin-bottom: 2rem !important; }

  /* Fix text sizing */
  .text-xl { font-size: 1rem !important; }
  .text-lg { font-size: 0.95rem !important; }
  .text-2xl { font-size: 1.25rem !important; }
  .text-3xl { font-size: 1.5rem !important; }

  .sm\:text-5xl,
  .sm\:text-6xl,
  .xl\:text-7xl {
    font-size: 1.65rem !important;
    line-height: 1.2 !important;
  }

  /* Fix the "Reliable · Safe · Affordable" tagline */
  .tracking-widest {
    letter-spacing: 0.05em !important;
    flex-wrap: wrap !important;
  }

  /* CTA buttons full width on mobile */
  .sm\:w-auto {
    width: 100% !important;
  }

  /* Footer */
  footer { padding: 3rem 1rem !important; }
  footer .flex-wrap { gap: 1.25rem !important; }

  /* Sections with py-24 */
  .py-24 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .py-20 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }

  /* Grid adjustments */
  .grid-cols-2 { grid-template-columns: 1fr 1fr !important; }
  .md\:grid-cols-2 { grid-template-columns: 1fr !important; }
  .md\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .lg\:grid-cols-3 { grid-template-columns: 1fr !important; }
  .lg\:grid-cols-2 { grid-template-columns: 1fr !important; }
  .lg\:grid-cols-\[1fr_2\.2fr\] { grid-template-columns: 1fr !important; }
  .lg\:grid-cols-\[1\.1fr_0\.9fr\] { grid-template-columns: 1fr !important; }

  /* Booking section process steps */
  .space-y-8 > * + * { margin-top: 1.5rem !important; }
  .space-y-6 > * + * { margin-top: 1rem !important; }
  .space-y-4 > * + * { margin-top: 0.75rem !important; }

  /* CTA Banner */
  .lg\:text-6xl { font-size: 1.65rem !important; line-height: 1.3 !important; }
  .lg\:text-2xl { font-size: 1.1rem !important; }

  /* Testimonial quote badge */
  .-top-6 { top: -0.75rem !important; }
  .left-10 { left: 1.25rem !important; }
}

/* ── Small Phone specifically for tagline fix ──────────── */
@media (max-width: 420px) {
  /* Make the tagline stack vertically */
  .tracking-widest.flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
  }
  .tracking-widest.flex .h-1 {
    display: none !important;
  }
}

/*============================================================
  ✦ PREMIUM MICRO-ANIMATIONS
============================================================*/

/* Fade-in on scroll (backup for AOS) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Subtle float for hero card */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Shimmer effect for brand elements */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Card hover lift */
.glass {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

@media (hover: hover) {
  .glass:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.3);
  }
}

/* Button press effect */
a[class*="rounded-full"][class*="bg-brand"]:active {
  transform: scale(0.97) !important;
}

/* Smooth link hover */
a {
  transition: color var(--transition), background var(--transition), transform 0.15s ease;
}

/*============================================================
  ✦ PAGE-SPECIFIC FIXES
============================================================*/

/* Fleet page - card images */
@media (max-width: 640px) {
  .swiper { padding-bottom: 2rem !important; }
  .swiper-slide { width: 85vw !important; }
}

/* Contact form responsive */
@media (max-width: 640px) {
  form input,
  form textarea,
  form select {
    font-size: 16px !important; /* Prevents iOS zoom */
  }
}

/* About / Destinations page cards */
@media (max-width: 640px) {
  .grid.gap-8 {
    gap: 1rem !important;
  }
}

/*============================================================
  ✦ ENHANCED VISUAL POLISH
============================================================*/

/* Gradient text for headings (optional class) */
.gradient-text {
  background: linear-gradient(135deg, var(--brand), #ff6b6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow border on focus */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-glow);
}

/* Smooth page transitions */
main {
  animation: fadeInUp 0.6s ease-out;
}
/* Mobile & smooth scrolling fixes */
html { scroll-behavior: smooth; }
@media (max-width: 768px) {
  .glass { transition: none !important; }
  .section-title { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
  .stats-card { padding: 1rem 0.5rem !important; }
  /* Fix navbar overlapping hero on mobile */
  #home {
    min-height: auto !important;
    padding-top: 7rem !important;
    padding-bottom: 4rem !important;
    align-items: flex-start !important;
  }
  main { padding-top: 6.5rem !important; }
}

