/* ===========================
   Slideshow Component
   =========================== */

.slideshow {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 30px rgba(34, 211, 238, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.3);
}

.slideshow__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

/* Slides */
.slideshow__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    overflow: hidden;
}

.slideshow__slide--active {
    opacity: 1;
    z-index: 1;
}

.slideshow__slide img {
    display: block;
    will-change: transform;
}

/* ===========================
   External Caption (above viewport)
   =========================== */

.slideshow__caption {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.slideshow__caption-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}

.slideshow__caption-subtitle {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
}

/* ===========================
   Title / Subtitle Overlay (internal, for mobile)
   =========================== */

.slideshow__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 24px 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.3) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    display: none;
}

.slideshow__title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.slideshow__subtitle {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ===========================
   Dot Indicators
   =========================== */

.slideshow__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
    padding: 10px 12px;
}

.slideshow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.35);
    transition: background 0.3s ease, transform 0.3s ease;
}

.slideshow__dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.slideshow__dot--active {
    background: #22d3ee;
    transform: scale(1.25);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
    .slideshow {
        border-radius: 8px;
    }

    /* Hide external caption, show internal overlay */
    .slideshow__caption {
        display: none;
    }

    .slideshow__overlay {
        display: block;
    }

    /* Dots back to overlaid on image */
    .slideshow__dots {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        gap: 6px;
        padding: 4px 10px;
        border-radius: 20px;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
    }

    .slideshow__dot {
        width: 6px;
        height: 6px;
    }
}
