/* =====================================================
   FIX UKURAN FOTO GALERI BERANDA - DIPERKECIL
===================================================== */

/* Judul tetap di tengah */
section:has(.gallery-grid-soft) {
    text-align: center !important;
}

section:has(.gallery-grid-soft) .section-head-soft {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    margin-bottom: 22px !important;
}

section:has(.gallery-grid-soft) .home-title,
section:has(.gallery-grid-soft) .home-desc {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Grid galeri */
.gallery-grid-soft {
    display: grid !important;
    justify-content: center !important;
    align-items: start !important;
    gap: 16px !important;
}

/* Jika foto hanya satu, buat lebih kecil dan tetap tengah */
.gallery-grid-soft:has(.gallery-card-soft:only-child) {
    grid-template-columns: minmax(260px, 500px) !important;
    justify-content: center !important;
}

/* Ukuran card foto tunggal */
.gallery-grid-soft .gallery-card-soft:only-child {
    width: 100% !important;
    max-width: 500px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    background: transparent !important;
    box-shadow: 0 14px 35px rgba(15, 23, 42, .10) !important;
    line-height: 0 !important;
}

/* Gambar tidak crop, tapi ukurannya kecil */
.gallery-grid-soft .gallery-card-soft:only-child img {
    width: 100% !important;
    height: auto !important;
    max-width: 500px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
    border-radius: 16px !important;
}

/* Tombol lihat foto lebih banyak */
section:has(.gallery-grid-soft) .more-soft {
    display: inline-flex !important;
    justify-content: center !important;
    margin: 20px auto 0 !important;
    text-align: center !important;
}

/* Kalau nanti foto lebih dari satu, tetap ukuran normal kecil */
@media (min-width: 1024px) {
    .gallery-grid-soft:not(:has(.gallery-card-soft:only-child)) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .gallery-grid-soft:not(:has(.gallery-card-soft:only-child)) .gallery-card-soft {
        height: 180px !important;
        border-radius: 16px !important;
    }

    .gallery-grid-soft:not(:has(.gallery-card-soft:only-child)) .gallery-card-soft img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
}

/* Mobile */
@media (max-width: 900px) {
    .gallery-grid-soft {
        grid-template-columns: 1fr !important;
    }

    .gallery-grid-soft .gallery-card-soft:only-child {
        max-width: 100% !important;
    }

    .gallery-grid-soft .gallery-card-soft:only-child img {
        max-width: 100% !important;
    }
}