/* =========================================================
   STATS.CSS
   Banda de métricas independiente.
========================================================= */

.stats-bar {
    width: 100%;

    background: var(--color-bg-secondary);

    border-top: 1px solid rgba(255, 255, 255, .07);
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.stats-bar__container {
    width: min(var(--container-width-fluid), var(--container-width));

    min-height: clamp(6.5rem, 10vw, 8rem);

    margin-inline: auto;

    display: grid;

    grid-template-columns: repeat(5, 1fr);

    align-items: stretch;
}

.stat {
    position: relative;
    min-width: 0;

    padding: 1rem clamp(.5rem, 1.5vw, 1.5rem);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    text-align: center;
}

.stat:not(:last-child)::after {
    content: "";

    position: absolute;

    top: 50%;
    right: 0;

    width: 1px;
    height: 38%;
    min-height: 2rem;

    transform: translateY(-50%);

    background: rgba(255, 255, 255, .10);
}

.stat strong {
    display: block;

    margin-bottom: .55rem;

    color: white;

    font-size: clamp(1.5rem, 3vw, 2.15rem);
    line-height: 1;

    font-weight: 800;

    letter-spacing: -.045em;

    white-space: nowrap;
}

.stat > span {
    display: block;

    max-width: 12rem;

    color: rgba(255, 255, 255, .48);

    font-size: clamp(.65rem, 1vw, .78rem);
    line-height: 1.35;

    font-weight: 500;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 55rem) {

    .stats-bar__container {
        grid-template-columns: repeat(3, 1fr);

        padding-block: 1rem;
    }

    .stat:nth-child(3)::after,
    .stat:nth-child(5)::after {
        display: none;
    }
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 38rem) {

    .stats-bar__container {
        width: 90%;

        grid-template-columns: repeat(2, 1fr);

        padding-block: .75rem;
    }

    .stat {
        padding: 1rem .5rem;
    }

    .stat strong {
        margin-bottom: .4rem;

        font-size: clamp(1.35rem, 7vw, 1.8rem);
    }

    .stat > span {
        font-size: clamp(.6rem, 2.5vw, .72rem);
    }

    .stat:nth-child(2n)::after {
        display: none;
    }

    .stat:nth-child(odd)::after {
        display: block;

        right: 0;
        height: 55%;
    }

    .stat:last-child {
        grid-column: 1 / -1;

        margin-top: .25rem;
        padding-top: 1rem;

        border-top: 1px solid rgba(255, 255, 255, .07);
    }

    .stat:last-child::after {
        display: none;
    }
}


/* =========================================================
   TELÉFONOS PEQUEÑOS
========================================================= */

@media (max-width: 22rem) {

    .stats-bar__container {
        width: 94%;
    }

    .stat strong {
        font-size: 1.3rem;
    }

    .stat > span {
        font-size: .6rem;
    }
}
