/* The counter strip on the public About page.
   Colours come from the template's own variables (--base-color, --dark-gray, --medium-gray,
   --alt-font), so the strip follows the site if the palette is ever changed rather than
   pinning a second copy of the brand colour here. */

.ahri-counters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 991px) {
    .ahri-counters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Two up on a phone rather than one: six tiles in a single column turns the section into
   a long scroll, and the figures are short enough to stay readable at half width. */
@media (max-width: 575px) {
    .ahri-counters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

.ahri-counter {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 26px 24px;
    background: var(--white, #fff);
    border: 1px solid var(--extra-medium-gray, #e4e4e4);
    border-radius: 14px;
    overflow: hidden;
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

/* A thin accent that grows across the top on hover — the same restrained motion the
   template uses on its own feature boxes, rather than a new effect of its own. */
.ahri-counter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--base-color, #18bcc7);
    transition: width .45s cubic-bezier(.33, 1, .68, 1);
}

.ahri-counter:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 18px 40px rgba(35, 35, 35, .10);
}

.ahri-counter:hover::before {
    width: 100%;
}

.ahri-counter-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    margin-bottom: 20px;
    border-radius: 16px;
    color: var(--base-color, #18bcc7);
    /* Tinted from the brand colour itself, so the badge keeps matching the icon if the
       template's palette is ever changed. The flat value is the fallback for browsers
       without color-mix. */
    background: rgba(24, 188, 199, .10);
    background: color-mix(in srgb, var(--base-color, #18bcc7) 10%, transparent);
    transition: background-color .35s ease, color .35s ease;
}

.ahri-counter:hover .ahri-counter-icon {
    color: var(--white, #fff);
    background: var(--base-color, #18bcc7);
}

.ahri-counter-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.ahri-counter-number {
    font-family: var(--alt-font, sans-serif);
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -1.5px;
    color: var(--dark-gray, #232323);
}

.ahri-counter-number .ahri-counter-suffix {
    font-size: 28px;
    letter-spacing: -1px;
    margin-left: 2px;
}

.ahri-counter-title {
    /* The bottom margin is the floor under the footnote's "margin-top: auto", so the gap
       never collapses on the tallest tile in a row. */
    margin: 10px 0 14px;
    font-family: var(--alt-font, sans-serif);
    font-size: 17px;
    font-weight: 600;
    /* The template's headings run loose; a two-word title that wraps needs it tighter. */
    line-height: 1.35;
    color: var(--dark-gray, #232323);
}

/* The "last updated" line sits on a hairline rule so it reads as a footnote to the figure
   above rather than as part of the label. */
.ahri-counter-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    /* Pushed to the bottom of the tile so the footnotes line up across a row even when one
       title wraps onto a second line. */
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--extra-medium-gray, #e4e4e4);
    font-size: 12px;
    line-height: 1.4;
    color: var(--medium-gray, #717580);
}

.ahri-counter-updated svg {
    flex: 0 0 13px;
    opacity: .75;
}

@media (max-width: 575px) {
    .ahri-counter {
        padding: 20px 16px 16px;
        border-radius: 12px;
    }

    .ahri-counter-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 14px;
        border-radius: 12px;
    }

    .ahri-counter-icon svg {
        width: 22px;
        height: 22px;
    }

    .ahri-counter-icon img {
        width: 22px;
        height: 22px;
    }

    .ahri-counter-number {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .ahri-counter-number .ahri-counter-suffix {
        font-size: 20px;
    }

    .ahri-counter-title {
        font-size: 15px;
        margin-top: 8px;
    }

    .ahri-counter-updated {
        padding-top: 10px;
        font-size: 11px;
    }
}
