/* ---
CATATAN: Semua gaya di bawah ini dirancang untuk bekerja dengan variabel
warna dari file CSS utama Anda (misal: --primary-color, --background-color).
Tidak ada warna yang di-hardcode di sini.
--- */

/* --- Tata Letak Halaman (Sesuai kode asli Anda) --- */
.page-container {
    flex-grow: 1;
}

.content-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.content-section h2 {
    font-size: 3rem;
    margin-bottom: 4rem;
    font-weight: 400;
    color: var(--primary-color); /* Menggunakan warna dari tema Anda */
    text-align: center;
}

/* --- GALERI FOTO MODERN (MASONRY LAYOUT UNTUK DESKTOP) --- */
.photo-gallery {
    column-count: 3; /* 3 kolom untuk layar besar */
    column-gap: 1.5rem;
}

.photo-item {
    margin-bottom: 1.5rem;
    break-inside: avoid;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color, rgba(0, 0, 0, 0.1));
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    background-color: var(--surface-color, #e0e0e0); /* Warna latar untuk gambar jika gagal dimuat */
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.photo-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px var(--shadow-color, rgba(0, 0, 0, 0.15));
}

.photo-item:hover img {
    transform: scale(1.1);
}

/* Overlay & Caption saat Hover */
.photo-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    box-sizing: border-box;
}

.photo-item:hover .overlay {
    opacity: 1;
}

.photo-item .overlay-caption {
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s 0.1s ease, opacity 0.4s 0.1s ease;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.photo-item:hover .overlay-caption {
    transform: translateY(0);
    opacity: 1;
}


/* --- Lightbox (Sama seperti sebelumnya, sudah modern) --- */
.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    display: none; justify-content: center; align-items: center;
    z-index: 9999; padding: 2rem; opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content {
    position: relative; max-width: 90vw; max-height: 90vh;
    text-align: center; transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.lightbox.active .lightbox-content { transform: scale(1); }
.lightbox-content img {
    max-width: 100%; max-height: 80vh; border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.1);
}
.lightbox-caption {
    color: white; margin-top: 1.5rem; font-size: 1.2rem;
    font-weight: 300; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
}
.lightbox-close, .lightbox-nav {
    position: fixed; color: white; cursor: pointer;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none; z-index: 10001;
}
.lightbox-close { top: 2rem; right: 2rem; font-size: 2rem; }
.lightbox-close:hover { background: rgba(255, 0, 0, 0.2); transform: scale(1.1) rotate(90deg); }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 2rem; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.1); }
.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }
.lightbox-loading {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 50px; height: 50px; border: 3px solid rgba(255, 255, 255, 0.2);
    border-top: 3px solid white; border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 100% { transform: translate(-50%, -50%) rotate(360deg); } }
.lightbox-counter {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    color: white; font-size: 0.9rem; background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px); padding: 0.5rem 1rem; border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2); z-index: 10001;
    font-family: 'Poppins', sans-serif;
}
body.lightbox-open { overflow: hidden; position: fixed; width: 100%; }

/* --- Desain Responsif --- */
@media (max-width: 992px) {
    .photo-gallery { column-count: 2; } /* Tablet besar: 2 kolom masonry */
}

@media (max-width: 768px) {
    .content-section h2 { font-size: 2.5rem; }
    
    /* Layout Grid untuk Tablet Kecil & Mobile */
    .photo-gallery {
        column-count: unset; /* Nonaktifkan masonry */
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 kolom grid */
        gap: 1rem;
    }
    .photo-item {
        margin-bottom: 0; /* Spasi diatur oleh gap */
        aspect-ratio: 16 / 9; /* Paksa rasio landscape 16:9 */
    }
    .photo-item img {
        height: 100%; /* Paksa gambar mengisi tinggi container */
        object-fit: cover; /* Gambar mengisi area tanpa distorsi */
    }
    /* Akhir dari layout grid */

    .lightbox-close { top: 1rem; right: 1rem; width: 45px; height: 45px; font-size: 1.5rem; }
    .lightbox-nav { width: 50px; height: 50px; font-size: 1.5rem; }
    .lightbox-prev { left: 1rem; }
    .lightbox-next { right: 1rem; }
}

@media (max-width: 576px) {
    .content-section { padding: 1rem; }
    .photo-gallery {
        grid-template-columns: 1fr; /* 1 kolom grid untuk mobile */
    }
}