/* Desain UI Dasar & Reset */
body, html { margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f8f9fa; color: #333; height: 100%; overflow: hidden; }

/* Navbar Atas (Hanya Header) */
.navbar { background-color: #fbb800; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); position: relative; z-index: 2000; height: 60px; box-sizing: border-box; margin-bottom: 0 !important;
    /* Jika navbar Anda punya border bawah yang tebal, bisa dinolkan juga */
    border-bottom: none;}
.navbar-brand { font-size: 1.2rem; font-weight: bold; cursor: pointer; color: #2d9e3e; }

/* Navigasi Desktop (Sembunyi di Mobile) */
.nav-links-desktop { display: flex; gap: 10px; align-items: center; }
.nav-links-desktop a, .nav-links-desktop button { background: none; border: none; color: white; font-size: 0.9rem; cursor: pointer; padding: 6px 10px; border-radius: 5px; transition: 0.3s; text-decoration: none; }
.nav-links-desktop a:hover, .nav-links-desktop a.active, .nav-links-desktop button:hover { background-color: #2d9e3e; color: #fbb800; font-weight: bold; }
/* --- TOMBOL MASUK TAMPILAN NORMAL (Teks & Garis Hijau) --- */
.btn-auth {
    border: 1px solid #2d9e3e !important;
    color: #2d9e3e !important;
    margin-left: 5px;
    background-color: transparent !important; /* Memastikan latar normal transparan */
    transition: all 0.3s ease !important; /* Agar perubahan warna terasa mulus */
}

/* --- TOMBOL MASUK TAMPILAN SAAT KURSOR DIARAHKAN (Latar Hijau, Teks Putih) --- */
.btn-auth:hover {
    background-color: #2d9e3e !important; /* Latar belakang menjadi hijau solid */
    color: #ffffff !important;            /* TEKS BERUBAH JADI PUTIH AGAR TERBACA */
}
/* Navigasi Bawah (Bottom Nav - Muncul di Mobile) */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background: white; box-shadow: 0 -2px 10px rgba(0,0,0,0.1); z-index: 3000; height: 65px; justify-content: space-around; align-items: center; padding-bottom: env(safe-area-inset-bottom); }
.bottom-nav a, .bottom-nav button { background: none; border: none; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 0.75rem; color: #64748b; cursor: pointer; flex: 1; height: 100%; text-decoration: none;}
.bottom-nav a span.icon, .bottom-nav button span.icon { font-size: 1.4rem; margin-bottom: 3px; }
.bottom-nav a.active { color: #2d9e3e; font-weight: bold; }

/* Container Halaman */
main { height: 100%; }

/* 1. VIEW: LANDING PAGE */
/* 1. Modifikasi Padding: Kita perkecil jarak atas (Top) secara drastis */
.hero-section {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)),
                url('https://images.unsplash.com/photo-1588665518204-cfa392476b72?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover;
    color: white;
    text-align: center;

    margin-top: 0 !important;      /* Memastikan tidak ada celah di atas */
    padding-top: 20px !important;  /* Jarak teks dari navbar (ubah sesuai selera) */
    padding-bottom: 40px;
}

/* 3. Penentu Utama: Matikan margin hantu pada H1 */
.hero-section h1 {
    font-size: 2.2rem;
    margin-top: 0 !important;      /* PENTING: Browser biasanya memberi margin-top pada h1 */
    margin-bottom: 15px;
    color: #2d9e3e;
}
/* 3. Rapikan Paragraf */
.hero-section p {
    font-size: 1rem;
    margin: 0 auto 20px auto;
    line-height: 1.5;
}
.btn-primary { background-color: #10b981; color: white; border: none; padding: 12px 25px; font-size: 1rem; border-radius: 8px; cursor: pointer; font-weight: bold; width: 100%; max-width: 300px; text-decoration: none;}
.container {
    /* 1. Tarik ke atas dengan margin negatif */
    /* Sesuaikan angkanya (misal -100px atau -150px) sampai posisi pas */
    margin-top: -10px !important;

    /* 2. WAJIB: Pastikan dia berada di atas gambar hero */
    position: relative;
    z-index: 10;

    /* 3. Berikan sedikit padding bawah agar tidak mepet dengan konten di bawahnya lagi */
    padding-bottom: 50px;
}

/* 2. VIEW: PETA & SIDEBAR / BOTTOM SHEET */
.map-container { display: flex; height: calc(100vh - 60px); flex-direction: row; position: relative; }
#map { flex-grow: 1; z-index: 1; height: 100%; }
.sidebar { width: 300px; background-color: white; padding: 15px; box-shadow: 2px 0 10px rgba(0,0,0,0.1); overflow-y: auto; z-index: 1000; box-sizing: border-box; }
.sidebar h3 { font-size: 1rem; color: #fbb800; border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; margin-top: 0; }
.control-item { display: flex; align-items: center; margin-bottom: 10px; cursor: pointer; font-size: 0.85rem; }

/* FAB Khusus Peta */
.fab { position: absolute; bottom: 85px; right: 20px; background-color: #f59e0b; color: white; border: none; border-radius: 50px; padding: 12px 18px; font-size: 0.9rem; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.3); cursor: pointer; z-index: 2000; }

/* Modal & Overlay */
.modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: white; padding: 20px; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); z-index: 4000; width: 90%; max-width: 350px; box-sizing: border-box; }
.modal h4 { margin: 0 0 15px 0; color: #fbb800; font-size: 1.1rem; }
.modal label { font-size: 0.85rem; font-weight: bold; color: #475569; display: block; margin-bottom: 5px; }
.modal input, .modal select, .modal textarea { width: 100%; margin-bottom: 15px; padding: 10px; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; font-size: 0.95rem; }
.modal textarea { height: 70px; resize: none; }
.btn-submit { background-color: #10b981; color: white; border: none; padding: 12px; width: 100%; border-radius: 6px; cursor: pointer; font-weight: bold; margin-bottom: 8px; }
.btn-close { background-color: #ef4444; color: white; border: none; padding: 12px; width: 100%; border-radius: 6px; cursor: pointer; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 3999; backdrop-filter: blur(2px); }

/* Halaman Konten Lainnya */
.content-container { padding: 20px; max-width: 1200px; margin: 0 auto; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; margin-top: 15px; }
.card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.card-img { height: 160px; width: 100%; object-fit: cover; }
.card-body { padding: 15px; }
.card-badge { display: inline-block; background: #e0f2fe; color: #0284c7; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; margin-bottom: 8px; }
.card h3 { margin: 0 0 8px 0; font-size: 1.1rem; }
.card p { color: #6b7280; font-size: 0.85rem; margin-bottom: 12px; }
.btn-outline { border: 1px solid #2d9e3e; color: #0284c7; background: none; padding: 8px 15px; border-radius: 5px; cursor: pointer; width: 100%; font-weight: bold; }

.guide-steps { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); margin-bottom: 15px; }
.step-number { background: #fbb800; color: #2d9e3e; width: 30px; height: 30px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; margin-right: 12px; flex-shrink: 0; }

.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100%; background: #f1f5f9; padding: 20px; box-sizing: border-box;}
.auth-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); width: 100%; max-width: 400px; }
.auth-group input, .auth-group select { width: 100%; padding: 12px; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; }
.btn-auth-submit { background-color: #2d9e3e; color: #fbb800; font-weight: bold; width: 100%; padding: 12px; border: none; border-radius: 6px; cursor: pointer; transition: 0.3s; margin-top: 10px; }

/* Styling Tabel di dalam Popup agar mirip ArcGIS/QGIS2web */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: 250px !important;
}

.popup-table {
    width: 100%;
    border-collapse: collapse;
}

.popup-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.popup-table th {
    background-color: #2d9e3e;
    color: white;
    text-align: left;
    padding: 8px;
    font-size: 13px;
}

.popup-table td {
    padding: 8px;
    font-size: 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}

.popup-header {
    background: #2d9e3e;
    color: white;
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

/* =========================================
   RESPONSIVE MOBILE (Layar di bawah 768px)
   ========================================= */
@media (max-width: 768px) {
    .nav-links-desktop { display: none; /* Sembunyikan menu atas di mobile */ }
    .bottom-nav { display: flex; /* Munculkan navigasi bawah */ }

    /* Penyesuaian Map Container untuk Panel Bawah (Bottom Sheet) */
    .map-container { flex-direction: column; height: calc(100vh - 60px - 65px); }

    #map { height: 60%; flex-grow: unset; }

    /* --- MEMATIKAN GARIS BAWAAN DARI STYLE.CSS --- */
    .sidebar::before,
    .sidebar::after,
    .handle-bar-mobile::before,
    .handle-bar-mobile::after {
        display: none !important;
        content: none !important;
    }
    /* Penyesuaian Posisi FAB di Mobile */
    .fab { bottom: calc(40% + 15px); right: 15px; padding: 10px 15px; font-size: 0.85rem; }

    .content-container { padding: 15px; }
}
