body {
    font-family: "Roboto", "Noto Sans", sans-serif;
    color: var(--color-grey-1);
    gap: 1rem;
}

main {
    max-width: 1200px;
    margin-inline: auto;
}

#resources-banner {
    max-width: 1200px;
    margin-inline: auto;
    padding: 2rem 1rem;

    display: grid;
    gap: 1rem;
    justify-items: center;
    font-size: 1.25rem;
}

@media screen and (min-width: 768px) {
    #resources-banner {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto;
        align-items: center;
        row-gap: 18px;
        column-gap: 2rem;

        padding-block: 2rem;
        padding-inline: 0;

        max-width: 960px;

        >h2 {
            grid-row: 1;
            font-size: 1.75rem;
            align-self: self-start;
            justify-self: start;
        }

        >p {
            grid-row: 2;
            align-self: self-start;
        }

        >img {
            grid-column: 2;
            grid-row: 1 / span 3;
            max-width: 300px;
            justify-self: center;
            width: 100%;
        }
    }
}

#resources {
    gap: 1rem;
}

#resources>div {
    display: grid;
    gap: 2rem;
    padding-block: 1rem;

    article {
        border: 1px solid #ccc;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 0 18px 0 var(--color-grey-6);

        display: grid;
        grid-template-rows: auto auto auto 1fr auto;
    }

    article>p {
        align-self: start;
    }

    article.video {
        .resource-type {
            background-color: var(--color-background-2);
            color: var(--color-grey-1);
            fill: var(--color-grey-1);
        }
    }

    article.module {
        .resource-type {
            background-color: var(--color-secondary);
            color: var(--color-grey-1);
            fill: var(--color-grey-1);
        }
    }

    article.download {
        .resource-type {
            background-color: var(--color-grey-6);
            color: var(--color-grey-1);
            fill: var(--color-grey-1);
        }
    }

    h3 {
        padding: 1rem;

        a {
            color: var(--color-grey-1);
        }
    }

    p {
        padding-inline: 1rem;
        padding-block-end: 1rem;
        color: var(--color-grey-1);
    }

    .resource-type {
        display: flex;
        align-items: center;
        gap: .25rem;

        background-color: var(--color-primary);
        padding: .25rem;
        color: white;
        font-weight: 600;

        fill: white;
    }

    footer {
        border-block-start: 1px solid #ccc;
        padding: .5rem 1rem;

        display: flex;
        align-items: center;
        gap: .5rem;

        .icon {
            width: 24px;
            height: 24px;
        }
    }

    img {
        max-width: 100%;
        max-height: 110px;
        object-fit: cover;
        display: block;
    }
}

@media screen and (min-width: 768px) {
    #resources>div {
        display: grid;
        grid-template-columns: 1fr 1fr;
        row-gap: 3rem;
    }
}

@media screen and (min-width: 1200px) {
    #resources>div {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

#resources-filter {
    font-size: 1rem;

    .field {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        align-items: center;
    }

    select {
        padding: 10px;
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 4px;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333'><path d='M3 5h6L6 9z'/></svg>");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-color: white;
        padding-right: 30px;
    }

    label {
        font-size: 1rem;
        font-weight: 600;
    }
}

@media screen and (min-width: 768px) {
    #resources-filter {
        .field {
            grid-template-columns: auto 1fr;
        }
    }
}
