body {
    --content-max-width: 1000px;
    --footer-extra-width: 180px;

    background-color: #f5f5f5;
    font-family: 'Lato', sans-serif;
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

main {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    max-width: var(--content-max-width);
    margin: 50px auto 0 auto;
    padding-bottom: 48px;
}

.card {
    background-color: #FFFFFF;
    border-radius: 30px;
    border: 1px solid #DEDEDE;
    margin: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px 0 #00000014;
}

.header {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    box-shadow: 0px 6px 12px #00000014;
    border: 1px solid #DEDEDE;
    border-radius: 30px;
}

.card h1 {
    font-size: 40px;
    font-weight: 700;
    color: #1D232B;
    text-align: center;
    margin: 20px 0 10px 0;
}

.description {
    max-width: 600px;
    font-size: 22px;
    font-weight: 400;
    color: #636A77;
    text-align: center;
    margin: 10px 20px 30px 20px;
}

.ended-initiatives {
    margin: 20px;
}

.ended-initiatives h2 {
    font-size: 22px;
    font-weight: 700;
    color: #636A77;
    text-align: left;
    margin: 0 0 10px;
}

.initiative-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: flex-start;
    gap: clamp(10px, 1.5vw, 40px);
}

/* Viewport band where 3×250px flex tiles wrap; grid keeps three equal columns. */
@media (min-width: 601px) and (max-width: 839px) {
    .initiative-cards {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .initiative-card {
        width: 100%;
        justify-self: center;
    }
}

@media (max-width: 600px) {
    .initiative-cards {
        /* Two equal columns when three-in-a-row is too tight */
        grid-template-columns: repeat(2, minmax(0, 1fr));
        display: grid;
    }

    .initiative-card {
        width: 100%;
        max-width: min(250px, 100%);
        justify-self: center;
    }
}

@media (max-width: 340px) {
    .initiative-cards {
        /* Two equal columns when three-in-a-row is too tight */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .initiative-card {
        width: 100%;
        max-width: 100%;
    }
}

.initiative-card {
    max-width: min(250px, 100%);
    min-width: 0;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #DEDEDE;
    aspect-ratio: 250 / 356;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 3px 6px 0 #00000014;
}

.initiative-card__media {
    flex: 0 0 auto;
    width: 100%;
    aspect-ratio: 1;
    background-color: #dedede;
}

.initiative-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
}

.initiative-card h3 {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    font-size: 16px;
    line-height: 1.35;
    padding: 15px;
    font-weight: 400;
    color: #2f394e;
    text-align: left;
}

.site-footer {
    flex-shrink: 0;
    box-sizing: border-box;
    width: min(95%, calc(var(--content-max-width) + var(--footer-extra-width)));
    margin: 0 auto;
    background-color: #a0a0a0;
    padding: 20px;
    border-radius: 12px 12px 0 0;
}

.site-footer__inner {
    max-width: var(--content-max-width);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.site-footer__brands {
    max-width: 200px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.site-footer__disclaimer {
    margin: 0;
    max-width: 600px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: #fefefe;
    text-align: center;
}

.site-footer__disclaimer a {
    color: #fefefe;
    text-decoration: underline;
}
