/* ==========================================================================
   Central ICT Club Bangladesh
   Gallery page
   A responsive photo wall. Tiles ship as gradient placeholders, drop a real
   <img> inside any tile and it will cover the frame automatically.
   ========================================================================== */

.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 180px;
    gap: 14px;
}

.gallery__item {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--navy-700), var(--blue-600));
    box-shadow: var(--sh-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.gallery__item:hover {
    transform: translateY(-3px);
    box-shadow: var(--sh-md);
}

/* tiles that span more space, for a livelier wall */
.gallery__item--wide {
    grid-column: span 2;
}

.gallery__item--tall {
    grid-row: span 2;
}

/* tint the placeholders so the grid does not look flat */
.gallery__item:nth-child(3n + 2) {
    background: linear-gradient(135deg, var(--navy-800), var(--green-600));
}

.gallery__item:nth-child(3n + 3) {
    background: linear-gradient(135deg, var(--blue-600), var(--green-500));
}

.gallery__ph {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.5);
}

.gallery__ph svg {
    width: 42px;
    height: 42px;
}

/* a real photo, once added, sits behind the caption and fills the tile */
.gallery__item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s var(--ease);
}

.gallery__item:hover img {
    transform: scale(1.05);
}

.gallery__label {
    position: relative;
    display: grid;
    gap: 3px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(to top, rgba(8, 26, 51, 0.85), transparent);
    color: var(--white);
}

.gallery__cat {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.8);
}

.gallery__cap {
    font-weight: 600;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 760px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 150px;
    }
}

@media (max-width: 460px) {
    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery__item--wide,
    .gallery__item--tall {
        grid-column: auto;
        grid-row: auto;
    }
}
