
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #373B44 0%, #4286f4 100%);
    color: white;
    padding: 10px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1500;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Map Container */
#map {
    z-index: 1;
    width: 100%;
    height: calc(100vh - 70px);
    position: relative;
}

.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 280px;
    height: calc(100vh - 70px);
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    border-right: 1px solid #e0e0e0;
    transition: transform 0.3s ease;
    transform: translateX(0);
    z-index: 1400;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Tombol X pada sidebar */
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.close-btn:hover {
    background-color: #ff1a1a; /* Lebih merah saat hover */
    transform: scale(1.1); /* Sedikit membesar */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

.close-btn:active {
    transform: scale(0.95);
    background-color: #e60000;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background-color: #f7faff;
    color: #1d3557;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-content {
    padding: 15px;
    overflow-y: auto;
    flex-grow: 1;
}

.sidebar-content label {
    font-size: 0.9rem;
    color: #ffffff;
    margin-bottom: 8px;
    display: block;
}

.sidebar-content p{
    color: #ffffff;
}

/* Toggle Button */
.toggle-btn {
    position: fixed;
    top: 100px;
    left: 15px;
    z-index: 1200;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 8px 10px;
    cursor: pointer;
}

.toggle-btn i {
    font-size: 1.2rem;
}

.toggle-btn-v2 i {
    font-size: 1.5rem;
}

.toggle-btn-v3 i {
    font-size: 1.1rem;
}


.toggle-btn:hover {
    background-color: #f1f5ff;
    transform: scale(1.05);
}


/* Legend Box */
.legend-box {
    position: absolute;
    bottom: 30px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 280px;
    z-index: 100;
    border: 1px solid #e0e0e0;
}

.legend-box h5 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

.legend-symbol {
    width: 30px;
    height: 20px;
    margin-right: 12px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-point {
    background: #4285F4;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.legend-line {
    background: #34A853;
    height: 4px;
    border-radius: 2px;
}

.legend-polygon {
    background: rgba(251, 176, 59, 0.4);
    border: 3px solid #FBB03B;
}

/* Info Box */
.info-box {
    position: absolute;
    top: 20px;
    left: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 100;
    max-width: 300px;
    border-left: 4px solid #667eea;
}

.info-box h6 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #667eea;
}

.info-box p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.mapboxgl-popup-content {
    z-index: 500;
    padding: 16px 18px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    max-height: 320px;
    overflow-y: auto;
}

/* Scrollbar (halus & modern) */
.mapboxgl-popup-content::-webkit-scrollbar {
    width: 6px;
}
.mapboxgl-popup-content::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}
.mapboxgl-popup-content::-webkit-scrollbar-track {
    background: transparent;
}

.popup-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 6px;
}

.popup-content p {
    font-size: 13px;
    color: #4b5563;
    margin: 4px 0;
    line-height: 1.6;
}

.popup-content strong {
    color: #111827;
}

/* Separator */
.popup-content hr {
    border: none;
    height: 1px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 0, 0, 0.15),
        transparent
    );
    margin: 8px 0;
}

.popup-content .alumni-item {
    background: #f9fafb;
    border-left: 4px solid #3b82f6;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.popup-content .alumni-item:last-child {
    margin-bottom: 0;
}

.popup-content .alumni-item strong {
    font-size: 13px;
    display: block;
    margin-bottom: 2px;
}

/* Bekerja */
.popup-content[data-type="bekerja"] .alumni-item {
    border-left-color: #2563eb;
}

/* Studi Lanjut */
.popup-content[data-type="studi"] .alumni-item {
    border-left-color: #16a34a;
}

/* Wirausaha */
.popup-content[data-type="wirausaha"] .alumni-item {
    border-left-color: #dc2626;
}

.mapboxgl-popup-close-button {
    font-size: 24px;
    color: #64748b;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.mapboxgl-popup-close-button:hover {
    background: #ef4444;
    color: #ffffff;
}
/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }

    .header p {
        font-size: 12px;
    }

    .legend-box {
        bottom: 15px;
        right: 10px;
        min-width: 240px;
        padding: 15px;
    }

    .info-box {
        top: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    #map {
        height: calc(100vh - 65px);
    }
}

/* Loading Animation */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: none;
}

.loading.active {
    display: block;
}

.mapboxgl-ctrl-baselayer {
    position: relative;
}

.mapboxgl-ctrl-baselayer button {
    background: rgba(40, 40, 40, 0.9);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: background 0.3s ease;
}

.mapboxgl-ctrl-baselayer button:hover {
    background: rgba(80, 80, 80, 1);
}

.mapboxgl-ctrl-baselayer i {
    font-size: 18px;
}

/* Dropdown menu */
.baselayer-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    border-radius: 6px;
    padding: 6px;
    display: none;
    flex-direction: column;
    min-width: 160px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.baselayer-dropdown button {
    background: none;
    border: none;
    color: #fff;
    text-align: left;
    padding: 6px 10px;
    font-size: 13px;
    width: 100%;
    cursor: pointer;
    border-radius: 4px;
}

.baselayer-dropdown button:hover {
    background: rgba(255, 255, 255, 0.15);
}


/**  V2 **/

#alumni-list {
    color: #fff;
}

.alumni-list-container {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
}

.alumni-item:focus,
.alumni-item:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/**  V3 **/
#alumnus-item {
    color: #fff;
}

#alumnus-list {
    color: #fff;
}

#alumniListContainer.list-group {
    max-height: 40vh;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 5px;
}

#sidebarV3 .list-group-item {
    background-color: transparent !important;
    color: #fff; /* Pastikan warna teks tetap terbaca */
    border-left: none; /* Hapus border kiri yang mungkin mengganggu */
}

#sidebarV3 .list-group-item:hover,
#sidebarV3 .list-group-item:focus {
    background-color: rgba(255, 255, 255, 0.15) !important; /* Latar belakang semi-transparan saat hover */
}

.alumnus-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Gunakan border putih transparan agar terlihat pada background gelap */
}

.alumnus-item:hover {
    background-color: #bdbdbd;
}

.legend-cluster {
    background-color: #fb923c; /* Warna cluster orange */
    border-radius: 50%;
    width: 15px;
    height: 15px;
    display: inline-block;
}

.toggle-btn-v2 {
    top: 150px;
}

.toggle-btn-v3 {
    top: 203px;
}

/* Untuk header sidebar v2 */
#sidebar-v2 .sidebar-header {
    background-color: #28a745 !important; /* Hijau */
}

.legend-symbol {
    display: inline-block;
    width: 12px; /* Ukuran simbol */
    height: 12px;
    margin-right: 6px;
    border-radius: 50%; /* Membuat bentuk lingkaran */
    border: 1px solid #333; /* Garis tepi agar terlihat jelas */
    vertical-align: middle;
}

/* Warna Spesifik untuk Setiap Kategori Alumni */
.legend-bekerja {
    background-color: #3182ce; /* Biru */
    border-color: #FFFFFF;
}

.legend-studi {
    background-color: #48bb78; /* Hijau */
    border-color: #FFFFFF;
}

.legend-wirausaha {
    background-color: #f56565; /* Merah */
    border-color: #FFFFFF;
}

.legend-university {
    background-color: #FFC107;
    border-color: #FFFFFF;
    /* Kita buat agak lebih besar untuk menunjukkan perbedaan */
    width: 14px;
    height: 14px;
}

.legend-cluster {
    background-color: #fed7aa; /* Warna kluster default */
    border: 1px solid #000;
}

/* Pastikan label sejajar */
.form-check-label {
    display: flex;
    align-items: center;
}


.head-hr {
    background-color: black;
    height: 3px;
}

.sub-hr {
    background-color: white;
    height: 2px;
}

.back-button {
    /* HILANGKAN: position: fixed, top, right, z-index */
    background-color: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: none;
}

.back-button:active {
    transform: scale(0.95);
}

.back-button svg {
    width: 20px;
    height: 20px;
    stroke: white;
    transition: transform 0.3s ease;
}

.back-button:hover svg {
    transform: translateX(-3px);
}

.back-button span {
    font-size: 14px;
    font-weight: 500;
}

@media screen and (max-width: 768px) {
    .back-button {
        padding: 8px 12px;
    }

    .back-button svg {
        width: 14px;
        height: 14px;
    }

    .back-button span {
        display: none; /* Sembunyikan teks di mobile, hanya tampilkan ikon */
    }

    /* Tambahan agar header title tidak terlalu sempit */
    .header-title h1 {
        font-size: 1.2rem;
    }
    .header-title p {
        font-size: 0.7rem;
    }
}
