:root {
    --primary-color: #3f51b5;
    --secondary-color: #f44336;
    --dark-color: #212121;
    --light-color: #fafafa;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 10px;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-color);
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    padding: 20px;
    box-sizing: border-box;
}

.slideshow-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background-color: #fff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slideshow-frame {
    width: 100%;
    aspect-ratio: 16 / 9; /* Mantiene la relaci¨®n de aspecto 16:9 */
    overflow: hidden;
    position: relative;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.media-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.media-container.visible {
    opacity: 1;
}

.media-container img,
.media-container iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    pointer-events: auto; /* Permite interacciones con el iframe */
}

.media-container img {
    object-fit: contain; /* Ajusta la imagen completa dentro del contenedor */
    object-position: center;
}

.slideshow-controls {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

button {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    box-shadow: var(--shadow);
}

button:hover {
    transform: scale(1.05);
    background-color: #5c6bc0;
}

button svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

/* Responsividad para m¨®viles */
@media (max-width: 600px) {
    .slideshow-container {
        padding: 10px;
    }

    button {
        width: 40px;
        height: 40px;
    }

    button svg {
        width: 20px;
        height: 20px;
    }
}