@charset "utf-8";

html {
    background-color: rgb(210, 220, 230);
}

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

header img {
    width: 100%;
}

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

h2 {
    font-size: 1.3em;
}

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

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

nav a {
    display: block;
    background-color: rgb(70, 90, 110);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: white;
}

nav a:hover {
    background-color: lightblue;
    color: rgb(70, 90, 110);
}

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

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

body > footer {
    background-color: rgb(70, 90, 110);
    color: rgba(255, 255, 255, 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;
}


/* Family Table */

.family-table {
    width: 100%;
    border-collapse: collapse;
}

.family-table th,
.family-table td {
    border: 1px solid rgb(70, 90, 110);
    padding: 10px;
    text-align: left;
}

.family-table thead {
    background-color: rgb(70, 90, 110);
    color: white;
}

.family-table tbody {
    background-color: ivory;
}

.family-table tfoot {
    background-color: rgb(210, 220, 230);
    font-weight: bold;
}


/* Vacation Flexbox Gallery */

.vacation-gallery {
    display: flex;
    flex-wrap: wrap;
}

.vacation-gallery img {
    width: 25%;
    height: auto;
}


/* Form Validation Styles */

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

input:valid {
    background-color: ivory;
}

input:invalid {
    background-color: rgb(255, 230, 230);
}


/* Desktop Styles */

@media only screen and (min-width: 769px) {

    html {
        background-image: url("background.png");
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover;
    }

    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%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }

    label {
        display: block;
        position: absolute;
        padding: 5px;
        width: 30%;
        box-sizing: border-box;
    }

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

    input[type="radio"] {
        display: inline;
        position: inherit;
        left: 0;
        width: auto;
        margin-left: 30%;
        margin-bottom: 10px;
    }

    input[type="radio"] + label.radio + input[type="radio"] {
        margin-left: 15px;
    }

    label.radio {
        display: inline;
        position: inherit;
        width: auto;
        padding: 5px;
    }

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

    fieldset::after {
        content: "";
        display: block;
        clear: both;
    }
}


/* Mobile Styles */

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

    .vacation-gallery img {
        width: 50%;
    }

    .family-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    form {
        width: 100%;
        font-size: large;
    }

    fieldset {
        width: 100%;
        padding: 5px;
        margin: 0;
        box-sizing: border-box;
    }

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

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

    textarea {
        position: inherit;
        display: block;
        width: 90%;
        min-height: 100px;
        padding: 5px;
        box-sizing: border-box;
    }

    input[type="radio"] {
        display: inline;
        width: auto;
        height: auto;
    }

    label.radio {
        display: inline;
        width: auto;
        height: auto;
    }

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


/* Small Mobile Styles - One Column Gallery */

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

    .vacation-gallery img {
        width: 100%;
    }
}