/* Google fonts import */

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600&display=swap");

/* Asterisk wildcard selector to override default styles added by the browser */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* General styles */

.active {
    border-bottom: 1px solid #114664;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #114664;
    font-family: "Montserrat", sans-serif;
}

h1,
h2,
h3 {
    font-family: "Montserrat", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #114664;
}

#faq h2,
#gallery h2,
#sign-up h2 {
    padding: 1rem 1.5rem;
    text-align: center;
}

h4 {
    font-family: "Montserrat", sans-serif;
    letter-spacing: 2px;
    color: #114664;
}

p,
li {
    font-family: "Montserrat", sans-serif;
    color: #114664;
    list-style-type: none;
    margin-top: 10px;
}

.hidden-heading {
    display: none;
}

/* Header */

header {
    background-color: white;
    color: #114664;
    padding: 0 1rem;
    position: fixed;
    z-index: 99;
    width: 100%;
    box-shadow: 0 2px 2px #114664;
    display: flex;
    justify-content: space-between;
    align-items: safe center;
}

header a {
    text-decoration: none;
    color: inherit;
}

header img {
    display: block;
    max-width: 100%;
}

#menu {
    list-style-type: none;
    font-family: "Montserrat", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 1em;
}

/* Navbar styles with dropdown toggle - credit to Love Running Walkthrough */

nav {
    position: absolute;
    background-color: white;
    width: 100%;
    left: 0;
    padding: 0 1rem;
    box-shadow: 0 2px 2px #114664;
    display: none;
    top: 100%;
}

/* Nav toggle */

#nav-toggle:checked ~ nav {
    display: block;
}

#nav-toggle {
    display: none;
}

.nav-toggle-label {
    font-size: 2rem;
}

/* Main */

main {
    background-color: #7ed858;
    flex: 1 0 auto;
    margin-top: 40px;
}

/* Hero section */

#hero {
    height: 600px;
    width: 100%;
    background: url("../images/hero-image1.jpg") no-repeat center center/cover;
    position: relative;
    background-position: 50% 15%;
    /* code from https://developer.mozilla.org/en-US/docs/Web/CSS/background-position */
}

#hero-faq {
    height: 400px;
    width: 100%;
    background: url("../images/faq-hero.jpg") no-repeat center center/cover;
    position: relative;
    background-position: 50% 25%;
}

#gallery-hero {
    height: 400px;
    width: 100%;
    background: url("../images/gallery-hero.jpg") no-repeat center center/cover;
    position: relative;
}

#sign-up-hero {
    height: 400px;
    width: 100%;
    background: url("../images/sign-up-hero.jpg") no-repeat center center/cover;
    position: relative;
    background-position: 50% 25%;
}

#hero-faq h2,
#gallery-hero h2,
#sign-up-hero h2 {
    font-size: 2rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    color: #114664;
    background-color: rgba(126, 216, 88, 0.9);
    padding: 15px;
    text-align: center;
    border: 1px solid white;
    width: 80%;
}

#cover-text {
    background-color: rgba(126, 216, 88, 0.9);
    font-size: 1.2rem;
    position: absolute;
    width: 100%;
    bottom: 30px;
    padding: 15px;
    text-align: center;
    border: 1px solid white;
    width: 80%;
    left: 10%;
}

.cta-button {
    display: inline-block;
    color: #114664;
    border: 1px solid #114664;
    background: #f0f0f0;
    border-radius: 2px;
    vertical-align: middle;
    max-width: fit-content;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    margin-top: 5px;
    margin-bottom: 5px;
}

.cta-button:hover {
    background-color: #fafafa;
}

/* what-how-where section */

#what-how-where {
    display: flex;
    flex-direction: row;
    width: 100%;
}

#what-how-where div {
    color: #fafafa;
    padding: 1rem 1.5rem;
    flex-basis: 100px;
    flex-grow: 1;
    border: 1px solid white;
}

#what-how-where h2 {
    margin-bottom: 20px;
    text-align: center;
}

#what {
    background-color: #37b6ff;
}

#how {
    background-color: #7ed858;
}

#where {
    background-color: #ffbf58;
}

/* FAQs Section credit to Cubixsolution */

.accordion {
    background-color: #37b6ff;
    font-family: "Montserrat", sans-serif;
    cursor: pointer;
    font-size: 1.2rem;
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    transition: 0.4s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    padding: 1rem 1.5rem;
    background-color: #ffbf58;
}

.faq {
    margin: 10px 0;
}

.faq.active {
    border: none;
}

/* Gallery - code adapted from Love Running walkthrough */

#photos {
    column-count: 3;
}

#photos img {
    width: 100%;
    line-height: 1em;
    border: 1px solid white;
}

#photos {
    line-height: 0;
}

/* Sign Up page - adapted from Love Running Walkthrough*/

#signup {
    background-position: center;
    position: relative;
}

#signup-form {
    padding: 1rem 1.5rem;
    max-width: 400px;
    left: 10%;
    top: 150px;
    font-family: "Montserrat", sans-serif;
    color: #114664;
    margin: auto;
}

.text-input {
    background: #fafafa;
    color: #114664;
    width: 100%;
    height: 25px;
    margin: 5px 0 20px 0;
    border: 1px solid #114664;
    font-family: "Montserrat", sans-serif;
    border-radius: 2px;
    padding: 0 5px;
}

#where-did-you-here {
    width: 100%;
    height: 26px;
    margin: 5px 0 20px 0;
    font-family: "Montserrat", sans-serif;
    color: #114664;
    border: 1px solid #114664;
    border-radius: 2px;
}

.join-button {
    margin-top: 20px;
    border-radius: 2px;
    padding: 15px 32px;
    font-size: 1rem;
    border: 1px solid #114664;
    color: #114664;
}

.join-button:hover {
    background-color: #fafafa;
}

/* Footer */

footer {
    background-color: #000;
}

#social-networks {
    text-align: center;
    padding: 10px 0;
    display: flex;
    gap: 20px;
    justify-content: center;
    list-style: none;
}

#social-networks i {
    font-size: 1.6rem;
    padding: 5%;
    color: #f0f0f0;
}

#social-networks i:hover {
    color: #fafafa;
}

#copyright-notice {
    text-align: center;
    padding-bottom: 10px;
    margin: 0;
    color: #f0f0f0;
}

#logo a {
    width: 60%;
    display: inline-block;
}

#logo img {
    width: 100%;
}

/* Media query: large or landscape phones (576px and up) */

@media screen and (min-width: 576px) {
    #photos {
        column-count: 3;
        column-gap: 0;
    }
}

/* Media query below 500 px */

@media screen and (max-width: 500px) {
    /* help from Jason at Code Institute */
    #what-how-where {
        display: unset;
    }

    #photos {
        column-count: 1;
        column-gap: 0;
    }
}

/* Media query: tablets and larger (768px and up) */
@media screen and (min-width: 768px) {
    /* Header */
    nav {
        display: block;
        position: relative;
        box-shadow: none;
        width: fit-content;
        padding-right: 1rem;
    }

    #menu {
        display: flex;
    }

    #menu > li {
        padding-left: 1rem;
        white-space: nowrap;
    }

    .nav-toggle-label {
        display: none;
    }

    #logo a {
        width: 60%;
        display: inline-block;
    }

    #logo img {
        width: 100%;
    }

    /* Main content */
    main {
        margin-top: 39px;
    }
}

/* Large devices (laptops and desktops, 992px and up) */

@media screen and (min-width: 992px) {
    #menu a:hover {
        border-bottom: 1px solid #114664;
    }

    /* Gallery - code adapted from Love Running walkthrough */
    #photos {
        column-count: 4;
    }
}