/* =========================================================
   BASE STYLES
   ========================================================= */
:root {
  --bg: #f7f7f7;
  --card: #ffffff;
  --muted: #666;
  --accent: #111;
  --radius: 12px;
  --accent-blue: #4ca1af;
  --accent-green: #76b852;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: var(--bg);
  color: var(--accent);
  line-height: 1.5;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: relative;
  color: #fff;
  padding: 2rem 3rem;
  overflow: hidden;
  border-radius: 0 0 20px 20px;
  isolation: isolate;
  text-align: left;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('img/header-bg.jpg') center/cover no-repeat;
  opacity: 0.45;
  transition: opacity 1.5s ease-in-out;
  z-index: -1;
}

.site-header:hover::before {
  opacity: 0.6;
}

.site-header .header-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
}

.site-header .logo {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: contain;
  margin-bottom: 0.3rem;
}

.site-header .brand {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.site-header .tagline {
  font-size: 1rem;
  margin: 0.2rem 0 0;
  color: #000;
}

/* =========================================================
   CONTENT STRUCTURE
   ========================================================= */
.container {
  width: 94%;
  max-width: 1000px;
  margin: 1.5rem auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* =========================================================
   CAR LIST & CAR ITEM
   ========================================================= */
.car {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
}

.car img {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0.8rem;
  background: #fafafa;
}

.car h3 {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #111;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* =========================================================
   VARIANT SELECT (dropdown warna)
   ========================================================= */
.variant-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0.5rem;
}

.variant-label {
  font-weight: 600;
  color: #333;
  font-size: 0.9rem;
}

.variant-select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 5px;
}

.badge.available {
  background: #e8f8ef;
  color: #117a3a;
}

.badge.rented {
  background: #fbeaea;
  color: #a02828;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

.btn.primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn.primary:hover {
  background: #357a84;
}

.btn.secondary {
  background: var(--accent-green);
  color: #fff;
}

.btn.secondary:hover {
  background: #5a9942;
}

.btn-group {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* =========================================================
   REVIEWS SECTION
   ========================================================= */
.reviews {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.review-item {
  border-bottom: 1px solid #eee;
  padding: .8rem 0;
}

.review-item:last-child {
  border-bottom: none;
}

.stars {
  color: #f5b301;
}

/* =========================================================
   MAP CONTAINER
   ========================================================= */
.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  border-radius: 14px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  text-align: center;
  padding: 1.5rem 0;
  color: #666;
  font-size: 0.9rem;
  border-top: 1px solid #ddd;
  background: #e0e0e0;
  margin-top: 2rem;
}

.social-icons a {
  color: #333;
  margin: 0 .5rem;
  font-size: 1.3rem;
  text-decoration: none;
}

/* =========================================================
   FLOATING WHATSAPP BUTTON
   ========================================================= */
.floating-wa {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #25D366;
  color: #fff;
  padding: 12px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: .4rem;
  z-index: 1000;
  transition: all 0.2s ease-in-out;
}

.floating-wa:hover {
  background: #1ebe5b;
  transform: translateY(-3px);
}

/* =========================================================
   MODAL (diperbaiki agar responsif di HP)
   ========================================================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 999;
  padding: 1rem;
}

.modal[aria-hidden="false"] {
  display: flex;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 850px;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  overflow: hidden;
  position: relative;
  box-sizing: border-box;
}

.modal-img {
  width: 50%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  background: #fafafa;
  display: block;
}

.modal-info {
  width: 50%;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.modal-close:hover {
  color: #000;
}

/* =========================================================
   SECTION SPACING
   ========================================================= */
section {
  margin-bottom: 30px;
}

section:last-of-type {
  margin-bottom: 0;
}

/* =========================================================
   MODAL ANIMATION (fade-in & zoom-in effect)
   ========================================================= */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal[aria-hidden="false"] .modal-content {
  animation: modalFadeIn 0.25s ease-out;
}


/* =========================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================= */
@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    align-items: center;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: auto;
  }

  .modal-info {
    width: 100%;
    padding: 1rem;
  }

  .site-header {
    padding: 1.5rem;
    text-align: center;
  }

  .site-header .header-content {
    align-items: center;
  }

  .site-header .brand {
    font-size: 1.6rem;
  }

  .grid {
    gap: 1rem;
  }

  .car img {
    height: auto;
    object-fit: contain;
  }
}

@media (max-width: 600px) {
  .brand {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }

  .card {
    padding: 1rem;
  }

  .floating-wa {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
  }
}
