@charset "utf-8";

html {
    background-color: rgb(248, 177, 149);
    background-image: url(sunset.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* nav {
    background-color: rgb(192, 108, 132);
    padding: 15px;
    text-align: center;
}

nav a {
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    color: rgb(108, 91, 123);
}

nav a:hover {
    text-decoration: underline;
    color: rgb(159, 44, 163);
} */

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

nav li {
    display: block;
    width: 20%;
    float: left;
}

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

nav a:hover {
    background-color: violet;
    color: azure;
}

header {
    text-align: center;
    padding: 20px;
}

header img {
    width: 100%;
}

body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    background-color: ivory;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

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

h1 {
    text-align: center;
}

h2 {
    font-size: 1.3em;
}

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

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

body>footer {
    background-color: rgb(244, 157, 181);
    color: rgba(56, 0, 40, 0.5);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}

ul {
    list-style-type: square;
}

/* Table Styles */
table {
    width: 100%;
    border: 10px ridge gray;
    border-collapse: collapse;
}

th,
td {
    height: 25px;
    border: 1px solid gray;
    padding: 10px;
}

thead,
tfoot {
    background-color: indianred;
    color: white;
}

tfoot {
    text-align: center;
}

tbody tr:nth-of-type(even) {
    background-color: beige;
}

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

div.imageGallery {
    flex-basis: 23%;
    max-width: 25%;
    padding: 0 4px;
}

div.imageGallery img {
    width: 100%;
}

/* Meida rules */
@media only screen and (max-width:1100px) {
    div.imageGallery {
        flex-basis: 48%;
        max-width: 50%;
    }
}

@media only screen and (max-width: 768px) {

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

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

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

    main>img {
        width: 90%;
        float: none;
    }

    div.imageGallery {
        flex-basis: 100%;
        max-width: 100%;
    }

    table,
    tbody,
    tr,
    td,
    th {
        display: block;
    }

    thead,
    tfoot {
        display: none
    }

    tbody td {
        position: relative;
        padding-left: 40%;
        height: auto;
    }

    td::before {
        content: attr(data-label);
        position: absolute;
        top: 0px;
        left: 0px;
        padding: 10px;
        width: 40%;
        white-space: nowrap;
    }

}