@charset "UTF-8";

body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    margin: 0;
    padding: 0;
}

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

header img {
    width: 100%;
    display: block;
}

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

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

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

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

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

nav a:hover {
    background-color: #ff6f00;
    color: white;
    font-size: 1.2em;
    transition:
        background-color 0.5s ease-in 0.2s,
        color 0.5s ease-in 0.2s,
        font-size 1s ease 0.2s;
}

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

main ul {
    list-style-type: square;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.image-grid img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #f9f9f9;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ccc;
}

thead {
    background-color: #333;
    color: white;
}

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

tfoot {
    background-color: #ddd;
    font-weight: bold;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #ff6f00;
    background-color: #fff9e6;
}

input:valid,
select:valid,
textarea:valid {
    border: 2px solid green;
}

input:invalid,
select:invalid,
textarea:invalid {
    border: 2px solid red;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

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

    body {
        background-color: rgba(255, 255, 255, 0.85);
        width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    fieldset {
        position: relative;
        width: 90%;
        padding: 5px;
        margin: 0 0 10px 10px;
    }

    fieldset > label:not(.radio) {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 30%;
        padding-right: 10px;
        margin-bottom: 12px;
        box-sizing: border-box;
    }

    fieldset > input:not([type="radio"]):not([type="submit"]):not([type="reset"]),
    fieldset > select,
    fieldset > textarea {
        width: 60%;
        padding: 5px;
        margin-bottom: 12px;
        box-sizing: border-box;
    }

    .radio-group {
        width: 100%;
        display: flex;
        gap: 20px;
        margin-bottom: 12px;
    }

    .radio-group label {
        display: inline-block;
        margin: 0;
    }

    input[type="submit"],
    input[type="reset"] {
        display: inline-block;
        width: 45%;
        padding: 10px;
        margin: 0 2% 10px 0;
        text-align: center;
        box-sizing: border-box;
    }
}

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

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

    nav a {
        border-bottom: 1px solid black;
        line-height: 2em;
    }

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

    h1, h2 {
        text-shadow: none;
    }

    .family-table-container,
    .education-table-container {
        overflow-x: auto;
        padding: 0 10px;
    }

    form {
        width: 100%;
        font-size: large;
    }

    fieldset {
        width: 100%;
        padding: 5px;
        margin: 0;
    }

    fieldset label,
    fieldset input,
    fieldset select,
    fieldset textarea {
        display: block;
        width: 90%;
        padding: 5px;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    .radio-group {
        display: block;
    }

    .radio-group label {
        display: inline-block;
        width: auto;
    }

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