/* ============================================================
   Gallery Page — gallery.css
   ============================================================ */

/* ── Section header ── */
.gallery-page-section {
    background: #f9f9fb;
    min-height: 60vh;
}

.gallery-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e63946;
    margin-bottom: 1rem;
}

.gallery-section-badge::before,
.gallery-section-badge::after {
    content: '';
    display: block;
    width: 36px;
    height: 2px;
    background: #e63946;
    border-radius: 2px;
}

/* ── Filter pills ── */
.gallery-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 2.5rem;
}

.gallery-filter-btn {
    padding: 7px 22px;
    border-radius: 50px;
    border: 2px solid #e63946;
    background: transparent;
    color: #e63946;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-filter-btn:hover,
.gallery-filter-btn.active {
    background: #e63946;
    color: #fff;
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.35);
}

/* ── Masonry grid ── */
.gallery-masonry {
    columns: 3 320px;
    column-gap: 1.2rem;
}

.gallery-masonry-item {
    break-inside: avoid;
    margin-bottom: 1.2rem;
    display: block;
}

/* ── Individual card ── */
.gallery-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1),
                box-shadow 0.35s ease;
}

.gallery-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.gallery-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.45s ease;
}

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

/* ── Hover overlay ── */
.gallery-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(230,57,70,0.75) 0%, rgba(20,20,30,0.72) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-zoom-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    color: #e63946;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    transition: transform 0.2s ease, background 0.2s ease;
    transform: scale(0.8);
}

.gallery-card:hover .gallery-zoom-btn {
    transform: scale(1);
}

.gallery-zoom-btn:hover {
    background: #e63946;
    color: #fff;
}

.gallery-alt-text {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 80%;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease 0.05s, transform 0.3s ease 0.05s;
}

.gallery-card:hover .gallery-alt-text {
    opacity: 1;
    transform: translateY(0);
}

/* ── Empty state ── */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: #aaa;
}

.gallery-empty i {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #ddd;
}

/* ── Lightbox overlay ── */
.glb-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 15, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.glb-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.glb-inner {
    position: relative;
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.glb-img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    object-fit: contain;
    transform: scale(0.94);
    transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
}

.glb-overlay.active .glb-img {
    transform: scale(1);
}

.glb-caption {
    color: rgba(255,255,255,0.75);
    font-size: 0.88rem;
    letter-spacing: 0.04em;
}

.glb-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.7rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.glb-close:hover {
    color: #e63946;
    transform: rotate(90deg);
}

.glb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    backdrop-filter: blur(6px);
}

.glb-nav:hover { background: #e63946; }

.glb-prev { left: 18px; }
.glb-next { right: 18px; }

/* ── Counter badge ── */
.glb-counter {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .gallery-masonry {
        columns: 2 240px;
        column-gap: 0.85rem;
    }
    .gallery-masonry-item { margin-bottom: 0.85rem; }
    .glb-nav { display: none; }
}

@media (max-width: 480px) {
    .gallery-masonry {
        columns: 1;
    }
}
