@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #0f172a;
  --accent: #2563eb;
  --bg-light: #f8fafc;
}

body {
  margin: 0; padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-light);
  color: var(--primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* NAVBAR ATAS STYLE */
.navbar {
  background: white;
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  z-index: 100;
  box-sizing: border-box;
}
.navbar-brand {
  font-size: 18px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px;
}
.navbar-menu {
  display: flex; list-style: none; margin: 0; padding: 0; gap: 30px;
}
.navbar-menu li {
  font-size: 14px; font-weight: 600; color: #64748b; cursor: pointer; transition: 0.2s;
}
.navbar-menu li:hover, .navbar-menu li.active {
  color: var(--accent);
}
.btn-login-top {
  background: #eff6ff; color: var(--accent); padding: 9px 20px; 
  border-radius: 30px; font-weight: 700; font-size: 13px; cursor: pointer; transition: 0.2s;
}
.btn-login-top:hover { background: var(--accent); color: white; }

/* LAYOUT UTAMA */
#main-content {
  position: relative;
  flex-grow: 1;
  height: calc(100vh - 65px);
  width: 100%;
}

.page { display: none; width: 100%; height: 100%; overflow-y: auto; box-sizing: border-box; }
.page.active { display: block; }

/* BERANDA DESIGN */
#dashboard { padding: 40px; background: white; }
.premium-hero { 
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%); 
  padding: 60px 40px; border-radius: 16px; text-align: center; margin-bottom: 40px;
}
.premium-hero h2 { font-size: 32px; font-weight: 800; margin: 0 0 12px 0; color: var(--primary); }
.premium-hero p { font-size: 15px; color: #475569; max-width: 600px; margin: 0 auto 25px; line-height: 1.6; }
.btn-explore-center {
  background: var(--accent); color: white; border: none; padding: 12px 28px;
  border-radius: 30px; font-weight: 700; font-size: 14px; cursor: pointer; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card-stat { 
  background: white; padding: 25px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); 
  text-align: center; border-top: 4px solid var(--accent); cursor: pointer; transition: 0.2s;
}
.card-stat:hover { transform: translateY(-3px); }
.card-stat h3 { margin: 0; font-size: 14px; color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.card-stat .count { font-size: 36px; font-weight: 800; margin-top: 10px; color: var(--primary); }

/* PETA FULLSCREEN & INTERFACE MELAYANG */
#map-page { padding: 0; overflow: hidden; position: relative; }
#map { width: 100%; height: 100%; z-index: 1; }

.floating-filters {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  z-index: 10; background: white; padding: 6px 18px;
  border-radius: 30px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex; align-items: center; gap: 12px; width: 85%; max-width: 600px;
}
.floating-search {
  flex-grow: 1; border: none; outline: none; padding: 8px 5px; font-size: 14px; font-family: inherit;
}

/* CAROUSEL KARTU DI ATAS PETA */
.floating-carousel {
  position: absolute; bottom: 25px; left: 0; right: 0;
  z-index: 10; display: flex; gap: 15px; padding: 0 25px;
  overflow-x: auto; scroll-behavior: smooth;
}
.floating-carousel::-webkit-scrollbar { display: none; }

.premium-card {
  background: white; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  min-width: 260px; max-width: 260px; padding: 10px; box-sizing: border-box;
  transition: 0.3s; cursor: pointer;
}
.premium-card:hover { transform: translateY(-4px); }
.card-img-wrapper {
  width: 100%; height: 140px; border-radius: 10px; overflow: hidden; margin-bottom: 10px; position: relative;
}
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.badge-tag {
  position: absolute; top: 8px; left: 8px; padding: 3px 10px;
  border-radius: 20px; color: white; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.badge-wisata { background: #f97316; }
.badge-resto { background: #3b82f6; }
.badge-penginapan { background: #10b981; }

.card-info h3 { margin: 0 0 4px 0; font-size: 15px; font-weight: 700; color: var(--primary); }
.card-info .location { font-size: 12px; color: #64748b; margin-bottom: 8px; }
.card-footer { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid #f1f5f9; padding-top: 8px; }
.card-footer .price { font-size: 12.5px; font-weight: 700; color: var(--accent); }
.btn-go-detail { background: #f1f5f9; border: none; padding: 5px 12px; border-radius: 20px; font-weight: 700; font-size: 11px; color: #475569; cursor: pointer; }
.btn-go-detail:hover { background: var(--accent); color: white; }

/* DETAIL LAYOUT NEW */
#detail-page { padding: 40px; background: white; }
.detail-container-new { max-width: 750px; margin: 0 auto; }
.btn-back { background: #f1f5f9; color: #475569; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; }
.btn-back:hover { background: #e2e8f0; }
.detail-block { margin-top: 25px; }
.detail-block h4 { margin: 0 0 8px 0; font-size: 14px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.5px; border-left: 3px solid var(--accent); padding-left: 8px; }

/* GOOGLE WINDOW INFO */
.info-window-content { padding: 4px; }
.info-window-content h4 { margin: 0 0 4px 0; color: var(--primary); font-size: 14px; }
.info-window-content p { margin: 0; color: #64748b; font-size: 12px; }
/* KUSTOMISASI KARTU GAMBAR DI BERANDA */
.beranda-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
  margin-bottom: 50px;
}

.beranda-card {
  background: white;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  padding: 12px;
  border: 1px solid #e2e8f0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.beranda-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.beranda-img-box {
  width: 100%;
  height: 180px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}

.beranda-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.beranda-card h4 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.beranda-card p {
  margin: 0 0 12px 0;
  font-size: 13px;
  color: #64748b;
}
/* DESAIN LIGHTBOX PREMIUM */
.lightbox {
  display: none; /* Sembunyikan pertama kali */
  position: fixed;
  z-index: 9999; /* Pastikan berada di paling atas menutupi peta/navbar */
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.9); /* Latar belakang gelap estetik */
  backdrop-filter: blur(5px); /* Efek blur blur kekinian */
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 75vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  animation: zoomEfek 0.3s ease; /* Efek membesar halus */
}

@keyframes zoomEfek {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f5f9;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover {
  color: #ef4444; /* Berubah merah saat didekati */
}

#lightbox-caption {
  margin: auto;
  display: block;
  width: 80%;
  text-align: center;
  color: #cbd5e1;
  padding: 15px 0;
  font-weight: 500;
}
/* Tambahkan ini di bagian CSS Anda */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 35px;
  padding: 10px 18px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  z-index: 10005;
  transition: 0.3s;
}
.nav-btn:hover { background: rgba(255, 255, 255, 0.5); }
.prev-btn { left: 30px; }
.next-btn { right: 30px; }
/* --- PERBARUI FILTER WARNA MARKER LEAFLET DI STYLE.CSS --- */

.marker-hijau, .marker-merah, .marker-biru {
    background: transparent !important;
    border: none !important;
    width: 25px !important;
    height: 41px !important;
}

/* Kategori Resto & Cafe jadi Hijau */
.marker-hijau img {
    filter: hue-rotate(140deg) brightness(90%);
}

/* Kategori Penginapan jadi Merah */
.marker-merah img {
    filter: hue-rotate(320deg) saturate(120%);
}

/* Kategori Wisata tetap Biru */
.marker-biru img {
    filter: none;
}
/* =========================================================================
   ATURAN CSS MODE MALAM (DARK MODE)
   ========================================================================= */

/* 1. Warna Dasar Body & Kontainer Website */
body.dark-theme {
    background-color: #0f172a !important; /* Hitam abu-abu pekat */
    color: #f1f5f9 !important;
}

/* 2. Warna Navbar Atas */
body.dark-theme navbar, 
body.dark-theme .header,
body.dark-theme [style*="position: relative"] { 
    background-color: #1e293b !important; /* Biru dongker gelap */
    border-color: #334155 !important;
}

/* 3. Teks Widget Cuaca saat Mode Malam */
body.dark-theme #widget-cuaca-jatiagung {
    color: #f1f5f9 !important;
}
body.dark-theme #widget-cuaca-jatiagung div div {
    color: #cbd5e1 !important;
}

/* 4. Kartu Melayang di Bawah Peta */
body.dark-theme .premium-card {
    background-color: #1e293b !important;
    border: 1px solid #334155 !important;
    color: #f1f5f9 !important;
}
body.dark-theme .premium-card h3 {
    color: #f8fafc !important;
}
/* =========================================================================
/* =========================================================================
   STRUKTUR NAVBAR & LAYOUT RESPONSIVE HP (MENCEGAH TEXT SALING TIMPA)
   ========================================================================= */

/* Pengaturan Flexbox Standar (Layar Komputer/Laptop) */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: #ffffff;
}
.navbar-responsive-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}
.navbar-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 15px;
}
.navbar-menu li {
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}
.navbar-fitur-kanan {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Gaya Tombol Mode Malam */
#btn-dark-mode {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    box-sizing: border-box;
}

/* Gaya Widget Cuaca */
#widget-cuaca-jatiagung {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-family: sans-serif;
}
#widget-cuaca-jatiagung img {
    width: 36px;
    height: 36px;
}
.cuaca-text {
    line-height: 1.2;
    text-align: left;
}
.cuaca-kota {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
}
.cuaca-angka {
    font-size: 14px;
    font-weight: bold;
    color: #1e293b;
}

/* =========================================================================
   ATURAN OTOMATIS SAAT WEB DIBUKA DI HP (MAKSIMAL LAYAR 768px)
   ========================================================================= */
@media screen and (max-width: 768px) {
    /* Paksa navbar utama pecah baris ke bawah */
    .navbar {
        flex-direction: column !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 15px 10px !important;
    }
    
    /* Buat bungkusan menu & fitur melebar penuh mengikuti HP */
    .navbar-responsive-wrapper {
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }

    /* Menu Beranda, Wisata, dll berbaris rapi di tengah */
    .navbar-menu {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 12px !important;
        width: 100% !important;
        padding: 8px 0 !important;
        border-top: 1px solid #f1f5f9;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .navbar-menu li {
        font-size: 13px !important;
    }

    /* Kelompok fitur kanan (Cuaca, Dark Mode, Login) berada paling bawah secara rapi */
    .navbar-fitur-kanan {
        width: 100% !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    /* Sembunyikan teks pembantu agar ruang HP longgar */
    .hide-on-mobile {
        display: none !important;
    }

    /* Perkecil komponen cuaca & tombol di layar HP */
    #widget-cuaca-jatiagung img {
        width: 26px !important;
        height: 26px !important;
    }
    .cuaca-angka {
        font-size: 12px !important;
    }
    #btn-dark-mode {
        padding: 6px 8px !important;
        height: 32px !important;
    }
    .btn-login-top {
        padding: 4px 10px !important;
        font-size: 12px !important;
        height: 32px !important;
        display: flex;
        align-items: center;
    }
}
/* Sembunyikan tombol login khusus saat dibuka di HP (layar di bawah 768px) */
@media screen and (max-width: 767px) {
  .btn-login-top {
    display: none !important;
  }
}