/* Gallery Swiper Styles - Common for all pages */

.gallery-outer-wrapper {
    background-color: #1a1a1a; /* Dark background for the main gallery wrapper */
    height: 700px; /* Increased height for the gallery wrapper */
}

/* Force all slides to have the same fixed height */
.swiper-slide {
    height: 700px !important;
    max-height: 700px !important;
}

/* Force the swiper wrapper to have a fixed height */
.swiper-wrapper {
    height: 700px !important;
    max-height: 700px !important;
}

/* Aspect ratio container for gallery images */
.aspect-ratio-container {
    position: relative;
    width: 100%;
    height: 700px !important; /* Fixed height instead of padding-bottom */
    padding-bottom: 0 !important; /* Remove padding-bottom */
    background-color: #1a1a1a; /* Dark background for the container */
    overflow: hidden; /* Ensure child img doesn't unexpectedly overflow */
}

/* Ensure images are properly contained within the fixed height container */
.aspect-ratio-container > img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* This ensures the image is not cropped */
    max-height: 700px;
    /* background-color removed from img, handled by parent */
}

/* Update caption styling */
.aspect-ratio-container .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 1rem;
    color: white;
    font-size: 0.875rem;
    z-index: 10;
    text-align: center;
}

@media (min-width: 640px) {
    .aspect-ratio-container .caption {
        font-size: 1rem;
        padding: 1.25rem;
    }
}

.swiper-container {
    width: 100%;
    /* height: 100%; */ /* Removed to allow autoHeight to work */
    overflow: hidden;
    position: relative;
    background-color: #1a1a1a; /* Add dark background */
}

/* Fix for mobile view */
.swiper-slide {
    width: 100% !important;
    height: auto !important;
    opacity: 1 !important;
    transform: none !important;
    transition: opacity 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a; /* Add dark background to the slide itself */
}

/* Only apply fade effect when JS is working properly */
.swiper-initialized .swiper-slide {
    opacity: 0;
}

.swiper-wrapper {
    /* Defaults are usually fine, but let's ensure background if needed */
    background-color: #1a1a1a; /* Add dark background */
}

.swiper-slide-active {
    opacity: 1 !important;
}

/* Caption styling - fallback */
.caption {
    z-index: 10;
    bottom: 0 !important;
    padding: 10px 0 !important;
    width: 100%;
    text-align: center;
    position: absolute;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
}

/* Navigation buttons */
.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 14px;
    }
}
