@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&display=swap');

/* --- WADAH UTAMA GALERI --- */
.fasilitas-container {
    width: 100%;
    padding: 20px 0;
    overflow: hidden;
    background: #ffffff;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    /* Margin negatif untuk menarik galeri ke atas agar mepet konten sebelumnya */
    /* margin-top: -20px; */
    box-sizing: border-box;
    border-radius: 20px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); */
    position: relative;
}

.fasilitas-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
    padding: 0 20px;
}

/* --- TRACK SLIDER (RESPONSIF) --- */
.slider-track {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px 20px;
    overflow-x: auto;
    /* Aktifkan scroll horizontal di HP */
    scroll-snap-type: x mandatory;
    /* Biar scroll-nya pas berhenti di tengah gambar */
    scrollbar-width: none;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

/* --- GAYA KOTAK GAMBAR (CARD) --- */
.fasilitas-card {
    position: relative;
    min-width: 200px;
    /* Lebar default untuk desktop */
    height: 280px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    scroll-snap-align: start;
    /* Biar kartu otomatis ke tengah saat di-scroll di HP */
}

/* Efek Fokus (Gambar Tengah) di Desktop */
@media (min-width: 851px) {

    .fasilitas-card.active,
    .fasilitas-card:hover {
        min-width: 380px;
        transform: scale(1.02);
        /* z-index: 10; */
    }
}

.fasilitas-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- OVERLAY TEKS --- */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    text-align: left;
}

.card-overlay h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-overlay p {
    margin: 5px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

/* --- PENYESUAIAN KHUSUS HP --- */
@media (max-width: 850px) {
    .fasilitas-container {
        margin-top: 0;
        /* Reset margin di HP */
        padding: 10px 0;
    }

    .slider-track {
        justify-content: center;
        /* Gambar mulai dari kiri di HP */
        gap: 10px;
    }

    .fasilitas-card {
        min-width: 85%;
        /* Gambar hampir memenuhi lebar layar HP */
        height: 320px;
    }

    .fasilitas-title {
        font-size: 20px;
    }
}

.nav-btn {
    position: absolute;
    top: 55%;
    /* Turunin dikit biar pas di tengah gambar, ngga nabrak judul */
    transform: translateY(-50%);
    background-color: #2fb14d;
    /* Gua samain sama hijau tema lu */
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    /* z-index: 20; */
    transition: background 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-btn:hover {
    background-color: #1a8a34;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}