header {
    text-align: center;
    max-width: 450px;
    margin: 64px auto;
    padding: 0 24px;
}
header p {
    margin-top: 16px;
}

#templates_container {
    max-width: 1130px;
    margin: 64px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
#templates_container h4 {
    grid-column: span 3;
    margin: 24px 24px 0 24px;
}
@media only screen and (max-width: 1040px) {
    .theme-grid {
        grid-template-columns: 1fr 1fr;
    }
    #templates_container h4 {
        grid-column: span 2;
    }
}
@media only screen and (max-width: 768px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }
    #templates_container h4 {
        grid-column: span 1;
    }
}
.template-card {
    background-color: #fff;
    box-shadow: 2px 2px 9px #e5e5e5;
    position: relative;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    width: 235px;
    overflow: hidden;
    margin: 36px 24px;
    height: 225px;
    transition: all 0.2s;
    top: 0;
    left: 0;
    border: 1px solid #ddd;
}

.template-card:hover {
    top: -4px;
    left: -4px;
    box-shadow: 6px 6px 9px #e5e5e5;
}

.template-card a {
    position: relative;
    height: 100%;
}
.template-card img {
    position: absolute;
    bottom: calc(0 - 195px);
    transition: all 4s;
}
.template-card .thumbnail {
    height: 100%;
    background-position-y: 0;
    transition: all 7s ease-out;
}
@media only screen and (min-width:992px) {
    .template-card:hover .thumbnail {
        background-position-y: calc( 100% - 47px);
    }
}
@media only screen and (max-width:991px) {
    .template-card.visible .thumbnail {
        background-position-y: calc( 100% - 47px);
    }
}
.template-card a:link,
.template-card a:active,
.template-card a:visited,
.template-card a:hover {
    color: #0A2145;
    text-decoration: none;
}

.template-card span {
    display: flex;
    align-content: space-between;
    justify-content: space-between;
    padding: 12px;
    position: absolute;
    bottom: 0;
    width: calc(100% - 24px);
    background-color: #fefefe;
    border-top: 1px solid #ddd;
    transition: all 0.1s;
}
.template-card a:active span {
    background-color: #f1f1f1;
}

.template-card span p {
    font-size: 18px;
}

.template-card span p:first-child {
    font-weight: 700;
}
.template-card span p:last-child {
    opacity: 0.6;
}
#templates_container .theme-grid h4 {
    display: flex;
}
#templates_container .theme-grid h4:after {
    content: '';
    height: 1px;
    margin-left: 20px;
    width: 100%;
    background-color: #ddd;
    position: relative;
    top: 50%;
}
.components {
    display: flex;
    flex-direction: column;
    align-items: center;
}