.gallery-container {
    display: flex;
    flex-wrap: wrap;
    background-color: transparent;
    width: 100%;
    padding: 10px;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
    margin: 0px auto;
    justify-content: space-around;
    align-items: center;
    max-height: 740px;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.gallery-item {
    flex-basis: 32.7%;
    margin-bottom: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.gallery-item:hover {
    opacity: 0.85;
}

.gallery-item img {
    width: 100%;
    object-fit: cover;
}


/* LIGHTBOX */

.lightbox {
    position: fixed;
    display: none;
    background-color: rgba(0, 0, 0, 0.9);
    width: 100%;
    height: 100%;
    overflow: auto;
    top: 0;
    left: 0;
    z-index: 300;
    align-content: center;
}

.lightbox-content {
    position: relative;
    width: 80%;
    max-width: 1200px;
    height: auto;
    margin: 40px auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content img.zoomed {
    transform: scale(1.5);
    cursor: zoom-out;
}

.lightbox-content img {
    width: 100%;
    border: 6px solid var(--gallery-lightbox-border);
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    background-color: var(--gallery-lightbox-arrow-bg);
    color: var(--gallery-lightbox-arrow-color);
    padding: 9px;
    top: 45%;
    cursor: pointer;
}

.lightbox-prev {
    left: 0;
}

.lightbox-next {
    right: 0;
}

@media(max-width: 767px) {
    .gallery-container {
        width: 100%;
    }

    .gallery-item {
        flex-basis: 49.80%;
        margin-bottom: 3px;
    }

    .lightbox-content {
        width: 80%;
        margin: 15% auto;
    }
}

@media (max-width:480px) {
    .gallery-item {
        flex-basis: 100%;
        margin-bottom: 1px;
    }

    .lightbox-content {
        width: 90%;
        margin: 20px auto;
    }
}


.lightbox-content img.zoomed ~ .lightbox-prev,
.lightbox-content img.zoomed ~ .lightbox-next {
    display: none;
}


.gallery-item video {
    width: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* For the lightbox view */
.lightbox video {
    max-width: 100%;
    max-height: 90vh;
    margin: auto;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.play-button i {
    color: var(--black);
    font-size: 24px;
    margin-left: 4px; /* Slight offset to visually center the play icon */
    transition: all 0.3s ease;
}

.video-thumbnail:hover .play-button {
    background-color: #ff0000;
}

.video-thumbnail:hover .play-button i {
    color: var(--white);
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.see-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0 20px 0;
    background-color: var(--gallery-see-more-container-bg);
    position: relative;
}

.see-more-container::after {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(
        to top,
        var(--gallery-see-more-container-bg) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

.see-more-btn {
    background-color: #1a73e8;
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.see-more-btn:hover {
    background-color: #1557b0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.see-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

