/**
 * The Angel Tree section on the home page (KMT_Home_Flyer): two matching white
 * cards, families on the left and donors on the right, each a picture, an
 * eyebrow, a heading, text and buttons. The buttons reuse the home page's own
 * .kmt-btn styles; this lays the section out and adds the outline secondary
 * button the home page has no style for.
 */
.kmt-angel-flyer {
    background-color: var(--neutral-100, #F5F5F5);
}

.kmt-angel-flyer__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
    max-width: 1440px;
    width: 85%;
    margin: 0 auto;
    padding: 64px 0;
}

.kmt-angel-flyer--donors-only .kmt-angel-flyer__inner {
    grid-template-columns: minmax(0, 720px);
    justify-content: center;
}

.kmt-angel-flyer__half {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 40px;
    border-radius: 12px;
    background-color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.kmt-angel-flyer__image {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 0 32px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    transition: transform 150ms ease;
}

.kmt-angel-flyer__image:hover {
    transform: translateY(-4px);
}

.kmt-angel-flyer__image img {
    display: block;
    width: 100%;
    height: auto;
}

.kmt-angel-flyer__eyebrow {
    margin: 0 0 8px;
    padding: 0;
    font-family: var(--font-body, 'Open Sans', sans-serif);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-primary, #2f3193);
}

.kmt-angel-flyer__title {
    margin: 0 0 16px;
    padding: 0;
    font-family: var(--font-headline, 'Poppins', sans-serif);
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: #000000;
}

.kmt-angel-flyer__text,
.kmt-angel-flyer__deadline {
    max-width: 480px;
    margin: 0 0 16px;
    padding: 0;
    font-size: 18px;
    line-height: 1.6;
    color: #333333;
}

.kmt-angel-flyer__deadline {
    font-weight: 700;
}

.kmt-angel-flyer__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.kmt-angel-flyer__body > :last-child {
    margin-bottom: 0;
}

/* Pinned to the foot, so the two cards' buttons line up whatever the text
 * length. Side by side while they fit, stacked when they do not. */
.kmt-angel-flyer__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: auto;
}

/* Secondary: outlined in the brand purple. The outline is an inset shadow,
 * not a border, so it is exactly as tall as the filled button beside it. */
.kmt-angel-flyer__btn-secondary {
    background-color: #FFFFFF;
    color: var(--brand-primary, #2f3193);
    box-shadow: inset 0 0 0 2px var(--brand-primary, #2f3193);
}

.kmt-angel-flyer__btn-secondary:hover {
    background-color: #E5EBFA;
    color: var(--brand-primary, #2f3193);
    transform: translateY(-2px);
}

/*
 * Row for row across the two cards: each card's five children (picture,
 * eyebrow, heading, body, button) sit on rows the cards share, so a heading
 * that wraps to two lines in one card moves the other card's text down with
 * it. Without subgrid the cards fall back to the flex column above.
 */
@supports (grid-template-rows: subgrid) {
    .kmt-angel-flyer__inner {
        grid-template-rows: repeat(5, auto);
        row-gap: 32px;
    }

    .kmt-angel-flyer__half {
        display: grid;
        grid-row: span 5;
        grid-template-rows: subgrid;
        row-gap: 0;
        justify-items: center;
        /* Top of each shared row, not the flex column's centring. */
        align-items: start;
        align-content: start;
    }

    .kmt-angel-flyer__actions {
        align-self: end;
    }
}

@media screen and (max-width: 980px) {
    .kmt-angel-flyer__inner {
        grid-template-columns: minmax(0, 1fr);
        padding: 48px 0;
    }

    .kmt-angel-flyer__half {
        padding: 40px 24px;
    }

    .kmt-angel-flyer__title {
        font-size: 28px;
    }
}

@media screen and (max-width: 600px) {
    .kmt-angel-flyer__inner {
        width: auto;
        margin: 0 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kmt-angel-flyer__image,
    .kmt-angel-flyer__image:hover,
    .kmt-angel-flyer__btn-secondary:hover {
        transition: none;
        transform: none;
    }
}
