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

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

#map {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.logo-container {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 998;
    display: flex;
    justify-content: center;
}

.logo {
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    text-align: center;
    line-height: 20px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 12px 20px;
    gap: 12px;
    flex: 1;
}

.search-icon {
    color: #5f6368;
    font-size: 20px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    color: #202124;
}

.menu-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: left 0.3s ease;
}

.menu-btn.shifted {
    left: 340px;
}

.logo-container {
    position: absolute;
    top: 20px;
    z-index: 998;
}

.logo {
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 20px;
}

.logo-icon {
    font-size: 24px;
}

.logo-text {
    font-weight: 700;
    font-size: 14px;
}

.sidebar {
    position: absolute;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h2 {
    color: #202124;
    font-size: 22px;
    margin-bottom: 5px;
}

.sidebar-search {
    margin-top: 15px;
}

.sidebar-search .search-box {
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    padding: 10px 15px;
}

.sidebar-search .search-input {
    font-size: 14px;
}

.sidebar-content {
    padding: 20px;
}

.place-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.place-item:hover {
    background: #f8f9fa;
}

.place-name {
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 5px;
}

.place-desc {
    font-size: 14px;
    color: #5f6368;
    margin-bottom: 5px;
}

.controls {
    position: absolute;
    right: 20px;
    bottom: 120px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.control-btn:hover {
    background: #f8f9fa;
}

.location-btn {
    position: absolute;
    right: 20px;
    bottom: 60px;
    z-index: 1000;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: background 0.2s;
}

.layer-btn {
    position: absolute;
    top: 80px;
    right: 20px;
    z-index: 1000;
    background: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: background 0.2s;
}

.layer-btn:hover {
    background: #f8f9fa;
}

.layer-menu {
    position: absolute;
    top: 140px;
    right: 20px;
    z-index: 1000;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 10px;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 180px;
}

.layer-menu.active {
    display: flex;
}

.layer-option {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 10px;
}

.layer-option:hover {
    background: #f8f9fa;
}

.layer-option.active {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 600;
}

/* Hide default Leaflet zoom controls */
.leaflet-control-zoom {
    display: none;
}

@media (max-width: 768px) {
    .logo-container {
        top: 15px;
    }

    .logo {
        padding: 8px 15px;
        line-height: 20px;
    }

    .logo-text {
        font-size: 14px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .sidebar {
        width: 280px;
        left: -280px;
    }

    .menu-btn {
        width: 40px;
        height: 40px;
        top: 15px;
        left: 15px;
    }

    .menu-btn.shifted {
        left: 300px;
    }

    .controls, .location-btn {
        right: 15px;
    }

    .login-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .layer-btn {
        top: 70px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .layer-menu {
        top: 120px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .logo {
        padding: 8px 12px;
        line-height: 14px;
    }

    .logo-text {
        font-size: 12px;
    }

    .logo-icon {
        font-size: 18px;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .sidebar-header h2 {
        font-size: 18px;
    }

    .place-item {
        padding: 12px;
    }

    .menu-btn.shifted {
        left: 280px;
    }
}

.leaflet-popup-content-wrapper {
    border-radius: 12px;
}

.popup-content {
    padding: 5px;
}

.popup-title {
    font-weight: 600;
    color: #202124;
    margin-bottom: 5px;
    font-size: 15px;
}

.popup-desc {
    font-size: 13px;
    color: #5f6368;
}

a{
    text-decoration: none;
}

/* --- Style untuk Popup Kustom --- */
.popup-content {
    width: 350px;
    font-family: Arial, sans-serif;
}

.popup-img {
    width: 100%;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.popup-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.popup-badge-container {
    margin-bottom: 10px;
}

.popup-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 5px;
    border: 1px solid rgba(0,0,0,0.1);
}

.popup-desc {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
}

.btn-rute {
    text-decoration: none;
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-rute:hover {
    background-color: #0056b3;
}

/* --- Style untuk Sidebar Item (dengan foto) --- */
.place-item {
    display: flex; /* Ganti dari block ke flex */
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.place-item:hover {
    background-color: #f4f4f4;
}

.place-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
    flex-shrink: 0; /* Mencegah gambar menyusut */
}

.place-info {
    flex-grow: 1; /* Mengisi sisa ruang */
}

.place-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
}

.place-kategori {
    font-size: 13px;
    color: #777;
}

/* Override default popup styling Leaflet jika perlu */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    padding: 1px; /* Leaflet menambah padding aneh, kita reset */
}

.leaflet-popup-content {
    margin: 15px !important;
    width: auto !important;
}

/* Membuat foto di popup menjadi pemicu yang interaktif */
.popup-photo-trigger {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 5px; /* Sesuaikan dengan .popup-img */
    overflow: hidden; /* Penting untuk badge */
}

/* Badge untuk jumlah foto (misal: "+4 foto") */
.photo-count-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.popup-photo-trigger:hover .popup-img {
    filter: brightness(0.9); /* Efek hover */
}