@charset "utf-8";

html {
    background-color: rgb(130, 145, 160);
}

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: rgb(65, 65, 65);
    background-color: rgb(235, 232, 225);
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

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

header img {
    width: 100%;
}

h2 {
    font-size: 1.3em;
}

h1, h2 {
    text-shadow: 4px 6px 5px gray;
}
/*
nav {
    background-color: rgb(70, 90, 110);
    padding: 15px;
    text-align: center;
}

nav > a {
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    color: white;
}

nav > a:hover {
    text-decoration: underline;
    color: ivory; 
}
*/

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

nav li {
    display: block;
}

nav a {
    display: block;
    background-color: rgb(100, 45, 40);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: ivory;
}

nav a:hover {
    background-color: rgb(150, 120, 75);
    color: white;
}

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

main > img{
    padding: 25px;
}

body > footer {
    background-color: rgb(100, 45, 40);
    color: rgba(255, 255, 255, 0.75);
    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;
}

p.vacationText {
    text-indent: 1em;
}

/* Flexbox styles for Vacation images */
div.gallery {
    display: flex;
    flex-flow: wrap;
    padding: 4px;
}

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

div.imgGallery img {
    width: 100%;
}

#navicon {
    display: none;
}

/*Family Table Styles*/

table{
        width: 100%;
        background-color: rgb(245, 245, 245);
        border: 3px solid rgb(100, 45, 40);
        border-collapse: collapse;
} 

th, td {
    border: 1px solid rgb(100, 45, 40);
    padding: 10px;
}

th {
    background-color: rgb(100, 45, 40);
    color: ivory;
}

/* Contact Form Styles */

form {
    width: 90%;
}

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

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

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

input:valid, select:valid, textarea:valid {
    background-color: lightgreen;
}

input:invalid, select:invalid, textarea:invalid {
    background-color: lightcoral;
}

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

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

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

div.recommend {
    display: block;
    position: relative;
    left: 0;
    width: 100%;
    min-height: 40px;
    margin-bottom: 10px;
}

div.recommend > label:first-child {
    display: inline-block;
    position: static;
    width: 30%;
    padding: 5px;
}

div.recommend input[type="radio"] {
    display: inline;
    position: static;
    left: 0;
    width: auto;
}

div.recommend label.radio {
    display: inline;
    position: static;
    width: auto;
    padding: 5px;
}

textarea {
    display: block;
    position: relative;
    left: 0;
    margin-left: 30%;
    padding: 5px;
    width: 60%;
    height: 100px;
    margin-bottom: 10px;
}

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

/* Media Queries for responsive design - screen sizes 0px - 769px */

@media only screen and (max-width: 768px) {
    #navicon {
        display: block;
    }

    nav ul {
        display: none;
    }

    #navicon:hover + ul,
    nav ul:hover {
        display: block;
    }
    
    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.imgGallery {
        flex: 48%;
        max-width: 50%;
    }

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

    thead, tfoot {
        display: none;
    }

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

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

    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%;
    }

    textarea {
        display: block;
        position: inherit;
        left: 0;
        margin-left: 0;
        padding: 5px;
        width: 90%;
        height: 100px;
    }

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

    div.recommend > label:first-child {
        display: block;
        position: inherit;
        width: 90%;
        height: auto;
        padding: 5px;
    }

    div.recommend {
        width: 100%;
        min-height: 0;
        margin-bottom: 10px;
    }

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

}

@media only screen and (max-width: 480px) {
  #navicon {
        display: block;
    }

    nav ul {
        display: none;
    }

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

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

@media only screen and (min-width: 769px) {
    html {
        background-image: url("whiterun.png");
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }

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

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

}