/* ===============================================
   GALLERY.CSS (Gaya Khusus Halaman Galeri)
   =============================================== */

/* Menggunakan gaya header--sticky agar header selalu tampil di halaman non-hero */
.header {
    position: fixed !important; 
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    background: #ffffff !important; /* Warna putih konsisten dengan style.css: .header--sticky */
    color: var(--ink) !important;
    box-shadow: 0 6px 18px rgba(16,24,40,.08);
}
.header .brand__name, .header .menu a {
    color: var(--ink) !important;
}

.main-gallery {
    padding-top: 80px; /* Jarak agar konten tidak tertutup header sticky */
    background: #f8f9fa; /* Warna latar belakang halaman agar ada kontras */
}

.section__title--page {
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 800;
    margin-bottom: 0.5rem;
    padding-top: 2rem;
}

/* Tata Letak Grid Galeri */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsif */
    gap: 15px;
    margin-top: 2rem;
}

.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    position: relative;
    transition: transform 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    min-height: 250px;
    object-fit: cover;
    display: block;
}

.loading-message {
    text-align: center;
    padding: 40px 0;
    color: var(--muted);
}
.text-center { text-align: center; }

/* Konsistensi Footer (Menggunakan style.css) */
.footer {
    margin-top: 40px;
}

/* ===============================================
   LIGHTBOX STYLING (Untuk Fitur Zoom & Swipe)
   =============================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none; /* Default hidden */
    justify-content: center;
    align-items: center;
    z-index: 99999;
    /* Transisi smooth saat dibuka/ditutup */
    opacity: 0;
    transition: opacity 0.3s ease; 
}
.lightbox.show {
    display: flex;
    opacity: 1;
}

/* Track untuk Swipe/Scroll Horizontal */
.lightbox-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: scroll; /* Memungkinkan swipe/scroll horizontal */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Efek smooth di iOS */
}

/* Setiap Slide Gambar di Lightbox */
.lightbox-slide {
    flex-shrink: 0; /* Penting untuk swipe */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: center;
}

.lightbox-slide img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* Memastikan gambar pas di layar */
    /* Animasi zoom-in saat slide aktif */
    transition: transform 0.3s ease; 
}

/* Navigasi Lightbox (Panah) */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px;
    cursor: pointer;
    z-index: 100000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    transition: background 0.2s;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
}

.lightbox-nav--prev { left: 15px; }
.lightbox-nav--next { right: 15px; }

/* Tombol Tutup */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100000;
}

/* Responsif Mobile: Kecilkan navigasi di HP */
@media (max-width: 600px) {
    .lightbox-nav {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        padding: 5px;
    }
}