/* Homepage stories section */

.stories-home {
    padding: 76px 24px 84px;
    background: var(--color-background);
}

.stories-home__inner {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.stories-home__heading {
    max-width: 760px;
    margin: 0 auto 42px;
    text-align: center;
}

.stories-home__heading .section-eyebrow {
    margin-bottom: 14px;
}

.stories-home__heading h1,
.stories-home__heading h2 {
    margin: 0 0 18px;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.2;
}

.stories-home__heading > p:last-child {
    margin: 0;
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1.75;
}

/* Story cards */

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.story-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 5px 22px rgba(32, 43, 70, 0.045);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.story-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(32, 43, 70, 0.10);
}

.story-card__image-link {
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    background: #eef0f6;
}

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.story-card:hover .story-card__image {
    transform: scale(1.035);
}

.story-card__image-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: var(--color-hero);
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
}

.story-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
}

.story-card__country {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: var(--color-primary);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.5;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.story-card__country .country-flag {
    width: 24px;
    height: 16px;
}

.story-card__title {
    margin: 0 0 10px;
    font-size: 25px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.story-card__title a:hover {
    color: var(--color-primary);
}

.story-card__author {
    margin: 0 0 14px;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.5;
}

.story-card__description {
    margin: 0 0 24px;
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.75;
}

.story-card__actions {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.story-card__actions .button {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
}

.stories-home__footer {
    display: flex;
    justify-content: center;
    margin-top: 42px;
}

/* Homepage introduction */

.intro-section {
    max-width: 920px;
    margin: 0 auto;
    padding: 76px 24px 92px;
}

.intro-section h2 {
    max-width: 800px;
    margin: 0 0 20px;
    font-size: clamp(29px, 3.5vw, 42px);
    line-height: 1.25;
}

.intro-section p:not(.section-eyebrow) {
    max-width: var(--reading-width);
    color: var(--color-muted);
}

/* Story Map banner on the homepage, above the story cards */
.stories-map-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 34px;
    padding: 17px 22px;
    border: 1px solid #dce2e9;
    border-radius: 12px;
    background: linear-gradient(105deg, #f0f3ef 0%, #edf2f3 100%);
}

.stories-map-banner__message {
    margin: 0;
    color: #202b46;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
}

.stories-map-banner__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 8px;
    background: #202b46;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease;
}

.stories-map-banner__link:hover {
    background: #35466b;
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .stories-map-banner {
        align-items: flex-start;
        flex-direction: column;
        padding: 17px;
    }

    .stories-map-banner__link {
        max-width: 100%;
    }
}