/* ==========================================================================
   STYLING SECTION FASILITAS (SNAP SCROLL SLIDER)
   ========================================================================== */

.facilities-section {
    background-color: #ffffff; /* Bisa diganti #f8fafc jika ingin agak abu-abu */
    padding: 6rem 0;
    overflow: hidden;
}

/* Header Fasilitas */
.fac-badge {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    display: inline-block;
}

.fac-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

/* Tombol Lihat Semua (Gaya Outline Oranye) */
.btn-fac-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 2rem;
    background-color: #ffffff;
    color: #f97316;
    border: 2px solid #f97316;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-fac-view-all:hover {
    background-color: #f97316;
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(249, 115, 22, 0.2);
}

/* --- KONTainer SLIDER HORIZONTAL (MAGIC CSS) --- */
.fac-slider-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2rem;
    padding-top: 1rem;

    /* Smooth Scroll & Snap */
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    /* Sembunyikan Scrollbar agar terlihat seperti App */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
.fac-slider-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* --- KARTU FASILITAS --- */
.fac-card {
    flex: 0 0 320px; /* Lebar tetap kartu, tidak akan menyusut */
    height: 420px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    scroll-snap-align: start; /* Titik henti saat digeser */
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.4s ease;
    cursor: grab;
}

.fac-card:hover {
    transform: translateY(-10px);
}

.fac-card:active {
    cursor: grabbing;
}

/* Gambar Background Kartu */
.fac-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.fac-card:hover .fac-card-bg {
    transform: scale(1.1); /* Efek zoom tipis saat kursor di atasnya */
}

/* Gradasi Gelap di Bawah agar Teks Terbaca */
.fac-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(
        to top,
        rgba(15, 23, 42, 0.9) 0%,
        rgba(15, 23, 42, 0) 100%
    );
    z-index: 1;
}

/* Konten Teks di Dalam Kartu */
.fac-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.75rem;
    z-index: 2;
    color: #ffffff;
}

.fac-card-icon {
    width: 45px;
    height: 45px;
    background-color: #f97316;
    color: #ffffff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.fac-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.fac-card-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    line-height: 1.5;
}

/* Responsif Layar HP */
@media (max-width: 767.98px) {
    .fac-title {
        font-size: 2rem;
    }
    .fac-card {
        flex: 0 0 280px; /* Kartu sedikit lebih kecil di HP */
        height: 380px;
    }
}

/* --- CLASS KHUSUS JIKA GALLERY KOSONG (BLUR & HITAM PUTIH) --- */
.fac-img-empty {
    filter: grayscale(100%) brightness(50%) blur(3px);
    -webkit-filter: grayscale(100%) brightness(50%) blur(3px);
    transform: scale(
        1.05
    ); /* Sedikit di-zoom agar sisi blur tidak bocor border-nya */
    transition: all 0.5s ease;
}

/* Ketika di-hover, beri sedikit transisi redup murni */
.fac-card:hover .fac-img-empty {
    filter: grayscale(100%) brightness(40%) blur(1px);
    transform: scale(1.1);
}

/* Menjaga teks badge 'No Photo' melayang rapi di tengah kartu jika kosong */
.fac-badge-no-photo {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(239, 68, 68, 0.2); /* Merah transparan halus */
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/* ==========================================================================
   OPTIMASI RESPONSIF MOBILE (HP)
   ========================================================================== */
@media (max-width: 767.98px) {
    .fac-title {
        font-size: 1.85rem;
    }

    .fac-slider-container {
        padding-bottom: 1rem;
        gap: 1rem; /* Jarak antar kartu dirapatkan di HP */
    }

    .fac-card {
        /* Menggunakan 80vw agar kartu memakan 80% layar HP, sisanya untuk mengintip kartu selanjutnya */
        flex: 0 0 80vw;
        height: 350px; /* Sedikit lebih ceper di HP */
        border-radius: 20px;
    }

    .fac-card-content {
        padding: 1.25rem; /* Teks agak dipadatkan */
    }

    .fac-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .fac-card-title {
        font-size: 1.2rem;
    }

    .fac-card-desc {
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .fac-card {
        flex: 0 0 85vw; /* Untuk HP super kecil, lebarkan sedikit layarnya */
    }
}
