@charset "UTF-8";

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

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

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

h2 {
    font-size: 1.3em;
    text-shadow: gray 4px 6px 5px;
}

/*nav {
    background-color: hsl(204, 72%, 69%);
    padding: 15px;
    text-align: center;
} */

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

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

nav a {
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    color: rgb(70, 70, 70);
    display: block;
    background-color: hsl(204, 72%, 69%);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
}

nav a:hover {
    text-decoration: underline;
    color: black;
    background-color: hsl(204, 48%, 60%);
    font-size: 1.2em;
    transition: background-color 0.5s ease-in 0.2s;
    transition: color 0.5s ease-in 0.2s;
    transition: font-size 1s ease;
}

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

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

footer {
    background-color: hsl(204, 72%, 69%);
    color: rgba(102, 102, 102, 0.8);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
}

.education li {
    list-style-type: square;
}

.education ul li {
    list-style-type: circle;
}

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

body > footer {
    clear: both;
}

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

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

div.imgGallery img {
    width: 100%;
}

table {
    border-collapse: collapse;
    width: 100%;
    background-color: hsl(204, 73%, 80%);
}

table, th, td {
    border: 1px solid black;
    padding: 8px;
    text-align: center;
}

thead {
    background-color: hsl(204, 79%, 65%);
    font-weight: bold;
    color: black;
}

tbody th {
    background-color: hsl(204, 79%, 65%);
    font-weight: bold;
    color: black;
}

tfoot {
    font-style: italic;
    background-color: hsl(204, 79%, 65%);
    color: black;
}

/*Style rule for elements with a focus*/

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

/*Style rule for valid and invalid input elements*/
    input#zip:focus:valid,
    input#email:focus:valid,
    input#phone:focus:valid {
        background: rgb(220,255,220) url(rb_valid.png) bottom right/contain no-repeat;
    }

    input#zip:focus:invalid,
    input#email:focus:invalid,
    input#phone:focus:invalid {
        background: rgb(220, 255, 255) url(rb_invalid.png) bottom right/contain no-repeat;
    }


/* Responsive Design */
/* For tablets: */

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

}

/* For mobile phones: */

@media only screen and (max-width: 768px) {
    html{
        background-color: hsl(204, 73%, 80%);
    }
    body{
        width: 100%;
        margin: 0;
    }
    nav li {
        width: 100%;
        float: none;
        font-size: x-large;
    }
    nav a {
        border-bottom: solid black 1px;
    }
    main > img {
        width: 90%;
        float: none;
    }

    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;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 0;
        width: 40%;
        padding: 10px;
        white-space: nowrap;
        color: black;
        font-weight: bold;
    }

    /*form adjustments for mobile*/
    form {
        width: 100%;
        font-size: large;
    }

    fieldset {
        width: 100%;
        padding: 5px;
        margin: 0;
    }

    input, select {
        position: inherit;
        display: block;
        height: 50px;
        padding: 5px;
        width: 90%;
    }

    label {
        position: inherit;
        display: block;
        height: 50px;
        width: 90%;
    }

    input[type="submit"] {
        float: none;
        width: 90%;
        margin: 10px;
        font-size: 1.2em;
    }
}

/* For desktop: */
@media only screen and (min-width: 769px) {
    html {
    background-color: hsl(204, 73%, 80%);
    background-image: url(background-image.jpg);
    }

    form {
        width: 82%;
    }

    fieldset {
        width:90%;
        padding: 5px;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    input, select {
        display: block;
        position: relative;
        left: 22%;
        padding: 5px;
        height: auto;
        width: 60%;
    }

    label {
    display: block;
    padding: 5px 0;
    }

    input[type="radio"] {
        display: inline;
        position: inherit;
        left: 0;
        width: auto;
    }

    label.radio {
        display: inline;
        position: inherit;
    }

    input[type="submit"] {
        display: block;
        text-align: center;
        float: left;
        left: 0;
        width: 40%;
        padding: 10px;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 10px;
    }

    input[type="reset"] {
        display: block;
        text-align: center;
        float: left;
        left: 0;
        width: 40%;
        padding: 10px;
        margin-bottom: 10px;
    }

    .button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    }

    .button-group input {
    width: 45%;
    padding: 10px;
    }

    footer {
        clear: both;
    }
    
}

