/* ==========================================================
   STORY TEASER GRID – matching New Offerings structure
   ========================================================== */

.c-story-grid {
    padding: var(--section-pad-y) 0;
    background: var(--color-light);
    position: relative;
    overflow: hidden;
}

.c-story-grid--has-bg {
    background-color: transparent;
}

.c-story-grid__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
}

.c-story-grid .container {
    position: relative;
    z-index: 2;
}

/* ── Header – identical to .c-new-offerings__header ── */
.c-story-grid__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

.c-story-grid__title {
    text-align: left;
    font-size: var(--font-size-h2);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 0;
}

.c-story-grid__view-all {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-black);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.2s;
}
.c-story-grid__view-all:hover {
    color: var(--color-primary-hover);
}

/* ── Intro text (below header) ────────────────────── */
.c-story-grid__body {
    margin: 0 auto 2.5rem;
    font-size: var(--font-size-body);
    line-height: 1.7;
    color: var(--color-text-muted);
    max-width: 800px;
    text-align: center;
}

/* ── Carousel – centred cards via spacer pseudo‑elements ─── */
.c-story-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    max-width: 100%;
    margin: 0 auto;
    /* No negative margins, no extra padding – spacers handle the centering */
}

.c-story-carousel::-webkit-scrollbar {
    display: none;
}

/* Invisible spacers that push the first and last cards to the centre */
.c-story-carousel::before,
.c-story-carousel::after {
    content: '';
    flex: 0 0 auto;
}

/* Default spacer width (mobile) */
.c-story-carousel::before,
.c-story-carousel::after {
    width: calc( (100% - 14rem) / 2 );
}

@media (min-width: 600px) {
    .c-story-carousel::before,
    .c-story-carousel::after {
        width: calc( (100% - 16rem) / 2 );
    }
}

@media (min-width: 1024px) {
    .c-story-carousel::before,
    .c-story-carousel::after {
        width: calc( (100% - 18rem) / 2 );
    }
}

/* Card width – unchanged */
.c-story-carousel .c-story-card {
    flex: 0 0 auto;
    width: 75vw;
    max-width: 14rem;
    scroll-snap-align: start;
}

@media (min-width: 600px) {
    .c-story-carousel .c-story-card {
        max-width: 16rem;
    }
}

@media (min-width: 1024px) {
    .c-story-carousel .c-story-card {
        max-width: 18rem;
    }
}

/* ── Story card – identical styling to .c-offering-card ── */
.c-story-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.c-story-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

/* Image – fixed height, no longer a whole‑card link wrapper */
.c-story-card__image {
    height: 10rem;
    overflow: hidden;
    background: var(--color-border);
}
.c-story-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.c-story-card:hover .c-story-card__image img {
    transform: scale(1.04);
}

/* Text content – matches .c-offering-card__content */
.c-story-card__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Label – hidden (was only used in old design) */
.c-story-card__label {
    display: none;
}

.c-story-card__title {
    font-size: var(--font-size-h4);
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

/* Learn More link – matches .c-offering-card__link exactly */
.c-story-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    transition: color 0.2s ease;
    margin-top: auto;
}
.c-story-card__link:hover {
    color: var(--color-primary-hover);
}
.c-story-card__link::after {
    content: ' →';
    font-size: 1.1em;
}

/* ── Mobile adjustments (matching new‑offerings) ────── */
@media (max-width: 599px) {
    .c-story-grid {
        padding-top: 1.5rem;
        padding-bottom: 3rem;
    }

    .c-story-grid__header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin-top: 0;
        margin-bottom: 1.5rem;
    }

    .c-story-grid__title {
        text-align: center;
    }

    h2.c-story-grid__title {
        margin-top: 0 !important;
        margin-bottom: 0.5rem;
    }

    .c-story-carousel {
        gap: 1.5rem;
    }

    /* Override spacer widths for mobile */
    .c-story-carousel::before,
    .c-story-carousel::after {
        width: calc( (100% - 75vw) / 2 );
    }

    .c-story-carousel .c-story-card {
        max-width: 75vw;
    }
}

/* Accent word inside story title (e.g., "interesting") */
.c-story-grid__title .c-script-underline {
    font-style: italic;
    color: var(--color-primary);
}