/* =========================================================
   Maybach Landing - Custom Styles (extends Tailwind CDN)
   ========================================================= */

:root {
  --c-bg-dark:        #1a1f1c;
  --c-green-dark:     #2c4135;
  --c-green:          #3a5a48;
  --c-green-soft:     #4d6f5b;
  --c-orange:         #e07a3c;
  --c-orange-hover:   #c8662b;
  --c-cream:          #fff7f3;
  --c-cream-2:        #f4ede5;
  --c-text:           #1a1a1a;
  --c-text-soft:      #6b6b6b;
  --c-line:           #e5e0d9;
  --shadow-card:      0 12px 40px -12px rgba(0,0,0,.18);
  --radius-card:      18px;
  --radius-pill:      999px;
  --font-display:     "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:        "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
/* `clip` prevents horizontal overflow WITHOUT creating a new scroll
   context, so position:sticky still anchors to the viewport.
   Fallback to `hidden` for older browsers. */
html, body { overflow-x: clip; max-width: 100%; }
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-text);
  background: #faf8f5;
  -webkit-font-smoothing: antialiased;
}

.font-display { font-family: var(--font-display); letter-spacing: -.01em; }

/* ------- Reusable buttons ------- */
.btn-orange {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--c-orange); color: #fff;
  padding: 12px 26px; border-radius: var(--radius-pill);
  font-weight: 600; letter-spacing: .02em;
  transition: background .2s ease, transform .15s ease;
  text-decoration: none; border: none; cursor: pointer;
  font-size: 15px;
}
.btn-orange:hover { background: var(--c-orange-hover); transform: translateY(-1px); }
.btn-orange:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.4); color: #fff;
  padding: 8px 18px; border-radius: var(--radius-pill);
  background: transparent; font-size: 13px; cursor: pointer;
  transition: background .2s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.1); }

/* ------- Top nav ------- */
.topnav {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 30; padding: 22px 6vw;
  display: flex; align-items: center; justify-content: space-between;
}
.topnav .brand {
  font-family: var(--font-display);
  font-size: 26px; color: #fff; font-weight: 600; letter-spacing: .04em;
}
.topnav nav ul { display: flex; gap: 32px; list-style: none; padding: 0; margin: 0; }
.topnav nav a { color: #fff; text-decoration: none; font-size: 14px; opacity: .85; transition: opacity .2s; }
.topnav nav a:hover { opacity: 1; }
.topnav-right { display: flex; align-items: center; gap: 14px; }

.topnav.scrolled {
  position: fixed; top: 0;
  background: rgba(26,31,28,.92);
  backdrop-filter: blur(10px);
  padding: 14px 6vw;
  animation: slidein .35s ease;
}
@keyframes slidein { from { transform: translateY(-100%); } to { transform: translateY(0); } }

.menu-toggle {
  display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px;
}
@media (max-width: 900px) {
  .topnav nav { display: none; }
  .topnav nav.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(26,31,28,.96); padding: 24px 6vw;
  }
  .topnav nav.is-open ul { flex-direction: column; gap: 20px; width: 100%; }
  .menu-toggle { display: inline-flex; }
}

/* ===========================================================
   HERO carousel + overlays
   =========================================================== */
.hero {
  position: relative;
  height: 100vh; min-height: 640px;
  background: var(--c-bg-dark);
  overflow: hidden;
}
@media (min-width: 1600px) { .hero { min-height: 760px; } }
@media (max-width: 480px) { .hero { min-height: 580px; height: 92vh; } }

.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-position: center; background-size: cover;
  opacity: 0; transition: opacity 1.1s ease;
  z-index: 1;
}
.hero-slide.is-active { opacity: 1; z-index: 2; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.15) 65%, rgba(0,0,0,.45) 100%
  );
}

.hero-overlays { position: absolute; inset: 0; z-index: 5; }

.hero-title {
  position: absolute; color: #fff;
  font-family: var(--font-display); font-weight: 600;
  line-height: 0.78;            /* tightly stacked — reads as one continuous phrase */
  font-size: clamp(36px, 5.6vw, 72px);
  max-width: 50ch;
  white-space: pre-line;
  text-shadow: 0 4px 24px rgba(0,0,0,.35);
}

.hero-cta { position: absolute; }

.hero-desc {
  position: absolute; color: rgba(255,255,255,.95);
  background: rgba(0,0,0,.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 18px 22px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.15);
  font-size: 14px; line-height: 1.65;
}

.hero-pricecard {
  position: absolute;
  background: #fff; border-radius: 16px; padding: 14px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-card);
}
.hero-pricecard img {
  width: 84px; height: 60px; object-fit: cover;
  border-radius: 10px; background: #f0ece5;
}
.hero-pricecard .price {
  font-family: var(--font-display); font-size: 22px; color: var(--c-text);
  font-weight: 600; line-height: 1;
}
.hero-pricecard .label {
  font-size: 11px; color: var(--c-text-soft); margin-top: 4px; letter-spacing: .02em;
}

@media (max-width: 760px) {
  .hero-desc { display: none; }
  .hero-pricecard { transform: scale(.85); transform-origin: top right; }
  .hero-title { font-size: clamp(34px, 9vw, 48px); }
}

/* dots */
.hero-dots {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 8;
}
.hero-dot {
  width: 36px; height: 3px; background: rgba(255,255,255,.35);
  border: none; cursor: pointer; transition: background .25s;
}
.hero-dot.is-active { background: #fff; }

/* =========================================================
   SECTION 2 - search bar
   ========================================================= */
.searchbar-wrap {
  position: relative; z-index: 9;
  margin: -38px 6vw 0;
}
.searchbar {
  background: #fff; border-radius: 16px;
  box-shadow: var(--shadow-card);
  padding: 22px 26px;
}
.searchbar-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.searchbar-tab {
  border: 1px solid var(--c-line); background: #fff;
  padding: 7px 18px; border-radius: var(--radius-pill);
  font-size: 13px; cursor: pointer; transition: all .2s;
  color: var(--c-text-soft);
}
.searchbar-tab.is-active {
  background: var(--c-bg-dark); color: #fff; border-color: var(--c-bg-dark);
}

/* Width of the Book-now column — used by BOTH rows so they line up vertically.
   Override per breakpoint below. */
:root { --book-col: 140px; }

.searchbar-grid {
  display: grid; gap: 0;
  grid-template-columns: 1.4fr 1.4fr 1fr 1fr var(--book-col);
  align-items: stretch;
}

/* Secondary row: Name | Phone | Email (spans cols 3-4) | empty(spans book col) */
.searchbar-grid--secondary {
  margin-top: 14px;
}
.searchbar-field--email {
  /* Span the two narrow columns (Pickup date + Pickup time) */
  grid-column: 3 / span 2;
  border-right: none;
}

.searchbar-field {
  border-right: 1px solid var(--c-line);
  padding: 6px 14px;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;             /* allow input to shrink without overflowing */
}
.searchbar-field:last-of-type { border-right: none; }
.searchbar-field label {
  font-size: 11px; color: var(--c-text-soft); text-transform: uppercase; letter-spacing: .08em;
}
.searchbar-field .val {
  position: relative;
  display: flex; align-items: center; gap: 6px;
}
.searchbar-field input {
  border: none; outline: none; font: inherit;
  font-size: 14px; color: var(--c-text);
  width: 100%; background: transparent; padding: 4px 0;
}
.searchbar-field .pin-btn {
  background: none; border: none; cursor: pointer;
  color: var(--c-orange); padding: 4px;
  display: inline-flex; align-items: center;
}
.searchbar .btn-orange { padding: 12px 24px; align-self: center; }

@media (max-width: 1024px) {
  .searchbar-grid {
    grid-template-columns: 1fr 1fr; gap: 12px;
  }
  .searchbar-grid--secondary { grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .searchbar-field { border-right: none; border-bottom: 1px solid var(--c-line); padding-bottom: 12px; }
  .searchbar-field--email { grid-column: auto; }
  .searchbar .btn-orange { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 480px) {
  .searchbar-grid { grid-template-columns: 1fr; }
  .searchbar-grid--secondary { grid-template-columns: 1fr; }
}

/* =========================================================
   SECTION 3 - About
   ========================================================= */
.about {
  padding: 90px 6vw;
  background: #faf8f5;
}
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.about h2 {
  font-family: var(--font-display); font-size: clamp(36px, 4vw, 54px);
  margin: 0 0 26px;
}
.about p { font-size: 15px; line-height: 1.7; color: var(--c-text-soft); margin: 0 0 14px; max-width: 52ch; }

.about-imgs {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 200px 200px;
  gap: 16px; position: relative;
}
.about-imgs .exp {
  background: var(--c-bg-dark); color: #fff;
  border-radius: var(--radius-card);
  padding: 22px; display: flex; flex-direction: column; justify-content: space-between;
}
.about-imgs .exp .num { font-family: var(--font-display); font-size: 38px; line-height: 1; }
.about-imgs .exp .lbl { font-size: 13px; opacity: .7; }
.about-imgs img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius-card); background: #ddd; }
.about-imgs .img-1 { grid-row: 1; grid-column: 1; }
.about-imgs .exp    { grid-row: 1; grid-column: 2; }
.about-imgs .img-2  { grid-row: 2; grid-column: 1 / span 2; height: 200px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* =========================================================
   SECTION 4 - Best Offer (green two-tone)
   ========================================================= */
.offer {
  margin: 60px 6vw;
  background: linear-gradient(90deg, var(--c-green-dark) 0%, var(--c-green-dark) 38%, var(--c-green) 38%, var(--c-green) 100%);
  border-radius: 22px;
  padding: 60px 60px;
  position: relative; overflow: hidden;
  min-height: 360px;
  display: flex; align-items: center;
}
/* text column kept on the LEFT, narrow, on top of the car */
.offer-text {
  position: relative; z-index: 2;
  width: 38%; max-width: 460px;
}
.offer-text .label {
  display: inline-block; background: var(--c-green-soft); color: #fff;
  padding: 6px 14px; border-radius: 999px; font-size: 12px; letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 14px;
}
.offer-text h3 {
  font-family: var(--font-display); color: #fff;
  font-size: clamp(34px, 4vw, 48px); margin: 0 0 12px;
}
.offer-text p { color: rgba(255,255,255,.78); margin: 0 0 24px; font-size: 15px; line-height: 1.65; max-width: 46ch; }

/* car image — absolutely positioned so it spans across BOTH green tones,
   matching the reference where the car body crosses the colour boundary */
.offer-img {
  position: absolute;
  top: 50%; right: 0;
  transform: translateY(-50%);
  width: 68%;
  z-index: 1;
  pointer-events: none;
}
.offer-img img {
  width: 100%; height: auto; display: block;
  filter: drop-shadow(0 30px 30px rgba(0,0,0,.35));
}

/* Tablet — slightly smaller car, still overlapping */
@media (max-width: 1100px) {
  .offer-img { width: 64%; }
  .offer-text { width: 42%; }
}

/* Mobile — stack: text on top of dark green, car on light green below */
@media (max-width: 760px) {
  .offer {
    flex-direction: column; align-items: stretch;
    padding: 36px 26px 0;
    min-height: 0;
    background: linear-gradient(180deg, var(--c-green-dark) 0%, var(--c-green-dark) 48%, var(--c-green) 48%, var(--c-green) 100%);
  }
  .offer-text { width: 100%; max-width: none; padding-bottom: 24px; }
  .offer-img {
    position: relative; right: auto; top: auto; transform: none;
    width: 100%; padding: 0 6px 18px;
  }
  .offer-img img { width: 100%; }
}

/* =========================================================
   SECTION 5 - Vehicles bubble carousel
   ========================================================= */
.vehicles {
  padding: 70px 6vw;
  background: var(--c-cream);
}
.vehicles-head {
  display: flex; align-items: end; justify-content: space-between; gap: 30px;
  margin-bottom: 30px;
}
.vehicles-head h2 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); margin: 0; }
.vehicles-head .sub { color: var(--c-text-soft); font-size: 14px; line-height: 1.55; max-width: 420px; }

/* Outer viewport: clips overflow.  Track inside translates without affecting the clip. */
.bubble-viewport {
  overflow: hidden;
  padding: 8px 2px 12px;
}
.bubble-track {
  display: flex; gap: 18px;
  position: relative;
  will-change: transform;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;            /* allow vertical page scroll, JS handles horizontal */
}
.bubble-track.is-dragging { cursor: grabbing; }
.bubble-track.is-dragging .bubble { transition: none; }
.bubble {
  flex: 0 0 240px;
  background: #fff;
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background .25s ease, transform .25s ease;
  box-shadow: 0 6px 18px -10px rgba(0,0,0,.1);
}
.bubble:hover, .bubble.is-hover { background: var(--c-cream); transform: translateY(-3px); }
.bubble img {
  width: 100%; height: 110px; object-fit: cover;
  border-radius: 12px; background: #eee;
  pointer-events: none;             /* image doesn't intercept drag */
  -webkit-user-drag: none;
}
.bubble .name { font-weight: 600; font-size: 14px; }
.bubble .price { color: var(--c-orange); font-weight: 600; font-size: 13px; }

/* Capsule arrow buttons */
.bubble-controls { display: flex; gap: 8px; }
.bubble-controls button {
  height: 40px; min-width: 58px; padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .2s ease;
}
.bubble-controls button:hover {
  background: var(--c-bg-dark); color: #fff; border-color: var(--c-bg-dark);
  transform: translateY(-1px);
}
.bubble-controls button:active { transform: translateY(0); }
.bubble-controls button svg { width: 18px; height: 18px; }

/* =========================================================
   SECTION 6 - Blog
   ========================================================= */
.blog {
  padding: 70px 6vw;
  background: #faf8f5;
}
.blog h2 { font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); margin: 0 0 8px; }
.blog .sub { color: var(--c-text-soft); margin-bottom: 36px; font-size: 14px; }
.blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.blog-card {
  background: #fff; border-radius: var(--radius-card); overflow: hidden;
  cursor: pointer; transition: transform .25s ease, box-shadow .25s ease;
  box-shadow: 0 4px 18px -10px rgba(0,0,0,.1);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; background: #eee; }
.blog-card .body { padding: 20px; }
.blog-card h4 { font-family: var(--font-display); font-size: 18px; margin: 0 0 8px; }
.blog-card p { font-size: 13px; color: var(--c-text-soft); margin: 0; line-height: 1.6; }
.blog-card .more { display: inline-block; margin-top: 14px; color: var(--c-orange); font-size: 13px; font-weight: 600; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }

/* =========================================================
   SUBSCRIBE
   ========================================================= */
.subscribe {
  margin: 0 6vw 60px;
  background: var(--c-cream-2); border-radius: 20px;
  padding: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  flex-wrap: wrap;
  box-sizing: border-box;
  max-width: calc(100% - 12vw);
  overflow: hidden;
}
.subscribe h3 {
  font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 32px);
  margin: 0; max-width: 22ch;
}
.subscribe form {
  display: flex; gap: 8px;
  flex: 1 1 auto;
  min-width: 0;            /* let flex children shrink instead of overflowing */
  max-width: 480px;
  width: 100%;
}
.subscribe input {
  flex: 1 1 auto;
  min-width: 0;            /* critical: input default min-width is auto */
  padding: 14px 18px; border-radius: var(--radius-pill);
  border: 1px solid var(--c-line); font: inherit; outline: none;
}
.subscribe form .btn-orange { flex: 0 0 auto; white-space: nowrap; }
.subscribe input:focus { border-color: var(--c-orange); }
.subscribe #subscribeMsg { flex-basis: 100%; }

/* iPad and below — give the form a full row */
@media (max-width: 900px) {
  .subscribe { padding: 32px; }
  .subscribe h3 { flex-basis: 100%; }
  .subscribe form { max-width: none; }
}

/* Phones — stack input above button so nothing escapes the rounded card */
@media (max-width: 560px) {
  .subscribe {
    margin: 0 4vw 40px;
    max-width: calc(100% - 8vw);
    padding: 26px 20px;
    gap: 14px;
  }
  .subscribe h3 {
    font-size: 20px; max-width: none; line-height: 1.3;
  }
  .subscribe form {
    flex-direction: column;
    width: 100%; gap: 10px;
  }
  .subscribe form .btn-orange { width: 100%; padding: 13px 18px; }
  .subscribe input { padding: 12px 16px; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: #0e1310; color: rgba(255,255,255,.72);
  padding: 60px 6vw 22px; font-size: 13px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px;
  padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer h5 { color: #fff; margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer .left p { white-space: pre-line; line-height: 1.7; margin: 0; }
.footer-bottom { padding-top: 22px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.footer-bottom .socials { display: flex; gap: 10px; }
.footer-bottom .socials a {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; transition: background .2s;
}
.footer-bottom .socials a:hover { background: var(--c-orange); }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Modals (booking confirmation, blog, map)
   ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,15,12,.65);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-backdrop.is-open { display: flex; animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 540px; max-height: 90vh; overflow: auto;
  position: relative; padding: 32px;
  animation: rise .3s ease;
}
@keyframes rise { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal.large { max-width: 880px; padding: 0; overflow: hidden; }
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.30);
  border: 1px solid #000;
  color: #000;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 10;
  transition: background .2s ease, transform .15s ease;
  padding: 0;
}
.modal-close:hover {
  background: rgba(255, 255, 255, 0.55);
  transform: scale(1.05);
}
.modal-close svg { width: 18px; height: 18px; color: #000; stroke: #000; pointer-events: none; }

#mapModal .modal { padding: 0; }
#mapModal .map-area { height: 480px; width: 100%; }
#mapModal .map-foot {
  padding: 16px 22px; display: flex; gap: 12px; align-items: center; border-top: 1px solid var(--c-line);
}
#mapModal .map-foot .selected { flex: 1; font-size: 13px; color: var(--c-text-soft); }

.confirm-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: #e6f4ec; color: #2c8a55;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px;
  font-size: 30px;
}
.confirm-modal h3 { font-family: var(--font-display); font-size: 26px; margin: 0 0 10px; }
.confirm-modal p { color: var(--c-text-soft); line-height: 1.6; margin: 0 0 8px; }

/* Flatpickr theme tweak */
.flatpickr-calendar { font-family: var(--font-body); border-radius: 14px; box-shadow: var(--shadow-card); }
.flatpickr-day.selected { background: var(--c-orange); border-color: var(--c-orange); }
