/* GAUGE / MEDIDOR CIRCULAR */
.imc-gauge-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0.5rem 0 1.25rem;
}

.imc-gauge-svg {
    overflow: visible;
    width: 100% !important;
    max-width: 260px;
    height: auto !important;
}

.imc-valor-grande {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.2rem;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
}

.imc-categoria-txt {
    font-size: 1rem;
    font-weight: 600;
    text-anchor: middle;
}

/* BARRA DE ESCALA IMC */
.imc-escala {
    width: 100%;
    margin: 1rem 0 0.5rem;
    position: relative;
}

.imc-escala-bar {
    height: 14px;
    border-radius: 99px;
    background: linear-gradient(to right,
            #3b82f6 0%,
            #3b82f6 19.5%,
            #22c55e 19.5%,
            #22c55e 37.5%,
            #f59e0b 37.5%,
            #f59e0b 50%,
            #ef4444 50%,
            #ef4444 65%,
            #991b1b 65%,
            #991b1b 80%,
            #450a0a 80%,
            #450a0a 100%);
    position: relative;
}

.imc-escala-marker {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 26px;
    background: #111827;
    border-radius: 2px;
    transform: translateX(-50%);
    transition: left 0.4s ease;
}

.imc-escala-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--color-text-muted, #6b7280);
    margin-top: 0.4rem;
}

@media (max-width: 479px) {
    .imc-escala-labels {
        font-size: 0.62rem;
        gap: 0;
    }
}

@media (max-width: 359px) {
    .imc-escala-labels {
        font-size: 0.58rem;
    }

    /* Ocultar las etiquetas 18,5 / 30 / 40 — quedan las âncoras clave */
    .imc-escala-labels span:nth-child(2),
    .imc-escala-labels span:nth-child(4),
    .imc-escala-labels span:nth-child(6) {
        visibility: hidden;
        width: 0;
        overflow: hidden;
        flex: 0 0 0;
    }
}

/* TARJETAS DE RESULTADO (hero grid) */
.imc-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

@media (max-width: 480px) {
    .imc-hero-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 359px) {
    .imc-hero-grid {
        grid-template-columns: 1fr;
    }
}

.imc-card {
    background: var(--color-surface, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    padding: 0.9rem 0.5rem;
    text-align: center;
    overflow: hidden;
    min-width: 0;
}

.imc-card-num {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text, #111827);
    word-break: break-word;
}

@media (max-width: 479px) {
    .imc-card-num {
        font-size: 1.15rem;
    }
}

.imc-card-lbl {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted, #6b7280);
    margin-top: 0.25rem;
}

/* BANNER DE CATEGORÍA */
.imc-categoria-banner {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-top: 1.25rem;
    border-left-width: 4px;
    border-left-style: solid;
}

.imc-categoria-banner i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.imc-categoria-banner-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.imc-categoria-banner-text p {
    font-size: 0.87rem;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 479px) {
    .imc-categoria-banner {
        padding: 0.85rem 0.85rem;
        gap: 0.65rem;
    }
}

/* TABLA DE CATEGORÍAS OMS */
.imc-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-top: 0.75rem;
}

.imc-tabla th {
    background: var(--color-surface, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #6b7280);
}

.imc-tabla td {
    border: 1px solid var(--color-border, #e5e7eb);
    padding: 0.5rem 0.75rem;
    color: var(--color-text, #111827);
}

@media (max-width: 479px) {

    .imc-tabla th,
    .imc-tabla td {
        padding: 0.4rem 0.45rem;
        font-size: 0.78rem;
    }

    .imc-tabla th {
        font-size: 0.68rem;
    }
}

.imc-tabla tr.fila-activa td {
    font-weight: 700;
}

.dot-cat {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* FORMULARIO — GRID DE CAMPOS */
@media (max-width: 479px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .form-grid .field-group[style*="grid-column"] {
        grid-column: auto !important;
    }
}

/* SELECT DE ACTIVIDAD FÍSICA  */
#actividad,
#sexo {
    width: 100%;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
}

.input-wrapper.select-wrapper {
    overflow: hidden;
}

/* PASOS — CÓDIGO LARGO */
.pasos-wrap {
    margin-top: 1.25rem;
}

.pasos-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text, #111827);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.paso {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.paso-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: var(--color-primary, #2563eb);
    color: #fff;
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.paso-text {
    font-size: 0.9rem;
    color: var(--color-text, #111827);
    line-height: 1.55;
    min-width: 0;
    overflow-wrap: break-word;
}

.paso-text code {
    background: var(--color-surface, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 5px;
    padding: 0.1rem 0.4rem;
    font-size: 0.88rem;
    word-break: break-all;
    white-space: pre-wrap;
    display: inline;
}

@media (max-width: 479px) {
    .paso-text {
        font-size: 0.83rem;
    }

    .paso-text code {
        font-size: 0.8rem;
    }
}

/* AVISO MÉDICO */
.aviso-medico {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 0.84rem;
    color: #78350f;
    margin-top: 1.25rem;
    line-height: 1.5;
}

.aviso-medico i {
    margin-right: 0.4rem;
}