@charset "utf-8";

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%;
    height: 180px;
    object-fit: contain;
    background-color: #88c63f;
    display: block;
}

h1, h2 {
    text-shadow: 4px 6px 5px gray;
}

h2 {
    font-size: 1.3em;
}

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

nav a {
    text-decoration: none;
    display: block;
    background-color: #8b3a62;
    line-height: 2.8em;
    text-align: center;
    color: #ffffff;
}

nav a:hover {
    background-color: #5c1d3d;
    color: #ffeb3b;
}

nav a#navicon {
    display: none;
}

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

ul.school-list {
    list-style-type: square;
}

body > footer {
    clear: both;
    background-color: #8b3a62;
    color: rgba(255, 255, 255, 0.85);
    font-weight: bold;
    font-size: 0.9em;
    line-height: 3em;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
}

body > footer a {
    color: inherit;
}

table.family-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px auto;
    background-color: #ffffff;
    border: 2px solid #8b3a62;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

table.family-table caption {
    font-size: 1.4em;
    font-weight: bold;
    padding: 10px;
    color: #8b3a62;
    caption-side: top;
}

table.family-table th,
table.family-table td {
    padding: 12px 15px;
    border: 1px solid #d3c2ce;
    text-align: left;
}

table.family-table thead th {
    background-color: #8b3a62;
    color: #ffffff;
    font-size: 1.05em;
    letter-spacing: 0.5px;
}

table.family-table tbody tr:nth-child(even) {
    background-color: #faf5f8;
}

table.family-table tbody tr:hover {
    background-color: #f0e2eb;
}

table.family-table tfoot td {
    background-color: #f4ecf1;
    font-style: italic;
    text-align: center;
    font-weight: bold;
    color: #5c1d3d;
    padding: 12px;
}

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

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

div.imgGallery img {
    width: 100%;
    height: 180px;       
    object-fit: cover;
    display: block;
}

@media only screen and (min-width: 769px) {
    html {
        background-image: url('bg.jpg');
        background-repeat: no-repeat;
        background-position: center center;
        background-attachment: fixed;
        background-size: cover;
    }

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

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

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

@media only screen and (max-width: 768px) {
    body {
        width: 100%;
        margin: 0;
    }

    div.imgGallery {
        flex: 48%;
        max-width: 50%;
    }

    nav a#navicon {
        display: block;
        font-size: 2em;
        text-align: right;
        padding-right: 20px;
        color: #ffffff;
        background-color: #8b3a62;
        text-decoration: none;
        line-height: 1.6em;
        cursor: pointer;
    }

    nav ul {
        display: none;
    }

    nav:hover ul {
        display: block;
    }

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

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

    table.family-table,
    table.family-table thead,
    table.family-table tbody,
    table.family-table tfoot,
    table.family-table tr,
    table.family-table th,
    table.family-table td {
        display: block;
    }

    table.family-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    table.family-table tr {
        border: 1px solid #8b3a62;
        margin-bottom: 15px;
        background-color: #ffffff;
        border-radius: 4px;
    }

    table.family-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    table.family-table td:last-child {
        border-bottom: none;
    }

    table.family-table td::before {
        position: absolute;
        top: 12px;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        text-align: left;
        color: #8b3a62;
        content: attr(data-label);
    }

    table.family-table tfoot td {
        padding-left: 15px;
        text-align: center;
    }

    table.family-table tfoot td::before {
        content: "";
    }

    main > img {
        float: none;
        width: 90%;
        display: block;
        margin: 0 auto;
    }
}

@media only screen and (max-width: 480px) {
    div.imgGallery {
        flex: 100%;
        max-width: 100%;
    }
}