@charset "utf-8";

/* ===============================
   Always Apply Styles (Global)
   =============================== */
body {
    font-family: Verdana, Geneva, sans-serif;
    color: rgb(91, 91, 91);
    background-color: ivory;
    margin: 0;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

header {
    text-align: center;
    padding: 0;
}

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

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

h2 {
    font-size: 1.3em;
}

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

nav a {
    display: block;
    background-color: rgb(180, 180, 180);
    line-height: 2.8em;
    text-decoration: none;
    text-align: center;
    color: rgb(50, 50, 50);
    font-weight: bold;

    /* Assignment 7 Transition */
    transition:
        background-color 0.5s ease-in 0.2s,
        color 0.5s ease-in 0.2s,
        font-size 1s ease;
}

nav a:hover {
    background-color: rgb(140, 140, 140);
    color: white;

    /* Assignment 7 Requirement */
    font-size: 1.2em;
}

main {
    padding: 20px;

    /* Assignment 7 Requirement */
    margin-top: 70px;
}

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

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

/* ===============================
   Table Styles
   =============================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background-color: rgb(180, 180, 180);
}

thead th {
    padding: 10px;
    text-align: left;
    border: 1px solid rgb(120, 120, 120);
}

tbody td {
    padding: 10px;
    border: 1px solid rgb(200, 200, 200);
}

tfoot td {
    padding: 10px;
    text-align: center;
    font-style: italic;
    background-color: rgb(220, 220, 220);
    border: 1px solid rgb(180, 180, 180);
}

/* Responsive table for mobile */
@media screen and (max-width: 768px) {
    table, thead, tbody, th, td, tfoot, tr {
        display: block;
        width: 100%;
    }

    thead tr {
        display: none;
    }

    tbody tr {
        margin-bottom: 15px;
        border: 1px solid rgb(200, 200, 200);
        padding: 10px;
    }

    tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px;
        border: none;
        border-bottom: 1px solid rgb(200, 200, 200);
    }

    tbody td::before {
        content: attr(data-label);
        font-weight: bold;
    }

    tfoot td {
        display: block;
        border: none;
    }
}

/* ===============================
   Desktop Styles
   =============================== */
@media screen and (min-width: 769px) {
    html {
        background-image: url("background.jpg");
        background-repeat: no-repeat;
        background-position: center center;
        background-size: cover;
    }

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

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

    /* Form Styles Desktop */
    form {
        width: 90%;
        margin: 20px auto;
    }

    fieldset {
        width: 90%;
        padding: 5px;
        margin-right: 10px;
        margin-bottom: 10px;
    }

    input, select, textarea {
        display: block;
        position: relative;
        left: 30%;
        padding: 5px;
        height: auto;
        width: 60%;
        margin-bottom: 10px;
    }

    label {
        display: block;
        position: absolute;
        width: 30%;
        padding: 5px;
        text-align: left;
    }

    input[type="radio"] {
        display: inline-block;
        position: inherit;
        left: 0;
        width: auto;
    }

    label.radio {
        display: inline-block;
        position: inherit;
        margin-right: 10px;
    }

    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;
        font-size: 1em;
        cursor: pointer;
    }

    body > footer {
        clear: both;
    }
}

/* ===============================
   Tablet / Mobile Styles
   =============================== */
@media 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;
        padding: 0;
    }

    /* Form Styles Mobile */
    form {
        width: 100%;
        font-size: large;
        margin: 10px 0;
    }

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

    input, select, textarea {
        display: block;
        position: inherit;
        width: 90%;
        height: 50px;
        padding: 5px;
        margin-bottom: 10px;
    }

    label {
        display: block;
        position: inherit;
        width: 90%;
        height: 50px;
        margin-bottom: 5px;
    }

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

/* ===============================
   Input Focus / Validation Styles
   =============================== */
input:focus, select:focus, textarea:focus {
    outline: 2px solid #3333cc;
    background-color: #f0f8ff;
}

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

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

/* ===============================
   Vacation Grid
   =============================== */
.vacation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    justify-items: center;
    margin-top: 20px;
}

.vacation-grid img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}