.bevlogic-stats {
    padding: var(--wp--preset--spacing--70) var(--wp--preset--spacing--30);
    position: relative;
}

.bevlogic-stats__inner {
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
}

/* Header */
.bevlogic-stats__header {
    text-align: center;
    margin-bottom: var(--wp--preset--spacing--50);
}

.bevlogic-stats__title {
    font-size: clamp(1.5rem, 3vw, 2rem); /* 24px to 32px - matches H2 */
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    margin: 0 0 var(--wp--preset--spacing--20) 0;
    color: var(--wp--preset--color--ink);
}

.bevlogic-stats__description {
    font-size: 1.125rem; /* 18px */
    font-family: var(--wp--preset--font-family--body);
    line-height: 1.6;
    color: var(--wp--preset--color--ink-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Grid Layout */
.bevlogic-stats__grid {
    display: grid;
    gap: var(--wp--preset--spacing--50);
    text-align: center;
}

.bevlogic-stats__grid--1 {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}

.bevlogic-stats__grid--2 {
    grid-template-columns: repeat(2, 1fr);
}

.bevlogic-stats__grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.bevlogic-stats__grid--4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Stat Item */
.bevlogic-stats__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--wp--preset--spacing--30);
}

.bevlogic-stats__icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--wp--preset--spacing--20);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bevlogic-stats__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bevlogic-stats__number {
    font-size: clamp(2rem, 5vw, 3rem); /* 32px to 48px */
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 700;
    line-height: 1;
    color: var(--wp--preset--color--primary);
    margin-bottom: var(--wp--preset--spacing--20);
    letter-spacing: -0.02em;
}

.bevlogic-stats__label {
    font-size: 1rem; /* 16px */
    font-family: var(--wp--preset--font-family--heading);
    font-weight: 600;
    color: var(--wp--preset--color--ink);
    margin-bottom: var(--wp--preset--spacing--10);
}

.bevlogic-stats__extra {
    font-size: 0.875rem; /* 14px */
    font-family: var(--wp--preset--font-family--body);
    color: var(--wp--preset--color--ink-light);
    opacity: 0.8;
}

/* Background Variations */
.bevlogic-stats--bg-default {
    background-color: var(--wp--preset--color--base);
}

.bevlogic-stats--bg-light {
    background-color: var(--wp--preset--color--base-2);
}

.bevlogic-stats--bg-gradient {
    background: var(--wp--preset--gradient--primary-gradient);
}

.bevlogic-stats--bg-gradient .bevlogic-stats__title,
.bevlogic-stats--bg-gradient .bevlogic-stats__description,
.bevlogic-stats--bg-gradient .bevlogic-stats__label,
.bevlogic-stats--bg-gradient .bevlogic-stats__extra {
    color: var(--wp--preset--color--base);
}

.bevlogic-stats--bg-gradient .bevlogic-stats__number {
    color: var(--wp--preset--color--base);
}

.bevlogic-stats--bg-dark {
    background-color: var(--wp--preset--color--ink);
}

.bevlogic-stats--bg-dark .bevlogic-stats__title,
.bevlogic-stats--bg-dark .bevlogic-stats__description,
.bevlogic-stats--bg-dark .bevlogic-stats__label,
.bevlogic-stats--bg-dark .bevlogic-stats__extra {
    color: var(--wp--preset--color--base);
}

.bevlogic-stats--bg-dark .bevlogic-stats__number {
    color: var(--wp--preset--color--accent);
}

/* Animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bevlogic-stats__item {
    animation: countUp 0.6s ease-out;
    animation-fill-mode: both;
}

.bevlogic-stats__item:nth-child(1) { animation-delay: 0.1s; }
.bevlogic-stats__item:nth-child(2) { animation-delay: 0.2s; }
.bevlogic-stats__item:nth-child(3) { animation-delay: 0.3s; }
.bevlogic-stats__item:nth-child(4) { animation-delay: 0.4s; }
.bevlogic-stats__item:nth-child(5) { animation-delay: 0.5s; }
.bevlogic-stats__item:nth-child(6) { animation-delay: 0.6s; }

/* Placeholder */
.bevlogic-stats__placeholder {
    padding: var(--wp--preset--spacing--60);
    background-color: var(--wp--preset--color--base-2);
    border: 2px dashed var(--wp--preset--color--border);
    text-align: center;
    color: var(--wp--preset--color--ink-lighter);
    border-radius: var(--wp--custom--rounded--base);
    font-family: var(--wp--preset--font-family--body);
}

/* Responsive */
@media (max-width: 1024px) {
    .bevlogic-stats__grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bevlogic-stats {
        padding: var(--wp--preset--spacing--50) var(--wp--preset--spacing--20);
    }
    
    .bevlogic-stats__grid--2,
    .bevlogic-stats__grid--3,
    .bevlogic-stats__grid--4 {
        grid-template-columns: 1fr;
    }
    
    .bevlogic-stats__number {
        font-size: 2.5rem;
    }
}


.wp-stat-block-group .statistics-data {
    font-size: 62px;
    font-family: var(--wp--preset--font-family--heading);
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    letter-spacing: -0.72px;
    color: #546DF9;
    text-align: center;
}
.wp-stat-block-group .statistics-data .pre-x {
    font-size: 28px;
    font-style: normal;
    font-weight: 700;
    margin-right: -10px;
}
.wp-stat-block-group .statistics-data .su-x {
    font-size: 21px;
    font-style: normal;
    font-weight: 400;
    line-height: 26px; /* 114.286% */
    margin-left: -14px;
}

.wp-stat-block-group .statistics-data-description {
    margin-top: 4px;
}

/** Blocks */
.wp-stat-block-group .wp-block-columns {
    align-items: normal !important;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap !important;
    gap: 2.5rem;
}
.wp-stat-block-group .wp-block-columns.has-column-count {
    gap: 0px;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-align-center {
    justify-content: center !important;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-align-left {
    justify-content: flex-start !important;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-align-right {
    justify-content: flex-end !important;
}
.wp-stat-block-group .wp-block-columns.has-column-count .wp-block-column {
    flex-basis: auto !important;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-2 .wp-block-column {
    width: 50%;
    max-width: 50%;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-3 .wp-block-column {
    width: 33.33%;
    max-width: 33.33%;
}
.wp-stat-block-group .wp-block-columns.wp-block-columns-4 .wp-block-column {
    width: 25%;
    max-width: 25%;
}
.wp-stat-block-group .wp-block-columns .wp-block-column {
    padding: 20px;
}
/* @media (min-width: 782px) {
    .wp-stat-block-group .wp-block-columns {
        flex-wrap: nowrap !important;
    }
} */
.wp-stat-block-group .wp-block-columns.are-vertically-aligned-top {
    align-items: flex-start;
}
.wp-stat-block-group  .wp-block-columns.are-vertically-aligned-center {
    align-items: center;
}
.wp-stat-block-group  .wp-block-columns.are-vertically-aligned-bottom {
    align-items: flex-end;
}
@media (max-width: 1140px) {
    .wp-stat-block-group .wp-block-columns {
        gap: 0px;
    }
    .wp-stat-block-group .wp-block-columns .wp-block-column,
    .wp-stat-block-group .wp-block-columns.wp-block-columns-3 .wp-block-column,
    .wp-stat-block-group .wp-block-columns.wp-block-columns-4 .wp-block-column {
        width: 50%;
        max-width: 50%;
        flex-basis: auto !important;
    }
}
@media (max-width: 781px) {
    .wp-stat-block-group  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 100% !important;
        max-width: 100%;
        width: 100%;
    }
}
@media (min-width: 782px) {
    .wp-stat-block-group  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
        flex-basis: 0;
        flex-grow: 1;
    }
    .wp-stat-block-group  .wp-block-columns:not(.is-not-stacked-on-mobile)
        > .wp-block-column[style*="flex-basis"] {
        flex-grow: 0;
    }
}
.wp-stat-block-group  .wp-block-columns.is-not-stacked-on-mobile {
    flex-wrap: nowrap !important;
}
.wp-stat-block-group  .wp-block-columns.is-not-stacked-on-mobile > .wp-block-column {
    flex-basis: 0;
    flex-grow: 1;
}
.wp-stat-block-group  .wp-block-columns.is-not-stacked-on-mobile
    > .wp-block-column[style*="flex-basis"] {
    flex-grow: 0;
}
:where(.wp-stat-block-group .wp-block-columns) {
    margin-bottom: 1.75em;
}
:where(.wp-stat-block-group .wp-block-columns.has-background) {
    padding: 1.25em 2.375em;
}
.wp-stat-block-group .wp-block-column {
    flex-grow: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}
.wp-stat-block-group .wp-block-column.is-vertically-aligned-top {
    align-self: flex-start;
}
.wp-stat-block-group .wp-block-column.is-vertically-aligned-center {
    align-self: center;
}
.wp-stat-block-group .wp-block-column.is-vertically-aligned-bottom {
    align-self: flex-end;
}
.wp-stat-block-group .wp-block-column.is-vertically-aligned-stretch {
    align-self: stretch;
}
.wp-stat-block-group .wp-block-column.is-vertically-aligned-bottom,
.wp-stat-block-group .wp-block-column.is-vertically-aligned-center,
.wp-stat-block-group .wp-block-column.is-vertically-aligned-top {
    width: 100%;
}

/* Character-by-character Animation */
.stat-animated {
    display: inline-block;
    font-size: 0; /* Remove whitespace between inline-block children */
}

.stat-char {
    display: inline-block;
    font-size: 62px; /* Reset font size to match parent .statistics-data */
    opacity: 0;
    transform: translateY(-50px) rotateX(90deg);
    transform-origin: center center;
}

/* Animation only triggers when .is-visible is added */
.stat-animated.is-visible .stat-char {
    animation: fadeInDown 0.4s ease-out forwards;
    animation-delay: calc(0.15s + (var(--char-index) * 0.05s)); /* 0.15s base delay + staggered delay */
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-50px) rotateX(90deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0deg);
    }
}