/* assets/css/home.css
   Home page styles: hero + fleet carousel
   Uses variables from other CSS but sets local fallback
*/

:root {
  --accent: #eb5013;
  --accent-dark: #d94410;
  --dark: #111827;
  --muted: #666;
  --max-width: 1200px;
  --font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, "Helvetica Neue", Arial;
}

/* reset section spacing */
section { display:block; }

/* ===== HERO (Full-width stretch) ===== */
.hero {
  background-color: var(--dark); 
  background-image: linear-gradient(rgba(17, 24, 39, 0.4), rgba(17, 24, 39, 0.2)), url("../img/banner.jpg"); 
  background-repeat: no-repeat;
  background-size: cover; 
  background-position: center bottom; 
  
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
  height: 90vh; 
  position: relative;
}

@media (min-width: 1200px) {
  .hero {
    height: 75vh;
    background-position: center bottom;
  }
}

.hero-overlay {
  text-align: center;
  color: #fff;
  padding: 10px 18px;
  max-width: 1000px;
}

.hero-overlay h1 {
  font-family: var(--font-family);
  font-size: 44px;
  margin: 0 0 8px;
  line-height: 1.05;
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(0,0,0,0.6); 
}

.hero-sub {
  margin: 0 0 18px;
  font-size: 16px;
  color: rgba(255,255,255,0.95);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 28px;
  font-weight: 700;
  text-decoration: none;
  background: rgba(255,255,255,0.95);
  color: var(--accent);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.hero-btn.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: #fff;
}
.hero-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}

.hero-btn:not(.primary):hover {
  background: #fff;
}

@media (max-width: 768px) {
  .hero-overlay h1 { font-size: 28px; }
  .hero-sub { font-size: 14px; }
  .hero { height: 80vh; }
}

/* ===== FLEET / CAROUSEL (Updated for Full-Width and Card Link) ===== */
.cars-section {
  max-width: 100%; /* Stretch to full width */
  margin: 48px 0; /* Remove horizontal margin */
  padding: 0; /* Remove padding */
  text-align: center;
}

.section-title {
  font-family: var(--font-family);
  color: var(--accent);
  font-size: 30px;
  margin-bottom: 18px;
  font-weight: 800;
  /* Centered title, add padding for breathing room */
  padding: 0 20px; 
}

/* horizontal scroll carousel */
.carousel {
  display: flex;
  gap: 24px; 
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 6px 20px 16px; /* Added padding left/right to match hero/map section look */
}
.carousel::-webkit-scrollbar { height: 10px; } 
.carousel::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 8px; }

/* Wrapper for the car card that handles the click */
.car-card-link {
    text-decoration: none;
    color: inherit;
    display: block; /* Ensure the link wrapper takes full card space */
    /* Must not take flex space to allow the .car-card to control width */
    flex: 0 0 340px; 
}

/* card */
.car-card {
  /* Set width using flex-basis on the parent .car-card-link and remove flex here */
  /* Re-added flex on the card itself for responsiveness in case of future changes */
  flex: 0 0 100%; /* Take 100% of the parent .car-card-link width */
  background: #fff;
  border-radius: 16px; 
  box-shadow: 0 12px 35px rgba(15,15,15,0.1); 
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 300ms cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 300ms ease; 
  cursor: pointer;
}
/* Apply hover to the parent link for consistency */
.car-card-link:hover .car-card {
  transform: translateY(-12px) scale(1.02); 
  box-shadow: 0 20px 45px rgba(15,15,15,0.15); 
}

.car-card img {
  width: 100%;
  height: 220px; 
  object-fit: cover;
  display: block;
  transition: transform 400ms ease-out; 
}
.car-card-link:hover .car-card img {
    transform: scale(1.05); 
}

.car-info {
  padding: 16px; 
  text-align: left;
}
.car-info h3 {
  margin: 0 0 8px;
  font-size: 20px; 
  color: var(--dark);
}
.car-desc {
  font-size: 14px; 
  color: var(--muted);
  margin-bottom: 12px;
}
.car-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.car-type {
  background: #f0f0f0; 
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--dark);
  font-weight: 600;
}
.price {
  color: var(--accent-dark);
  font-size: 18px; 
  font-weight: 800;
}

/* no cars fallback */
.no-cars { color: var(--muted); font-size: 16px; }

/* Responsive breakpoints: Apply flex-basis to the .car-card-link */
@media (max-width: 1100px) { 
  .car-card-link { flex: 0 0 300px; }
  .car-card img { height: 200px; }
}
@media (max-width: 900px) {
  .car-card-link { flex: 0 0 280px; } 
}
@media (max-width: 650px) {
  .car-card-link { flex: 0 0 240px; } 
  .car-card img { height: 160px; }
}
@media (max-width: 560px) {
  .car-card-link { flex: 0 0 90%; } 
  .car-card img { height: 180px; }
}

/* small layout tweaks so footer isn't too close */
.cars-section { margin-bottom: 60px; }

/* ===== GOOGLE MAPS SECTION (Added and styled for attractiveness and wide fit) ===== */
.map-section {
  padding: 0;
  margin-bottom: 60px;
  max-width: 100%;
}
.map-container {
  width: 100%;
  height: 450px; 
  border-radius: 0; 
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.15); 
}
.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}