@charset "utf-8";

body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    background-color: ivory;
    margin: 0;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}
header {
    text-align: center;
    padding: 20px;
}
h2 {
    font-size: 1.3em;
}
/*nav {
    padding: 15px;
    color: rgb(252, 158, 129);
    text-align: center;
}
nav a {
    text-decoration: none;
    color: rgb(0, 0, 0);
    padding-left: 10px;
    padding-right: 10px;
}
nav a:hover {
    text-decoration: underline;
    color: lightblue;
}
    */
nav{
    margin-top: 3px;
    padding: 0;
}
nav ul{
    list-style: none;
    margin: 0;
    padding: 0;
}
nav li {
   float: left;
   width: 20%;
   display: block; 
}
nav a {
    text-decoration: none;
    display:block;
    background-color: rgb(252, 158, 129);
    line-height: 2.8em;
    text-align: center;
    color: rgb(0, 0, 0);
}
nav a:hover {
    background-color: lightblue;
    color: rgb(0, 0, 0);
    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;
    clear: both;
    margin-top: 70px;
}

main>img {
    width: 25%;
    padding: 25px;
    float: right;
}
    
body>footer {
    background-color: rgb(252, 158, 129);
    color: rgba(233, 233, 233, 0.6);
    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;
}
header img {
    width: 100%;
}

/*Flexbox styles for Vacation Images*/
div.gallery{
    display: flex;
    flex-flow: wrap;
}

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

div.imgGallery img{
    width: 100%;
}

a#navicon{
    display: none;
}

/*Form Styles*/

form{
    width: 90%;
}

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

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

label{
    display: block;
    position: absolute;
    width: 30%;
    padding: 5px;
}

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

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

input:focus, select:focus{
    background-color: lightblue;
}

input:focus, select:focus, textarea:focus{
   background-color: lightblue;
} 

input#name:focus:valid,
input#address1:focus:valid,
input#city:focus:valid,
input#state:focus:valid,
input#zip:focus:valid,
input#phone:focus:valid,
input#email:focus:valid,
input#bdate:focus:valid{
    background-color: lightgreen;
}

input#name:focus:invalid,
input#address1:focus:invalid,
input#city:focus:invalid,
input#state:focus:invalid,  
input#zip:focus:invalid,
input#phone:focus:invalid,
input#email:focus:invalid,
input#bdate:focus:invalid{
    background-color: lightcoral;
}

hr{
    clear: right;
}

textarea{
    padding: 10px;
    margin: 10px;
}

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

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

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

/*Media Query for Flexbox 50% width */
@media screen and (max-width:1100px) {
    div.imgGallery{
        flex:48%;
        max-width:50%;
    }
}

/*Media Queries Styles for Mobile - screen size 0px to 768px */
@media screen and (max-width:768px) { 
    html{
     background-color: rgb(197, 220, 243);
    }
    body{
        width: 100%;
        margin: 0;
    }
    nav li{
        float: none;
        font-size:x-large;
        width: 100%;
    }
    nav a{
        border-bottom: solid 1px black;
    }
    main>img{
        width: 90%;
        float: none;
    }
    div.imgGallery{
    flex:100%;
    max-width:100%;
    }
    a#navicon{
    display: block;
    }
    nav ul {
    display: none;
    }
    #navicon:hover+ul, nav ul:hover {
    display: block;
    }
    table, tbody, th, td, tr {
    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%;
    }
    form{
        width: 100%;
        font-size: large;
    }
    fieldset{
        width: 100%;
        padding: 5px;
        margin: 0px;
    }
    input, select{
        display: block;
        width: 90%;
        padding: 5px;
        position: inherit;
        height: 50px;
    }
    label{
        display: block;
        position: inherit;
        height: 50px;
        width: 90%;
    }
     input[type="submit"],
     input[type="reset"]{
        float: none;
        width: 90%;
        margin: 10px;
        font-size: 1.2em;
    }
}

/*Media Queries Styles for Desktops - screen size greater than 768px */
@media screen and (min-width:769px) {
    html{
     background-color: rgb(197, 220, 243);
     background-image: url("background.jpg");
        background-size: cover;
        background-attachment: fixed;
        background-repeat: no-repeat;
        background-position: center;
    }
    main>img{
        width: 25%;
        padding: 25px;
        float: right;
    }
    body{
        width: 90%;
    }
    form{
        width: 90%;
    }
    fieldset{
        width: 90%;
        padding: 5px;
        margin-right: 10px;
        margin-bottom: 10px;
    }
    input, select{
        display: block;
        width: 60%;
        padding: 5px;
        position: relative;
        left: 30%;
        height: auto;
    }
    label{
        display: block;
        position: absolute;
        width: 30%;
        padding: 5px;
        height: auto;
    }
     input[type="radio"]{
        display: inline;
        position: inherit;
        left: 0;
        width: auto;
    }
    label.radio{
        display: inline;
        position: inherit;
    }
    input[type="submit"], 
    input[type="reset"]{
        display: block;
        left: 0;
        float: left;
        text-align: center;
        width: 40%;
        padding: 10px;
        margin-left: 5%;
        margin-right: 5%;
        margin-bottom: 10px;
    }
    footer{
        clear: both;
    }
}