.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 50px 20px;
}

.gallery-category {
    grid-column: 1/-1;
    font-size: 2rem;
    color: #0056b3;
    margin: 50px 0 25px;
    text-align: left;
    border-bottom: 3px solid #0717ff;
    padding-bottom: 8px;
}

.g {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f8f8;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.g img,
.g video {
    width: 100%;
    display: block;
    border-radius: 12px;
    transition: transform 0.4s, filter 0.4s;
}

.g p {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.4s;
}

.g:hover img,
.g:hover video {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.g:hover p {
    opacity: 1;
}


/* Lightbox Overlay */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
}

.lightbox img,
.lightbox video {
    max-width: 90%;
    max-height: 90%;
    border-radius: 12px;
}