* {
    outline: 0;
}


html, body {
    margin: 0;
    font-family: 'PT Serif', serif;
    min-height: 100vh;
}


h1, h2, h3, nav a {
    font-family: 'Work Sans', sans-serif;
}

h1 {
    color: rgb(20, 40, 60);
    font-size: 2em;
    margin-top: 8px;
    margin-bottom: 0px;

    margin-left: 8px;
    margin-right: 8px;
    margin-top: 32px;
    margin-bottom: 4px;
    line-height: 1.1em;
}

h2 {
    color: rgb(0, 0, 0);

    margin-left: 8px;
    margin-right: 8px;
    margin-top: 32px;
    margin-bottom: 0px;
}

h3 {
    color: rgb(0, 0, 0);
    margin-left: 8px;
    margin-right: 8px;
    margin-top: 8px;
    margin-bottom: 0px;
}

p {
    margin: 8px;
    margin-top: 0px;
}

ul {
    margin-top: 2px;
}

li {
    list-style-type: square;
}


button::-moz-focus-inner {
    border: 0;
}


/* HEADER */
header {
    display: block;
    text-align: center;
    overflow: auto;
    background-image: url("img/header_background.jpg");
    background-size: cover;
    background-position: left bottom;
}

header img {
    width: 90%;
    margin: 16px auto;
    max-height: 80px;
}






/* NAVIGATION */
nav {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgb(20, 40, 60) 0%, rgb(40, 80, 120) 100%);
}

#button_container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 4px;
    width: 100%;
}

nav a {
    text-align: center;
    display: block;
    font-size: 0.8em;
    text-decoration: none;
    line-height: 1.3em;
    font-weight: bold;
    color: rgb(255, 255, 255);
    background: linear-gradient(0deg, rgba(20, 40, 60, 0.5), rgba(40, 80, 120, 0.75));
    border: 1px groove rgba(60, 80, 120, 0.5);
    border-radius: 4px;
    padding: 8px;
    margin: 3px 0px;
    transition: all 0.333s;
    outline: 0;
}

nav .active {
    background: linear-gradient(0deg, rgb(40, 80, 120), rgb(20, 40, 60));
    box-shadow: inset 0 0 24px 0px rgb(60, 80, 120);
    border-color: rgba(255, 255, 255, 0.5);
    border-style: ridge;
}

nav a:first-child {
    border-radius: 0 0px 8px 0;
}

nav a:last-child {
    border-radius: 0px 0px 0px 8px;
}





/* MAIN & ARTICLES */
main {
    width: 100%;
}

article {
    width: 100%;
    margin-bottom: 64px;
    border-bottom: 3px solid rgb(220, 220, 220);
    padding-top: 16px;
    padding-bottom: 16px;
}

article img {
    width: 100%;
}

#palvelut {
    padding: 16px;
    background: linear-gradient(90deg,
                              rgb(20, 40, 60) 0%,
                              rgb(40, 80, 120) 1%,
                              rgb(20, 40, 60) 3%,
                              rgb(20, 40, 60) 97%,
                              rgb(40, 80, 120) 99%,
                              rgb(20, 40, 60) 100%);
    border-radius: 4px;
    margin-top: 16px;
    margin-bottom: 16px;
}

#palvelut h2, #palvelut h3, #palvelut p {
    margin: 8px;
    color: rgb(255, 255, 255);
}


/* DETAILS AND SUMMARY */
details {
    border: 1px solid rgb(220, 220, 220);
    border-radius: 4px;
    margin-bottom: 8px;
}

details summary {
    padding: 4px;
    list-style: none;
    background: linear-gradient(0deg, rgb(240, 240, 240), rgb(255, 255, 255));
    background-color: rgb(220, 220, 220);
    cursor: pointer;
}

details p {
    margin: 8px;
}



/* IMAGE GALLERY */
.image_gallery {
    display: none;
    width: 100%;
    height: 256px;
    overflow: hidden;
    background-size: cover;
}

.image_gallery button {
    background-color: rgba(20, 40, 60, 0.0);
    width: 48px;
    height: 100%;
    border: 0;
    color: rgb(20, 40, 60);
    font-size: 3em;
    outline: 0;
}

.image_gallery button:hover {
    background-color: rgba(20, 40, 60, 0.5);
    color: rgb(255, 255, 255);
}

.image_gallery button:last-child {
    float: right;
}



/* IMAGE VIEWER */
#image_viewer {
    position: fixed;
    width: 100%;
    height: 100%;
    margin: 0px;
    left: 0px;
    top: 0px;
    background-color: rgba(8, 8, 8, 1.0);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain;
    display: none;
    z-index: 999;
}

#image_viewer button {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    background-color: rgb(20, 40, 60);
    border: 0px;
    height: 64px;
    color: rgb(255, 255, 255);
}





/* FOOTER */
footer {
    display: block;
    background: linear-gradient(0deg, rgb(20, 40, 60) 0%, rgb(40, 80, 120) 100%);
    overflow: auto;
}

footer section {
    width: 100%;
}

footer h3 {
    color: rgb(255, 255, 255);
}

footer p {
    display: inline-block;
    margin: 8px;
    color: rgb(255, 255, 255);
}

footer img {
    float: right;
    max-height: 80px;
    margin: 8px;
}



@media only screen and (min-width: 600px) {

    nav {
        text-align: center;
    }

    #button_container, main, footer section {
        width: 600px;
        margin: auto;
    }

    /* IMAGE GALLERY */
    .image_gallery {
        height: 450px;
    }

}