/* ==========================================================================
   galeri.css - Styling Halaman Galeri Foto PT Astha Dwi Astha (828)
   Model: Masonry Photo Grid Responsif Sesuai Screenshot dengan Animasi & Modal
   Dukungan Penuh Mode Gelap (Dark Mode) & Mode Terang (Light Mode)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESET & DASAR
   -------------------------------------------------------------------------- */
body {
    background-color: var(--bg-dark, #080d1a);
    color: var(--text-main, #e2e8f0);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.light-theme {
    background-color: #f8fafc;
    color: #1e293b;
}

/* --------------------------------------------------------------------------
   2. MAIN SECTION & PARALLAX BACKGROUND LAYERS
   -------------------------------------------------------------------------- */
.gallery-main-section {
    padding-top: 120px;
    padding-bottom: 90px;
    flex: 1;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 15% 15%, rgba(250, 204, 21, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 85% 65%, rgba(234, 179, 8, 0.06) 0%, transparent 55%);
}

body.light-theme .gallery-main-section {
    background: radial-gradient(circle at 15% 15%, rgba(202, 138, 4, 0.06) 0%, transparent 60%),
                radial-gradient(circle at 85% 65%, rgba(217, 119, 6, 0.04) 0%, transparent 55%);
}

/* Ambient Floating Parallax Layers */
.gallery-parallax-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.parallax-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.28;
    will-change: transform;
    transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1);
}

.parallax-orb.orb-1 {
    width: 480px;
    height: 480px;
    top: 5%;
    left: -120px;
    background: radial-gradient(circle, #facc15 0%, rgba(250, 204, 21, 0) 70%);
}

.parallax-orb.orb-2 {
    width: 560px;
    height: 560px;
    top: 45%;
    right: -160px;
    background: radial-gradient(circle, #3b82f6 0%, rgba(59, 130, 246, 0) 70%);
    opacity: 0.20;
}

.parallax-orb.orb-3 {
    width: 420px;
    height: 420px;
    bottom: 8%;
    left: 25%;
    background: radial-gradient(circle, #eab308 0%, rgba(234, 179, 8, 0) 70%);
    opacity: 0.18;
}

.parallax-grid-lines {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(250, 204, 21, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(250, 204, 21, 0.035) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 80%);
    will-change: transform;
}

body.light-theme .parallax-grid-lines {
    background-image: 
        linear-gradient(rgba(202, 138, 4, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(202, 138, 4, 0.04) 1px, transparent 1px);
}

.gallery-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.gallery-header-meta {
    margin-bottom: 38px;
    text-align: center;
    position: relative;
    z-index: 2;
    will-change: transform, opacity;
    transition: transform 0.1s linear, opacity 0.15s linear;
}

.gallery-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 18px;
    background: rgba(250, 204, 21, 0.08);
    border: 1px solid rgba(250, 204, 21, 0.25);
    border-radius: 999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #facc15;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    margin-bottom: 14px;
}

body.light-theme .gallery-badge {
    background: rgba(202, 138, 4, 0.08);
    border-color: rgba(202, 138, 4, 0.25);
    color: #b45309;
}

.gallery-badge .pulse-dot {
    width: 7px;
    height: 7px;
    background-color: #facc15;
    border-radius: 50%;
    box-shadow: 0 0 8px #facc15;
    animation: radarPulse 2s infinite ease-in-out;
}

@keyframes radarPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.3); }
}

.gallery-heading-title {
    font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(2rem, 3.2vw, 2.75rem);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
}

body.light-theme .gallery-heading-title {
    color: #0f172a;
}

.gallery-heading-desc {
    font-size: 1.02rem;
    line-height: 1.68;
    color: #94a3b8;
    max-width: 680px;
    margin: 0 auto;
}

body.light-theme .gallery-heading-desc {
    color: #64748b;
}

/* --------------------------------------------------------------------------
   3. GRID FOTO MASONRY (SESUAI GAMBAR REFERENSI USER)
   -------------------------------------------------------------------------- */
.gallery-masonry {
    column-count: 3;
    column-gap: 20px;
    margin-top: 10px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 24px;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #091122;
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    will-change: transform;
}

.gallery-item:hover {
    transform: translate3d(0, calc(var(--parallax-y, 0px) - 6px), 0);
    border-color: rgba(250, 204, 21, 0.45);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5), 0 0 28px rgba(250, 204, 21, 0.16);
}

body.light-theme .gallery-item {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

body.light-theme .gallery-item:hover {
    border-color: #ca8a04;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform: scale(1.08) translate3d(0, var(--img-parallax-y, 0px), 0);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
    will-change: transform;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.14) translate3d(0, var(--img-parallax-y, 0px), 0);
}

/* Overlay Animasi Hover */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 9, 18, 0.94) 0%, rgba(5, 9, 18, 0.45) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    visibility: visible;
}

.zoom-badge {
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: rgba(7, 12, 24, 0.85);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 999px;
    color: #facc15;
    font-size: 0.74rem;
    font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    backdrop-filter: blur(8px);
    transform: translateY(-8px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .zoom-badge {
    transform: translateY(0);
}

.overlay-text {
    transform: translateY(12px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover .overlay-text {
    transform: translateY(0);
}

.overlay-text h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
    line-height: 1.3;
}

.overlay-text p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   3.5 CARD MULTI-PHOTO SLIDER / CAROUSEL (DAPAT DI GESER-GESER)
   -------------------------------------------------------------------------- */
.gallery-slider-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

.gallery-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.gallery-slide {
    flex: 0 0 100%;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-slide .gallery-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    pointer-events: none;
}

/* Tombol Panah Geser pada Card */
.gallery-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(8, 14, 28, 0.82);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.gallery-slider-btn:hover {
    background: #facc15;
    color: #080d1a;
    border-color: #facc15;
    transform: translateY(-50%) scale(1.12);
}

.gallery-slider-btn.prev-btn {
    left: 10px;
}

.gallery-slider-btn.next-btn {
    right: 10px;
}

.gallery-item:hover .gallery-slider-btn {
    opacity: 1;
    visibility: visible;
}

@media (hover: none) {
    .gallery-slider-btn {
        opacity: 0.88;
        visibility: visible;
    }
}

/* Badge Indikator dan Titik Pagination Card */
.gallery-slider-meta {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    pointer-events: none;
}

.gallery-slider-badge {
    background: rgba(10, 16, 32, 0.88);
    color: #facc15;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(250, 204, 21, 0.35);
    backdrop-filter: blur(6px);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.gallery-slider-dots {
    display: flex;
    gap: 5px;
    pointer-events: auto;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: all 0.25s ease;
}

.slider-dot.active {
    width: 16px;
    border-radius: 10px;
    background: #facc15;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.7);
}

/* Album Thumbnails Strip di Lightbox Modal */
.modal-album-strip {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(6, 11, 22, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
}

body.light-theme .modal-album-strip {
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
}

.modal-album-thumb {
    width: 58px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.modal-album-thumb.active, .modal-album-thumb:hover {
    border-color: #facc15;
    opacity: 1;
    transform: scale(1.06);
    box-shadow: 0 4px 10px rgba(250, 204, 21, 0.35);
}

/* --------------------------------------------------------------------------
   4. MODAL LIGHTBOX FOTO INTERAKTIF
   -------------------------------------------------------------------------- */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.3s;
}

.gallery-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 7, 15, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gallery-modal-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 960px;
    background: #091122;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 35px rgba(250, 204, 21, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    transform: scale(0.96) translateY(12px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-modal.show .gallery-modal-container {
    transform: scale(1) translateY(0);
}

body.light-theme .gallery-modal-container {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
}

/* Header Modal */
.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(7, 12, 24, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .gallery-modal-header {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.modal-meta-info {
    display: flex;
    flex-direction: column;
}

.modal-counter {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #facc15;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
}

body.light-theme .modal-counter {
    color: #ca8a04;
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: #ffffff;
    margin: 2px 0 0;
}

body.light-theme .modal-title {
    color: #0f172a;
}

.modal-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-modal-ctrl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.btn-modal-ctrl:hover {
    background: #facc15;
    border-color: #fde047;
    color: #0a0e17;
    transform: scale(1.05);
}

body.light-theme .btn-modal-ctrl {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light-theme .btn-modal-ctrl:hover {
    background: #ca8a04;
    color: #ffffff;
    border-color: #ca8a04;
}

.btn-modal-close {
    font-size: 1.15rem;
    font-weight: 700;
}

/* Body Modal (Gambar & Tombol Navigasi) */
.gallery-modal-body {
    position: relative;
    width: 100%;
    min-height: 280px;
    max-height: 68vh;
    background: #04070f;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

body.light-theme .gallery-modal-body {
    background: #0b1120;
}

.modal-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    max-height: 68vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    cursor: zoom-in;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.modal-img.is-zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
}

/* Tombol Panah Kiri / Kanan Navigasi Modal */
.modal-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(7, 12, 24, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.modal-nav-arrow:hover {
    background: #facc15;
    border-color: #fde047;
    color: #0a0e17;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 14px;
}

.modal-next {
    right: 14px;
}

/* Footer Modal */
.gallery-modal-footer {
    padding: 14px 24px;
    background: rgba(7, 12, 24, 0.9);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .gallery-modal-footer {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.modal-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    color: #94a3b8;
    margin: 0;
}

body.light-theme .modal-desc {
    color: #475569;
}

/* --------------------------------------------------------------------------
   5. RESPONSIVE BREAKPOINTS (DESKTOP -> TABLET -> MOBILE)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    .gallery-masonry {
        column-count: 2;
        column-gap: 18px;
    }

    .gallery-item {
        margin-bottom: 18px;
    }

    .gallery-modal-container {
        max-width: 95vw;
    }

    .modal-image-wrapper,
    .modal-img {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .gallery-main-section {
        padding-top: 105px;
        padding-bottom: 60px;
    }

    .gallery-heading-title {
        font-size: 1.85rem;
    }

    .gallery-heading-desc {
        font-size: 0.92rem;
    }

    .gallery-modal {
        padding: 12px;
    }

    .gallery-modal-header {
        padding: 12px 16px;
    }

    .modal-title {
        font-size: 0.95rem;
    }

    .modal-nav-arrow {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }

    .modal-prev { left: 8px; }
    .modal-next { right: 8px; }

    .gallery-modal-footer {
        padding: 10px 16px;
    }

    .modal-desc {
        font-size: 0.8rem;
    }
}

@media (max-width: 540px) {
    .gallery-masonry {
        column-count: 1;
        column-gap: 0;
    }

    .gallery-item {
        margin-bottom: 16px;
        border-radius: 15px;
    }

    .gallery-overlay {
        padding: 14px;
    }

    .overlay-text h4 {
        font-size: 0.95rem;
    }

    .overlay-text p {
        font-size: 0.76rem;
    }

    .gallery-modal-container {
        border-radius: 16px;
    }

    .modal-image-wrapper,
    .modal-img {
        max-height: 52vh;
    }
}

