/* ---------------------------
   RESET Y ESTILOS GENERALES
--------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    background: #f4f4f9;
    color: #333;
}

/* ---------------------------
   SECCIÓN BENEFICIOS 3D
--------------------------- */
.beneficios-3d {
    position: relative;
    padding: 40px 0;
    text-align: center;
    perspective: 1000px; /* Efecto 3D */

    /* Ocultamos scroll horizontal para no ver la barra lateral inferior */
    overflow-x: hidden;

    /* Dejamos el scroll vertical en manos del body (no del contenedor) */
    overflow-y: visible;
}

.beneficios-3d h2 {
    font-size: 2rem;
    margin-bottom: 80px;
    color: #cf0c0c;
    text-transform: uppercase;
}

/* Contenedor principal del carrusel 3D */
.carousel-3d {
    position: relative;
    width: 400px;  /* Estructura original */
    height: 240px; /* Estructura original */
    margin: 0 auto;
    transform-style: preserve-3d;
    transition: transform 1s ease;
}

/* Cada panel del carrusel (10 en total) */
.carousel-item {
    position: absolute;
    top: 50%;
    left: 50%;

    min-width: 200px;
    min-height: 200px;

    transform-style: preserve-3d;
    transform: translate(-50%, -50%);
    transform-origin: center center -200px; /* Distancia al eje 3D */

    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 10px;
    text-align: center;
}

.carousel-item img {
    width: 40%;
    max-height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.carousel-item h3 {
    font-size: 1rem;
    color: #0a7995;
    margin-bottom: 0.3rem;
}

.carousel-item p {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.2;
    text-align: justify;        /* Justificar el texto */
    overflow-wrap: break-word;  /* Evita que palabras largas se salgan */
    word-wrap: break-word;
}

/* Botones de navegación manual */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #0db3de;
    color: #fff;
    border: none;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.8;
    transition: background 0.3s;
    z-index: 10;
}
.carousel-btn:hover {
    background: #0a7995;
}
.prev-btn {
    left: 10%;
}
.next-btn {
    right: 10%;
}

/* ---------------------------
   RESPONSIVIDAD EXTRA
--------------------------- */

/* Para tabletas (max-width: 1024px) */
@media (max-width: 1024px) {
    .carousel-3d {
        width: 350px;
        height: 210px;
    }
    .carousel-item {
        min-width: 140px;
        min-height: 120px;
        transform-origin: center center -180px;
    }
    .carousel-item img {
        max-height: 55px;
    }
}

/* Para móviles (max-width: 768px) */
@media (max-width: 768px) {
    .carousel-3d {
        width: 300px;
        height: 200px;
    }
    .carousel-item {
        min-width: 130px;
        min-height: 220px;
        transform-origin: center center -160px;
    }
    .carousel-item img {
        max-height: 50px;
    }
    .carousel-btn {
        font-size: 1.3rem;
        width: 32px;
        height: 32px;
    }
}

/* Para móviles pequeños (max-width: 480px) */
@media (max-width: 480px) {
    .beneficios-3d h2 {
        font-size: 1.8rem;
        margin-bottom: 100px;
    }
    .carousel-3d {
        width: 250px;
        height: 170px;
    }
    .carousel-item {
        min-width: 110px;
        min-height: 90px;
        transform-origin: center center -140px;
    }
    .carousel-item img {
        max-height: 40px;
    }
    .carousel-btn {
        font-size: 1rem;
        width: 28px;
        height: 28px;
    }
}

/* Ajuste específico para iPhone SE (max-width: 375px) */
@media (max-width: 375px) {
    .carousel-3d {
        width: 240px;
        height: 240px;
    }
    .carousel-item {
        min-width: 100px;
        transform-origin: center center -80px;
        border-radius: 8px;
        padding: 12px;
    }
    .carousel-item h3 {
        font-size: 0.85rem;
    }
    .carousel-item p {
        font-size: 0.75rem;
        line-height: 1.3;
        text-align: left;
    }
    .carousel-item img {
        max-height: 35px;
    }
    .carousel-btn {
        font-size: 0.9rem;
        width: 26px;
        height: 26px;
    }
}

