/* ─────────────────────────────────────────────────────────────────────────────
   Homepage counter section — Components/Shared/FoundationStats.razor.
   Centred statement line, then three compact equal cards (icon left, figure right);
   the children card is highlighted in navy. Section shell, container and fade-in
   come from nikalas-theme.css (nfd-*).
   ───────────────────────────────────────────────────────────────────────────── */

.nf-stats {
    padding-top: calc(var(--nfd-section-py) * .6);
    padding-bottom: calc(var(--nfd-section-py) * .5);   /* the footer's curved top supplies the rest */
    text-align: center;
    background:
        radial-gradient(ellipse 35% 60% at 50% 70%, rgba(255, 163, 58, .1) 0%, rgba(255, 163, 58, 0) 70%),
        radial-gradient(ellipse 30% 50% at 4% 40%, rgba(214, 230, 250, .6) 0%, rgba(214, 230, 250, 0) 70%),
        radial-gradient(ellipse 30% 50% at 96% 40%, rgba(214, 230, 250, .6) 0%, rgba(214, 230, 250, 0) 70%),
        var(--nfd-bg);
}

.nf-stats__dots {
    position: absolute;
    z-index: -1;
    width: 80px;
    height: 64px;
    pointer-events: none;
    background-image: radial-gradient(rgba(122, 160, 214, .45) 2.4px, transparent 2.8px);
    background-size: 18px 18px;
}
.nf-stats__dots--left  { left: clamp(16px, 3vw, 52px); top: 24px; }
.nf-stats__dots--right { right: clamp(16px, 3vw, 44px); bottom: 24px; }

/* ── Statement line ────────────────────────────────────────────────────────── */

.rioc-app h2.nf-stats__title {
    max-width: 1000px;
    margin: 0 auto;
    font-size: clamp(21px, 1.9vw, 29px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.01em;
    color: var(--nfd-navy);
    text-wrap: balance;
    text-transform: none;
}
.nf-stats__hl { color: var(--nfd-orange-text); }
.nf-stats__underline {
    display: block;
    width: clamp(160px, 15vw, 260px);
    height: 12px;
    margin: 8px auto 0;
    color: var(--nfd-orange);
}

/* ── Compact cards ─────────────────────────────────────────────────────────── */

.rioc-app ul.nf-stats__grid {
    max-width: 1080px;
    list-style: none;
    margin-top: clamp(28px, 3vw, 40px);
    margin-bottom: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.8vw, 24px);
}

.nf-stats__card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: clamp(14px, 1.4vw, 20px);
    min-width: 0;
    padding: clamp(18px, 1.8vw, 24px) clamp(18px, 2vw, 28px);
    border: 1px solid var(--nfd-line);
    border-radius: 18px;
    background: linear-gradient(160deg, #FFFFFF 0%, #FBFCFF 100%);
    box-shadow: var(--nfd-shadow-card);
    text-align: left;
    transition: transform .3s var(--nfd-ease), box-shadow .3s var(--nfd-ease), border-color .3s var(--nfd-ease);
}
/* Thin orange accent along the top and a soft orange glow in the corner. */
.nf-stats__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, rgba(255, 121, 0, 0), var(--nfd-orange) 30%, var(--nfd-orange-2) 70%, rgba(255, 163, 58, 0));
}
.nf-stats__card::after {
    content: "";
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(255, 163, 58, .22) 0%, rgba(255, 163, 58, 0) 70%);
}
.nf-stats__card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 121, 0, .35);
    box-shadow: var(--nfd-shadow-card-hover);
}

/* Icon in a rounded square with a soft halo ring. */
.nf-stats__icon {
    position: relative;
    z-index: 1;
    flex: none;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    color: #fff;
    background: var(--nfd-icon-bg);
    box-shadow: 0 0 0 6px rgba(255, 121, 0, .1), 0 10px 18px -10px rgba(232, 100, 10, .75);
    transition: transform .35s var(--nfd-ease);
}
.nf-stats__icon svg { width: 27px; height: 27px; }
.nf-stats__card:hover .nf-stats__icon { transform: translateY(-2px) rotate(-6deg); }

.nf-stats__body { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; }
.nf-stats__num {
    font-size: clamp(30px, 2.6vw, 40px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.01em;
    color: var(--nfd-navy);
    background: linear-gradient(180deg, #1D4E9A 0%, var(--nfd-navy) 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    font-variant-numeric: tabular-nums;
}
.nf-stats__label {
    margin-top: 4px;
    font-size: clamp(14.5px, 1.05vw, 16px);
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.2;
    color: var(--nfd-muted);
    text-transform: none;
}

.nf-stats__note {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.35;
    color: var(--nfd-muted);
    text-transform: none;
}

/* Highlighted card — same size, navy with a dot pattern and an orange glow. */
.nf-stats__card--featured {
    border-color: transparent;
    background:
        radial-gradient(circle at 100% 100%, rgba(255, 121, 0, .35) 0%, rgba(255, 121, 0, 0) 45%),
        radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
        linear-gradient(150deg, #1E4F9C 0%, var(--nfd-navy) 55%, var(--nfd-navy-deep) 100%);
    box-shadow: 0 22px 40px -22px rgba(16, 47, 101, .7);
}
.nf-stats__card--featured::after { display: none; }
.nf-stats__card--featured:hover { border-color: transparent; box-shadow: 0 28px 46px -22px rgba(16, 47, 101, .8); }
.nf-stats__card--featured .nf-stats__icon {
    color: var(--nfd-orange);
    background: #fff;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, .12), 0 10px 18px -10px rgba(0, 0, 0, .5);
}
.nf-stats__card--featured .nf-stats__num {
    color: #fff;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFE2C2 100%);
    -webkit-background-clip: text;
            background-clip: text;
}
.nf-stats__card--featured .nf-stats__label { color: rgba(255, 255, 255, .85); }
.nf-stats__sparkle {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 26px;
    height: 26px;
    color: var(--nfd-orange-2);
    opacity: .9;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 899.98px) {
    .nf-stats__card { flex-direction: column; text-align: center; gap: 12px; padding: 20px 12px; }
    .nf-stats__body { align-items: center; }
    .nf-stats__sparkle { width: 20px; height: 20px; top: 10px; right: 10px; }
}

@media (max-width: 599.98px) {
    /* Phones: stacked, back to icon-left rows so the stack stays short. */
    .rioc-app ul.nf-stats__grid { grid-template-columns: 1fr; max-width: 400px; gap: 12px; }
    .nf-stats__card { flex-direction: row; text-align: left; gap: 16px; padding: 16px 20px; }
    .nf-stats__body { align-items: flex-start; }
    .nf-stats__num { font-size: 32px; }
    .nf-stats__icon { width: 52px; height: 52px; border-radius: 14px; }
    .nf-stats__icon svg { width: 25px; height: 25px; }
    .nf-stats__dots { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .nf-stats__card, .nf-stats__icon { transition: none; }
    .nf-stats__card:hover, .nf-stats__card:hover .nf-stats__icon { transform: none; }
}
