@charset "utf-8";


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

body {
   font-family: Arial, Helvetica, sans-serif;
   color: rgb(70, 70, 70);
   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(80, 100, 120);
   line-height: 2.8em;
   text-decoration: none;
   text-align: center;
   color: white;
   padding: 10px;
}

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

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

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

footer {
   clear: both;
   background-color: rgb(80, 100, 120);
   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;
}

ul {
   list-style-type: square;
}


.gallery {
   display: flex;
   flex-wrap: wrap;
   gap: 15px;
}

.gallery figure {
   margin: 0;
}

.gallery img {
   width: 100%;
}



@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 figure {
      flex: 1 1 100%;
   }
}

@media only screen and (min-width: 501px) and (max-width: 768px) {
   .gallery figure {
      flex: 1 1 45%;
   }
}

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

   body {
      width: 90%;
      margin: 0 auto;
   }

   .gallery figure {
      flex: 1 1 22%;
   }
}

.familyTable {
   width: 90%;
   margin: 20px auto;
   border-collapse: collapse;
   background-color: white;
   border: 2px solid black;
}

.familyTable th,
.familyTable td {
   border: 1px solid black;
   padding: 12px;
   text-align: left;
}

.familyTable th {
   background-color: lightblue;
}

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

@media screen and (max-width: 600px) {
   .familyTable,
   .familyTable thead,
   .familyTable tbody,
   .familyTable tfoot,
   .familyTable tr,
   .familyTable th,
   .familyTable td {
      display: block;
      width: 100%;
   }

   .familyTable thead {
      display: none;
   }

   .familyTable td {
      border: 1px solid black;
      padding: 10px;
   }

   .familyTable td::before {
      font-weight: bold;
      display: block;
   }

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

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

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

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

main hr {
   clear: both;
}

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

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

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

form {
   width: 90%;
}

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

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

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

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;
   float: left;
   left: 0;
   text-align: center;
   width: 40%;
   padding: 10px;
   margin-left: 5%;
   margin-right: 5%;
   margin-bottom: 10px;
}

footer {
   clear: both;
}

@media only screen and (max-width: 768px) {
   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%;
   }

   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;
   }
}
.recommendBox {
   clear: both;
   margin-top: 20px;
   margin-bottom: 20px;
}

.recommendBox p {
   padding: 5px;
   margin: 0;
}

.recommendBox input[type="radio"] {
   display: inline;
   position: static;
   width: auto;
   margin-left: 30%;
}

.recommendBox label.radio {
   display: inline;
   position: static;
   width: auto;
}

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

nav a:hover {
   background-color: rgb(150, 120, 120);
   color: ivory;
   font-size: 1.2em;
   transition: background-color 0.5s ease-in 0.2s,
               color 0.5s ease-in 0.2s,
               font-size 1s ease;
}

iframe {
   max-width: 100%;
   display: block;
   margin: 20px auto;
   border: none;
}