/* src/css/galeri.css (FINAL REVISI: NUDE THEME EDITION) */

#galeri {
    position: relative;
    z-index: 2;
    
    /* --- THEME CHANGE --- */
    /* Warna Dasar: Putih Gading */
    background-color: var(--card-bg-color) !important;          
    background-image: url('../assets/images/bg-galeri.webp');

    /* Agar gambar memenuhi seluruh area panel kanan dari atas ke bawah */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    border: 1px solid var(--border-color) !important; 
    box-shadow: 0 15px 40px var(--shadow-color) !important;
    
    /* Padding Container */
    padding: 4rem 1rem 6rem 1rem;
    margin-top: 0;
    margin-bottom: 3rem !important;
    
    border-radius: 20px;
    overflow: hidden;
}

#galeri::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 250px; 
    background-image: url('../assets/images/ornamen-galeri-top.webp'); 
    background-size: 100% auto; 
    background-repeat: no-repeat;
    background-position: top center;
    z-index: -2; 
    pointer-events: none;
    opacity: 0.7; /* Opacity dinaikkan sedikit karena background terang */
}

#galeri::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px; 
    background-image: url('../assets/images/ornamen-galeri-bottom.webp'); 
    background-size: 100% auto; 
    background-repeat: no-repeat;
    background-position: bottom center;
    z-index: -2; 
    pointer-events: none;
    opacity: 0.9;
}

/* Header */
.galeri-header {
    text-align: center;
    margin-bottom: 1.5rem;
    z-index: 10;
    position: relative;
}

.galeri-header .section-title {
    font-family: var(--sacramento, cursive);
    font-size: 2.5rem;
    
    /* --- THEME CHANGE --- */
    color: var(--heading-text-color); /* Coklat Bata Pudar */
    
    margin-bottom: 5px;
}

.galeri-header .section-subtitle {
    font-family: 'Josefin Sans', sans-serif;
    font-size: 0.9rem;
    
    /* --- THEME CHANGE --- */
    color: var(--main-text-color); /* Coklat Tua */
    opacity: 0.8;
}

/* --- SCROLLABLE PREVIEW CONTAINER --- */
.polaroid-dual-string {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    height: 720px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    
    /* Styling Scrollbar */
    scrollbar-width: thin;
    
    /* --- THEME CHANGE --- */
    scrollbar-color: var(--accent-color) transparent;
}

/* Scrollbar Custom */
.polaroid-dual-string::-webkit-scrollbar {
    width: 4px;
}

.polaroid-dual-string::-webkit-scrollbar-track {
    background: transparent;
}

.polaroid-dual-string::-webkit-scrollbar-thumb {
    background-color: var(--accent-color); /* Mocca */
    border-radius: 10px;
}

/* Komponen Tali & Polaroid */
.string-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hanging-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
}

.string-line {
    width: 2px;
    height: 25px;
    
    /* --- THEME CHANGE --- */
    background: var(--heading-text-color); /* Tali warna coklat */
    
    opacity: 0.9;
}

.polaroid-frame {
    /* Frame polaroid tetap Putih Bersih agar kontras dengan card background yang krem */
    background: #fff; 
    
    width: 145px;
    padding: 6px 6px 25px 6px;
    
    /* Shadow lembut */
    box-shadow: 0 5px 15px var(--shadow-color);
    
    transform-origin: top center;
    position: relative;
    transition: transform 0.3s;
    animation: swing 3.5s infinite ease-in-out alternate;
}

.photo-area {
    width: 100%;
    height: 145px;
    background: #eee; /* Background placeholder abu muda */
    overflow: hidden;
}

.photo-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Filter Sepia dihapus/dikurangi agar foto terlihat natural di tema bersih */
    filter: sepia(10%); 
    transition: transform 0.5s;
}

/* --- THEME CHANGE: JEPITAN KAYU --- */
.clip-wood {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 20px;
    
    /* Warna kayu muda (Mocca/Border) */
    background: var(--border-color); 
    border: 1px solid var(--accent-color);
    
    border-radius: 2px;
    z-index: 5;
}

.clip-wood::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    height: 2px;
    
    /* Kawat jepit warna gelap */
    background: var(--main-text-color);
}

/* Animasi */
.tilt-left { transform: rotate(2deg); }
.tilt-right { transform: rotate(-2deg); }
.tilt-slight { transform: rotate(1deg); }

@keyframes swing {
    0% { transform: rotate(2deg); }
    100% { transform: rotate(-2deg); }
}

/* --- TOMBOL DI BAWAH --- */
.see-all-container {
    position: relative;
    width: 100%;
    height: auto;
    margin-top: 20px;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-primary-custom {
    position: relative;
    z-index: 2;
    
    /* --- THEME CHANGE --- */
    background: var(--button-primary-bg); /* Coklat Elegan */
    color: var(--button-primary-text); /* Putih */
    
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary-custom:hover {
    transform: translateY(-3px);
    background: var(--heading-text-color); /* Warna lebih terang saat hover */
    box-shadow: 0 8px 20px var(--shadow-color);
}

/* --- FULL GALLERY MODAL (THEATER MODE) --- */
.full-gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* --- THEME CHANGE --- */
    /* Gunakan warna Coklat Kopi Gelap Transparan agar foto terlihat jelas & elegan */
    background: rgba(78, 52, 46, 0.95); 
    
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.full-gallery-modal.active {
    transform: translateY(0);
}

.full-gallery-header {
    flex-shrink: 0;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    z-index: 10;
}

.full-gallery-header h3 {
    margin: 0;
    font-family: var(--sacramento, cursive);
    font-size: 1.8rem;
    color: #ffffff; /* Teks tetap putih di mode gelap */
}

#close-full-gallery {
    background: none;
    border: none;
    font-size: 2rem;
    color: #ffffff; /* Icon close putih */
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s;
}

#close-full-gallery:hover {
    transform: rotate(90deg);
}

.full-gallery-grid-wrapper {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
    background: transparent;
}

.full-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding-bottom: 50px;
}

.grid-item {
    aspect-ratio: 1/1.5;
    overflow: hidden;
    cursor: pointer;
    background: #eee;
    border-radius: 8px;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.grid-item:hover img {
    transform: scale(1.1);
}

/* Popup Zoom */
.gallery-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* --- THEME CHANGE --- */
    background: rgba(62, 39, 35, 0.98); /* Sangat gelap (Dark Coffee) */
    
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.gallery-popup img {
    max-width: 90%;
    max-height: 80vh;
    border: 4px solid #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.close-popup {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.gallery-popup.closing {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Responsive */
@media screen and (max-width: 768px) {
    .polaroid-dual-string {
        height: 520px;
    }

    .full-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}