/*Import for google fonts*/
@import url("https://fonts.googleapis.com/css2?family=Fjalla+One&family=Open+Sans:wght@300&family=Oswald:wght@200;300;400;500;600;700&display=swap");

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

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Generic project styles */
    color: #ffffff;
    background-color: #1d1d1d;
    font-family: "Open Sans", sans-serif;
}

/* Header */
header {
    background-color: #3b3b3b;
    padding: 0 1rem;
    position: fixed;
    z-index: 99;
    width: 100%;
    box-shadow: 0 2px 2px #3a3a3a;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

header a {
    text-decoration: none;
    color: #ffffff;
}

h1 {
    font-family: "Fjalla One", sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #f30611;
}

#menu {
    font-size: 110%;
    letter-spacing: 4px;
    list-style-type: none;
}

#menu>li {
    margin-bottom: 1em;
}

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

/* Navbar Style with dropdown toggle*/
nav {
    position: absolute;
    background-color: #3b3b3b;
    width: 100%;
    left: 0;
    padding: 0 1rem;
    box-shadow: 0 2px 2px #3a3a3a;
    display: none;
    top: 100%;
}

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

#nav-toggle {
    display: none;
}

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

/* Main content */
main {
    flex: 1 0 auto;
    margin-top: 47px;
}

/* Clickable Boxes*/

.container {
    height: 100%;
    display: flex;
    flex-wrap: wrap;
}

.image-box {
    flex: 1 50% 100%;
    box-sizing: border-box;
    margin-right: 5px;
    margin-bottom: 0px;
    position: relative;
    overflow: hidden;
    border: 4px solid transparent;
    transition: border-color 0.3s ease-in-out;
    max-height: 929px;
}

.image-link a {
    object-fit: cover;
}

.image-box:hover {
    border-color: #f30611;
}

.image-box img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Hover Over Text */

.image-link {
    display: block;
    position: relative;
}

.hover-text {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translate(-50%);
    background-color: rgba(131, 131, 131, 0.8);
    padding: 10px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3 ease-in-out;
    pointer-events: none;
}

.image-box:hover .hover-text {
    opacity: 1;
}

.hover-text {
    margin: 0;
}

/* Footer */

footer {
    background-color: #3b3b3b
}
#social-networks {
    text-align: center;
    padding: 20px 0;
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
}

#social-networks i {
    font-size: 160%;
    padding: 5%;
    color: #ffffff;
}

/* image wrappers */


.wrapper img {
    max-width: 320px;
    float: left;
    border: 3px solid #3b3b3b;
    border-radius: 10px;
    margin-right: 5px;

}

.wrapper {
    display: flex;
    margin: 50px auto;
    width: 70%;
    flex-wrap: wrap;

}

.text-box {
    color: #ffffff
}

.text-box h2 {
    font-size: 42px;
}

.text-box p {
    font-size: 16px;
}

.wrapper .motogp img {
    max-width: 320px;
    float: right;
    border: 3px solid #3b3b3b;
    border-radius: 10px;
    margin-right: 5px;

}




/* Media query: Smaller than Tablet */
@media screen and (max-width: 768px) {
    .hover-text {
        opacity: 1;
        flex: 0 0 100%;
    }
}

/* Media query: Tablets and larger */
@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;
    }

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

    #logo {
        font-size: 240%;
        line-height: 65px;
        margin: 0 0.5rem;
    }

    /* Main content */
    .hover-text {
        opacity: 1;
        bottom: 10%;
        flex: 0 0 100%;
    }

    main {
        margin-top: 75px;
        display: flex;
        flex-wrap: wrap;
        align-items: stretch;
        height: auto;
        overflow-y: hidden;
    }


    .image-box {
        flex: 1 0 100%;
        height: auto;
        margin-right: 0%;
    }

    .image-box img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
}

/* Large devices (laptops and desktops) */
@media screen and (min-width: 992px) {
    #menu a {
        color: #ffffff;
        position: relative;
        text-decoration: none;
    }

    #menu a::before {
        content: "";
        position: absolute;
        width: 100%;
        height: 3px;
        border-radius: 4px;
        background-color: #ffffff;
        bottom: 0;
        left: 0;
        transform-origin: right;
        transform: scaleX(0);
        transition: transform 0.3s ease-in-out;
    }

    #menu a:hover::before {
        transform-origin: left;
        transform: scaleX(1);
    }

    main {
        margin-top: 78px;
    }

    .image-box {
        flex: 1 0 33%;
        height: 100%;
        margin-right: 0%;
    }
}