@charset "utf-8";

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

header img {
width: 100%;
display: block;
}

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(120, 95, 75);
line-height: 2.8em;
text-decoration: none;
text-align: center;
color: ivory;
}

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

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

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

.gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}

.gallery img {
width: 23%;
}

.familyTable {
width: 100%;
border-collapse: collapse;
background-color: white;
margin-top: 20px;
}

.familyTable th,
.familyTable td {
border: 1px solid rgb(120, 95, 75);
padding: 10px;
text-align: left;
}

.familyTable th {
background-color: rgb(120, 95, 75);
color: ivory;
}

.familyTable tfoot {
background-color: rgb(220, 220, 220);
font-weight: bold;
text-align: center;
}

body > footer {
background-color: rgb(120, 95, 75);
color: rgba(255, 255, 255, 0.7);
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;
}

.clearFloat {
clear: both;
}

form {
width: 90%;
}

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

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

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

textarea {
height: 100px;
}

input[type="radio"] {
display: inline;
position: inherit;
left: 0;
width: auto;
margin-right: 5px;
}

label.radio {
display: inline;
position: inherit;
margin-right: 20px;
}

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

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

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

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

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

.gallery img {
width: 48%;
}

.familyTable,
.familyTable thead,
.familyTable tbody,
.familyTable th,
.familyTable td,
.familyTable tr {
display: block;
}

.familyTable thead {
display: none;
}

.familyTable tr {
margin-bottom: 15px;
border: 1px solid rgb(120, 95, 75);
background-color: white;
}

.familyTable td {
border: none;
border-bottom: 1px solid lightgray;
position: relative;
padding-left: 50%;
min-height: 30px;
}

.familyTable td::before {
content: attr(data-label);
position: absolute;
left: 10px;
top: 10px;
width: 45%;
font-weight: bold;
color: rgb(120, 95, 75);
}

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

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

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

textarea {
height: 150px;
}

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

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

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

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