/*
 * ============================================================
 *  AutoPrime — Home Page CSS
 *  home.css
 *
 *  Depends on: autoprime-frontend.css (must load first)
 *  Used by: resources/views/frontend/home.blade.php
 *
 *  Sections:
 *   1. Hero Section
 *   2. Home Drawer (full-width slide-up car detail panel)
 *   3. Booking Form (inside drawer Tab 2)
 *   4. Stats Cards
 *   5. Why Us + Step Cards
 *   6. Contact Section
 *   7. Responsive Overrides
 * ============================================================
 */


/* ============================================================
   1. HERO SECTION  — full-height dark banner with overlay
   ============================================================ */

.hero-home {
  background: linear-gradient(130deg, #0f172a 0%, #1a2c4e 50%, #1d3557 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* Faint background car image for depth */
.hero-home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?q=80&w=1983&auto=format&fit=crop')
              center / cover no-repeat;
  opacity: 0.12;
  z-index: -1;
}

.hero-home .hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero-home .hero-title span {
  color: var(--ap-blue-light);
}

.hero-home .hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 520px;
  line-height: 1.7;
}

/* Scroll indicator arrow — bounces at bottom of hero */
.scroll-arrow {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.5rem;
  animation: apBounce 1.8s infinite;
}

@keyframes apBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Mini car cards grid on hero (featured vehicles row) */
.hero-car-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.hero-car-strip::-webkit-scrollbar {
  display: none;
}

/* Individual strip card */
.hero-strip-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 0.75rem 1rem;
  min-width: 180px;
  flex-shrink: 0;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.hero-strip-card:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-3px);
}

.hero-strip-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.hero-strip-card .scard-name {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-strip-card .scard-price {
  font-size: 0.75rem;
  color: var(--ap-blue-light);
  font-weight: 600;
}


/* ============================================================
   2. HOME DRAWER — full-width bottom slide-up car detail panel
   ============================================================ */

/* Semi-transparent backdrop overlay */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1500;
  display: none;
  align-items: flex-end;
}

/* Panel slides up from the bottom edge */
.drawer-panel {
  background: #fff;
  border-radius: 36px 36px 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 2rem 2.5rem 2.5rem;
  scrollbar-width: thin;
  scrollbar-color: #7f8fa3 transparent;
}

.drawer-panel::-webkit-scrollbar       { width: 5px; }
.drawer-panel::-webkit-scrollbar-thumb { background: #7f8fa3; border-radius: 10px; }

/* Active state — panel visible */
.drawer-backdrop.open {
  display: flex;
}

.drawer-backdrop.open .drawer-panel {
  transform: translateY(0);
}

/* Drag handle visual pill */
.drawer-handle {
  width: 44px;
  height: 5px;
  background: #e2e8f0;
  border-radius: 10px;
  margin: 0 auto 1.5rem;
}

/* Circular close button */
.drawer-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--ap-navy);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.drawer-close:hover {
  background: var(--ap-navy);
  color: #fff;
}

/* Pill-style tab bar for switching between Details / Schedule tabs */
.drawer-tabs {
  display: flex;
  gap: 0.25rem;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 1.5rem;
  width: fit-content;
}

.drawer-tab {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ap-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-tab.active {
  background: #fff;
  color: var(--ap-navy);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Tab content containers */
.tab-panel         { display: none; }
.tab-panel.active  { display: block; }

/* Main car image */
.drawer-main-img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 24px;
}

/* Photo thumbnail strip */
.drawer-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.drawer-thumb {
  width: 72px;
  height: 50px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.6;
  transition: all 0.2s;
}

.drawer-thumb:hover,
.drawer-thumb.active {
  border-color: var(--ap-navy);
  opacity: 1;
}

/* Technical spec chip badges */
.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #f5f7fb;
  border: 1px solid var(--ap-border);
  border-radius: 50px;
  padding: 0.35rem 0.9rem;
  font-size: 0.82rem;
  color: var(--ap-text);
  font-weight: 500;
}

.spec-chip i { color: var(--ap-navy); }

/* Feature keyword pills */
.feat-pill {
  display: inline-block;
  background: #f0f4ff;
  color: var(--ap-navy);
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.85rem;
  margin: 0.2rem;
}

/* SOLD stamp overlay on sold cars */
.sold-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  font-size: 1.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  padding: 0.4rem 1.5rem;
  border-radius: 8px;
  border: 3px solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
  user-select: none;
}


/* ============================================================
   3. BOOKING FORM — inside drawer Tab 2
   ============================================================ */

/* Container with soft background */
.booking-form-wrap {
  background: #f8fafc;
  border-radius: 20px;
  padding: 1.5rem;
  border: 1px solid var(--ap-border);
}

/* All form inputs inside booking area */
.booking-form-wrap .form-control,
.booking-form-wrap .form-select {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.88rem;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.2s;
}

.booking-form-wrap .form-control:focus,
.booking-form-wrap .form-select:focus {
  border-color: var(--ap-navy);
  box-shadow: 0 0 0 3px rgba(30, 43, 79, 0.08);
}


/* ============================================================
   4. STATS CARDS — about/stats dark section
   ============================================================ */

/* Glassmorphism stat card for dark background */
.stat-modern {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  padding: 1.8rem 0.8rem;
  color: #fff;
  text-align: center;
}

/* Gradient text number */
.stat-modern .number {
  font-size: 2.6rem;
  font-weight: 700;
  background: linear-gradient(120deg, #fff, #d3e2ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ============================================================
   5. WHY US & STEP CARDS
   ============================================================ */

/* Feature card — hover lift effect */
.feature-glass {
  background: #fff;
  border-radius: 28px;
  padding: 2rem 1rem;
  text-align: center;
  box-shadow: 0 15px 30px -12px rgba(28, 40, 61, 0.08);
  border: 1px solid #fff;
  transition: box-shadow 0.2s, transform 0.2s;
  height: 100%;
}

.feature-glass:hover {
  box-shadow: 0 25px 35px -14px rgba(30, 43, 79, 0.2);
  transform: translateY(-4px);
}

.feature-glass i { color: var(--ap-navy); }

/* How It Works step card */
.step-modern {
  background: #fff;
  border-radius: 36px;
  padding: 2.2rem 1.5rem;
  box-shadow: 0 20px 30px -18px #141f33;
  border: 1px solid #f0f3fa;
  height: 100%;
}

/* Numbered circle icon */
.step-number {
  background: var(--ap-navy);
  color: #fff;
  width: 60px;
  height: 60px;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  margin-bottom: 1.5rem;
}


/* ============================================================
   6. CONTACT SECTION
   ============================================================ */

/* Map placeholder block */
.map-glass {
  background: #eef2f9;
  border-radius: 28px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3f506e;
  font-weight: 300;
}

/* Contact form pill inputs */
#contact .form-control {
  border-radius: 50px;
  border: 1.5px solid var(--ap-border);
  transition: border-color 0.2s;
}

#contact .form-control:focus {
  border-color: var(--ap-navy);
  box-shadow: 0 0 0 3px rgba(30, 43, 79, 0.08);
}

#contact textarea.form-control {
  border-radius: 24px;
}


/* ============================================================
   7. RESPONSIVE OVERRIDES
   ============================================================ */

@media (max-width: 768px) {
  .drawer-panel {
    padding: 1.5rem 1.25rem 2rem;
    max-height: 95vh;
  }

  .drawer-main-img {
    height: 220px;
  }

  .hero-home {
    min-height: 85vh;
    padding: 4rem 1rem 3rem;
  }
}

@media (max-width: 480px) {
  /* Full-width tabs on small screens */
  .drawer-tabs {
    width: 100%;
  }

  .drawer-tab {
    flex: 1;
    text-align: center;
  }

  .hero-home .hero-title {
    font-size: 2.2rem;
  }
}
