/* ==========================================================================
   AUTO 21 — LUXURY AUTOMOTIVE DESIGN SYSTEM
   Palette: Slate & Anthracite Gray, Pure White, Vibrant Racing Red
   ========================================================================== */

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

:root {
  /* Core Brand Colors (Gris Lighter, Blanc, Rouge) */
  --bg-dark: #323946;
  --bg-slate: #40495a;
  --bg-card: rgba(54, 62, 77, 0.92);
  --bg-card-hover: rgba(66, 76, 94, 0.96);
  --bg-modal: #2a303d;
  
  /* Brand Red & Metallic Accents */
  --red-primary: #dc2626;
  --red-light: #ef4444;
  --red-dark: #991b1b;
  --red-metallic: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #991b1b 100%);
  --red-glow: rgba(220, 38, 38, 0.45);
  
  /* Pure White & Silver Grey */
  --text-white: #ffffff;
  --text-light: #f8fafc;
  --text-gray: #94a3b8;
  --text-slate: #cbd5e1;

  /* WhatsApp Green */
  --green-whatsapp: #25d366;
  --green-glow: rgba(37, 211, 102, 0.35);

  /* Typography */
  --font-main: 'Outfit', 'Plus Jakarta Sans', system-ui, sans-serif;
  
  /* Transitions */
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s var(--ease-smooth);
  --transition-slow: all 0.5s var(--ease-smooth);
  
  /* Borders & Shadows */
  --border-glass: 1px solid rgba(255, 255, 255, 0.1);
  --border-red-glow: 1px solid rgba(220, 38, 38, 0.45);
  --shadow-luxury: 0 16px 40px rgba(0, 0, 0, 0.85);
  --shadow-red-burst: 0 0 25px rgba(220, 38, 38, 0.3);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-dark);
  color: var(--text-light);
  font-family: var(--font-main);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  background: var(--bg-dark);
  position: relative;
  overflow-x: hidden;
}

/* Ambient Canvas Background */
#ambientCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 2;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--red-primary);
}

/* ULTRA-LUXURY GLASSMORPHIC NAVBAR (Height 52px) */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.35rem 0;
  background: rgba(42, 49, 62, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  height: 52px;
  display: flex;
  align-items: center;
  transition: var(--transition-fast);
}

.navbar.scrolled {
  background: rgba(30, 36, 46, 0.98);
  border-bottom: 1px solid rgba(220, 38, 38, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-logo img {
  height: 36px;
  max-height: 36px;
  width: auto;
  border-radius: 6px;
  border: 1px solid rgba(220, 38, 38, 0.55);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.35);
  object-fit: contain;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.3px;
  color: var(--text-white);
  line-height: 1.1;
}

/* Desktop Links Bar */
.nav-desktop-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 1.25rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-desk-link {
  color: var(--text-slate);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition-fast);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.nav-desk-link:hover,
.nav-desk-link.active {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.85);
  box-shadow: 0 2px 10px rgba(220, 38, 38, 0.4);
}

/* Hamburger Button */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.5);
  color: var(--red-light);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-fast);
}

.hamburger-btn:hover {
  background: var(--red-primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(220, 38, 38, 0.5);
}

.hamburger-icon {
  font-size: 1.2rem;
  line-height: 1;
}

/* Luxury Navigation Drawer Overlay */
.nav-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-slow);
}

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

.nav-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(12, 16, 26, 0.98);
  border-left: var(--border-red-glow);
  box-shadow: -15px 0 40px rgba(0,0,0,0.9);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  transition: right 0.4s var(--ease-smooth);
  z-index: 2001;
}

.nav-drawer-overlay.active .nav-drawer {
  right: 0;
}

.drawer-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--red-primary);
  color: #fff;
}

.drawer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.drawer-link {
  color: var(--text-gray);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  display: block;
}

.drawer-link:hover, .drawer-link.active {
  color: var(--red-light);
  transform: translateX(-5px);
}

/* Compact Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: var(--transition-fast);
  min-height: 34px;
}

.btn-red {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 50%, #b91c1c 100%);
  color: #ffffff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-red:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #f87171 0%, #ef4444 50%, #dc2626 100%);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.65);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-whatsapp {
  background: var(--green-whatsapp);
  color: #fff;
  box-shadow: 0 2px 10px var(--green-glow);
}

.btn-whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--red-light);
  color: var(--red-light);
}

.btn-sm {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  min-height: 28px;
}

/* Clean Video Hero Section */
.hero-video-section {
  padding-top: 3.8rem;
  padding-bottom: 2rem;
  position: relative;
}

.video-hero-wrapper {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 20px;
  overflow: hidden;
  border: var(--border-red-glow);
  box-shadow: var(--shadow-luxury), var(--shadow-red-burst);
}

.video-hero-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-hero-badge {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(9, 12, 18, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--red-primary);
  color: var(--red-light);
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Clean Quick Action Banner below Video */
.hero-quick-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-card);
  border: var(--border-glass);
  padding: 1rem 1.5rem;
  border-radius: 16px;
  margin-top: 1.25rem;
  box-shadow: var(--shadow-luxury);
}

/* Section Titles */
.section-title-wrap {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2rem auto;
}

.section-tag {
  color: var(--red-light);
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.3rem;
  display: block;
}

.section-main-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 0.4rem;
  letter-spacing: -0.3px;
  color: var(--text-white);
}

/* Vehicle Cards Grid */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.car-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: var(--transition-slow);
  position: relative;
  display: flex;
  flex-direction: column;
}

.car-card:hover {
  transform: translateY(-6px);
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8), var(--shadow-red-burst);
}

.car-media-box {
  height: 220px;
  background: #0d121c;
  position: relative;
  overflow: hidden;
}

.car-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-smooth);
}

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

.car-status-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(9, 12, 18, 0.92);
  border: 1px solid var(--red-primary);
  color: var(--red-light);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 800;
  z-index: 2;
}

.car-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.car-brand-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--red-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.25rem;
}

.car-title-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-white);
  margin-bottom: 0.85rem;
}

.car-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.tag-spec {
  padding: 0.25rem 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 0.78rem;
  color: var(--text-gray);
}

.car-action-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.car-price-tag {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-white);
}

/* Sell / Rachat & Reprise Section Card */
.sell-box-card {
  background: var(--bg-card);
  border: var(--border-red-glow);
  border-radius: 24px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  box-shadow: var(--shadow-luxury);
}

.sell-form-box {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(42, 49, 62, 0.95);
  padding: 1.75rem;
  border-radius: 18px;
  border: var(--border-glass);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.filter-field label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-gray);
  margin-bottom: 0.25rem;
  display: block;
  text-transform: uppercase;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: rgba(34, 40, 52, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--red-primary);
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2rem;
}

/* Interactive Finance Calculator */
.calc-card {
  background: linear-gradient(135deg, rgba(17, 23, 38, 0.95) 0%, rgba(9, 12, 18, 0.98) 100%);
  border: var(--border-red-glow);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
  box-shadow: var(--shadow-luxury);
}

.range-slider {
  width: 100%;
  accent-color: var(--red-primary);
  cursor: pointer;
}

/* Modal Window */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-slow);
}

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

.modal-window {
  background: var(--bg-modal);
  border: var(--border-red-glow);
  border-radius: 20px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.95);
  position: relative;
  padding: 1.75rem;
}

.close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.close-btn:hover {
  background: var(--red-primary);
  color: #fff;
}

/* Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
}

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

/* Strict Mobile Responsiveness */
@media (max-width: 860px) {
  .nav-desktop-menu {
    display: none;
  }
  .hamburger-btn {
    display: inline-flex;
  }
  .nav-wa-btn span {
    display: none;
  }
  .nav-wa-btn::after {
    content: "💬";
  }
}

@media (max-width: 991px) {
  .video-hero-wrapper {
    height: 340px;
  }
  .hero-quick-banner {
    flex-direction: column;
    text-align: center;
  }
  .sell-box-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  .video-hero-wrapper {
    height: 250px;
  }
  .sell-box-card {
    padding: 1.2rem 1rem;
    border-radius: 18px;
  }
  .sell-form-box {
    padding: 1.2rem 1rem;
  }
  .form-row-2 {
    grid-template-columns: 1fr;
  }
  .section-main-title {
    font-size: 1.4rem;
  }
  .btn {
    width: 100%;
  }
}
