@charset "utf-8";

html {
    background-color: rgb(174, 222, 255);
}

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 {
    font-size: 1.3em;
    text-shadow: 4px 6px 5px gray;
}

/*nav {
    background-color: rgb(209, 235, 244);
    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: pink;
}
*/

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

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

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

nav a:hover {
    background-color: pink;
    color: white;
}

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

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

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

.vacationplaces {
    display: flex;
    flex-wrap: wrap;
}

.vacationplaces img {
    width: 25%;
    box-sizing: border-box;
    padding: 10px;
}

@media only screen and (max-width: 768px) {
    html {
        background-color: rgb(174, 222, 255);
    }

    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: 100%;
        float: none;
    }

    .vacationplaces img {
        width: 50%;
    }
}

@media only screen and (max-width: 480px) {
    .vacationplaces img {
        width: 100%;
    }
}

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

    .vacationplaces img {
        width: 25%;
    }
}


/* Family Table*/

.familyTable {
    width: 100%;
    background-color: ivory;
    border-collapse: collapse;
    border: 2px solid rgb(174, 222, 255);
}

.familyTable th,
.familyTable td {
    border: 1px solid rgb(91, 91, 91);
    padding: 10px;
}

.familyTable th {
    background-color: pink;
    color: rgb(16, 16, 16);
    text-align: center;
}

.familyTable td {
    background-color: ivory;
}

.familyTable tfoot td {
    background-color: pink;
    color: white;
    font-weight: bold;
    text-align: center;
}


/* About Me Form*/

.clear {
    clear: both;
}

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

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

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

label[for="referrer"] {
    width: 30%;
    height: auto;
    white-space: normal;
    line-height: 1.2em;
}

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

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

/* Recommendation Question */

.recommend {
    padding: 10px 5px;
    margin-bottom: 10px;
}

.recommend span {
    display: inline-block;
    width: 30%;
}

.recommend input[type="radio"] {
    margin-left: 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-top: 20px;
    margin-bottom: 10px;
}


/* Form Element Focus */

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


/* Valid Form Data */

input#name:focus:valid,
input#zip:focus:valid,
input#phone:focus:valid,
input#email:focus:valid {
    background-color: rgb(220, 255, 220);
}


/* Invalid Data */

input#name:focus:invalid,
input#zip:focus:invalid,
input#phone:focus:invalid,
input#email:focus:invalid {
    background-color: rgb(255, 232, 233);
}

footer {
    clear: both;
}


/* Responsive Family Table*/

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

    .familyTable thead {
        display: none;
    }

    .familyTable,
    .familyTable tbody,
    .familyTable tr,
    .familyTable td {
        display: block;
        width: 100%;
    }

    .familyTable tr {
        margin-bottom: 15px;
        border: 1px solid rgb(91, 91, 91);
    }

    .familyTable td {
        box-sizing: border-box;
        border: none;
        border-bottom: 1px solid rgb(174, 222, 255);
    }

    .familyTable td::before {
        display: block;
        font-weight: bold;
        color: rgb(91, 91, 91);
        margin-bottom: 5px;
    }

    .familyTable td:nth-child(1)::before {
        content: "Name";
    }

    .familyTable td:nth-child(2)::before {
        content: "Relationship";
    }

    .familyTable td:nth-child(3)::before {
        content: "Birthday";
    }

    .familyTable td:nth-child(4)::before {
        content: "Interesting Fact(s)";
    }

    .familyTable tfoot,
    .familyTable tfoot tr,
    .familyTable tfoot td {
        display: block;
        width: 100%;
    }


    /* About Me 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%;
    }

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

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

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

    /* Recommendation Question Mobile */

    .recommend {
        padding: 5px;
        margin-bottom: 10px;
    }

    .recommend span {
        display: block;
        width: 90%;
        height: 50px;
    }

    .recommend input[type="radio"] {
        margin-left: 0;
    }

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