/* 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;
}

/* 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-link h3,
.stories.has-parallax h2,
.stories.has-parallax .story-support-link h3 {
    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 links */
.stories-supporting {
    max-width: 820px;
    margin: 54px 0 0;
    padding-top: 34px;
    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: grid !important;
    grid-template-columns: repeat(2, minmax(220px, 360px));
    gap: 56px;
}

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

.story-support-link {
    display: block;
    max-width: 360px;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit;
    text-decoration: none;
}

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

.story-support-link + .story-support-link {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.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-link h3 {
    max-width: 360px;
    margin: 0 0 14px;
    line-height: 1.06;
}

.story-support-link p {
    max-width: 360px;
    margin: 0;
    line-height: 1.62;
}

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

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

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

    .stories-supporting,
    .stories-supporting > .wp-block-group__inner-container {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}
