@charset "utf-8";

/* ========================= */
/* GLOBAL STYLES (ALL SCREENS) */
/* ========================= */

body {
   font-family: Verdana, Geneva, sans-serif;
   color: rgb(91, 91, 91);
   background-color: ivory;
}

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 a {
   display: block;
   background-color: rgb(70, 90, 120);
   line-height: 2.8em;
   text-decoration: none;
   text-align: center;
   color: white;
}

nav a:hover {
   background-color: lightblue;
   color: black;
}

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

body > footer {
   background-color: rgb(70, 90, 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;
   clear: both;
}

ul {
   list-style-type: square;
}

/* ========================= */
/* FAMILY TABLE STYLES */
/* ========================= */

.familyTable {
   width: 100%;
   border-collapse: collapse;
   background-color: rgb(245, 245, 245);
   margin: 20px auto;
}

.familyTable caption {
   font-size: 1.2em;
   font-weight: bold;
   margin-bottom: 10px;
}

.familyTable th,
.familyTable td {
   border: 2px solid rgb(70, 90, 120);
   padding: 10px;
   text-align: left;
}

.familyTable thead {
   background-color: rgb(70, 90, 120);
   color: white;
}

.familyTable tbody tr:nth-child(even) {
   background-color: rgb(230, 235, 240);
}

.familyTable tfoot {
   background-color: rgb(210, 225, 235);
   font-style: italic;
   text-align: center;
}

/* ========================= */
/* DESKTOP ONLY (min-width: 769px) */
/* ========================= */

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

   html {
      background-color: rgb(210, 225, 235);
      background-image: url("mybackground.jpg");
      background-repeat: no-repeat;
      background-size: cover;
      background-position: center;
   }

   body {
      width: 90%;
      margin-left: auto;
      margin-right: auto;
   }

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

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

/* ========================= */
/* MOBILE ONLY (max-width: 768px) */
/* ========================= */

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

   body {
      width: 100%;
      margin: 0;
   }

   nav li {
      float: none;
      width: 100%;
      font-size: x-large;
   }

   nav a {
      border-bottom: 1px solid black;
   }

   header img {
      width: 100%;
      height: auto;
   }

   main > img {
      float: none;
      width: 90%;
      padding: 10px 0;
   }

   main {
      padding: 10px;
   }

   /* Responsive Family Table */

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

   .familyTable thead {
      display: none;
   }

   .familyTable tr {
      margin-bottom: 15px;
      border: 2px solid rgb(70, 90, 120);
      background-color: white;
   }

   .familyTable td {
      border: none;
      position: relative;
      padding-left: 45%;
      padding-top: 8px;
      padding-bottom: 8px;
   }

   .familyTable td:nth-of-type(1):before {
      content: "Name:";
      position: absolute;
      left: 10px;
      font-weight: bold;
   }

   .familyTable td:nth-of-type(2):before {
      content: "Relationship:";
      position: absolute;
      left: 10px;
      font-weight: bold;
   }

   .familyTable td:nth-of-type(3):before {
      content: "Birthday:";
      position: absolute;
      left: 10px;
      font-weight: bold;
   }

   .familyTable td:nth-of-type(4):before {
      content: "Interesting Fact:";
      position: absolute;
      left: 10px;
      font-weight: bold;
   }

   .familyTable tfoot {
      display: block;
      text-align: center;
   }
}