/* Source: patterns/stories-real-impact.css */
/* ===============================
   Pattern: Stories Real Impact
   Supports: NOFCC Section Background block
================================ */

.stories {
    position: relative;
    overflow: hidden;
    min-height: 72vh;
    padding: 96px 0 86px;
}

/* Legacy Cover support only. New NOFCC background image behaviour is owned by textures.css. */
.stories.has-parallax {
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
}

.stories .wp-block-cover__background {
    background:
        linear-gradient(
            90deg,
            rgba(15, 15, 16, 0.82) 0%,
            rgba(15, 15, 16, 0.62) 44%,
            rgba(15, 15, 16, 0.38) 100%
        ) !important;
    opacity: 1 !important;
}

/* Dark overlay only belongs to image mode. */
.stories.has-background-image .nofcc-section-background__overlay {
    background:
        linear-gradient(
            90deg,
            rgba(15, 15, 16, 0.82) 0%,
            rgba(15, 15, 16, 0.62) 44%,
            rgba(15, 15, 16, 0.38) 100%
        ) !important;
}

.stories.has-background-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.10), transparent 32%),
        linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.28));
    pointer-events: none;
}

.stories .wp-block-cover__inner-container,
.stories .nofcc-section-background__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}

.stories .container {
    width: min(100% - 48px, 1180px);
    max-width: 1180px;
    margin: 0 auto;
}

.stories-main {
    max-width: 650px;
    padding: clamp(34px, 4.5vw, 52px);
    box-sizing: border-box;
    background: rgba(15, 15, 16, 0.46);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.stories-main:has(.nofcc-media-videos--home) {
    max-width: 1120px;
}

.stories-main:has(.nofcc-media-videos--home) > .wp-block-group__inner-container {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
    gap: clamp(26px, 4vw, 48px);
    align-items: center;
    max-width: none;
}

.stories-main:has(.nofcc-media-videos--home) > .wp-block-group__inner-container > :not(.nofcc-media-videos--home) {
    grid-column: 1;
}

.stories-main > .wp-block-group__inner-container > .nofcc-media-videos--home {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: stretch;
    margin: 0;
}

.stories-main .nofcc-media-video-card--home {
    grid-template-columns: 1fr;
    height: 100%;
}

.stories-main .nofcc-media-video-card__content {
    padding: clamp(22px, 2.6vw, 30px);
}

.stories-main .nofcc-media-video-card__content h3 {
    font-size: clamp(1.25rem, 1.8vw, 1.8rem);
}

.stories.has-background-image .stories-main .nofcc-media-video-card__content .eyebrow,
.stories.has-parallax .stories-main .nofcc-media-video-card__content .eyebrow {
    color: var(--color-red);
}

.stories.has-background-image .stories-main .nofcc-media-video-card__content p,
.stories.has-parallax .stories-main .nofcc-media-video-card__content p {
    color: var(--color-muted);
}

.stories.has-background-image .stories-main .nofcc-media-video-card__privacy,
.stories.has-parallax .stories-main .nofcc-media-video-card__privacy {
    color: rgba(89, 98, 103, 0.82);
}

/* Pattern-local panel styles for the shared Stories panels. */
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-90 { background: rgba(255,255,255,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-80 { background: rgba(255,255,255,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-70 { background: rgba(255,255,255,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-60 { background: rgba(255,255,255,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-50 { background: rgba(255,255,255,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-40 { background: rgba(255,255,255,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-white-30 { background: rgba(255,255,255,.30); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-90 { background: rgba(142,209,252,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-80 { background: rgba(142,209,252,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-70 { background: rgba(142,209,252,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-60 { background: rgba(142,209,252,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-50 { background: rgba(142,209,252,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-40 { background: rgba(142,209,252,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-blue-30 { background: rgba(142,209,252,.30); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-90 { background: rgba(255,243,207,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-80 { background: rgba(255,243,207,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-70 { background: rgba(255,243,207,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-60 { background: rgba(255,243,207,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-50 { background: rgba(255,243,207,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-40 { background: rgba(255,243,207,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-gold-30 { background: rgba(255,243,207,.30); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-90 { background: rgba(237,245,234,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-80 { background: rgba(237,245,234,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-70 { background: rgba(237,245,234,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-60 { background: rgba(237,245,234,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-50 { background: rgba(237,245,234,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-40 { background: rgba(237,245,234,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-sage-30 { background: rgba(237,245,234,.30); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-90 { background: rgba(251,231,233,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-80 { background: rgba(251,231,233,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-70 { background: rgba(251,231,233,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-60 { background: rgba(251,231,233,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-50 { background: rgba(251,231,233,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-40 { background: rgba(251,231,233,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-rose-30 { background: rgba(251,231,233,.30); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-90 { background: rgba(15,15,16,.90); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-80 { background: rgba(15,15,16,.80); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-70 { background: rgba(15,15,16,.70); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-60 { background: rgba(15,15,16,.60); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-50 { background: rgba(15,15,16,.50); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-40 { background: rgba(15,15,16,.40); }
.stories :is(.stories-main, .stories-supporting).is-style-panel-dark-30 { background: rgba(15,15,16,.30); }

/* Image-mode typography */
.stories.has-background-image,
.stories.has-parallax {
    color: var(--color-white);
}

.stories.has-background-image .eyebrow,
.stories.has-parallax .eyebrow {
    color: rgba(255, 255, 255, 0.72);
}

.stories.has-background-image h2,
.stories.has-background-image .story-support-block h3,
.stories.has-background-image .nofcc-story-card__title,
.stories.has-parallax h2,
.stories.has-parallax .story-support-block h3,
.stories.has-parallax .nofcc-story-card__title {
    color: var(--color-white);
}

.stories.has-background-image p,
.stories.has-parallax p {
    color: rgba(255, 255, 255, 0.82);
}

.story-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.stories.has-background-image .story-feature-link,
.stories.has-parallax .story-feature-link {
    color: var(--color-white);
}

.story-feature-link::after {
    content: "→";
    color: var(--color-red);
}

/* Supporting story cards */
.stories-supporting {
    max-width: 100%;
    margin: 54px 0 0;
    padding: clamp(30px, 4vw, 42px);
    box-sizing: border-box;
    background: rgba(15, 15, 16, 0.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(31, 41, 55, 0.14);
}

.stories.has-background-image .stories-supporting,
.stories.has-parallax .stories-supporting {
    border-top-color: rgba(255, 255, 255, 0.24);
}

.stories-supporting,
.stories-supporting > .wp-block-group__inner-container {
    display: block !important;
}

.stories-supporting > .wp-block-group__inner-container {
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
}

.story-support-block {
    display: block;
    max-width: none;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: inherit;
}

.stories.has-background-image .story-support-block,
.stories.has-parallax .story-support-block {
    color: var(--color-white);
}

.story-support-label {
    margin: 0 0 12px;
    color: var(--color-muted) !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stories.has-background-image .story-support-label,
.stories.has-parallax .story-support-label {
    color: rgba(255, 255, 255, 0.68) !important;
}

.story-support-block h3 {
    max-width: 720px;
    margin: 0 0 14px;
    line-height: 1.06;
}

.story-support-block > p:not(.story-support-label) {
    max-width: 720px;
    margin: 0;
    line-height: 1.62;
}

.stories.has-background-image .story-support-block > p:not(.story-support-label),
.stories.has-parallax .story-support-block > p:not(.story-support-label) {
    color: rgba(255, 255, 255, 0.76);
}

.nofcc-featured-stories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(18px, 2.4vw, 28px);
    margin-top: clamp(28px, 4vw, 40px);
}

.nofcc-story-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-charcoal);
}

.nofcc-story-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: rgba(15, 15, 16, 0.14);
}

.nofcc-story-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nofcc-featured-stories .nofcc-story-card__image {
    object-position: center 0%;
}

.nofcc-story-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(22px, 3vw, 28px);
}

.nofcc-story-card__eyebrow {
    margin: 0 0 10px;
    color: var(--color-red) !important;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.nofcc-story-card__title {
    margin: 0 0 14px;
    color: var(--color-charcoal) !important;
    font-size: clamp(1.2rem, 1.9vw, 1.55rem);
    line-height: 1.15;
}

.nofcc-story-card__title a {
    color: inherit !important;
    text-decoration: none;
}

.nofcc-story-card__title a:hover,
.nofcc-story-card__title a:focus {
    color: var(--color-red) !important;
}

.nofcc-story-card__summary {
    margin: 0 0 22px;
    color: var(--color-charcoal) !important;
    line-height: 1.6;
}

.nofcc-story-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--color-red) !important;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.nofcc-story-card__link::after {
    content: "→";
}

.nofcc-featured-stories-empty {
    margin: clamp(24px, 3vw, 32px) 0 0;
    padding: 22px 24px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-charcoal) !important;
}

.nofcc-stories-listing {
    background: var(--color-warm-white);
    padding: clamp(48px, 6vw, 80px) 0 clamp(56px, 7vw, 96px);
}

.nofcc-stories-listing .container {
    width: min(100% - (var(--gutter) * 2), var(--container-wide));
    max-width: var(--container-wide);
}

.nofcc-stories-listing__heading {
    max-width: 780px;
    margin: 0 0 clamp(30px, 4vw, 48px);
}

.nofcc-stories-listing__heading .eyebrow,
.nofcc-stories-intro .eyebrow,
.nofcc-stories-listing__selected-content .eyebrow {
    margin: 0 0 12px;
    color: var(--color-red);
}

.nofcc-stories-listing__heading h2,
.nofcc-stories-intro h2,
.nofcc-stories-listing__selected-content h2 {
    margin: 0;
    color: var(--color-charcoal);
    font-size: clamp(2rem, 3.2vw, 3.75rem);
    line-height: 1.08;
}

.nofcc-stories-listing__heading p:not(.eyebrow),
.nofcc-stories-intro p:not(.eyebrow) {
    max-width: 66ch;
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: clamp(1.05rem, 1.2vw, 1.18rem);
    line-height: 1.68;
}

.nofcc-stories-intro {
    background: var(--color-warm-white);
    padding: clamp(58px, 7vw, 96px) 0 0;
}

.nofcc-stories-intro .container {
    width: min(100% - (var(--gutter) * 2), var(--container-wide));
    max-width: var(--container-wide);
}

.nofcc-stories-listing__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(20px, 2.6vw, 34px);
}

.nofcc-stories-listing__selected {
    display: grid;
    max-width: 100%;
    margin-top: clamp(54px, 7vw, 88px);
    padding-top: clamp(44px, 6vw, 72px);
    grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(32px, 6vw, 76px);
    align-items: start;
    border-top: 1px solid var(--color-border);
    scroll-margin-top: clamp(80px, 10vw, 130px);
}

.nofcc-stories-listing__selected--no-media {
    grid-template-columns: minmax(0, 920px);
}

.nofcc-stories-listing__notice {
    max-width: min(100%, 1040px);
    margin-top: clamp(32px, 4vw, 48px);
    padding-top: clamp(28px, 4vw, 40px);
    border-top: 1px solid var(--color-border);
    scroll-margin-top: clamp(80px, 10vw, 130px);
}

.nofcc-stories-listing__selected-image {
    width: min(100%, 430px);
    margin: 0;
    overflow: hidden;
    align-self: start;
    aspect-ratio: 4 / 5;
    background: var(--color-ivory);
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 54px rgba(12, 24, 38, 0.08);
}

.nofcc-stories-listing__selected-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nofcc-stories-listing__selected-content {
    max-width: 820px;
    padding-top: clamp(22px, 4vw, 54px);
    color: var(--color-charcoal);
}

.nofcc-stories-listing__selected-story {
    margin-top: clamp(24px, 3vw, 34px);
    color: var(--color-muted);
    font-size: clamp(1.05rem, 1.22vw, 1.2rem);
    line-height: 1.8;
}

.nofcc-stories-listing__selected-story > * {
    margin-top: 0;
}

.nofcc-stories-listing__selected-story > * + * {
    margin-top: 1.35em;
}

.nofcc-stories-listing__selected-story > *:last-child {
    margin-bottom: 0;
}

.nofcc-stories-listing__notice {
    padding: clamp(24px, 3vw, 34px);
    color: var(--color-charcoal);
    background: var(--color-cream);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-red);
    box-shadow: 0 18px 46px rgba(12, 24, 38, 0.045);
}

.nofcc-stories-listing__notice p {
    max-width: 62ch;
    margin: 0;
    color: var(--color-muted);
    font-size: clamp(1.02rem, 1.1vw, 1.12rem);
    line-height: 1.6;
}

.nofcc-stories-listing__notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.nofcc-story-single {
    background: var(--color-warm-white);
}

.nofcc-story-single__breadcrumb {
    padding: clamp(24px, 3vw, 40px) 0 clamp(12px, 1.8vw, 22px);
    background: var(--color-warm-white);
}

.nofcc-story-single__content {
    padding: clamp(20px, 3vw, 38px) 0 clamp(64px, 8vw, 112px);
    background: var(--color-warm-white);
}

.nofcc-story-single__content .container {
    width: min(100% - (var(--gutter) * 2), var(--container-wide));
    max-width: var(--container-wide);
}

.nofcc-story-single__article {
    display: grid;
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(34px, 6vw, 78px);
    align-items: start;
}

.nofcc-story-single__article--no-media {
    grid-template-columns: minmax(0, 900px);
}

.nofcc-story-single__image {
    width: min(100%, 440px);
    margin: 0;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--color-ivory);
    border: 1px solid var(--color-border);
    box-shadow: 0 20px 54px rgba(12, 24, 38, 0.08);
}

.nofcc-story-single__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nofcc-story-single__body {
    max-width: 820px;
    padding-top: clamp(6px, 2vw, 24px);
    color: var(--color-charcoal);
}

.nofcc-story-single__header .eyebrow {
    margin: 0 0 12px;
    color: var(--color-red);
}

.nofcc-story-single__header h1 {
    margin: 0;
    color: var(--color-charcoal);
    font-size: clamp(2.25rem, 4.2vw, 4.8rem);
    line-height: 1.04;
}

.nofcc-story-single__story {
    margin-top: clamp(26px, 3.5vw, 40px);
    color: var(--color-muted);
    font-size: clamp(1.05rem, 1.22vw, 1.2rem);
    line-height: 1.8;
}

.nofcc-story-single__story > * {
    margin-top: 0;
}

.nofcc-story-single__story > * + * {
    margin-top: 1.35em;
}

.nofcc-story-single__story > *:last-child {
    margin-bottom: 0;
}

/* Light panels use dark text; dark panels retain light text. */
.stories :is(.stories-main, .stories-supporting):is(
    [class*="is-style-panel-white-"],
    [class*="is-style-panel-blue-"],
    [class*="is-style-panel-gold-"],
    [class*="is-style-panel-sage-"],
    [class*="is-style-panel-rose-"]
),
.stories :is(.stories-main, .stories-supporting):is(
    [class*="is-style-panel-white-"],
    [class*="is-style-panel-blue-"],
    [class*="is-style-panel-gold-"],
    [class*="is-style-panel-sage-"],
    [class*="is-style-panel-rose-"]
) :where(.eyebrow, .story-support-label, h2, h3, p, a) {
    color: var(--color-charcoal) !important;
}

.stories :is(.stories-main, .stories-supporting)[class*="is-style-panel-dark-"],
.stories :is(.stories-main, .stories-supporting)[class*="is-style-panel-dark-"]
    :where(.eyebrow, .story-support-label, h2, h3, p, a) {
    color: var(--color-white) !important;
}

@media (max-width: 900px) {
    .stories {
        min-height: auto;
        padding: 82px 0 78px;
    }

    .stories-supporting {
        margin-top: 46px;
        padding: 30px;
    }

    .nofcc-featured-stories {
        grid-template-columns: 1fr;
    }

    .stories-main {
        padding: 34px 30px;
    }

    .stories-main:has(.nofcc-media-videos--home) > .wp-block-group__inner-container {
        grid-template-columns: 1fr;
    }

    .stories-main > .wp-block-group__inner-container > .nofcc-media-videos--home {
        grid-column: 1;
        grid-row: auto;
        margin-top: 8px;
    }
}

@media (max-width: 1080px) {
    .nofcc-stories-listing__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .nofcc-stories-intro {
        padding-top: clamp(46px, 10vw, 68px);
    }

    .nofcc-stories-intro .container {
        width: min(100% - 32px, var(--container-wide));
    }

    .nofcc-stories-listing {
        padding: clamp(40px, 9vw, 58px) 0 clamp(46px, 10vw, 68px);
    }

    .nofcc-stories-listing .container {
        width: min(100% - 32px, var(--container-wide));
    }

    .nofcc-stories-listing__grid {
        grid-template-columns: 1fr;
    }

    .nofcc-stories-listing__selected,
    .nofcc-stories-listing__selected--no-media {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .nofcc-stories-listing__selected-image {
        width: 100%;
        max-width: 520px;
        aspect-ratio: 4 / 3;
    }

    .nofcc-stories-listing__selected-content {
        padding-top: 0;
    }

    .nofcc-stories-listing__notice {
        padding: 22px 20px 26px;
    }

    .nofcc-stories-listing__notice-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .nofcc-story-single__breadcrumb {
        padding: 20px 0 10px;
    }

    .nofcc-story-single__content {
        padding: 22px 0 clamp(52px, 11vw, 72px);
    }

    .nofcc-story-single__content .container {
        width: min(100% - 32px, var(--container-wide));
    }

    .nofcc-story-single__article,
    .nofcc-story-single__article--no-media {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .nofcc-story-single__image {
        width: 100%;
        max-width: 540px;
        aspect-ratio: 4 / 3;
    }

    .nofcc-story-single__body {
        padding-top: 0;
    }
}
