/* Base */
.body-fr5-inv {
    font-family: 'Segoe UI', sans-serif;
    margin: 40px;
    padding: 0;
    background-color: white;
    color: black;
}

.joy-learning-fr5-inv {
    text-align: center;
    padding: 30px 20px;
}

.joy-learning-fr5-inv h1 {
    font-size: 2em;
    margin-bottom: 10px;
}

.joy-learning-fr5-inv p {
    font-size: 1.1em;
    margin-bottom: 30px;
}

.columns-fr5-inv {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.carousel-container-fr5-inv {
    width: 45%;
    max-width: 400px;
    height: 250px;
    background-color: #f5f5f5;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-fr5-inv img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.carousel-fr5-inv img:first-child {
    display: block;
}

/* Puntitos de navegación */
.dots-fr5-inv {
    text-align: center;
    padding: 8px 0;
    background-color: white;
}

.dot-fr5-inv {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot-fr5-inv.active {
    background-color: #333;
}

/* ===== MEDIA QUERIES ===== */

/* Móvil muy pequeño (≤480px) */
@media (max-width: 480px) {
    .joy-learning-fr5-inv h1 {
        font-size: 1.5em;
    }
    .joy-learning-fr5-inv p {
        font-size: 1em;
    }
    .columns-fr5-inv {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    .carousel-container-fr5-inv {
        width: 100%;
        height: 200px;
    }
}

/* Tablets verticales (≤768px) */
@media (max-width: 768px) {
    .joy-learning-fr5-inv h1 {
        font-size: 1.8em;
    }
    .carousel-container-fr5-inv {
        width: 90%;
        height: 220px;
    }
}

/* Tablets horizontales / pantallas pequeñas (≤912px) */
@media (max-width: 912px) {
    .columns-fr5-inv {
        gap: 20px;
    }
    .carousel-container-fr5-inv {
        width: 48%;
        height: 240px;
    }
}

/* Desktop pequeño (≤1024px) */
@media (max-width: 1024px) {
    .columns-fr5-inv {
        gap: 25px;
    }
    .carousel-container-fr5-inv {
        width: 45%;
        height: 250px;
    }
}

/* Desktop grande (min-width: 1440px) */
@media (min-width: 1440px) {
    .carousel-container-fr5-inv {
        max-width: 500px;
        height: 300px;
    }
}

/* Orientación landscape ≤1024px */
@media (max-width: 1024px) and (orientation: landscape) {
    .columns-fr5-inv {
        flex-direction: row;
        justify-content: center;
    }
}

/* Orientación portrait ≤1024px */
@media (max-width: 1024px) and (orientation: portrait) {
    .columns-fr5-inv {
        flex-direction: column;
        align-items: center;
    }
}

/* Orientación portrait ≤480px */
@media (max-width: 480px) and (orientation: portrait) {
    .carousel-container-fr5-inv {
        width: 100%;
        height: 180px;
    }
    .joy-learning-fr5-inv h1 {
        font-size: 1.4em;
    }
    .joy-learning-fr5-inv p {
        font-size: 0.95em;
    }
}
