.header {
    background-image: radial-gradient(rgba(0, 0, 0, .8), rgba(0, 0, 0, .7)), url(../images/DanceWeTeachCover.jpg);
    background-position: 33% 100%;
    background-attachment: scroll;
}

.header span {
    display: block;
}

.card-item .main-link,
.template-text-2 {
    color: var(--offwhite);
}

.template-angle {
    grid-row: 2 / 3;
}

.template-angle picture {
    max-width: 500px;
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    margin-bottom: -2em;
    justify-self: center;
}

.template-body {
    background-image: linear-gradient(
        174deg,
        rgba(235, 235, 235, .8) 0%,
        rgba(235, 235, 235, .8) 80%,
        var(--arthurMurrayBlue) 80.08%,
        var(--arthurMurrayBlue) 100%
    ),
    url(../images/FootprintsBackground.svg);
}

.card-text p {
    margin: 0;
}

#card23 {
    grid-column: 1 / 4;
    max-width: 800px;
}

.card-item picture {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    width: 150px;
    height: 150px;
    justify-self: center;
    align-self: center;
}

.card-item#card23 {
    grid-template-rows: 100px 60px auto;
}

.card-item h3 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
    align-self: end;
    padding: .5rem 0;
    margin: 0;
    text-shadow: 0 0 5px #fff;
    color: var(--arthurMurrayBlue);
    z-index: 1000;
    font-size: var(--h3);
}

.card-item#card23 h3 {
    margin: 0 1em;
    font-size: var(--h5);
}

.card-item#card23 picture {
    width: 300px;
    height: 80px;
    margin: 0;
}

.card-item#card23 picture img {
    margin-bottom: 0;
}

#card23 span {
    display: inline-block;
}

#country > p:last-of-type {
    margin: 3em auto 5em;
    padding: 0 1em;
    max-width: 700px;
}

.card-text a {
    color: #000;
}

.card-text a:hover {
    color: #777;
    color: var(--arthurMurrayBlue);
    transition: .3s ease-out;
}

/* Media Queries */
@media screen and (min-width: 600px) {
    @media not all and (-webkit-min-device-pixel-ratio: 0), not all and (min-resolution: .001dpcm) {
        @supports (-webkit-appearance: none) {
            .card-item {
                margin: .5em;
            }
        }
    }
}

@media screen and (min-width: 565px) {
    .card-item#card23 {
        grid-template-rows: 100px 40px auto;
    }
}

@media screen and (min-width: 615px) {
    .header {
        background-size: cover;
        background-position-y: 50%;
    }

    .header span {
        display: inline-block;
    }

    .template-body {
        background-image: linear-gradient(
            174deg,
            rgba(235, 235, 235, .8) 0%,
            rgba(235, 235, 235, .8) 80%,
            var(--arthurMurrayBlue) 80.08%,
            var(--arthurMurrayBlue) 100%
        ),
        url(../images/FootprintsBackground.svg);
    }
}

@media screen and (min-width: 1000px) {
    .template-body {
        background-image: linear-gradient(
            174deg,
            rgba(235, 235, 235, .8) 0%,
            rgba(235, 235, 235, .8) 64%,
            var(--arthurMurrayBlue) 64.08%,
            var(--arthurMurrayBlue) 87%
        ),
        url(../images/FootprintsBackground.svg);
    }

    .template-angle picture {
        margin-bottom: -3em;
        justify-self: center;
        grid-column: 3 / 5;
    }

    .template-angle {
        grid-row: 1 / 2;
    }

    .header {
        background-position: 50% 0;
        background-attachment: fixed;
    }
}

/* Additional Rules */
.cards,
.doorways {
    justify-content: center;
}

.doorways {
    margin: 0;
    background-color: var(--white);
    z-index: 1;
    position: relative;
    padding: 5em 0 0;
    display: grid;
    grid-template-columns: minmax(1fr, 1200px);
}

#country > p,
.doorways h2 {
    text-align: center;
}

.cards {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1em;
    padding: 0 1em;
    max-width: 1200px;
}

@media not all and (-webkit-min-device-pixel-ratio: 0), not all and (min-resolution: .001dpcm) {
    @supports (-webkit-appearance: none) {
        .cards {
            margin: .5em;
        }
    }
}

.card-item {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 190px 50px auto;
    width: 100%;
    flex: 2 1 330px;
    max-width: 330px;
    background-color: var(--offwhite);
    border: 2px solid var(--lightgray);
    text-align: center;
    overflow: hidden;
}

.card-text {
    grid-column: 1 / 2;
    grid-row: 3 / 4;
    display: flex;
    grid-template-columns: auto;
    grid-template-rows: auto;
    gap: .5em;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0 1em 1em;
}

.classes {
    font-weight: 500;
    font-size: .7em;
    line-height: 2;
    letter-spacing: 1.1px;
    font-family: "Montserrat", sans-serif;
}

.card {
    align-self: center;
}

@media screen and (min-width: 1000px) {
    #card23 {
        grid-column: 1 / 4;
    }

    #card23 picture {
        width: 700px;
        height: 180px;
    }

    #card23 h3 {
        font-size: var(--h5);
    }
}
