@charset "utf-8";

/* HTML background */
html {
    background-color: lightblue;
}

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

/* Header styles */
header {
    text-align: center;
    padding: 20px;
}

/* Heading 2 styles */
h2 {
    font-size: 1.3em;
}

/* Navigation styles 
nav {
    background-color: rgb(70, 90, 110);
    padding: 15px;
    text-align: center;
}
*/
/* Navigation link styles */
nav a {
    display: block;
    background-color: lightblue;
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.5s ease-in 0.2s,
                color 0.5s ease-in 0.2s,
                font-size 1s ease;
}

/* Navigation hover styles */
nav a:hover {
    background-color: navy;
    color: white;
    font-size: 1.2em;
}

/* Main content styles */
main {
    padding: 20px;
    margin-top: 70px;
}

/* Image styles */
main > img {
    width: 25%;
    float: right;
    padding: 25px;
}

header img{
    width: 100%;
}

/* Education list styles */
ul {
    list-style-type: square;
}

/* Footer styles */
body > footer {
    background-color: rgb(70, 90, 110);
    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;
}

/* Text Shadow*/
h1, h2 {
    text-shadow: 4px 6px 5px gray;
}

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

nav li {
    display: block;
    width: 20%;
    float: left;
}
input:focus,
select:focus,
textarea:focus {
    background-color: lightyellow;
}

input:valid {
    background-color: lightgreen;
}

input:invalid {
    background-color: lightpink;
}

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

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;
    position: relative;
    float: left;
    clear: none;
    left: 0;
    text-align: center;
    width: 40%;
    padding: 10px;
    margin: 0 5% 10px 5%;
    box-sizing: border-box;
}
/* mobile media query */
.gallery {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 10px;
}

/* Family Table Styles */
.familyTable {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: white;
}

.familyTable th,
.familyTable td {
    border: 2px solid navy;
    padding: 10px;
    text-align: left;
}

.familyTable th {
    background-color: lightblue;
    color: navy;
}

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

@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 {
   flex: 0 1 calc(50% - 10px);
}

#navicon {
   display: block;
   font-size: 2em;
   text-align: center;
   padding: 10px;
   text-decoration: none;
}

nav ul {
   display: none;
}

nav:hover ul {
   display: block;
}
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%;
}

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

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

   .gallery img {
      flex: 0 1 90%;
   }

   
 }

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

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

    .familyTable thead {
        display: none;
    }

    .familyTable tr {
        margin-bottom: 15px;
        border: 2px solid navy;
    }

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

    .familyTable td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        font-weight: bold;
        text-align: left;
    }

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

/*desktop media query */

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

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

    .gallery img {
     flex: 0 1 calc(25% - 10px);
    }

    #navicon {
   display: none;
}

nav ul {
   display: block;
}
}





