/* Example-campaign cards on the cause landing pages (templates/static/cause.html.twig).
   The campaign's main picture is the card background; a dark gradient keeps the white text legible. */
.saatiot .saatiot__card--pic {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    padding: 20px;
    border-color: #282828;
    background-color: #282828;
    background-size: cover;
    background-position: center;
    color: #fff;
    overflow: hidden;
}

.saatiot .saatiot__card--pic::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.45) 0%, rgba(20, 20, 20, 0.88) 100%);
}

.saatiot .saatiot__card--pic > * {
    position: relative;
}

.saatiot .saatiot__card--pic h3,
.saatiot .saatiot__card--pic h3 a,
.saatiot .saatiot__card--pic p {
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.saatiot .saatiot__card--pic h3 a {
    text-decoration: none;
}

.saatiot .saatiot__card--pic h3 a:hover,
.saatiot .saatiot__card--pic h3 a:focus {
    text-decoration: underline;
}

/* The whole card is clickable through the title link */
.saatiot .saatiot__card--pic h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.saatiot .saatiot__stats-line span {
    white-space: nowrap;
}

.saatiot .saatiot__stats-line span:not(:last-child)::after {
    content: " \00b7";
}

.saatiot .saatiot__card--pic h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

/* Way cards that lead to a guide page: the whole card is a link */
.saatiot .saatiot__card--link {
    position: relative;
}

.saatiot .saatiot__card--link h3 a {
    color: inherit;
    text-decoration: none;
}

.saatiot .saatiot__card--link h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.saatiot .saatiot__card--link:hover,
.saatiot .saatiot__card--link:focus-within {
    border-color: var(--saatiot-orange);
}

.saatiot .saatiot__card-more {
    color: var(--saatiot-orange);
    font-weight: 600;
}

/* Light, varied hero (replaces the dark pro-page hero on the cause pages).
   Flat tints from the brand palette; the picture comes from an example campaign. */
.saatiot .saatiot__hero--light {
    --hero-bg: #faf9f6;
    padding: 0;
    background: var(--hero-bg);
    color: #282828;
    display: grid;
    grid-template-columns: 1fr;
    overflow: hidden;
}

.saatiot .saatiot__hero--cream { --hero-bg: #f5e6d0; }
.saatiot .saatiot__hero--mint  { --hero-bg: #e8f6f8; }
.saatiot .saatiot__hero--sky   { --hero-bg: #afdfe5; }
.saatiot .saatiot__hero--peach { --hero-bg: #fbe3d3; }
.saatiot .saatiot__hero--paper { --hero-bg: #f2f1ec; }

.saatiot .saatiot__hero--light .saatiot__hero-body {
    padding: 32px 28px 36px;
}

.saatiot .saatiot__hero--light .saatiot__eyebrow {
    color: #127a85;
}

.saatiot .saatiot__hero--sky .saatiot__eyebrow {
    color: #0e5c64;
}

.leftside.simple .saatiot .saatiot__hero--light h1 {
    color: #282828;
}

.leftside.simple .saatiot .saatiot__hero--light .saatiot__lead {
    color: #3a3a3a;
}

.saatiot .saatiot__hero--light .saatiot__button--ghost {
    border-color: #282828;
    color: #282828;
}

.saatiot .saatiot__hero--light .saatiot__button--ghost:hover,
.saatiot .saatiot__hero--light .saatiot__button--ghost:focus-visible {
    background: #282828;
    border-color: #282828;
    color: #fff;
}

.saatiot .saatiot__hero-media {
    min-height: 200px;
    background: rgba(255, 255, 255, 0.4);
}

.saatiot .saatiot__hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 25%;
}

.saatiot .saatiot__hero-media--contain {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.saatiot .saatiot__hero-media--contain img {
    width: auto;
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
}

/* Phones: the picture goes on top of the text in every layout except "plain" */
.saatiot .saatiot__hero--light .saatiot__hero-media {
    order: -1;
    aspect-ratio: 16 / 9;
}

/* Side-by-side only when the content column itself is wide enough (container query),
   not by window width: with the sidebar the column is much narrower than the window. */
.saatiot {
    container-type: inline-size;
}

@container (min-width: 560px) {
    .saatiot .saatiot__hero--right,
    .saatiot .saatiot__hero--left {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    }

    .saatiot .saatiot__hero--right .saatiot__hero-media,
    .saatiot .saatiot__hero--left .saatiot__hero-media {
        order: 0;
        aspect-ratio: auto;
        min-height: 320px;
    }

    .saatiot .saatiot__hero--left {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }

    .saatiot .saatiot__hero--left .saatiot__hero-media {
        order: -1;
    }

    .saatiot .saatiot__hero--top .saatiot__hero-media {
        aspect-ratio: 21 / 8;
    }
}

/* No automatic hyphenation in the light hero titles */
.leftside.simple .saatiot .saatiot__hero--light h1 {
    hyphens: manual;
    overflow-wrap: break-word;
}
