/* =========================================
   APSA India - Gallery Page (gallery.css)
   ========================================= */

/* ---- Gallery Grid ---- */
.gallery-section {
    padding: 70px 0;
    background-color: var(--white);
}

.gallery-grid {
    columns: 3;
    column-gap: 12px;
    margin-top: 40px;
}

.gallery-item {
    break-inside: avoid;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(155,1,1,0.0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.gallery-item:hover .gallery-item__overlay {
    background: rgba(155,1,1,0.35);
}

.gallery-item__overlay i {
    color: var(--white);
    font-size: 32px;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item:hover .gallery-item__overlay i {
    opacity: 1;
}

/* ---- Lightbox ---- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

.lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: var(--white);
    font-size: 36px;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox__close:hover {
    color: var(--primary-red);
}

.lightbox__prev,
.lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(155,1,1,0.7);
    color: var(--white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

.lightbox__prev:hover,
.lightbox__next:hover {
    background: var(--primary-red);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .gallery-grid { columns: 2; }
}

@media (max-width: 500px) {
    .gallery-grid { columns: 2; }
}
