/*
 * FINALIZED SWIPER GALLERY STYLES
 */

.gallery-container {
    height: 100vh; 
    width: 100vw;
    display: flex;
    flex-direction: column; 
    background: #000;
    padding-top: 50px; 
    padding-bottom: 30px;
    box-sizing: border-box; 
}

/* * Main Swiper (Large Image)
 */
.swiper.mySwiper2 {
    width: 100%;
    height: 100%;
    flex-grow: 1; 
    min-height: 0; 
}

.mySwiper2 .swiper-slide {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mySwiper2 .swiper-slide figure {
    position: relative;
    margin: 0;
    width: 100%;
    height: 100%;
}

.mySwiper2 .figure-single-image {
    /* These lines will center the <img> within the 100%-height figure */
    display: flex;
    align-items: center;
    justify-content: center;
}

.mySwiper2 .figure-single-image img {
    /* display: block; */
    /* FIX: Constrain the image to 80% of the slide's width and height */
    max-width: 80%;
    max-height: 80%;
    
    /* Ensure the image scales down from its original size */
    width: auto;
    height: auto;
    
    /* Ensure the entire image is visible, fitting within the 80% box */
    object-fit: contain; 
    border-radius: 10px;
}

.mySwiper2 .figure-nested-gallery .swiper {
    width: 100%;
    height: 100%;
    border-radius: 15px; /* This rounds the cube container */
    overflow: hidden;   
}

.mySwiper2 .figure-nested-gallery .swiper .swiper-slide img {
    /* display: block; */
    /* Constrain the image to 80% of the nested slide's width and height */
    max-width: 80%;
    max-height: 80%;
    
    width: auto;
    height: auto;
    
    object-fit: contain; 
    border-radius: 15px;
}

.mySwiper2 .swiper-button-next,
.mySwiper2 .swiper-button-prev {
    color: #fff; 
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
.mySwiper2 .swiper-button-next:hover,
.mySwiper2 .swiper-button-prev:hover {
    opacity: 1;
}

/* * Caption styles
 */
.mySwiper2 .swiper-slide figcaption {
    position: absolute; 
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10; 
    color: #fff;
    font-size: 18px; 
    font-family: "Comfortaa", sans-serif;
    
    /* FIX: Set background to transparent and remove blur effects */
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;

    display: flex;
    justify-content: left;
    gap: 0.5rem;
    padding: 8px 20px;
    box-sizing: border-box;
    width: 100%;
    
    transform: translate3d(0, 100%, 0);
    opacity: 0;
    transition: all .3s ease-in-out;
}

.mySwiper2 .swiper-slide-active figcaption {
    transform: translate3d(0, 0, 0);
    opacity: 1;
}

/* Caption text animation */
.mySwiper2 .swiper-slide figcaption .swiper-text-large {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease-out;
}
.mySwiper2 .swiper-slide-active figcaption .swiper-text-large {
    opacity: 1;
    transform: translateY(0);
}
.mySwiper2 .swiper-slide-active figcaption .swiper-text-large:nth-child(1) {
    transition-delay: 0.2s;
}
.mySwiper2 .swiper-slide-active figcaption .swiper-text-large:nth-child(2) {
    transition-delay: 0.3s;
}
.mySwiper2 .swiper-slide-active figcaption .swiper-text-large:nth-child(3) {
    transition-delay: 0.4s;
}

/* * Nested Swiper Pagination
 */
.swiper-slide .swiper .swiper-pagination {
    bottom: 10px !important; 
    top: auto !important;
}
.swiper-slide .swiper .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #fff;
    opacity: 0.7;
}
.swiper-slide .swiper .swiper-pagination-bullet-active {
    opacity: 1;
}


/* * Thumbnail Swiper
 */
.swiper.mySwiper {
    height: 100px; 
    box-sizing: border-box;
    background: #111;
    flex-shrink: 0; 
    position: relative; 
    padding: 10px 10px;
    overflow: hidden; 
    
}

.swiper.mySwiper .swiper-wrapper {
    /* Adding this property can sometimes force Swiper to recalculate the width based on content, not error */
    width: auto !important; 
}


/* * Thumbnail Slide Style - FIX THE WIDTH HERE! */
.mySwiper .swiper-slide {
    /* Set a fixed, small width to ensure the slide is a normal size */
    /* width: 80px !important;  */
    width: 80px;
    height: 80px;
    opacity: 0.4; 
    transition: opacity 0.3s ease;
    cursor: pointer;
    
    /* Ensure the inline margin is also handled here */
    margin-right: 10px; 
    
    display: block; 
    box-sizing: border-box;
    flex-shrink: 0; /* Important for flex-based layouts */
}

.mySwiper .swiper-slide-thumb-active {
    opacity: 1; 
}

.mySwiper .swiper-slide img {
    display: block; 
    width: 100%;
    height: 100%;
    object-fit: cover; 
    border-radius: 5px;
}

/* .mySwiper2 .figure-nested-gallery .swiper .swiper-slide {
    background: transparent !important; 
} */
/* --- THUMBNAIL NAV BUTTONS --- */

/* .mySwiper .swiper-button-next,
.mySwiper .swiper-button-prev {
    color: #fff;
    opacity: 1; 
    transition: opacity 0.3s ease;
    top: 50%; 
    z-index: 20 !important; 
    transform: translateY(-50%); 
    
    background-color: rgba(0, 0, 0, 0.5); 
    padding: 10px 5px;
    border-radius: 5px;
    height: 100%;
    width: 30px;
    box-sizing: border-box;
    cursor: pointer; 
}

.mySwiper .swiper-button-next:hover,
.mySwiper .swiper-button-prev:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.8);
}

.mySwiper .swiper-button-prev {
    left: 0 !important; 
}

.mySwiper .swiper-button-next {
    right: 0 !important; 
    left: auto !important; 
}

.mySwiper .swiper-button-next::after,
.mySwiper .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    margin: 0; 
} */