/* Basic 4-column grid for gallery items */
.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;              /* space between cells */
    max-width: 1500px;      /* or any preferred width */
    margin: 2rem auto;      /* center on the page, with top/bottom spacing */
    padding: 0 1rem;        /* optional horizontal padding */
}

/* Each gallery item container */
.gallery-item {
    background-color: #fff;
    border: 1px solid #ddd;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

/* Caption beneath the thumbnail */
.gallery-caption {
    margin-top: 0.5rem;
    font-style: italic;        /* or any style you prefer */
    color: #333;              /* adjust to match your brand colors */
}

/* Lightbox (similar to composites) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;    /* So we can put image above caption in a column */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* The enlarged image inside the lightbox */
.lightbox img {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
    margin-bottom: 1rem;
}

/* The lightbox caption below the large image */
.caption {
    color: #fff;
    font-size: 1rem;
    text-align: center;
    max-width: 80%;
    margin-bottom: 1rem;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 2%;
    right: 2%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: #f3f3f3;
}
