@charset "utf-8";
html {
    background-color: rgb(224,233,237);
}
body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91,91, 91);
    background-color: ivory;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}
header {
    text-align: center;
    padding: 20px;
}
h2 {
    font-size: 1.3em;
}
/* nav {
    background-color: rgb(68, 83,127);
    padding: 15px;
    text-align: center;
}
nav a {
    padding-left: 10px;
    padding-right: 10px;
    text-decoration: none;
    color: rgb(248, 247, 246);
}
nav a:hover {
    text-decoration: underline;
    color: rgb(255,215,155);
}
    */
nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav li {
    display: block;
    width: 20%;
    float: left;

}
nav a {
    display: block;
    background-color: rgb(68, 83, 127);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: rgb(245, 247, 246);
}
nav a:hover {
    background-color: rgb(255, 215, 155);
    color: rgb(68, 83, 127);
    font-size: 1.2em;
    transition:
        background-color 0.5s ease-in 0.2s,
        color 0.5s ease-in 0.2s,
        font-size 1s ease;
}
main {
    padding: 20px;
    margin-top: 70px;
}
main > img {
    width: 25%;
    padding: 25px;
    float: right;
}
div.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
}
div.gallery img  {
    width: 100%;
    height: auto;
    display: block;
}
header img {
    width: 100%;
    display: block;
}
body > footer {
    background-color: rgb(68,83,127);
    color: rgba(245, 245, 245, 0.75);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    clear: both;
}
.school-list {
    list-style-type: square;
}
/*
html {
    background-image: url("bg.jpg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
}
    */
@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;
        display: block;
    }
    main > img {
        width: 90%;
        float: none;
        display: block;
        margin: 0 auto;
    }
    div.gallery img {
        flex: 0 0 calc(50% - 12px);
    }
    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;
    }
    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("bg.jpg");
        background-repeat: no-repeat;
        background-position: center top;
        background-size: cover;
    }
    div.gallery img {
        flex: 0 0 calc(25% - 12px);
    }
}
@media only screen and (max-width: 480px) {
    div.gallery img {
        flex: 0 0 100%;
    }
}

h1, h2 {
    text-shadow: 4px 6px 5px gray;
}
table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 2px solid rgb(68, 83, 127);
}
th, td {
    border: 1px solid rgb(120, 135, 170);
    padding: 10px;
    text-align: left;
}
thead {
    background-color: rgb(200, 210, 230);
}
tfoot {
    background-color: rgb(224, 233, 237);
    font-style: italic;
}
@media screen and (max-width: 600px) {
    table, tbody, tr, td, th {
        display: block;
    }
    thead, tfoot {
        display: none;
    }
    tbody td {
        position: relative;
        padding-left: 40%;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        top: 0px;
        left: 0px;
        padding: 5px;
        width: 40%;
        font-weight: bold;
    }
}
.clearfloat {
    clear: both;

}
input:focus, select:focus, textarea:focus {
    background-color: rgb(220, 255, 220);
}
input#name:focus:valid,
input#address1:focus:valid,
input#city:focus:valid,
input#zip:focus:valid,
input#phone:focus:valid,
input#email:focus:valid,
input#bdate:focus:valid,
select#state:focus:valid {
    background-color:rgb(220, 255, 220);
}
input#name:focus:invalid,
input#address1:focus:invalid,
input#city:focus:invalid,
input#zip:focus:invalid,
input#phone:focus:invalid,
input#email:focus:invalid,
input#bdate:focus:invalid,
select#state:focus:invalid {
    background-color:rgb(255, 232, 233);
}
form {
    width: 90%;
}
fieldset {
    width:90%;
    padding: 5px;
    margin-right: 10px;
    margin-bottom: 10px;
    position: relative;
}
Label {
    display: block;
    position: absolute;
    padding: 5px;
    width: 30%;
}
input, select, textarea {
    display: block;
    position: relative;
    left: 30%;
    padding: 5px;
    height: auto;
    width: 60%
}
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;
}
.formRow > label {
    position: relative;
    display: block;
    width: 100%;
    left: 0;
}
.fieldset.optgroup {
    border: none;
    margin: 0;
    padding: 0;
}
fieldset.optgroup {
    position: relative;
    left: 30%;
    width: 60%;
}
    