/* ---- RESET ---- */
.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    margin: 0 auto; /* center inside parent */
    margin-top: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
                0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Maintain perfect responsive 16:9 */
.aspect-ratio-box {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity .8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---- Captions ---- */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    color: #fff;
}

/* ---- Navigation Buttons ---- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.35);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    z-index: 2;
    transition: background .3s;
}

.nav-btn:hover {
    background: rgba(0,0,0,.75);
}

.prev { left: 10px; }
.next { right: 10px; }

/* ---- Dots ---- */
.dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 3;
}

.dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: .3s;
}

.dot.active {
    background: white;
    transform: scale(1.15);
}

/* ---- RESPONSIVE BREAKPOINTS ---- */

/* Reduce slideshow size on tablets */
@media (max-width: 991px) {
    .slideshow-container {
        /* margin-left: 50px; */
        max-width: 480px;
        margin: 30px auto;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
    }

    .nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .dots {
        bottom: 12px;
    }
}

/* Reduce slideshow size on mobile */
@media (max-width: 768px) {
    .slideshow-container {
        max-width: 380px;
        margin: 30px auto 0; /* Added more top space */
    }

    .aspect-ratio-box {
        padding-bottom: 60%; /* Slightly less height */
    }

    .nav-btn {
        width: 32px;
        height: 32px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .dot {
        width: 8px;
        height: 8px;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .slideshow-container {
        max-width: 300px;
        margin: 30px auto 0; /* Increased top gap */
    }

    .aspect-ratio-box {
        padding-bottom: 65%; /* Slightly more height for tiny screens */
    }

    .nav-btn {
        width: 28px;
        height: 28px;
    }

    .nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .caption h3 {
        font-size: 1rem;
    }
}