/* ========================================= */
/* MODAL.CSS - MODERN DESIGN           */
/* ========================================= */

/* 1. Container Utama (Overlay Gelap) */
.modal {
    display: none; /* Default hidden */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85); /* Latar belakang gelap transparan */
    backdrop-filter: blur(5px); /* Efek blur di background */
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 2. Kotak Putih Modal */
.modal-content {
    background-color: #fff;
    width: 100%;
    max-width: 900px; /* Lebar maksimal */
    border-radius: 16px; /* Sudut membulat */
    overflow: hidden;
    display: flex; /* Layout Flexbox Kiri-Kanan */
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease; /* Animasi muncul */
    position: relative;
    max-height: 90vh; /* Agar tidak kepanjangan */
}

/* 3. Kolom Kiri: Foto Full */
.modal-image-col {
    flex: 1; /* Mengambil 50% lebar */
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0; /* Pastikan 0 agar foto full */
}

.modal-image-col img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Foto memenuhi area tanpa gepeng */
    display: block;
}

/* 4. Kolom Kanan: Informasi */
.modal-info-col {
    flex: 1; /* Mengambil 50% lebar */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    text-align: left;
}

/* Judul Kota */
.modal-city-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Group Info (Label & Value) */
.info-group {
    margin-bottom: 20px;
    font-family: 'Poppins', sans-serif;
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.info-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

/* 5. Tombol Daftar (CTA) */
.modal-cta-button {
    display: inline-block;
    margin-top: 30px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 15px 35px;
    text-align: center;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    align-self: flex-start; /* Tombol rata kiri */
    font-family: sans-serif;
}

.modal-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

/* 6. Tombol Close (X) */
.close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Lingkaran */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.close-button:hover {
    color: #333;
    background: #f0f0f0;
    transform: rotate(90deg);
}

/* 7. Animasi Zoom Masuk */
@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ========================================= */
/* RESPONSIVE (HP)               */
/* ========================================= */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column; /* Ubah jadi Atas-Bawah */
        max-height: 95vh;
        overflow-y: auto; /* Aktifkan scroll jika konten panjang */
    }
    
    .modal-image-col {
        height: 300px; /* Batasi tinggi foto di HP */
        flex: none; /* Jangan flex 1, tapi fix height */
    }
    
    .modal-info-col {
        padding: 25px;
        flex: none;
    }

    .modal-city-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .modal-cta-button {
        width: 100%; /* Tombol lebar penuh di HP */
        text-align: center;
    }
}