@import url("//fonts.googleapis.com/css?family=Nunito:400,600,700,800");
body {
    background-color: #f9fafb;
    font-size: 14px;
    font-weight: 400;
    font-family: "Nunito", "Segoe UI", arial;
    color: #6c757d;
  }
  
  #mapid {
      height: 500px;
      border-radius: 8px;
  }
  
  .table-responsive {
      margin-top: 20px;
  }
  
  .card .card-header h4 {
    font-size: 16px;
    line-height: 28px;
    color: #1E90FF;
    padding-right: 10px;
    margin-bottom: 0;
  }
  .card-header {
      font-size: 16px;
      line-height: 28px;
      color: #ffffff;
      padding-right: 10px;
      margin-bottom: 0;
      background-color: #1E90FF;
  }
  
  footer {
      background: linear-gradient(135deg, #1E90FF, #87CEFA);
      color: white;
      padding: 15px 0;
      text-align: center;
      margin-top: 20px;
      box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .header {
      color: white;
      padding: 15px 0;
      text-align: center;
      font-size: 24px;
      font-weight: bold;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }
  
  .map-container { 
      width: 100%; 
      max-width: 1200px; 
      margin: 20px auto; 
      padding: 20px; 
      background-color: white; 
      border-radius: 8px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

.data-table { 
    margin-top: 20px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

th, td { 
    padding: 12px 15px; 
    border: 1px solid #ddd; 
    text-align: left;
}

th { 
    color: #6777ef; 
    color: white; 
}

tr:nth-child(even) { 
    background-color: #f9f9f9; 
}

.navbar {
    background: linear-gradient(135deg, #1E90FF, #87CEFA);
    color: white;
}

.navbar .navbar-brand, 
.navbar .nav-link {
    color: white;
    transition: color 0.3s ease;
}

.navbar .navbar-brand:hover, 
.navbar .nav-link:hover {
    color: #d1d1e9;
}

.navbar-toggler {
    border-color: white;
}

.nav-items-wrapper {
    display: flex;
    gap: 10px;
}

.nav-link-custom {
    color: white;
    background-color: #6777ef;
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-link-custom:hover {
    background-color: #5763c6;
    color: #d1d1e9;
}

.nav-link-custom:focus {
    outline: none;
    box-shadow: 0 0 5px #d1d1e9;
}
 /* Overlay styling */
 #locationDetailPopup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 800px;
    max-height: 90%; /* Batasi tinggi untuk menghindari overflow */
    overflow-y: auto; /* Agar deskripsi panjang bisa di-scroll */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    }

    #locationDetailPopup .popup-content {
        text-align: left;
    }

    #locationImage {
        width: 100%; /* Gambar menyesuaikan lebar pop-up */
        height: auto; /* Menjaga aspek rasio gambar */
        max-height: 200px; /* Batas maksimal tinggi gambar */
        object-fit: contain; /* Menyesuaikan gambar tanpa crop */
        border-radius: 8px; /* Opsional untuk sudut bulat */
        margin: 10px 0; /* Jarak antar elemen */
        display: block; /* Pastikan gambar berada di tengah */
    }
    #locationImage1 {
        width: 100%; /* Gambar menyesuaikan lebar pop-up */
        height: auto; /* Menjaga aspek rasio gambar */
        max-height: 200px; /* Batas maksimal tinggi gambar */
        object-fit: contain; /* Menyesuaikan gambar tanpa crop */
        border-radius: 8px; /* Opsional untuk sudut bulat */
        margin: 10px 0; /* Jarak antar elemen */
        display: block; /* Pastikan gambar berada di tengah */
    }
    

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(5px); /* Blur effect for background */
        z-index: 9998; /* Behind the popup */
        transition: opacity 0.4s ease;
        opacity: 0;
        visibility: hidden;
    }

    .overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    /* Styling custom pop-up */
    .custom-popup {
        display: none;
        position: fixed;
        z-index: 9999; /* Above the overlay */
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) scale(0.9);
        background: linear-gradient(135deg, #ffffff, #f9f9f9);
        padding: 25px;
        box-shadow: 0px 8px 30px rgba(0, 0, 0, 0.15);
        border-radius: 15px;
        width: 450px;
        max-width: 95%;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .custom-popup.active {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translate(-50%, -50%) scale(1);
    }

    /* Close button styling */
    .custom-popup .close-popup {
        position: absolute;
        top: 10px;
        right: 10px;
        cursor: pointer;
        font-size: 24px;
        color: #999;
        transition: color 0.3s ease;
    }

    .custom-popup .close-popup:hover {
        color: #ff6b6b;
        transform: scale(1.2);
    }

    /* Popup content styling */
    .custom-popup .popup-content h5 {
        margin-bottom: 20px;
        font-size: 22px;
        font-weight: bold;
        color: #333;
        text-align: center;
    }

    .custom-popup .popup-content p {
        margin-bottom: 15px;
        font-size: 16px;
        color: #666;
        line-height: 1.6;
        text-align: center;
    }

    /* Animation keyframes for smoother pop-up appearance */
    @keyframes popup-scale {
        0% {
            transform: translate(-50%, -50%) scale(0.85);
            opacity: 0;
        }
        100% {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
        }
    }

    /* Apply the animation on active state */
    .custom-popup.active {
        animation: popup-scale 0.4s ease forwards;
    }
    @keyframes slideUp {
        0% {
            opacity: 0;
            transform: translateY(100%);
        }
        100% {
            opacity: 1;
            transform: translateY(0);
        }
    }


    .sidebar {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 300px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        z-index: 1000;
    }
    .legend-marker {
        display: inline-block;
        width: 20px;
        height: 20px;
        background-color: #00b7ff;
        margin-right: 3px;
    }
    
    .popup-content img {
        display: block;
        margin: 0 auto;
        max-width: 100%;
        height: auto;
        border-radius: 8px;
    }
    
    .popup-content .details {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 kolom dengan lebar sama */
        gap: 10px 20px; /* Jarak antar elemen */
    }
    
    .popup-content .details p {
        display: flex;
        justify-content: space-between; /* Agar label di kiri dan value di kanan */
        align-items: center;
        border-bottom: 1px solid #ddd; /* Garis bawah opsional */
        padding: 5px 0;
    }
    #locationSample {
        display: block; /* Mengubah span menjadi blok agar teks turun ke bawah */
        white-space: normal; /* Memastikan teks bisa wrap */
        word-wrap: break-word; /* Memastikan teks panjang bisa pindah baris */
        overflow-wrap: break-word; /* Alternatif untuk memastikan teks panjang tidak keluar area */
    }
    #locationKlasifikasi {
        display: block; /* Mengubah span menjadi blok agar teks turun ke bawah */
        white-space: normal; /* Memastikan teks bisa wrap */
        word-wrap: break-word; /* Memastikan teks panjang bisa pindah baris */
        overflow-wrap: break-word; /* Alternatif untuk memastikan teks panjang tidak keluar area */
    }
    .styled-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .styled-table th, .styled-table td {
        border: 1px solid #ddd;
        padding: 10px;
        text-align: center;
    }
    
    .styled-table th {
        background-color: #f4f4f4;
        font-weight: bold;
    }
    
    .styled-table tr:nth-child(even) {
        background-color: #f9f9f9;
    }
    .styled-table th {
        background-color: #000; /* Warna hitam */
        color: #fff; /* Warna teks putih agar kontras */
        font-weight: bold;
        padding: 10px;
        text-align: center;
    }
    
    