/* ==========================================================================
   Galeri & Fasilitas Stylesheet (Scoped for JTI POLIJE)
   ========================================================================== */

/* Intro Row */
.intro-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 8px 0 22px;
}

.intro-row h2 {
    margin: 0;
    color: var(--navy, #0b1220);
    font-size: 1.35rem;
    letter-spacing: -.02em;
}

.intro-row p {
    margin: 6px 0 0;
    color: var(--muted, #64748b);
    font-size: .88rem;
    line-height: 1.5;
}

.gallery-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 12px;
    background: #fff;
    color: #475569;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .03);
}

.gallery-count i {
    color: var(--blue, #2563eb);
}

/* Facility Description Box */
.facility-description-card {
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .03);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.facility-description-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--blue, #2563eb);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.facility-description-content h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--navy, #0b1220);
    letter-spacing: -.02em;
}

.facility-description-content p,
.facility-description-content div {
    margin: 0;
    color: var(--muted, #64748b);
    font-size: .88rem;
    line-height: 1.65;
}

/* Filter Bar */
.filterbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 14px 0 24px;
    border-top: 1px solid var(--line, #e2e8f0);
}

.filter-label {
    margin-right: 6px;
    color: var(--muted, #64748b);
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: .06em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-btn {
    padding: 8px 15px;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 10px;
    background: #fff;
    color: #475569;
    font-family: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.filter-btn:hover {
    border-color: #93c5fd;
    color: var(--blue, #2563eb);
    background: #f8fafc;
}

.filter-btn.active {
    background: var(--blue, #2563eb);
    border-color: var(--blue, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .25);
}

/* Location Section */
.location-section {
    margin-bottom: 44px;
}

.location-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line, #e2e8f0);
}

.location-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.location-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eff6ff;
    color: var(--blue, #2563eb);
    font-size: 1rem;
    flex-shrink: 0;
}

.location-title h3 {
    margin: 0;
    color: var(--navy, #0b1220);
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.location-title p {
    margin: 3px 0 0;
    color: var(--muted, #64748b);
    font-size: .8rem;
}

.location-total {
    color: #94a3b8;
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Album Group Subheading */
.album-group {
    margin-bottom: 24px;
}

.album-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy, #0b1220);
    margin: 0 0 12px;
    padding-left: 2px;
}

.album-title i {
    color: var(--blue, #2563eb);
    font-size: .85rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

/* Gallery Card */
.gallery-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .04);
    transition: transform .25s ease, box-shadow .25s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, .1);
}

.gallery-image-wrap {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    aspect-ratio: 4 / 3;
}

.gallery-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .45s ease;
    display: block;
}

.gallery-card:hover .gallery-image {
    transform: scale(1.05);
}

.image-zoom {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(11, 18, 32, .75);
    color: #fff;
    font-size: .82rem;
    backdrop-filter: blur(4px);
    transition: background-color .2s;
}

.gallery-card:hover .image-zoom {
    background: var(--blue, #2563eb);
}

/* Overriding conflict with style.css .gallery-caption */
.gallery-card .gallery-caption {
    position: static !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    backdrop-filter: none !important;
    padding: 14px 16px 16px !important;
    color: var(--ink, #172033) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex: 1;
}

.gallery-card .gallery-caption strong {
    display: block;
    color: var(--navy, #0b1220);
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.4;
}

.gallery-card .gallery-caption p {
    margin: 4px 0 0;
    color: var(--muted, #64748b);
    font-size: .78rem;
    line-height: 1.5;
    flex: 1;
}

.gallery-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line, #e2e8f0);
    color: #94a3b8;
    font-size: .72rem;
}

.gallery-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gallery-meta i {
    color: var(--blue, #2563eb);
}

/* Empty State */
.empty-state {
    display: none;
    padding: 48px 24px;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    background: #fff;
    color: var(--muted, #64748b);
    font-size: .92rem;
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 12px;
    color: #94a3b8;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(2, 6, 23, .92);
    backdrop-filter: blur(8px);
}

.lightbox.open {
    display: flex;
}

.lightbox-inner {
    position: relative;
    width: min(100%, 1020px);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    background: #0b1220;
}

.lightbox-caption {
    margin-top: 14px;
    color: #e2e8f0;
    text-align: center;
    font-size: .88rem;
    line-height: 1.5;
    max-width: 780px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(11, 18, 32, .85);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background-color .2s, transform .2s;
    font-size: 1rem;
    z-index: 10;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: var(--blue, #2563eb);
    transform: scale(1.06);
}

.lightbox-close {
    top: -54px;
    right: 0;
}

.lightbox-prev {
    left: -58px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.06);
}

.lightbox-next {
    right: -58px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.06);
}

/* Responsive */
@media (max-width: 1100px) {
    .lightbox-prev {
        left: 12px;
    }
    .lightbox-next {
        right: 12px;
    }
}

@media (max-width: 950px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .intro-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .facility-description-card {
        flex-direction: column;
        padding: 20px;
    }
    .lightbox {
        padding: 16px;
    }
    .lightbox-close {
        top: -46px;
        right: 0;
        width: 38px;
        height: 38px;
    }
    .lightbox-prev,
    .lightbox-next {
        width: 38px;
        height: 38px;
    }
    .lightbox-image {
        max-height: 68vh;
    }
}
