/* Gallery Slider Styles */
.gallery-slider {
    position: relative;
    width: 100%;
    /* max-width: 800px; /* Adjust max-width as needed */
    height: 700px; /* Fixed height for consistency, adjust as needed */
    overflow: hidden;
    border-radius: 8px; /* Matches existing image styling */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Matches existing image styling */
    margin: 80px auto 0 auto; /* Adjust for header and center */
    display: flex; /* Use flex to center images if they don't fill */
    align-items: center; /* Vertically center images */
    justify-content: center; /* Horizontally center images */
}

.gallery-slider .gallery-images {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out; /* Smooth slide transition */
}

.gallery-slider .gallery-images img {
    flex-shrink: 0; /* Prevent images from shrinking */
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits within bounds without cropping */
    background-color: #f0f0f0; /* Placeholder background for images */
}

.gallery-slider .gallery-images video {
    flex-shrink: 0; /* Prevent images from shrinking */
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure image fits within bounds without cropping */
    background-color: #f0f0f0; /* Placeholder background for images */
}

.gallery-slider .slider-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1.5em;
    border-radius: 5px;
    z-index: 10; /* Ensure buttons are clickable */
    transition: background-color 0.3s ease;
}

.gallery-slider .slider-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.gallery-slider .prev-button {
    padding-bottom: .6em;
    left: 10px;
}

.gallery-slider .prev-button::before{
    content: '\276e';
}

.gallery-slider .next-button {
    padding-bottom: .6em;
    right: 10px;
}
.gallery-slider .next-button::before{
    content: '\276f';
}

.gallery-slider .pagination-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-slider .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.5); /* Semi-transparent white */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.2); /* Subtle border */
}

.gallery-slider .dot.active {
    background-color: #333; /* Darker for active dot */
    transform: scale(1.2); /* Slightly larger for active dot */
}

/* Responsive adjustments for the slider */
@media (max-width: 768px) {
    .gallery-slider {
        height: 300px; /* Adjust height for smaller screens */
        margin-top: 40px; /* Adjust margin for smaller screens */
    }

    .gallery-slider .slider-nav-button {
        padding: 8px 12px;
        font-size: 1.2em;
    }

    .gallery-slider .dot {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 480px) {
    .gallery-slider {
        height: 250px; /* Even smaller height for very small screens */
    }
}

/* New: Styles for when the screen is below column-display resolution */
@media (max-width: 992px) {
    .gallery-slider {
        /* On small screens, the gallery container itself might need to adjust */
        height: auto; /* Allow height to be determined by stacked images */
        display: block; /* Change to block to allow vertical stacking of children */
        box-shadow: none; /* Remove shadow if it looks odd with stacked images */
        margin-top: 20px; /* Adjust top margin for stacked images */
        cursor: default; /* Remove resize cursor */
    }

    .gallery-slider .gallery-images {
        flex-direction: column; /* Stack images vertically */
        height: auto; /* Allow images container to adjust height */
        transform: none !important; /* Crucial: Override JS transform to prevent horizontal shift */
        display: flex; /* Keep flex for individual image centering if needed */
        align-items: center; /* Center images horizontally within the flex column */
        justify-content: center;
    }

    .gallery-slider .gallery-images img {
        width: 100%; /* Ensure images take full width when stacked */
        height: auto; /* Maintain aspect ratio */
        object-fit: contain; /* Still contain if images have different aspect ratios */
        margin-bottom: 15px; /* Add space between stacked images */
        border-radius: 8px; /* Maintain rounded corners */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Re-add shadow to individual images */
    }

    .gallery-slider .gallery-images video {
        width: 100%; /* Ensure images take full width when stacked */
        height: auto; /* Maintain aspect ratio */
        object-fit: contain; /* Still contain if images have different aspect ratios */
        margin-bottom: 15px; /* Add space between stacked images */
        border-radius: 8px; /* Maintain rounded corners */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Re-add shadow to individual images */
    }

    .gallery-slider .slider-nav-button,
    .gallery-slider .pagination-dots {
        display: none; /* Hide navigation elements on small screens */
    }

    .gallery-slider + * {
        order: -1; /* Moves the element immediately following .gallery-slider to the first position in a flex container */
        padding-top: 10px;
    }
}
