/* =========================================
   HALAMAN.CSS — CLEAN & CONSOLIDATED
   ========================================= */

/* ===== GLOBAL RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #fefefe;
  color: #222;
}

/* =========================================
   NAVBAR (Desktop/Tablet default)
   ----------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999; /* di atas konten */
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 5%;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.logo {
  font-weight: bold;
  font-size: 1.4em;
}

/* Hamburger: hidden by default (desktop/tablet) */
.menu-toggle {
  display: none;
  font-size: 24px;
  background: none;
  border: none;
  cursor: pointer;
}

/* Menu (desktop) */
.menu {
  display: flex;
  align-items: center;
  gap: 2em;
}

/* Item menu (tautan & tombol) */
.menu a,
.menu button {
  font-size: 1.1em;
  font-weight: 500;
  background: none;
  border: none;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}
.menu a:hover,
.menu button:hover {
  color: #ff6b00;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5em;
}

.search {
  padding: 0.6em 1.2em;
  border: 1px solid #ccc;
  border-radius: 25px;
  outline: none;
  font-size: 1.05em;
  transition: all 0.2s ease;
}
.search:focus {
  border-color: #ff6b00;
  box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

.btn-book {
  background: #ff6b00;
  color: #fff;
  text-decoration: none;
  padding: 0.6em 1.4em;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.05em;
}

/* Book Now versi menu (default disembunyikan di desktop/tablet) */
.menu .menu-book {
  display: none;
}

/* =========================================
   HERO
   ----------------------------------------- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3em;
  padding: 7em 4em 4em; /* offset untuk navbar fixed */
}

.hero-text {
  text-align: justify;
  text-justify: inter-word;
}

.hero-text h1 {
  font-size: 4.5em;
  margin-bottom: 0.3em;
}

.hero-text p {
  max-width: 700px;
  line-height: 1.8;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #444;
  text-align: justify;
}

.highlight,
.hero-text .highlight {
  color: #ff6b00;
}

.hero-image img {
  width: 450px;
  height: 450px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 10px #fff, 0 0 20px rgba(0, 0, 0, 0.1);
}

/* =========================================
   DESTINATIONS
   ----------------------------------------- */
.destinations {
  padding: 3em;
  max-width: 90%;
  margin: auto;
}

.destinations h2 {
  text-align: center;
  margin-bottom: 2em;
  font-size: 2.5em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2.5em;
  justify-items: center;
  align-items: stretch; /* samakan tinggi baris */
}

/* Kartu dasar (+ container flip) */
.travel-card {
  position: relative;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-width: 420px;
  width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;

  display: flex;
  flex-direction: column;
  height: 100%;
  perspective: 1200px; /* untuk efek 3D flip */

  min-height: 600px; /* cukup utk sisi belakang */
}
.travel-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Konten sisi depan */
.travel-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.card-content {
  padding: 1.4em;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-content .location {
  color: #ff6b00;
  font-size: 1.05em;
  margin-bottom: 0.8em;
}

.card-content h3 {
  margin: 0 0 1em 0;
  font-size: 1.4em;
}

/* Footer tombol (harga disembunyikan) */
.card-footer {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.price,
.btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 0.95em;
  font-weight: bold;
  white-space: nowrap;
}
.price {
  display: none;
}
.btn-view {
  background: #ff6b00;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s ease;
}
.btn-view:hover {
  background: darkorange;
}

/* =========================================
   FLIP CARD (DETAIL)
   ----------------------------------------- */
.travel-card .card-inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}
.travel-card .card-front,
.travel-card .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
}

/* FRONT (warisi style gambar + content + footer) */
.travel-card .card-front img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}
.travel-card .card-front .card-content {
  padding: 1.4em;
}
.travel-card .card-front .card-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* BACK (deskripsi) */
.travel-card .card-back {
  transform: rotateY(180deg);
  padding: 1.4em;
}
.travel-card.flipped .card-inner {
  transform: rotateY(180deg);
}

.travel-card .card-back .back-content {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.travel-card .card-back h3 {
  margin: 0 0 0.4em 0;
  font-size: 1.4em;
}
.travel-card .card-back .location {
  color: #ff6b00;
  margin-bottom: 0.8em;
}
.travel-card .card-back .desc {
  color: #444;
  line-height: 1.7;
  margin-bottom: 1.2em;
  text-align: justify;
}

.travel-card .card-back .back-actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.btn-back,
.btn-booknow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 20px;
  font-weight: bold;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.btn-back {
  background: #eee;
  color: #333;
}
.btn-booknow {
  background: #ff6b00;
  color: #fff;
}
.btn-booknow:hover {
  background: darkorange;
}

/* =========================================
   RESPONSIVE
   ----------------------------------------- */

/* Tablet (769–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .navbar {
    padding: 16px 4%;
  }
  .menu-toggle {
    display: none;
  } /* tetap hidden */
  .menu {
    gap: 1.5em;
  }
  .navbar-right {
    gap: 1em;
  }

  .hero {
    gap: 2em;
    padding: 6.5em 2em 3em;
  }
  .hero-image img {
    width: 360px;
    height: 360px;
  }
  .hero-text h1 {
    font-size: 3.6em;
  }
  .hero-text p {
    font-size: 0.95rem;
  }

  .card-grid {
    gap: 2em;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
  .travel-card {
    max-width: 360px;
    min-height: 550px;
  }
  .travel-card .card-front img {
    height: 240px;
  }
}

/* Desktop (≥1025px) */
@media (min-width: 1025px) {
  .travel-card .card-front img {
    height: 250px;
  }
  .card-content h3 {
    font-size: 1.2rem;
  }
  .card-content p {
    font-size: 1rem;
  }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
  /* Navbar wrap & urutan: [☰][Logo] di atas */
  .navbar {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
  }
  .menu-toggle {
    display: block;
    order: 0;
    margin-right: 6px;
  }
  .logo {
    order: 1;
  }

  /* Menu HP (column) */
  .menu {
    order: 2;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    display: none;
    gap: 10px; /* jarak seragam antar item */
    margin-top: 8px;
    background: #fff;
    padding: 6px 0;
    border-radius: 8px;
  }
  .menu.show {
    display: flex;
  }

  .navbar-right {
    order: 3;
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .search {
    width: 100%;
  }

  /* Book Now: desktop disembunyikan, versi menu muncul PALING ATAS & rata kiri */
  .desktop-book {
    display: none;
  }
  .menu .menu-book {
    display: block;
    order: 0;
    width: auto;
    text-align: left;
    margin: 0; /* tidak tambah jarak, gap yang atur */
  }
  /* Samakan semua item menu (termasuk Book Now) */
  .menu .menu-btn,
  .menu a.menu-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    line-height: 1.2;
    margin: 0;
  }

  /* Hero kompak */
  .hero {
    flex-direction: column;
    text-align: center;
    padding: 6em 1em 2em;
  }
  .hero-image img {
    width: 250px;
    height: 250px;
  }

  /* Grid 2 kolom (rapi), 1 kolom untuk HP kecil */
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    align-items: stretch;
    justify-items: stretch;
  }

  /* Kartu & tombol lebih kecil */
  .travel-card {
    min-height: 500px;
  }
  .travel-card .card-front img {
    height: 220px;
  }

  .card-footer {
    justify-content: center;
  }
  .btn-view {
    height: 30px;
    padding: 0 10px;
    font-size: 0.85em;
    border-radius: 15px;
  }

  .btn-back,
  .btn-booknow {
    height: 32px;
    border-radius: 16px;
    padding: 0 12px;
  }

  /* Tipografi card di HP */
  /* sisi depan */
  .card-content .location {
    font-size: 0.85em;
  }
  .card-content h3 {
    font-size: 1.1em;
  }

  /* sisi belakang (views) */
  .card-back h3 {
    font-size: 1.1em;
  }
  .card-back .location {
    font-size: 0.85em;
  }
  .card-back .desc {
    font-size: 0.9em;
    line-height: 1.5;
  }
}

/* Small phones (≤480px) */
@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
  .travel-card {
    min-height: 460px;
  }
  .travel-card .card-front img {
    height: 200px;
  }

  .btn-view {
    height: 28px;
    padding: 0 8px;
    font-size: 0.8em;
    border-radius: 14px;
  }

  /* Tipografi lebih kecil lagi */
  .card-content .location {
    font-size: 0.8em;
  }
  .card-content h3 {
    font-size: 1em;
  }
  .card-back h3 {
    font-size: 1em;
  }
  .card-back .location {
    font-size: 0.8em;
  }
  .card-back .desc {
    font-size: 0.85em;
    line-height: 1.4;
  }
}

/* =========================================
   UTILITAS TAMBAHAN
   ----------------------------------------- */
/* Sembunyikan Book Now di menu (desktop/tablet) jika Book Now ditempatkan pertama di menu */
@media (min-width: 769px) {
  .menu .menu-btn:first-child {
    display: none;
  }
}
