/* LÍNEAS CON MÉTRICAS */
.metricas {
    margin-bottom: 1.5rem;
}

.metricas > .titulo {
    font-size: 13px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.metricas > .linea {
    display: flex;
    flex-direction: row;
}

.metricas > .linea > .seccion {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

/* COMUNES A TODOS LOS TIPOS DE MÉTRICAS */
.metrica-texto,
.metrica-circulo {
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.metrica-texto > .etiqueta,
.metrica-circulo > .etiqueta {
    flex: 0 0;
    margin-top: .5rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
}

/* 1 - MÉTRICAS DE TEXTO SIMPLE */
.metrica-texto > .valor {
    flex: 1 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    color: #CB0017;
    font-size: clamp(2.5rem, 2.5vw, 3.75rem);
    font-weight: 700;
}

/* 2 - MÉTRICAS CON CÍRCULO PARCIALMENTE RELLENO */
.metrica-circulo > .grafico {
    position: relative;
    width: clamp(96px, 16vw, 120px);
}

.metrica-circulo > .grafico > .svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.metrica-circulo > .grafico > .svg > .track,
.metrica-circulo > .grafico > .svg > .progress {
    fill: none;
    stroke-width: 7;
}

.metrica-circulo > .grafico > .svg > .track {
    stroke: #E9EDF2;
}

.metrica-circulo > .grafico > .svg > .progress {
    stroke: var(--metric-color);
    stroke-linecap: round;
    stroke-dasharray: var(--circumference);
    stroke-dashoffset: var(--circumference);
    animation: metrica-circulo-fill .75s ease-out forwards;
}

@keyframes metrica-circulo-fill {
    to {
        stroke-dashoffset: var(--offset);
    }
}

.metrica-circulo > .grafico > .centro {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 66%;
    height: 66%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .18rem;
}

.metrica-circulo > .grafico > .centro > .valor {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
}

.metrica-circulo > .grafico > .centro > .proporcion {
    margin-top: 0;
    font-size: clamp(1rem, 1.3vw, 1.1rem);
    font-weight: 600;
    color: #666;
}

@media (max-width: 991px) {
    .metricas > .linea {
        flex-direction: column;
        gap: .75rem;
    }

    .metricas > .linea > .seccion {
        flex-direction: row;
    }
    .metrica-circulo {
        min-width: 108px;
        max-width: 140px;
    }

    .metrica-circulo > .grafico > .svg > .track,
    .metrica-circulo > .grafico > .svg > .progress {
        stroke-width: 9;
    }
}
