/* ============================================
   MoroCars Premium — Custom Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #0D0D0D;
  --bg-card: #171717;
  --bg-card-hover: #1f1f1f;
  --accent: #FFD600;
  --accent-dark: #c7a800;
  --accent-glow: rgba(255, 214, 0, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border: rgba(255, 255, 255, 0.06);
  --glass-bg: rgba(23, 23, 23, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ---- Glassmorphism ---- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

.glass-card {
  background: rgba(23, 23, 23, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  background: rgba(31, 31, 31, 0.8);
  border-color: rgba(255, 214, 0, 0.2);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px var(--accent-glow);
}

/* ---- Gradient Accent ---- */
.gradient-accent {
  background: linear-gradient(135deg, var(--accent), #FF9500);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-bg {
  background: linear-gradient(135deg, var(--accent), #FF9500);
}

/* ---- Buttons ---- */
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #FFAB00);
  color: #000;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 214, 0, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 12px;
  border: 2px solid var(--accent);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #000;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 214, 0, 0.25);
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-whatsapp:hover {
  background: #1ebe57;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.3);
}

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  padding: 16px 0;
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(13, 13, 13, 0.9) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border);
}

.navbar .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #FFAB00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.navbar .nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: var(--accent);
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar .nav-link:hover::after {
  width: 100%;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 214, 0, 0.08) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 149, 0, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,13,13,0.6) 0%, rgba(13,13,13,0.9) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -2px;
}

.hero .typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1em;
  background: var(--accent);
  margin-left: 4px;
  animation: blink 1s infinite;
  vertical-align: middle;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 214, 0, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Car Cards ---- */
.car-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card .car-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.car-card .car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.car-card:hover .car-image img {
  transform: scale(1.08);
}

.car-card .badge-urgency {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.car-card .badge-type {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.car-card .car-info {
  padding: 20px;
}

.car-card .car-price {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), #FFAB00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.car-card .car-price span {
  font-size: 0.85rem;
  font-weight: 400;
  -webkit-text-fill-color: var(--text-muted);
}

/* ---- Filter Pills ---- */
.filter-pill {
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-pill.active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

/* ---- Stats ---- */
.stat-item {
  position: relative;
}

.stat-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 40px;
  background: var(--border);
}

.stat-item:last-child::after {
  display: none;
}

/* ---- Steps ---- */
.step-card {
  position: relative;
}

.step-card .step-number {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0 auto 16px;
}

.step-connector {
  position: absolute;
  top: 28px;
  left: calc(50% + 36px);
  width: calc(100% - 72px);
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0.3;
}

/* ---- Testimonial ---- */
.testimonial-card {
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--accent);
  display: flex;
  gap: 2px;
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 20px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1) translateY(0);
}

/* ---- WhatsApp FAB ---- */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1500;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: fab-pulse 2s infinite;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.5);
}

@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1); }
}

/* ---- Animations ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ---- Floating particles ---- */
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.06;
  animation: float-particle 20s infinite;
  pointer-events: none;
}

@keyframes float-particle {
  0%, 100% { transform: translateY(0) translateX(0); }
  25% { transform: translateY(-30px) translateX(20px); }
  50% { transform: translateY(-10px) translateX(-10px); }
  75% { transform: translateY(-40px) translateX(15px); }
}

/* ---- Mobile Nav ---- */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 13, 0.98);
  backdrop-filter: blur(20px);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

.mobile-nav a:hover {
  color: var(--accent);
}

/* ---- Misc ---- */
.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  letter-spacing: -1px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(255, 214, 0, 0.15);
}

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ---- CTA Section Gradient ---- */
.cta-gradient {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.08) 0%, rgba(255, 149, 0, 0.04) 100%);
  border: 1px solid rgba(255, 214, 0, 0.1);
}

/* ---- No-results ---- */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

/* ---- Legal Pages ---- */
.legal-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p, .legal-content li {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 0.95rem;
}

.legal-content ul {
  list-style: none;
  padding: 0;
}

.legal-content ul li::before {
  content: '→';
  color: var(--accent);
  margin-right: 8px;
}

@media (max-width: 768px) {
  .stat-item::after {
    display: none;
  }

  .hero h1 {
    letter-spacing: -1px;
  }

  .car-card .car-image {
    height: 180px;
  }

  .step-connector {
    display: none;
  }

  .whatsapp-fab {
    bottom: 16px;
    right: 16px;
    width: 54px;
    height: 54px;
  }
}