@charset "utf-8";

/* Styles for all screen sizes */

html {
    background-color: hsl(200, 20%, 47%);
}

body {
    background-color: #F1F8E9;
    color: #1B1B1B;
    font-family: Verdana, Geneva, sans-serif;
    box-sizing: border-box;
}

header {
    text-align: center;
}

header img {
    display: block;
    width: 100%;
    height: auto;
}

h1,
h2 {
    text-shadow: 4px 6px 5px gray;
}

h2 {
    font-size: 1.3em;
}

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

nav a {
    display: block;
    background-color: #2E7D32;
    color: white;
    line-height: 2.8em;
    text-align: center;
    text-decoration: none;
}

nav a:hover {
    background-color: #C8E6C9;
    color: #1B3A1B;
}

nav a:focus-visible {
    outline: 3px solid #163e19;
    outline-offset: -3px;
}

/* Hide the navicon on larger screens */
a#navicon {
    display: none;
}

main {
    padding: 20px;
    margin-top: 35px;
}

footer {
    clear: both;
    background-color: #2E7D32;
    color: white;
    padding: 10px;
    text-align: center;
}

footer a {
    color: white;
}

/* Flex gallery */
div.gallery {
    display: flex;
    flex-flow: row wrap;
}

div.imgGallery {
    box-sizing: border-box;
    padding: 4px;
}

div.imgGallery img {
    display: block;
    width: 100%;
    height: auto;
}

table {
    width: 100%;
    table-layout: fixed;
    border: 4px solid rgb(7, 93, 146);
    border-collapse: collapse;
    background-color: white;
}

caption {
    font-weight: bold;
    padding: 0.75em;
}

th, td {
    border: 1px solid #61717b;
    padding: 12px;
    text-align: left;
    overflow-wrap: anywhere;
}

thead, tfoot {
    background-color: rgb(7, 93, 146);
    color: white;
}

tbody tr:nth-of-type(even) {
    background-color: rgb(197, 206, 221);
}

@media only screen and (max-width: 1100px) {
    div.imgGallery {
        flex: 48%;
        max-width: 50%;
    }
}

/* Styles for devices 768 pixels wide or smaller */
@media only screen and (max-width: 768px) {

    body {
        width: 100%;
        margin: 0;
    }

    /* Display the hamburger navicon on mobile devices */
    a#navicon {
        display: block;
        font-size: 2em;
        border-bottom: none;
    }

    /* Hide the menu until the navicon is used */
    nav ul {
        display: none;
    }

    a#navicon:hover + ul,
    nav ul:hover {
        display: block;
    }

    nav li {
        float: none;
        font-size: x-large;
        width: 100%;
    }

    nav a {
        border-bottom: 1px solid black;
    }

    a#navicon {
        border-bottom: none;
    }

    main > img {
        display: block;
        float: none;
        width: 90%;
        margin: auto;
    }

    /* Two-column gallery */
    div.imgGallery {
        width: 50%;
    }

    tbody, tr, td {
        display: block;
    }

    thead {
        display: none;
    }

    tbody tr {
        border: 2px solid rgb(7, 93, 146);
        margin-bottom: 1em;
    }

    /* Reserve the left column for each cell's data-label. */
    tbody td {
        position: relative;
        padding-left: 40%;
    }

    tbody td::before {
        content: attr(data-label);
        position: absolute;
        top: 0px;
        left: 0px;
        width: 40%;
        padding: 5px;
        font-weight: bold;
    }

    tfoot {
        display: table-footer-group;
    }

    tfoot tr, tfoot td {
        display: block;
    }

    tfoot td {
        text-align: center;
    }
}

/* One-column gallery on smaller mobile screens */
@media only screen and (max-width: 480px) {

    div.imgGallery {
        width: 100%;
    }
}

/* Styles for devices 769 pixels wide or larger */
@media only screen and (min-width: 769px) {

    html {
        background: hsl(200, 20%, 47%) url("back_pic.jpg")
                    center / cover no-repeat fixed;
    }

    body {
        width: 90%;
        margin: auto;
    }

    nav ul {
        display: flex;
    }

    nav li {
        width: 20%;
    }

    main > img {
        float: right;
        width: 25%;
        padding: 25px;
    }

    /* Four-column gallery */
    div.imgGallery {
        width: 25%;
    }

    article {
        column-count: 3;
        column-gap: 30px;
        column-rule: 2px solid gray;
        margin-top: 15px;
    }
}