/* public/css/gallery.css */

.gallery-background-section {
    width: 100%;
    height: 100vh;
    margin: 0;
    /* Ubah margin ke 0 agar benar-benar full screen */
    position: relative;
    overflow: hidden;
}

.bg-slider {
    position: absolute;
    inset: 0;
    display: flex;
    /* Ubah ke hidden agar navigasi utama lewat tombol */
    overflow-x: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    z-index: 1;
}

.bg-slider::-webkit-scrollbar {
    display: none;
    /* Sembunyikan scrollbar di Chrome/Safari */
}

.bg-item {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    scroll-snap-align: center;
    filter: brightness(0.7);
    transition: filter 0.5s ease;
}

/* Navigasi Tombol */
.gallery-nav {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 10;
    pointer-events: none;
    /* Supaya tidak menghalangi klik pada area tengah */
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    /* Tombol tetap bisa diklik */
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.4);
}

.gallery-content-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    color: white;
}

.section-title {
    font-size: 14px;
    letter-spacing: 0.6em;
    margin-bottom: 20px;
}

.gallery-desc {
    font-size: 13px;
    font-weight: 300;
    max-width: 280px;
    line-height: 1.6;
    opacity: 0.9;
}

.soft-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.bottom-shade {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20vh;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    z-index: 3;
}

/* --- OVERRIDE GLOBAL UNTUK MOBILE --- */
@media (max-width: 1023px) {

    .gallery-background-section {
        height: 100dvh !important;
        width: 100% !important;
        position: relative;
    }

    .bg-slider {
        /* Kembalikan ke auto agar user mobile bisa swipe manual dengan nyaman */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bg-item {
        /* Pastikan gambar memenuhi layar mobile tanpa terdistorsi */
        background-position: center center !important;
        filter: brightness(0.75);
        /* Sedikit lebih terang di mobile agar detail foto terlihat */
    }

    /* Navigasi Tombol Mobile */
    .gallery-nav {
        padding: 0 10px;
        /* Perkecil padding agar tombol lebih ke pinggir */
    }

    .nav-btn {
        width: 38px;
        /* Ukuran tombol lebih mungil di mobile */
        height: 38px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .nav-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Teks Overlay */
    .section-title {
        font-size: 11px;
        letter-spacing: 0.5em;
        margin-bottom: 12px;
    }

    .gallery-desc {
        font-size: 12px;
        max-width: 240px;
        /* Batasi lebar teks agar tidak menumpuk ke tombol */
        line-height: 1.5;
        padding: 0 15px;
    }

    .bottom-shade {
        height: 25dvh;
        /* Gradasi sedikit lebih tinggi untuk kesan cinematic */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    }
}

/* Fix untuk layar HP yang sangat pendek agar teks tidak menabrak tombol navigasi */
@media (max-height: 600px) and (orientation: portrait) {
    .gallery-desc {
        font-size: 11px;
        max-width: 200px;
    }

    .section-title {
        margin-bottom: 8px;
    }
}