/* ============================================================
   gallery.css — Darul Musthofa
   Halaman Galeri: Page hero + grid foto + load more + empty state +
   GLightbox tweaks. Mandiri (tidak require program.css/beranda.css).
   ============================================================ */

/* ============================================================
   1. PAGE HERO (duplikat ringkas dari program.css)
   ============================================================ */
.page-hero {
    position: relative;
    color: #fff;
    padding-block: clamp(3rem, 6vw, 5rem);
    background:
        radial-gradient(circle at 80% 30%, rgba(201,161,74,0.2), transparent 55%),
        linear-gradient(135deg, #0A5239 0%, #0F6E4E 100%);
    overflow: hidden;
}

.page-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 1rem;
}
.breadcrumb a { color: rgba(255,255,255,0.9); }
.breadcrumb a:hover { color: var(--warna-aksen-light); }
.breadcrumb [aria-current="page"] {
    color: var(--warna-aksen-light);
    font-weight: 600;
}

.page-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
    margin-bottom: 0.75rem;
}

.page-hero-tagline {
    color: rgba(255,255,255,0.88);
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    max-width: 600px;
    margin: 0 auto 1.25rem;
    line-height: 1.6;
}

.gallery-meta {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 999px;
    color: var(--warna-aksen-light);
    font-size: 0.9rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.gallery-meta strong { color: #fff; }

/* ============================================================
   2. GALLERY GRID
   ============================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4 / 3;
    box-shadow: var(--shadow-sm);
    background: var(--bg-soft);
    transition: transform var(--transisi), box-shadow var(--transisi);
    text-decoration: none;
}

.gallery-item:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow);
}

.gallery-item.is-hidden {
    display: none;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.78));
    color: #fff;
    font-size: 0.88rem;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity var(--transisi), transform var(--transisi);
    pointer-events: none;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Selalu tampilkan caption di device touch (tidak ada hover) */
@media (hover: none) {
    .gallery-caption {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   3. LOAD MORE
   ============================================================ */
.gallery-load-more {
    text-align: center;
    margin-top: 2.5rem;
}

.gallery-load-more .btn {
    min-width: 240px;
}

.gallery-counter {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.gallery-counter strong { color: var(--text); }

/* ============================================================
   4. EMPTY STATE
   ============================================================ */
.gallery-empty-state {
    max-width: 480px;
    margin: 2rem auto;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-soft);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.gallery-empty-state .empty-ic {
    font-size: 4rem;
    line-height: 1;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.gallery-empty-state h2 {
    color: var(--warna-utama);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.gallery-empty-state p {
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   5. SECTION CTA (duplikat ringkas dari beranda.css)
   ============================================================ */
.section-cta {
    padding-block: clamp(3rem, 6vw, 5rem);
    background: linear-gradient(135deg, var(--warna-utama-dark), var(--warna-utama));
    color: #fff;
    text-align: center;
}
.section-cta h2 {
    color: #fff;
    margin-bottom: 0.75rem;
}
.section-cta p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    font-size: 1.05rem;
}

.page-gallery .site-footer {
    margin-top: 0; /* CTA jadi penutup */
}

/* ============================================================
   6. GLIGHTBOX CUSTOM THEMING (emerald + emas)
   ============================================================ */
.glightbox-clean .gslide-description {
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
}

.glightbox-clean .gslide-title {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
}

.glightbox-clean .gslide-desc {
    color: rgba(255,255,255,0.85);
}

.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
    background-color: rgba(15,110,78,0.85) !important;
}

.glightbox-clean .gprev:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gclose:hover {
    background-color: var(--warna-utama-dark) !important;
}

.glightbox-clean .gprev svg,
.glightbox-clean .gnext svg,
.glightbox-clean .gclose svg {
    fill: #fff !important;
}

/* ============================================================
   7. RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding-block: 2.5rem;
    }
    .gallery-empty-state {
        padding: 2.5rem 1.5rem;
    }
}

@media (max-width: 500px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .gallery-item {
        aspect-ratio: 16 / 10;
    }
}