/* Declare fonts */

@font-face {
    font-family: Amatic;
    src: url(fonts/Amatic_SC/AmaticSC-Regular.ttf);
    font-weight: 400;
}
@font-face {
    font-family: AmaticBold;
    src: url(fonts/Amatic_SC/AmaticSC-Bold.ttf);
    font-weight: 700;
}

/* Main body and universal formatting */

body {
    background-color: #E7E5DF;
    font-family: Amatic, Arial, Helvetica, sans-serif;
}

h1 {font-size: 3em; font-weight: bold;}
h2 {font-size: 2em; font-weight: bold;}
h3 {font-size: 1.5em; font-weight: bold;}
h4 {font-size: 1em; font-weight: bold;}

li a {
    display: block;
    width: 100%;
    height: 100%;
    text-align: center;
    text-decoration: none;
}

/* Header */

header {
    position: sticky;
    background-color: #E7E5DF;
    top: 0;
    box-shadow: #393e41 0px 0px 20px;
}
.root_header {
    /* Ensure readability on wide screens */
    max-width: 1000px;
    min-height: 5vh;
    margin-left: auto;
    margin-right: auto;
    /* Internal positioning with flexbox */
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: stretch;
}
.root_header * {
    margin-top: auto;
    margin-bottom: auto;
    height: 100%;
}
.root_header ul{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
.root_header ul li {
    font-size: 1.2em;
}
.root_header ul li a span{
    color: #393e41;
    padding: 1em;
}
.root_header ul li:hover a {color: #4e937a;}
.root_header ul li:hover {background-color: #d1cdc2;}


.root_header ul li:not(:last-child) {
    border-right: 3px solid #d1cdc2;
}

/* Hero */

.hero {
    /* Define background with fallback */
    background-color: #4E937A;
    background-image: url(../img/hero_background.jpg);
    background-size: cover;
    background-position: bottom center;
    background-attachment: fixed;
    /* Take up all the front of the page */
    min-height: 95vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.small_hero {
    min-height: 20vh;
    background-size:  cover;
    background-position: center;
    background-image: url(../img/hero_small_background.jpg);
}
.hero_text {
    color: white;
    width: 80vw;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: black 0px 0px 10px;
}
.hero_text h1 {font-size: 3em; font-weight: bold;}
.hero_text p {font-size: 2em;}

/* Sections */
section {
    margin: 0 auto; 
    padding: 2vh 0;
    min-height: 10vh;
}
section.text_section {
    width: 50vw;
    max-width: 1000px;
}
section h2:first-of-type {text-align: center;}
section.text_section p {font-size: 1.5em;}
section:not(:first-of-type) {margin-top: 5vh;}
section:last-of-type {margin-bottom: 5vh;}

/* Testimonials section */

section.testimonials {
    margin-left: auto;
    margin-right: auto;
}
section.testimonials div.testimonials {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
}
section.testimonials div.testimonials div {
    max-width: 30vw;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
}
section.testimonials div.testimonials div div img {border-radius: 100%;}
section.testimonials div.testimonials div div * {
    display: block;
    width: 100%;
}
div.testimonial_text {
    text-align: center;
    display: block!important;
    margin-top: 2vh;
}

/* Gallery section */

section.gallery {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 1em;
    margin-left: auto;
    margin-right: auto;
    margin-top: -3em;
}
div.gallery_item {
    padding: 1em;
    border-radius: 16px;
    background-color: #d1cdc2;
}
div.gallery_item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    min-width: 20vw;
    max-width: 30vw;
    border-radius: 16px 16px 0 0;
    padding-bottom: 0.5em;
    margin-left: auto;
    margin-right: auto;
}
div.gallery_item h4 {
    text-align: center;
}
div.gallery_item p {
    max-width: 30vw;
}

/* Footer */

footer div.footer {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    padding: 2em;
}
footer div.footer div {
    margin-left: auto;
    margin-right: auto;
}

/* Footer return to top button */

footer button{
    background-color: #4E937A;
    font-size: 1.4em;
    width: 100%;
    padding: 1vh 4vw;
}
footer button:hover {
    background-color: #85b79d;
}

/* Mobile overrides */

/* All smaller screens */

@media only screen and (max-width: 900px) {
    /* On smaller screens place navbar horizontally below logo */
    .root_header {flex-direction: column;}
    .root_header * {margin-left: auto; margin-right: auto;padding-top: 1vh;}
    .root_header ul li {padding: 0.5em 8vw;}
    section.text_section {width: 80vw;}
    section.testimonials {max-width: 90vw;}
    section.testimonials div.testimonials {flex-direction: column;}
    section.testimonials div.testimonials div {flex-direction: row;max-width: none;}
    div.testimonial_text {
        width: 60%;
        margin-top: none;
        margin-top: auto;
        margin-bottom: auto;
    }
    footer div.footer {flex-direction: column; padding: 2em 0; width: 80%;}
    footer div.footer div {text-align: left;margin-left: 5vw; font-size: 1.2em;}
    footer div.footer div:not(:first-of-type) {margin-top: 1em;}
    .small_hero {text-align: center;}
    div.gallery_item img {
        min-width: 30vw;
        max-width: 60vw;
    }
    div.gallery_item p {
        min-width: 30vw;
        max-width: 60vw;
    }
}

/* Tiny mobile screens */

@media only screen and (max-width: 540px) {
    /* On tiny screens place navbar vertically below logo */
    header {position: initial;}
    .root_header li {text-align: center;}
    .root_header ul {flex-direction: column;}
    .root_header ul li {padding: 0.4em 12vw;}
    .root_header ul li:not(:last-child) {
        border-right: none;
        border-bottom: 3px solid #d1cdc2;
    }
    section.testimonials div.testimonials div {flex-direction: column;max-width: none;}
    div.testimonial_text {
        margin-top: 2vh;
        width: 80%;
    }
    section.text_section {width: 90vw;}
    div.gallery_item img {
        min-width: 60vw;
        max-width: none;
    }
    div.gallery_item p {
        min-width: 60vw;
        max-width: none;
    }
}