/* =========================================================
   mp-gallery.css — Photo Gallery page for Shree Pithad Dham
   Namespace: gl-  |  Depends on: custom.css design tokens
   ========================================================= */

/* ── Lead paragraph ───────────────────────────────────────── */
.gl-lead-band {
    background: var(--mp-cream, #FBF4E9);
    padding: 32px 0 8px;
    text-align: center;
}

.gl-lead-band .mp-lead {
    max-width: 680px;
    margin: 0 auto;
}

/* ── Filter tabs ──────────────────────────────────────────── */
.gl-filter-band {
    background: var(--mp-cream, #FBF4E9);
    padding: 20px 0 30px;
}

.gl-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.gl-tab {
    display: inline-block;
    padding: 8px 22px;
    border-radius: 30px;
    font-family: var(--mp-font-display);
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1.5px solid var(--mp-gold, #C99A3F);
    color: var(--mp-maroon, #6E1E1E);
    background: transparent;
    transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
    user-select: none;
}

.gl-tab:hover,
.gl-tab.gl-tab-active {
    background: var(--mp-maroon, #6E1E1E);
    border-color: var(--mp-maroon, #6E1E1E);
    color: #fff;
}

/* ── Main gallery section ─────────────────────────────────── */
.gl-section {
    background: var(--mp-cream, #FBF4E9);
    padding: 0 0 72px;
}

/* ── Masonry / CSS-columns grid ──────────────────────────── */
.gl-grid {
    columns: 2;
    column-gap: 18px;
}

@media (min-width: 768px) {
    .gl-grid {
        columns: 3;
        column-gap: 20px;
    }
}

@media (min-width: 1200px) {
    .gl-grid {
        columns: 4;
        column-gap: 22px;
    }
}

/* ── Individual card ──────────────────────────────────────── */
.gl-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 28px -12px rgba(42, 12, 12, 0.28);
    margin-bottom: 20px;
    break-inside: avoid;
    cursor: pointer;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    display: block;
}

.gl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(42, 12, 12, 0.36);
}

/* Gold corner accents */
.gl-card::before,
.gl-card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border-color: var(--mp-gold, #C99A3F);
    border-style: solid;
    z-index: 3;
    pointer-events: none;
}

.gl-card::before {
    top: 8px;
    left: 8px;
    border-width: 2px 0 0 2px;
    border-radius: 4px 0 0 0;
}

.gl-card::after {
    bottom: 8px;
    right: 8px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 4px 0;
}

/* ── Thumbnail wrapper ────────────────────────────────────── */
.gl-thumb {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
}

.gl-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.40s ease;
}

.gl-card:hover .gl-thumb img {
    transform: scale(1.07);
}

/* ── Hover overlay with maroon gradient ───────────────────── */
.gl-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(110, 30, 30, 0.90) 0%,
        rgba(110, 30, 30, 0.32) 45%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.28s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 18px;
    z-index: 2;
    border-radius: 14px;
}

.gl-card:hover .gl-overlay {
    opacity: 1;
}

/* Zoom icon inside overlay */
.gl-zoom-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.55);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.20s ease;
}

.gl-zoom-btn:hover {
    background: rgba(255, 255, 255, 0.36);
}

/* ── Caption strip ────────────────────────────────────────── */
.gl-caption {
    padding: 9px 12px 10px;
    text-align: center;
    border-top: 1px solid var(--mp-line, rgba(110, 30, 30, 0.12));
    background: #fff;
}

.gl-caption-text {
    font-family: var(--mp-font-display);
    font-size: 12px;
    letter-spacing: 0.07em;
    color: var(--mp-maroon, #6E1E1E);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.gl-caption-diamond {
    color: var(--mp-gold, #C99A3F);
    font-size: 8px;
}

/* ── Hidden card (filter) ─────────────────────────────────── */
.gl-card.gl-hidden {
    display: none;
}

/* ── Lightbox overlay ─────────────────────────────────────── */
.gl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(20, 5, 5, 0.94);
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.gl-lightbox.gl-lb-open {
    display: flex;
}

.gl-lb-inner {
    position: relative;
    max-width: min(94vw, 980px);
    max-height: 90vh;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gl-lb-inner img {
    display: block;
    max-width: 100%;
    max-height: 82vh;
    border-radius: 10px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.72);
    object-fit: contain;
}

.gl-lb-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--mp-saffron, #E8820C);
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.36);
    z-index: 4;
    transition: background 0.20s ease;
}

.gl-lb-close:hover {
    background: var(--mp-saffron-deep, #C76A05);
}

.gl-lb-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--mp-font-display);
    font-size: 14px;
    margin-top: 14px;
    letter-spacing: 0.09em;
}

/* Navigation arrows in lightbox */
.gl-lb-prev,
.gl-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.30);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.20s ease;
    z-index: 4;
}

.gl-lb-prev { left: 16px; }
.gl-lb-next { right: 16px; }

.gl-lb-prev:hover,
.gl-lb-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 575px) {
    .gl-lb-prev { left: 6px; }
    .gl-lb-next { right: 6px; }
    .gl-lb-close {
        top: -10px;
        right: -10px;
    }
}

/* ── Empty state when all filtered out ───────────────────── */
.gl-empty-msg {
    display: none;
    text-align: center;
    padding: 60px 0;
    font-family: var(--mp-font-display);
    color: var(--mp-maroon, #6E1E1E);
    opacity: 0.55;
    font-size: 1.1rem;
    letter-spacing: 0.06em;
}

/* ── Responsive page banner tweak ────────────────────────── */
@media (max-width: 575px) {
    .gl-filter-tabs {
        gap: 8px;
    }
    .gl-tab {
        font-size: 11px;
        padding: 7px 16px;
    }
}
