/*Font-face*/
@font-face {
    font-family: iceage;
    src: url(../fonts/iceage.ttf);
    font-display: swap;
}

/*Smoother scrolling from links to elements on the page*/
html {
    scroll-behavior: smooth;
}

/*General reset and rules for body*/
body {
    font-size: 16px;
    font-family: "Gill Sans", "Open Sans", sans-serif;
}

body, 
body * {
    box-sizing: border-box;
    margin: 0;
    max-width: 100%;
}

/*General colors*/
header, 
header > nav, 
footer {
    background-color: rgb(91, 91, 91);
}

nav a, 
footer * {
    color: rgb(255, 255, 255);
}

/*General link styles*/
a {
    text-decoration: none;
}

/*Common rules*/
header > figure:first-of-type,
footer > * {
    margin: 15px;
}

header,
footer {
    display: flex;
    align-items: center;
}

/*Header styles*/
header {
    position: relative;
    font-size: 1.4rem;
}

header > figure:first-of-type {
    width: 180px;
    border-radius: 5px;
}

header > figure:last-of-type {
    width: 30px;
    cursor: pointer;
    margin-left: auto;
    margin-right: 15px;
}

header > nav {
    position: absolute;
    right: 0;
    top: 70px;
    display: none;
    width: 170px;
    line-height: 2em;
    z-index: 2;
}

nav > ul {
    list-style: none;
    padding: 0;
}

nav > ul > li {
    padding: 5px 0;
}

nav a {
    padding: 15px;
}

nav li:active {
    background-color: rgb(94, 156, 94);
}

/*Class for javascript*/
.shownavbar {
    display: block;
}
/*Header styles ends*/

/*Headline styles, paragraph styles and font decisions*/
#headline figure:first-of-type {
    background-image: url(../images/ice-nature-landscape.webp);
    background-size: cover;
    background-position: center;
}

#headline figure:first-of-type img {
    visibility: hidden;
}

h1 {
    font-family: iceage, Garamond, serif;
    font-size: clamp(2.9rem, 7vw, 5rem);
    color: rgb(129, 234, 255);
    text-shadow: 5px 5px 0 rgb(0, 0, 0);
    border-radius: 20px;
}

h2, 
h3, 
header, 
footer section > p {
    font-family: Garamond, serif;
}

h2 {
    font-size: 1.8rem;
    background-color: rgb(203, 246, 255);
}

h2, 
h3 {
    font-weight: lighter;
    padding: 15px;
}

h3 {
    font-size: 1.5rem;
}

h1, 
h2, 
h3, 
#page-info > * {
    text-align: center;
}

p {
    margin-bottom: 10px;
}

main p, 
table {
    line-height: 1.5em;
}

/*Footer styles*/
footer {
    flex-wrap: wrap;
    justify-content: space-between;
}

#contact-info > * {
    margin: 5px;
}

footer address {
    line-height: .8em;
}

footer address, 
#page-info > * {
    font-size: .7rem;
}

#page-info > * {
    line-height: 1.4em;
    margin-top: 5px;
    align-self: center;
}

footer img {
    width: 150px;
}

footer a {
    color: rgb(108, 255, 162);
    font-weight: bold;
}

iframe {
    width: 140px;
    height: 120px;
}

@media screen and (max-width: 360px) {
    iframe,
    #contact-info {
        margin: 10px auto;
    }

    footer address {
        text-align: center;
    }

}

/*****Desktop design*****/
@media screen and (min-width: 600px) {
    
    /*Common rules*/
    header, 
    nav > ul, 
    #contact-info {
        display: flex;
    }

    /*Header styles*/
    header, 
    header > nav {
        position: static;
    }

    header > nav {
        display: block;
        width: 100%;
        margin: 10px 0;
        margin-right: 5px;
    }

    header, 
    nav > ul {
        justify-content: right;
    }

    header > figure:first-of-type {
        width: 25%;
        max-width: 210px;
    }

    header > figure:last-of-type {
        display: none;
    }

    nav li:hover {
        background-color: rgb(130, 183, 130);
    }
    /*Header styles ends*/

    /*Footer styles*/
    #contact-info {
        gap: 5vw;
    }

    #page-info {
        margin: 5px auto;
        margin-bottom: 20px;
    }

    #page-info > * {
        max-width: 70ch;
    }

    iframe {
        width: 170px;
    }

    #contact-info {
        flex-grow: 1.5;
    }

    iframe {
        flex-grow: 1;
    }

    #page-info {
        padding: 0 20px;
    }
}