* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
}

/* Contenedor principal */
.carrousel {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: #000;
}

/* Fila horizontal de slides */
.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Cada slide ocupa el 100% del ancho */
.slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
}

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

/* Títulos grandes, centrados y animados */
.caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    opacity: 0;
    animation: fadeIn 1.2s forwards;
    width: 90%;
    max-width: 600px;
}

.caption h2 {
    margin: 0;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
}

.caption h3 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -12px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Flechas */
.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

/* Móvil */
@media (max-width: 600px) {
    .carrousel {
        height: 60vh;
    }

    .slide {
        height: 60vh;
    }

    .slide img {
        object-fit: contain;
        background: #f0f0f0;
    }

    .caption {
        top: 20px;
        width: 100%;
        padding: 0 10px;
    }

    .caption h2 {
        font-size: 2rem;
    }

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