/* ─────────────────────────────────────────────────────────────────────────────
   Impact page — Components/Pages/Public/Impact.razor. Scoped under .nf-ip.
   Site navy + orange theme (nikalas-theme.css); --ip-* are local aliases of those
   tokens. Lightbox from anubhav-page.css, figures from FoundationStats.
   ───────────────────────────────────────────────────────────────────────────── */

.nf-ip {
    /* Page aliases onto the site-wide navy + orange tokens (nikalas-theme.css). */
    --ip-accent: var(--nfd-orange);
    --ip-accent-2: var(--nfd-orange-2);
    --ip-accent-text: var(--nfd-orange-text);
    --ip-accent-tint: var(--nfd-orange-tint);
    --ip-navy: var(--nfd-navy);
    --ip-bg: var(--nfd-bg);
    --ip-grad: linear-gradient(120deg, var(--nfd-navy-deep) 0%, var(--nfd-navy) 45%, #174B87 100%);

    background: var(--ip-bg);
}
/* ── Hero: shared photo banner (.nf-wwp-hero, who-we-are-page.css) ────────── */

.nf-ip-hero__bg { background-image: url("/_content/RioCommerce.Web.Storefront/images/nikalas/impact/full-24.jpg"); background-position: 70% 40%; }

/* ── Section heading ───────────────────────────────────────────────────────── */

.nf-ip-head { margin-bottom: clamp(24px, 3vw, 36px); text-align: center; }
.nf-ip-head--second { margin-top: clamp(44px, 5vw, 64px); }
.rioc-app h2.nf-ip-head__title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 0;
    font-size: clamp(26px, 2.4vw, 38px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--ip-navy);
    text-transform: none;
}
.nf-ip-head__title::before,
.nf-ip-head__title::after { content: ""; flex: none; width: clamp(24px, 3.4vw, 48px); height: 3px; border-radius: 2px; background: var(--ip-accent); }
.rioc-app p.nf-ip-head__sub { margin: 10px auto 0; max-width: 40em; font-size: var(--nfd-fs-body); color: var(--nfd-muted); text-transform: none; }

/* ── Gallery ───────────────────────────────────────────────────────────────── */

.nf-ip-gallery { padding-top: clamp(28px, 3vw, 44px); }
.rioc-app ul.nf-ip-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 1.6vw, 22px);
}
.nf-ip-grid > li { min-width: 0; }
/* Feature the first photo at double width on desktop for a magazine rhythm. */
.nf-ip-grid > li:first-child { grid-column: span 2; grid-row: span 2; }
.nf-ip-grid__item {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    aspect-ratio: 2 / 1;
    padding: 0;
    border-radius: 14px;
    cursor: zoom-in;
    font: inherit;
}
.nf-ip-grid > li:first-child .nf-ip-grid__item { aspect-ratio: auto; }
.nf-ip-grid__item:hover .nf-ap-grid__zoom,
.nf-ip-grid__item:focus-visible .nf-ap-grid__zoom { opacity: 1; scale: 1; }
.nf-ip-grid__item:focus-visible { outline: 3px solid var(--ip-accent); outline-offset: 3px; }
/* Pink-tinted overlay on hover (the motion layer's wash, recoloured). */
.nf-ip .nfd-photo::after { background: linear-gradient(200deg, rgba(255, 140, 40, .22) 0%, rgba(255, 140, 40, 0) 45%, rgba(16, 47, 101, .28) 100%); }

/* ── Story card ────────────────────────────────────────────────────────────── */

.nf-ip-story { padding-top: 0; }
.nf-ip-story__card {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 40px);
    padding: clamp(24px, 3vw, 40px);
    border: 1px solid var(--nfd-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 50px -28px rgba(16, 47, 101, .35);
}
.nf-ip-story__icon {
    flex: none;
    display: grid;
    place-items: center;
    width: clamp(86px, 8vw, 116px);
    aspect-ratio: 1;
    padding-right: clamp(20px, 3vw, 40px);
    border-right: 3px solid var(--ip-accent);
    color: var(--ip-accent);
    box-sizing: content-box;
}
.nf-ip-story__icon svg { width: 100%; height: 100%; }
.nf-ip-story__text .nfd-text { max-width: none; }
.nf-ip-story__text .nfd-text:last-child { margin-bottom: 0; }
.nf-ip-hl { color: var(--ip-accent-text); font-weight: 700; }

/* ── Stats (shared component, four figures here) ───────────────────────────── */

.nf-ip .nf-stats { background: var(--ip-bg); }
.rioc-app .nf-ip ul.nf-stats__grid { max-width: var(--nfd-container); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.nf-ip .nf-stats__card--featured {
    background:
        radial-gradient(rgba(255, 255, 255, .12) 1.2px, transparent 1.6px) 0 0 / 14px 14px,
        var(--ip-grad);
    box-shadow: 0 22px 40px -20px rgba(16, 47, 101, .65);
}
.nf-ip .nf-stats__card--featured .nf-stats__icon { color: var(--ip-accent); }
.nf-ip .nf-stats__card--featured .nf-stats__num { background: linear-gradient(180deg, #fff 0%, #FFE2C2 100%); -webkit-background-clip: text; background-clip: text; }
.nf-ip .nf-stats__card--featured .nf-stats__sparkle { color: var(--nfd-orange-2); }
.nf-ip .nf-stats__card--featured .nf-stats__note { color: rgba(255, 255, 255, .85); }
.nf-ip .nf-stats__num { background: linear-gradient(180deg, #1D4E9A 0%, var(--ip-navy) 100%); -webkit-background-clip: text; background-clip: text; }
.nf-ip .nf-stats__card:hover { border-color: rgba(255, 121, 0, .35); }
.nf-ip .nf-stats__card::after { background: radial-gradient(circle, rgba(255, 163, 58, .22) 0%, rgba(255, 163, 58, 0) 70%); }

/* ── Report cards ──────────────────────────────────────────────────────────── */

.nf-ip-reports { padding-bottom: calc(var(--nfd-section-py) * .8); }
.rioc-app ul.nf-ip-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(16px, 2vw, 28px);
}
@media (max-width: 1099.98px) { .rioc-app ul.nf-ip-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.nf-ip-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    padding: clamp(24px, 2.4vw, 32px) 20px clamp(22px, 2.2vw, 28px);
    border: 1px solid var(--nfd-line);
    border-top: 4px solid var(--ip-accent);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--nfd-shadow-card);
    text-align: center;
    transition: translate .35s var(--nfd-ease), box-shadow .35s var(--nfd-ease);
}
.nf-ip-card:hover { translate: 0 -6px; box-shadow: 0 26px 46px -24px rgba(16, 47, 101, .42); }
.nf-ip-card__icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 18px;
    color: var(--ip-accent);
    background: var(--ip-accent-tint);
    transition: color .3s ease, background-color .3s ease, rotate .4s var(--nfd-ease);
}
.nf-ip-card__icon svg { width: 30px; height: 30px; }
.nf-ip-card:hover .nf-ip-card__icon { color: #fff; background: var(--ip-accent); rotate: -6deg; }
.rioc-app h3.nf-ip-card__title {
    margin: 0 0 18px;
    font-size: clamp(18px, 1.4vw, 21px);
    font-weight: 700;
    color: var(--ip-navy);
    text-transform: none;
}
.nf-ip-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--nfd-btn-bg);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 20px -10px rgba(212, 94, 0, .7);
    transition: translate .3s var(--nfd-ease), box-shadow .3s var(--nfd-ease);
}
.nf-ip-card__btn svg { width: 17px; height: 17px; transition: translate .3s var(--nfd-ease); }
.nf-ip-card__btn:hover { color: #fff; translate: 0 -2px; box-shadow: 0 14px 24px -10px rgba(212, 94, 0, .8); }
.nf-ip-card__btn:hover svg { translate: 4px 0; }
.nf-ip-card__btn:focus-visible { outline: 2px solid var(--ip-navy); outline-offset: 3px; }
/* Report not published yet: same footprint as the button, clearly not clickable. */
.nf-ip-card__btn--pending,
.nf-ip-card__btn--pending:hover {
    background: var(--nfd-bg-soft, #F5F8FD);
    color: var(--nfd-muted, #64748B);
    border: 1px dashed var(--nfd-line, #D7DFEC);
    box-shadow: none;
    translate: none;
    cursor: default;
    font-weight: 600;
}

/* ── Gallery captions ──────────────────────────────────────────────────────── */

.nf-ip-grid__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 30px 14px 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    background: linear-gradient(180deg, rgba(10, 35, 80, 0) 0%, rgba(10, 35, 80, .88) 100%);
    opacity: 0;
    translate: 0 8px;
    transition: opacity .3s ease, translate .3s var(--nfd-ease);
}
.nf-ip-grid__item:hover .nf-ip-grid__caption,
.nf-ip-grid__item:focus-visible .nf-ip-grid__caption { opacity: 1; translate: 0 0; }
@media (hover: none) { .nf-ip-grid__caption { opacity: 1; translate: 0 0; } }

/* ── Impact stories ────────────────────────────────────────────────────────── */

.nf-ip-stories { padding-top: calc(var(--nfd-section-py) * .5); }
.rioc-app ul.nf-ip-stories__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2vw, 28px);
}
.nf-ip-story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--nfd-line);
    border-radius: var(--nfd-radius);
    background: #fff;
    box-shadow: var(--nfd-shadow-card);
    transition: translate .35s var(--nfd-ease), box-shadow .35s var(--nfd-ease), border-color .35s var(--nfd-ease);
}
.nf-ip-story-card:hover { translate: 0 -6px; border-color: rgba(255, 121, 0, .4); box-shadow: var(--nfd-shadow-card-hover); }
.nf-ip-story-card__img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #DFE8F5; }
.rioc-app .nf-ip-story-card__img img[width] { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; transition: scale .5s var(--nfd-ease); }
.nf-ip-story-card:hover .nf-ip-story-card__img img { scale: 1.05; }
.nf-ip-story-card__figure {
    position: absolute;
    left: 14px;
    bottom: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--nfd-btn-bg);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: none;
}
.nf-ip-story-card__body { display: flex; flex-direction: column; flex: 1; padding: 22px 22px 24px; border-top: 3px solid var(--nfd-orange); }
.rioc-app h3.nf-ip-story-card__title { margin: 0 0 10px; font-size: clamp(19px, 1.5vw, 22px); font-weight: 800; line-height: 1.25; color: var(--nfd-navy); text-transform: none; }
.rioc-app p.nf-ip-story-card__text { flex: 1; margin: 0 0 18px; font-size: var(--nfd-fs-small); line-height: 1.65; color: var(--nfd-text); text-transform: none; }
.nf-ip-story-card__link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--nfd-orange-text);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}
.nf-ip-story-card__link svg { width: 17px; height: 17px; transition: translate .3s var(--nfd-ease); }
.nf-ip-story-card__link:hover { color: var(--nfd-navy); }
.nf-ip-story-card__link:hover svg { translate: 4px 0; }
.nf-ip-story-card__link:focus-visible { outline: 2px solid var(--nfd-orange); outline-offset: 3px; border-radius: 4px; }

@media (max-width: 1023.98px) { .rioc-app ul.nf-ip-stories__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599.98px) { .rioc-app ul.nf-ip-stories__grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
    .nf-ip-story-card, .nf-ip-story-card__img img[width], .nf-ip-grid__caption { transition: none; }
    .nf-ip-story-card:hover { translate: none; }
    .nf-ip-story-card:hover .nf-ip-story-card__img img { scale: none; }
}

/* Lightbox buttons turn pink here. */
.nf-ip-lb .nf-ap-lb__btn:hover { background: var(--nfd-orange); }


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

@media (max-width: 1099.98px) {
    .rioc-app .nf-ip ul.nf-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 899.98px) {
    .rioc-app ul.nf-ip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nf-ip-grid > li:first-child { grid-column: span 2; grid-row: auto; }
    .nf-ip-grid > li:first-child .nf-ip-grid__item { aspect-ratio: 2 / 1; }
    .nf-ip-story__card { flex-direction: column; text-align: left; align-items: flex-start; }
    .nf-ip-story__icon { width: 64px; padding: 0 0 16px; border-right: 0; border-bottom: 3px solid var(--ip-accent); }
}

@media (max-width: 599.98px) {
    .rioc-app ul.nf-ip-grid { grid-template-columns: 1fr; gap: 12px; }
    .rioc-app ul.nf-ip-cards { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
    .nf-ip-grid > li:first-child { grid-column: auto; }
    .rioc-app .nf-ip ul.nf-stats__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .nf-ip-card, .nf-ip-card__icon, .nf-ip-card__btn, .nf-ip-card__btn svg { transition: none; }
    .nf-ip-card:hover, .nf-ip-card__btn:hover, .nf-ip-card__btn:hover svg { translate: none; }
    .nf-ip-card:hover .nf-ip-card__icon { rotate: none; }
}
