/* ================================================================================================ */

.collection-gallery {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    padding: 0;
    width: 100%;
    overflow: hidden;
    margin-bottom: 4rem;
    padding-bottom: 20px;
}

.collection-gallery .gallery-collection {
    position: relative;
    overflow: hidden;
    flex: 0 1 calc(100%);
    max-width: 100%;
    display: flex;
    aspect-ratio: 3 / 4; /* Default aspect ratio for gallery items / IMAGES */
    box-shadow: inset 0 0 0 0.2rem transparent;
    transition: box-shadow 0.3s ease-in-out;
}

/* ====================================================== */
.collection-gallery .gallery-collection::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 0.2rem solid transparent;
    transition: border-color 0.3s ease-in-out;
    z-index: 99;
    pointer-events: none;
}

.collection-gallery .gallery-collection.media-loaded:hover::after {
    border-color: rgb(0, 0, 0);
}

.dark-mode .collection-gallery .gallery-collection.media-loaded:hover::after {
    border-color: rgb(255, 255, 255);
}
/* ====================================================== */

.collection-gallery .video-gallery {
    aspect-ratio: 9 / 16; /* Default aspect ratio for media items / VIDEOS */
}

/* .collection-gallery .gallery-collection img {
    background-color: #f1f1f1;
} */

.collection-gallery .gallery-collection img,
.collection-gallery .gallery-collection video.centered-cinema {
    filter: grayscale(100%);
    width: 100%;
    height: auto;
    display: block;
    transition: all 0.3s ease-in-out;
    object-fit: cover;
    z-index: 98;
}

.collection-gallery .gallery-collection.position-top-left img {
    object-position: left top;
}

.collection-gallery .gallery-collection.position-top img {
    object-position: center top;
}

.collection-gallery .gallery-collection.position-top-right img {
    object-position: right top;
}

.collection-gallery .gallery-collection.position-center-left img {
    object-position: left center;
}

.collection-gallery .gallery-collection.position-center img {
    object-position: center;
}

.collection-gallery .gallery-collection.position-center-right img {
    object-position: right center;
}

.collection-gallery .gallery-collection.position-bottom-left img {
    object-position: left bottom;
}

.collection-gallery .gallery-collection.position-bottom img {
    object-position: center bottom;
}

.collection-gallery .gallery-collection.position-bottom-right img {
    object-position: right bottom;
}

.collection-gallery .gallery-collection:hover img,
.collection-gallery .gallery-collection:hover .centered-cinema {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.sound-toggle-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--c0);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease-in-out;
    z-index: 99;
}

.sound-toggle-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
}

.collection-gallery .gallery-collection .collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));

    color: var(--c11);
    width: 100%;
    height: 50%;
    text-align: left;
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    display: flex;
    flex-direction: column;
    /* Stack the title and subtitle vertically */
    justify-content: flex-end;
    /* Align them to the bottom */
    padding: .5rem;

    z-index: 99;
}

.collection-gallery .gallery-collection .collection-overlay .collection-overlay-title {
    font-family: "Anton", sans-serif;
    font-size: var(--text-big-p);
    font-weight: 400;
    font-style: normal;
    line-height: 1.1;
}

.collection-gallery .gallery-collection .collection-overlay .collection-overlay-subtitle {
    font-size: .9rem;
    font-family: var(--body-font);
    line-height: 1.5;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: var(--letter-tight);
    color: var(--c12);
}

.collection-gallery .gallery-collection.media-loaded:hover .collection-overlay {
    opacity: 1;
}

.lazy-load {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.lazy-load-loaded {
    opacity: 1;
}