/* Home: "Intelligent Digital Solutions Without Limits" stats + CTA strip (home.php).
   Counter JS unchanged (assets-2026/js/custom.js counts .stat-number up). Text unchanged.
   Cream band, split head, hairline 3x2 stat grid, full-width dark CTA strip. */

section.stats-section {
    --st-g: max(24px, calc((100vw - 1320px) / 2 + 24px));
    position: relative;
    padding: 110px 0 0 !important;
    background: #f5f3ef !important;
    overflow: hidden;
}

section.stats-section::before,
section.stats-section::after {
    display: none !important;
}

section.stats-section > .container {
    max-width: 1320px !important;
    padding: 0 24px !important;
}

/* ---------- head ---------- */
section.stats-section .section-head-bg {
    align-items: flex-end !important;
    margin: 0 0 64px !important;
    padding: 0 !important;
    background: none !important;
    --bs-gutter-x: 48px;
}

section.stats-section .section-head-bg .h2 {
    color: #111 !important;
    font-size: 52px !important;
    line-height: 1.1 !important;
    letter-spacing: -.03em;
}

section.stats-section .section-head-bg .body-2 {
    margin: 0 !important;
    color: #55524c !important;
    font-size: 17px !important;
    line-height: 1.75 !important;
}

/* ---------- stats grid ---------- */
section.stats-section .stats-grid {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

section.stats-section .stats-grid > .row {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 !important;
    border-top: 1px solid #111;
}

section.stats-section .stat-item {
    position: relative;
    width: auto !important;
    max-width: none !important;
    flex: none !important;
    margin: 0 !important;
    padding: 44px 40px 48px !important;
    border: 0 !important;
    border-bottom: 1px solid #e2ddd4 !important;
    border-left: 1px solid #e2ddd4 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    transition: background .4s ease !important;
}

section.stats-section .stat-item:nth-child(3n+1) {
    border-left: 0 !important;
    padding-left: 0 !important;
}

section.stats-section .stat-item::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -1px;
    height: 3px;
    background: #ff9f0a;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .6s cubic-bezier(.65, 0, .35, 1);
}

section.stats-section .stat-item::after {
    display: none !important;
}

section.stats-section .stat-item:hover::before {
    transform: scaleX(1);
}

section.stats-section .stat-number {
    display: block;
    margin: 0 0 22px !important;
    color: #111 !important;
    background: none !important;
    -webkit-text-fill-color: #111 !important;
    font-family: var(--bold);
    font-size: 72px !important;
    line-height: 1 !important;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
    transition: color .4s ease, -webkit-text-fill-color .4s ease;
}

section.stats-section .stat-item:hover .stat-number {
    color: #e07f00 !important;
    -webkit-text-fill-color: #e07f00 !important;
}

section.stats-section .stat-item h3 {
    margin: 0 0 12px !important;
    color: #111 !important;
    font-family: var(--bold);
    font-size: 21px !important;
    line-height: 1.3 !important;
}

section.stats-section .stat-item p {
    margin: 0 !important;
    color: #55524c !important;
    font-size: 15.5px !important;
    line-height: 1.75 !important;
}

/* ---------- CTA strip (full width) ---------- */
section.stats-section .cta-section {
    margin: 110px 0 0 !important;
    padding: 0 !important;
    background: #111114 !important;
}

section.stats-section .cta-container {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

section.stats-section .cta-banner {
    gap: 48px;
    margin: 0 !important;
    padding: 64px var(--st-g) !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
}

section.stats-section .cta-banner::before,
section.stats-section .cta-banner::after {
    display: none !important;
}

section.stats-section .cta-banner h3 {
    max-width: 820px;
    color: #fff !important;
    font-family: var(--bold);
    font-size: 34px !important;
    line-height: 1.25 !important;
    letter-spacing: -.02em;
}

section.stats-section .cta-banner .btn-orange {
    flex: 0 0 auto;
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    height: auto !important;
    padding: 18px 30px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: #ff9f0a !important;
    color: #111 !important;
    font-family: var(--medium);
    font-size: 16px !important;
    box-shadow: none !important;
    transition: background .3s ease !important;
}

section.stats-section .cta-banner .btn-orange svg {
    transition: transform .3s ease;
}

section.stats-section .cta-banner .btn-orange svg path {
    stroke: currentColor !important;
}

section.stats-section .cta-banner .btn-orange:hover {
    background: #fff !important;
}

section.stats-section .cta-banner .btn-orange:hover svg {
    transform: translate(3px, -3px);
}

/* ---------- reveal (JS adds .st-anim / .st-in) ---------- */
section.stats-section.st-anim .section-head-bg > *,
section.stats-section.st-anim .stat-item,
section.stats-section.st-anim .cta-banner > * {
    opacity: 0;
    transform: translateY(30px) !important;
    transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform .9s cubic-bezier(.22, 1, .36, 1), background .4s ease !important;
}

section.stats-section.st-anim .stats-grid > .row {
    border-top-color: transparent;
    background: linear-gradient(#111, #111) top left / 0 1px no-repeat;
    transition: background-size 1.2s cubic-bezier(.65, 0, .35, 1) .1s;
}

section.stats-section.st-anim.st-in .section-head-bg > *,
section.stats-section.st-anim.st-in .stat-item,
section.stats-section.st-anim.st-in .cta-banner > * {
    opacity: 1;
    transform: none !important;
}

section.stats-section.st-anim.st-in .stats-grid > .row {
    background-size: 100% 1px;
}

section.stats-section.st-anim.st-in .section-head-bg > *:nth-child(2) { transition-delay: .1s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(1) { transition-delay: .15s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(2) { transition-delay: .25s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(3) { transition-delay: .35s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(4) { transition-delay: .45s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(5) { transition-delay: .55s; }
section.stats-section.st-anim.st-in .stat-item:nth-child(6) { transition-delay: .65s; }
section.stats-section.st-anim.st-in .cta-banner > *:nth-child(2) { transition-delay: .15s; }

/* ---------- responsive ---------- */
@media (max-width: 1199px) {
    section.stats-section .section-head-bg .h2 {
        font-size: 42px !important;
    }

    section.stats-section .stat-item {
        padding: 36px 28px 40px !important;
    }

    section.stats-section .stat-number {
        font-size: 56px !important;
    }

    section.stats-section .cta-banner h3 {
        font-size: 28px !important;
    }
}

@media (max-width: 991px) {
    section.stats-section {
        padding-top: 80px !important;
    }

    section.stats-section > .container {
        padding: 0 20px !important;
    }

    section.stats-section .section-head-bg {
        margin-bottom: 40px !important;
    }

    section.stats-section .section-head-bg .h2 {
        font-size: 34px !important;
    }

    section.stats-section .stats-grid > .row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    section.stats-section .stat-item,
    section.stats-section .stat-item:nth-child(3n+1) {
        padding: 32px 24px 36px !important;
        border-left: 1px solid #e2ddd4 !important;
    }

    section.stats-section .stat-item:nth-child(odd) {
        padding-left: 0 !important;
        border-left: 0 !important;
    }

    section.stats-section .cta-section {
        margin-top: 80px !important;
    }

    section.stats-section .cta-banner {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 28px;
        padding: 52px 20px !important;
    }
}

@media (max-width: 575px) {
    section.stats-section {
        padding-top: 56px !important;
    }

    section.stats-section > .container {
        padding: 0 16px !important;
    }

    section.stats-section .section-head-bg .h2 {
        font-size: 27px !important;
    }

    section.stats-section .section-head-bg .body-2 {
        font-size: 15px !important;
    }

    section.stats-section .stats-grid > .row {
        grid-template-columns: 1fr;
    }

    section.stats-section .stat-item,
    section.stats-section .stat-item:nth-child(3n+1),
    section.stats-section .stat-item:nth-child(odd) {
        padding: 28px 0 30px !important;
        border-left: 0 !important;
    }

    section.stats-section .stat-number {
        font-size: 48px !important;
        margin-bottom: 16px !important;
    }

    section.stats-section .stat-item h3 {
        font-size: 19px !important;
    }

    section.stats-section .cta-section {
        margin-top: 56px !important;
    }

    section.stats-section .cta-banner {
        padding: 44px 16px !important;
    }

    section.stats-section .cta-banner h3 {
        font-size: 23px !important;
    }

    section.stats-section .cta-banner .btn-orange {
        width: 100%;
        justify-content: center;
    }
}

/* no gaps between grid cells (legacy row gap) */
section.stats-section .stats-grid > .row {
    gap: 0 !important;
    row-gap: 0 !important;
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

/* ================= v2: full-width stat grid ================= */
@media (min-width: 992px) {
    section.stats-section > .container {
        max-width: none !important;
        padding: 0 !important;
    }

    section.stats-section .section-head-bg {
        max-width: 1320px;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 12px !important;
    }

    section.stats-section .stats-grid > .row {
        border-top: 1px solid #111;
        background: none;
    }

    section.stats-section .stat-item,
    section.stats-section .stat-item:nth-child(3n+1) {
        padding: 56px 48px 60px !important;
        border-left: 1px solid #e2ddd4 !important;
    }

    /* outer columns: text lines up with the page grid */
    section.stats-section .stat-item:nth-child(3n+1) {
        padding-left: var(--st-g) !important;
        border-left: 0 !important;
    }

    section.stats-section .stat-item:nth-child(3n) {
        padding-right: var(--st-g) !important;
    }

    /* hover fills the whole cell */
    section.stats-section .stat-item:hover {
        background: #fff !important;
    }

    section.stats-section .stat-number {
        font-size: 84px !important;
    }

    section.stats-section .stat-item p {
        max-width: 420px;
    }

    section.stats-section .cta-section {
        margin-top: 0 !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    section.stats-section .stat-item,
    section.stats-section .stat-item:nth-child(3n+1) {
        padding: 44px 32px 48px !important;
    }

    section.stats-section .stat-item:nth-child(3n+1) {
        padding-left: 24px !important;
    }

    section.stats-section .stat-item:nth-child(3n) {
        padding-right: 24px !important;
    }

    section.stats-section .stat-number {
        font-size: 62px !important;
    }
}

/* balanced columns: outer cells carry the page gutter, so every text block gets similar width */
@media (min-width: 1200px) {
    section.stats-section .stats-grid > .row {
        grid-template-columns: calc(var(--st-g) + 420px) minmax(0, 1fr) calc(var(--st-g) + 420px);
    }

    section.stats-section .stat-item p {
        max-width: 400px;
    }
}
