@charset "utf-8";

html {
    background-color: rgb(158, 98, 0);
}

body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(255, 255, 255);
    background-color: rgb(4, 11, 5);
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: 0px;
}

header {
    text-align: center;
    padding: 0;
}

header img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 275px;
    object-fit: cover;
    object-position: center;
    margin: 0 auto;
}


nav {
    width: 100%;
    background-color: rgb(6, 0, 117);
    overflow: hidden;
    clear: both;
    display: block;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
}

nav li {
    flex: 1;
    margin: 0;
    padding: 0;
}

nav a {
    text-decoration: none;
    display: block;
    background-color: rgb(6, 0, 117);
    line-height: 2.8em;
    text-align: center;
    color: rgb(255, 255, 255);
}

nav a:hover {
    background-color: rgb(103, 95, 255);
    color: white;
    font-size: 1.2em;
    transition: background-color 0.5s ease-in 0.2s, color 0.5s ease-in 0.2s, font-size 1s ease;
}

main {
    padding: 20px;
    margin-top: 0;
    clear: both;
}

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

img {
    width: 10%;
}

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

ul {
    list-style-type: circle;
}

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

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

div.imgGallery img {
    width: 100%;
}

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

table {
    width: 100%;
    border: 10px double rgb(0, 86, 10);
    border-collapse: collapse;
}

th, td {
    height: 35px;
    border: 1px solid rgb(62, 62, 62);
    padding: 10px;
}

thead, tfoot {
    background-color: rgb(6, 0, 117);
    color: white;
}

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

@media only screen and (max-width: 768px) {
    body {
        width: 100%;
        margin: 0;
    }
    nav ul {
        display: block;
    }
    nav li {
        float: none;
        width: 100%;
    }
    nav a {
        border-bottom: solid black 1px;
        font-size: x-large;
    }
    main > img {
        width: 90%;
        float: none;
        padding: 0px;
    }
    div.imgGallery {
        flex: 100%;
        max-width: 100%;
    }
    table, tbody, tr, td, th {
        display: block;
    }
    thead, tfoot {
        display: none;
    }
    tbody td {
        position: relative;
        padding-left: 40%;
        height: auto;
        text-align: left;
        border-bottom: 1px solid white;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        top: 0px;
        left: 0px;
        padding: 10px;
        width: 40%;
        white-space: nowrap;
    }
} 

input:focus, select:focus, textarea:focus {
    background-color: rgb(173, 255, 173);
}

input:valid, select:valid, textarea:valid {
     background: rgb(173, 255, 173) url(rb_valid.png) bottom right/contain no-repeat;
}

input:invalid, select:invalid, textarea:invalid {
     background: rgb(173, 255, 173) url(rb_invalid.png) bottom right/contain no-repeat;
}

@media screen and (min-width: 601px) {
    form { 
        width: 90%;
    }
    fieldset {
        width: 90%; 
        padding: 5px; 
        margin: 0 10px 10px 0;
    }
    input, select, textarea {
        display: block;
        position: relative;
        left: 30%;
        width: 60%;
        padding: 5px;
        height: auto;
    }
    label {
        display: block;
        position: absolute;
        width: 30%;
        padding: 5px;
    }
    input[type="radio"] {
        display: inline;
        position: static;
        width: auto;
    }
    label.radio {
        display: inline;
        position: static;
    }
    #submit, #reset {
        display: block;
        float: left;
        position: relative;
        left: 0;
        text-align: center;
        width: 40%;
        padding: 10px;
        margin: 0 5% 10px 5%;
    }
}

@media screen and (max-width: 600px) {
    form { 
        width: 100%; 
        font-size: large;
    }
    fieldset {
        width: 100%; 
        padding: 5px; 
        margin: 0;
    }
    label, input, select, textarea {
        display: block; 
        position: static;
        width: 90%; 
        height: auto; 
        padding: 5px; 
        margin: 5px auto;
    }
    #submit, #reset {
        float: none;
        width: 90%;
        margin: 10px;
        font-size: 1.2em;
    }
}