/* Simple Gallery Slider - Responsive Height key working code four */
.simple-gallery-slider {
    position: relative;
    width: 100%;
    /* CHANGED: height: auto allows the slider to shrink/grow to fit the ACTIVE image exactly */
    height: auto;
    max-width: 100%;
    margin: 40px 0;
    /* allow nav dots / controls to sit outside the slider (in the new footer) */
    overflow: visible;
    background: #fff;
}
.simple-gallery-slides-wrapper {
    /* CHANGED: Relative positioning allows it to wrap the relative active slide */
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}
.simple-gallery-slides {
    position: relative;
    width: 100%;
    height: auto;
}
.simple-gallery-slide {
    /* CHANGED: Default is absolute. Inactive slides float at top:0 without taking up flow space */
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: auto;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.simple-gallery-slide.active {
    /* CHANGED: The active slide becomes relative. This forces the parent container 
       to expand to the exact height of this image. */
    position: relative;
    opacity: 1;
    z-index: 1;
}
.slide-image-container {
    width: 100%;
    height: auto;
}
.slide-image {
    width: 100%;
    /* CHANGED: height: auto ensures the image dictates the slide height based on aspect ratio */
    height: auto;
    display: block;
    background: transparent;
    cursor: zoom-in;
}

/* --- NEW: Container for Dots and Caption below the slider --- */
.simple-gallery-footer {
    /* Centers the contents (dots and caption) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Ensures it sits immediately beneath the slider area with NO gap */
    margin-top: 0px; 
}

/* Caption (Now outside the slider and combined with the dots in .simple-gallery-footer) */
.simple-gallery-main-caption {
    font-size: 16px;
    line-height: 1.5;
    color: inherit;
    text-align: center;
    /* All positional padding/margins removed as requested */
    padding: 20px;
    /* Ensure auto margins to help with centering */
    margin: 0 auto;
    /* Ensure the caption block spans enough width for text-align to work, while respecting max-width */
    width: 100%;
    max-width: 80%; /* Keep content readable */
}

/* Slider Arrows (with black background - perfect as-is) */
.slider-arrow {
    position: absolute;
    /* top will be set by JS to center on image height */
    /* transform: translateY(-50%); removed */
    /* sized to fit a 40px chevron */
    width: 56px;
    height: 56px;
    background: #000;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-arrow:hover {
    background: rgba(0,0,0,0.8);
}
/* position prev/next outside the slider */
.prev-arrow { left: -70px; }
.next-arrow { right: -70px; }
.arrow-icon {
    font-family: "Public Sans", sans-serif;
    font-size: 40px;
    color: #000000;
    line-height: 1;
}
/* Remove background from the prev/next buttons so they sit on the slider background */
.prev-arrow,
.next-arrow {
    background: none;
}
.prev-arrow:hover,
.next-arrow:hover {
    background: none;
}

/* Dots (Now inside the .simple-gallery-footer container) */
.slider-dots {
    /* Removed absolute positioning and related properties */
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
    /* Add a small separation above the caption */
    margin-bottom: 8px;
    margin-top: 0; 
}
.slider-dot {
    width: 12px;
    height: 12px;
    /* inactive dots at 30% opacity */
    background: rgba(0,0,0,0.3);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}
.slider-dot.active {
    background: #000;
}

/* Lightbox */
.simple-lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: white;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: zoom-out;
}
.simple-lightbox.active {
    display: flex;
}
.simple-lightbox-img {
    max-width: 90%;
    max-height: 70vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}
.simple-lightbox-img.zoomed {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    cursor: zoom-out;
}
.simple-lightbox-caption {
    padding: 0px 0px;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    color: inherit;
    max-width: 90%;
}
.simple-lightbox-close {
    position: absolute;
    top: 20px; right: 30px;
    font-size: 60px;
    font-weight: bold;
    color: #333;
    background: none;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Lightbox Arrows - ONLY icon, no background */
.simple-lightbox-arrow {
    position: absolute;
    /* top set by JS to center on image */
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
}
.simple-lightbox-prev { left: 40px; }
.simple-lightbox-next { right: 40px; }
.simple-lightbox-arrow .arrow-icon {
    font-family: "Public Sans", sans-serif;
    font-size: 40px;
    color: #333;

}
/* Responsive */
@media (max-width: 968px) {
    .simple-gallery-slider {
        /* No fixed height needed here anymore as it is auto */
        height: auto;
        min-height: 0;
    }
    /* Keep arrows outside on mobile, but closer and smaller */
    .prev-arrow { left: -40px; }
    .next-arrow { right: -40px; }
    .slider-arrow {
        width: 40px;
        height: 40px;
    }
	.prev-arrow { left: -32px; }
    .next-arrow { right: -32px; }
    .arrow-icon {
        font-size: 36px;
    }
    
    .simple-lightbox-close {
        top: 10px; right: 15px; font-size: 50px;
    }
	.simple-lightbox-prev { left: -5px; }
    .simple-lightbox-next { right: -5px; }
    .simple-lightbox-arrow .arrow-icon {
        font-size: 40px;
    }
}