.block-estadisticas {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 46px;
    padding: var(--wp--custom--section--y) var(--wp--custom--section--x);
}
.block-estadisticas.fondo-white-04{
    background-color: var(--wp--preset--color--white-04);
    color: var(--wp--preset--color--black);
}
.block-estadisticas.fondo-white-02{
    background-color: var(--wp--preset--color--white-02);
    color: var(--wp--preset--color--black);
}
.block-estadisticas.fondo-black{
    background-color: var(--wp--preset--color--black);
    color: var(--wp--preset--color--white);
}
.block-estadisticas.fondo-main-blue{
    background-color: var(--wp--preset--color--main--blue);
    color: var(--wp--preset--color--white);
}
/* El titular/descripción de cabecera son texto negro fijo y se apoyan
   directamente en el fondo de la sección (la .stat-card sí es una tarjeta
   siempre clara e independiente, no necesita override). */
.block-estadisticas.fondo-black .estadisticas-header h2,
.block-estadisticas.fondo-black .estadisticas-header p,
.block-estadisticas.fondo-main-blue .estadisticas-header h2,
.block-estadisticas.fondo-main-blue .estadisticas-header p {
    color: var(--wp--preset--color--white);
}

.inner-estadisticas {
    display: flex;
    flex-direction: column;
    row-gap: 46px;
    width: 100%;
    max-width: 1200px;
}

.estadisticas-header {
    display: flex;
    flex-direction: column;
    text-align: center;
    row-gap: 20px;
}

.estadisticas-eyebrow {
    display: inline-flex;
    align-items: center;
    align-self: center;
    column-gap: 8px;
    padding: 8px 16px;
    border: 1px solid var(--wp--preset--color--transparent--blue);
    border-radius: var(--wp--custom--radius--full);
    background-color: var(--wp--preset--color--transparent--blue);
    color: var(--wp--preset--color--main-blue);
    font-size: var(--wp--preset--font-size--small);
    font-weight: var(--wp--custom--weight-700);
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.estadisticas-eyebrow-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.estadisticas-header h2 {
    margin: 0;
    color: var(--wp--preset--color--black);
}

.estadisticas-header p {
    margin: 0;
    color: var(--wp--preset--color--black);
}

.grid-estadisticas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 30px;
    border-radius: var(--wp--custom--radius--xl);
    background-color: var(--wp--preset--color--white-03);
    box-shadow: var(--shadow-card);
}

.stat-number {
    font-family: "Space Grotesk", sans-serif;
    font-size: var(--wp--preset--font-size-h1);
    line-height: var(--wp--preset--line-height-h1);
    font-weight: var(--wp--custom--weight-700);
    color: var(--wp--preset--color--main-blue);
    font-variant-numeric: tabular-nums;
}

.stat-accent {
    display: block;
    width: 40px;
    height: 4px;
    margin: 16px 0 12px;
    border-radius: var(--wp--custom--radius--full);
    background-color: var(--wp--preset--color--grey-06);
}

.stat-label {
    margin: 0;
    font-size: var(--wp--preset--font-size--small);
    line-height: var(--wp--preset--line-height--small);
    font-weight: var(--wp--custom--weight-400);
    color: var(--wp--preset--color--black);
}

@media (max-width: 1024px) {

    .grid-estadisticas {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Exactamente 3 cards: con 2 columnas la 3ª quedaría sola en su fila.
       Se salta directo a 1 columna (los layouts de 4+ cards sí aprovechan
       las 2 columnas de este tramo). */
    .grid-estadisticas:has(> .stat-card:nth-child(3):last-child) {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .block-estadisticas {
        padding: var(--wp--custom--section--y-mobile) var(--wp--custom--section--x-mobile);
    }
}

@media (max-width: 768px) {
    .grid-estadisticas {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .stat-number {
        font-size: var(--wp--preset--font-size-h2);
        line-height: var(--wp--preset--line-height-h2);
    }
}