.slideshow-container {
    width: 80%;
    max-width: 1000px;
    aspect-ratio: 16 / 9;
    margin: 40px auto;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    background: rgba(95, 98, 119, 0.4);
    display: flex;
}

/* Slide base style */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    z-index: 0;
}

/* Active slide */
.slide.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

/* Left (text) side */
.slide-left {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.5);
}

/* Right (image) side */
.slide-right {
    width: 50%;
    overflow: hidden;
}

.slide-right img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ensures image covers the entire half */
}

/* Slide button */
.btn-slide {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #fff;
    color: #000;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-slide:hover {
    background-color: #f0f0f0;
}

/* Dot navigation */
.dot-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: #fff;
}

/* ----------------- */
/* MOBILE RESPONSIVE */
/* ----------------- */

@media (max-width: 768px) {

    /* Container fixes */
    .slideshow-container {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        aspect-ratio: unset;
        height: auto;
        display: block;
        position: relative;
        padding-bottom: 20px; /* space for dots */
    }

    /* Slides remain fadeable */
    .slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0;
        display: block;
        transition: opacity 0.8s ease-in-out;
        pointer-events: none;
    }

    .slide.active {
        opacity: 1;
        pointer-events: auto;
        position: relative;  /* expands naturally */
    }


    /* Image section (top) */
    .slide-right {
        width: 100%;
        height: auto;
    }

    .slide-right img {
        width: 100%;
        height: auto;
        object-fit: cover;
        max-height: 320px;
    }

    /* Text section (bottom) */
    .slide-left {
        width: 100%;
        padding: 20px 15px;
        text-align: center;
        background: rgba(0,0,0,0.55);
    }

    /* Mobile dots: center correctly */
    .dot-container {
        position: relative;
        margin: 15px auto 5px auto;
        bottom: auto;

        left: 0 !important;         /* <-- IMPORTANT FIX */
        transform: none !important; /* <-- IMPORTANT FIX */

        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        z-index: 10;
        padding-bottom: 10px;
    }

    .dot {
        width: 12px;
        height: 12px;
        background: rgba(255,255,255,0.5);
        border-radius: 50%;
        transition: background-color 0.4s ease;
    }

    .dot.active {
        background: #fff;
    }
}
