h1 {
    text-align: center;
    margin-top: 30px;
    color: #2c3e50;
    word-break: break-word; /* Evita desbordes en móviles */
}

/* Contenedor principal */
.porcentaje-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 20px;
    height: 700px; /* Altura fija solo para escritorio */
    overflow-y: auto;
    font-family: 'Nunito', sans-serif;
    flex-wrap: wrap;
    box-sizing: border-box;
    flex-direction: row; /* ← En escritorio: lado a lado */
}

/* Columnas */
.left-column, .right-column {
    width: 48%;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    flex: 1;
    box-sizing: border-box;
    word-break: break-word;
}

/* Títulos */
h2 {
    color: #34495e;
    word-break: break-word;
}

h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 10px;
    word-break: break-word;
}

ul {
    list-style-type: none;
    padding: 0;
}

.beneficio-item {
    margin-bottom: 20px;
}

/* Imagen */
.image-container {
    text-align: center;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-container img {
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

/* Barras de progreso */
.progress-bars {
    margin-top: 20px;
}

.progress-container {
    margin-bottom: 15px;
}

.progress {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 20px;
    height: 30px;
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

.progress-bar .percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: white;
    font-weight: bold;
    letter-spacing: 1px;
    text-align: center;
    white-space: nowrap;
}

/* Colores según el porcentaje */
.low {
    background-color: #e74c3c;
}

.medium {
    background-color: #f39c12;
}

.high {
    background-color: #27ae60;
}

.very-high {
    background-color: #349B7D;
}

/* Tablets y pantallas medianas */
@media screen and (max-width: 1024px) {
    .left-column, .right-column {
        width: 100%;
        margin-bottom: 20px;
    }

    h1 {
        font-size: 24px;
    }

    h3 {
        font-size: 1.1em;
    }

    .progress-bar .percentage-text {
        font-size: 12px;
    }
}

/* Móviles */
@media screen and (max-width: 768px) {
    .porcentaje-container {
        flex-direction: column; /* ← En móvil: vertical */
        align-items: stretch;
        height: auto;
        margin: 15px;
    }

    .left-column, .right-column {
        width: 100%;
        padding: 15px;
        margin-bottom: 20px;
        box-sizing: border-box;
    }

    .image-container {
        height: auto;
    }

    .image-container img {
        width: 100%;
        height: auto;
        max-height: none;
        object-fit: contain;
        border-radius: 8px;
    }

    h1 {
        font-size: 20px;
    }

    h3 {
        font-size: 1em;
    }

    .progress-bar .percentage-text {
        font-size: 10px;
    }
}
