@keyframes load {
    0% { opacity: 0; transform: scale(0.7); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(180deg); }
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: 'Josefin Sans', sans-serif;
	font-size: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    background-color: #f4f1ea;
}

header {
    width: 100%;
    text-align: center;
}

main {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

footer {
    width: 100%;
    text-align: center;
    margin-top: 40px;
}

.page-title {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.page-title a {
    display: inline-block;
}

.page-title img {
    max-width: 250px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.page-title a:focus {
    outline: 3px solid #000;
    outline-offset: 4px;
    border-radius: 4px;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
    animation: load 1s ease-out;
    animation-fill-mode: forwards;
    opacity: 0;
}

main > *:nth-child(1) .box-container,
main > .box-container:nth-child(1) {
    animation-delay: 0.2s;
}

main > *:nth-child(2) .box-container,
main > .box-container:nth-child(2) {
    animation-delay: 0.4s;
}

main > *:nth-child(3) .box-container,
main > .box-container:nth-child(3) {
    animation-delay: 0.6s;
}

.box {
    width: 250px;
    height: 250px;
    text-align: center;
    transition: background-color 0.3s;
    box-sizing: border-box;
    perspective: 1000px;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.front, .back {
    border-radius: 10px;
    overflow: hidden;
}

.box.badge-tile {
    background-color: #ffffff;
}

.box.badge-tile .back {
    color: #3C3D35;
    background-color: #ffffff;
    width: 100%;
    padding: 22px 24px;
    line-height: 1.45;
    box-sizing: border-box;
}

.box.badge-tile .back h2 {
    font-size: 1.15em;
    margin: 0 0 10px;
    line-height: 1.25;
    color: #3C3D35;
}

.box.badge-tile .back p {
    margin: 0;
    font-size: 0.92em;
    width: 100%;
    display: block;
    color: #3C3D35;
}

.box:hover .front,
.box-container a:focus .front {
    transform: rotateY(180deg);
}

.box:hover .back,
.box-container a:focus .back {
    transform: rotateY(0deg);
}

.box-container a:focus {
    outline: 3px solid #000;
    outline-offset: 4px;
}

.box1 {
    background-color: #004631;
    color: #004631;
}

.box2 {
    background-color: #381e42;
    color: #381e42;
}

.box3 {
    background-color: #0c2340;
    color: #0c2340;
}

.front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 1s;
}

.front {
    transform: rotateY(0deg);
}

.back {
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: white;
    text-align: left;
    line-height: 1.5em;
    padding: 0px 20px 0px 20px;
    width: 90%;
    background-color: inherit;
}

img {
   width: 100%;
   height: 100%;
   object-fit: contain; 
}


h1 {
    text-align: center;
	font-size: 2em;
}
h2 {
    text-align: left;
	font-size: 1.5em;
	margin:0px;
}
h3 {
   margin-top: 15px;
   font-weight: bold;
}

p {
   margin-top: 10px;
   width: 90%;
   display: flex;
   justify-content: center;
}

a {
   color: inherit;
   text-decoration: underline;
}

a:hover, a:focus {
   text-decoration: underline;
}

.box-container a, .box-container .fa-link {
   color: inherit;
   text-decoration: none;
   transform: scale(0.9);
}

.fa-link {
   margin-right :5px; 
}

@media (min-width :600px) {
   .container {
       flex-direction :row; 
       justify-content :space-around; 
       align-items :flex-start; 
   }
}
