@charset "utf-8";

/* HTML background */

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

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

header img {
width: 100%;
}

/* Heading styles */
h1, h2 {
    text-shadow: 4px 6px 5px gray;
}
h2 {
font-size: 1.3em;
}

/* Navigation styles */
/*
nav {
background-color: #3c5a6e;
padding: 15px;
text-align: center;
}
*/
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

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

nav a {
    display: block;
    background-color: #3c5a6e;
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: ivory;
}

nav a:hover {
    background-color: #70b7e4;
    color: #000000;
}

/* Navigation links */
nav > a {
padding-left: 10px;
padding-right: 10px;
text-decoration: none;
color: ivory;
}

/* Navigation links when hovered over */
nav a:hover {
text-decoration: underline;
color: rgb(255, 255, 255);
}

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

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

/* Footer styles */
body > footer {
background-color: rgb(60, 90, 110);
color: rgba(255, 255, 255, 0.6);
font-weight: bold;
font-size: 0.9em;
line-height: 3em;
text-align: center;
margin-top: 10px;
padding: 10px;
clear: both;
}

div.gallery {
    display: flex;
    flex-flow: wrap;
}

div.imgGallery {
    flex:25%;
    max-width: 25%;
    box-sizing: border-box;
    padding: 0 4px;
}

div.imgGallery img{
    width:100%;
}

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

/* Family table */
table {
    width: 90%;
    margin: 20px auto;
    border-collapse: collapse;
    background-color: #fffff0;
    border: 2px solid #3c5a6e;
}

table caption {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    color: rgb(91, 91, 91);
    text-shadow: 4px 6px 5px gray;
}

th, td {
    border: 1px solid #3c5a6e;
    padding: 10px;
    text-align: left;
}

thead {
    background-color: #70b7e4;
}

th {
    color: black;
}

tbody tr:nth-child(even) {
    background-color: #e6f3fa;
}

tfoot {
    background-color: #3c5a6e;
    color: rgb(255, 255, 255);
    text-align: center;
}

/* Form fields when they have focus */
input:focus, select:focus, textarea:focus {
    background-color: #e6f7ff;
}

/* Invalid fields only when they have focus */
input:focus:invalid, select:focus:invalid, textarea:focus:invalid {
    background-color: #ffcccc;
}

/* Valid fields only when they have focus */
input:focus:valid, select:focus:valid, textarea:focus:valid {
    background-color: #ccffcc;
}

@media only screen and (max-width: 1100px) {
    div.imgGallery {
        flex:50%;
        max-width: 50%;
        box-sizing: border-box;
        padding: 0 4px;
    }
}

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

    div.imgGallery {
        flex:100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 0 4px;
    }

    table caption {
        display: block;
        width: 100%;
        text-align: center;
        font-size: 1.6em;
        line-height: 1.2;
        padding: 15px 0;
        white-space: nowrap;
    }

    table, tbody, tr, td, th {
        display: block;
    }

    thead, tfoot {
        display: none;
    }

    tbody td {
        position: relative;
        padding-left: 40%;
        min-height: 25px;
    }

    tbody td::before {
        content: attr(data-label);
        position: absolute;
        top: 0;
        left: 0;
        padding: 5px;
        width: 35%;
        font-weight: bold;
    }

    tbody tr {
        margin-bottom: 15px;
        border: 1px solid #3c5a6e;
    }

    tbody tr:last-child {
        margin-bottom: 0;
    }

    /* Contact form - mobile screens */
    textarea {
        position: inherit;
        display: block;
        width: 90%;
        height: 100px;
        padding: 5px;
    }

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

    /* Radio buttons on mobile */
    input[type="radio"] {
        display: inline;
        position: inherit;
        height: auto;
        width: auto;
        padding: 0;
        margin: 0 5px 0 0;
    }

    label.radio {
        display: inline;
        position: inherit;
        height: auto;
        width: auto;
        padding: 0;
        margin-right: 15px;
    }

    p.recommend {
        margin-bottom: 10px;
    }
}


@media only screen and (min-width: 769px) {
    
    /* HTML background */
    html {
        background-color: #70b7e4;
        background-image: url("background.png");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
    }

      /* Contact form - larger screens */
    textarea {
        display: block;
        position: relative;
        left: 30%;
        padding: 5px;
        width: 60%;
    }
    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"] {
        clear: both;
    }

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

}