/* Universal styles */
* {
    box-sizing: border-box;
}

/* Global styles for the document */
body {
    background-color: #90C7E3; /* Changed background color */
    color: #666666;
    font-family: Verdana, Arial, sans-serif;
    margin: 0;
}

/* Styles for the header element */
header {
    background-color: #002171;
    color: #FFFFFF;
    font-family: Georgia, serif;
    padding: 1em;
}

/* Styles for the h1 element */
h1 {
    text-align: center;
    font-size: 1.5em; /* Added font size */
    color: #FFFFFF; /* Set H1 text color to white */
}

/* Remove underline from header link */
header a {
    text-decoration: none; /* Remove underline */
    color: #FFFFFF; /* Ensure link color is white */
}

/* Styles for the nav element */
nav {    
    font-size: 1.2em; /* Set font size */
    background-color: white; 
    text-align: center;
}

/* Remove underline from hyperlinks in nav */
nav a {
    text-decoration: none;
}

/* Styles for nav link states */
nav a:link {
    color: #5C7FA3; /* Unvisited hyperlinks */
}

nav a:visited {
    color: #344873; /* Visited hyperlinks */
}

nav a:hover {
    color: #A52A2A; /* Hover state */
}

/* Styles for the unordered lists in nav */
nav ul {
    display: flex;             /* Configure as a flex container */
    flex-direction: column;    /* Set flex direction to column */
    list-style-type: none;     /* No list markers */
    padding-left: 0;           /* Set left padding to 0 */
    margin: 0;                 /* Set margin to 0 */
}

nav li {
    padding-left: 1em;
    padding-right: 1em;
    padding-top: .5em;
    padding-bottom: .5em;
    width: 100%;
    border-bottom: solid 1px;
}

/* Styles for the h2 element */
h2 {
    color: #1976D2;
    font-family: Georgia, serif;
}

/* Styles for the h3 element */
h3 {
    font-family: Georgia, serif;
}

/* Styles for the dt element */
dt {
    color: #002171;
    font-weight: bold;
}

/* Styles for a class named resort */
.resort {
    color: #1976D2;
    font-size: 1.2em;
}

/* Styles for the footer element */
footer {
    font-size: 0.70em;
    font-style: italic;
    text-align: center;
    padding: 1em;
    background-color: #FFFFFF; /* Added background color */
}

/* Style rule for the wrapper ID */
#wrapper {
    background-color: #FFFFFF; /* Changed background color */
    box-shadow: 0px 4px 8px rgba(0.2, 0.2, 0.2, 0.2);
}

/* Styles for the main element */
main {
    padding-left: 2em;
    padding-right: 2em;
    display: block; /* For IE compatibility */
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 1em;
    padding-right: 1em;
    background-color: white;
    overflow: auto;
}

/* Hero image styles */
#homehero, #yurthero, #trailhero {
    height: 300px;
    background-size: 200% 100%;
    background-repeat: no-repeat;
}

#homehero {
    background-image: url('coast.jpg');
}

#yurthero {
    background-image: url('yurt.jpg');
}

#trailhero {
    background-image: url('trail.jpg');
}

/* Section styles */
section {
    padding-left: .5em;
    padding-right: .5em;
}

#mobile {
    display: none;
}

#desktop {
    display: inline;
}

.info-columns {
    display: block;
}

.info-columns article {
    margin-bottom: 1em;
}

/* Mobile view: Show mobile hyperlink and hide desktop text */
@media (max-width: 600px) {
    nav ul {
        flex-direction: column;
        justify-content: center;
        flex-wrap: nowrap;
        justify-content: space-around;
    }

    section {
        padding-left: 2em;
        padding-right: 2em;
    }

    .info-columns {
        display: flex;
        gap: 1em;
    }

    .info-columns article {
        flex: 1;
        margin-bottom: 0;
    }

    h1 {
        font-size: 2em;
        letter-spacing: .25em;
    }

    #content {
        display: flex;
        flex-direction: row;
    }

    #mobile {
        display: inline;
    }

    #desktop {
        display: none;
    }
}

/* Wide viewport styles */
@media (min-width: 1024px) {
    body {
        background-image: linear-gradient(to bottom, white 20%, lightblue 20%, lightblue 100%, white 100%);
    }

    section {
        padding-right: 10%;
        padding-left: 10%;
    }

    #content {
        width: 80%;
        margin: auto;
        margin-top: 30%;
    }

    nav ul {
        flex-direction: row;
        justify-content: space-around;
        border-bottom: none;
    }

    #wrapper {
        padding-left: 2em;
        padding-bottom: 2em;
        padding-right: 2em;
        background: linear-gradient(#FFFFFF, #90C7E3);
    }

    nav li {
        border-bottom: none;
    }
}

/* Table styles */
table {
    width: 90%;
    margin: 0 auto;
    border: 1px solid #3399CC;
    border-collapse: collapse;
}

td, th {
    text-align: center;
    padding: 5px;
    border: 1px solid #3399CC;
}

.text {
    text-align: left;
}

tr:nth-child(even) {
    background-color: #DFEDF8;
}

/* Form styles */
form {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-auto-rows: auto;
    gap: 20px;
    padding-left: 20px;
}

label {
    grid-column: 1 / 2;
    text-align: left;
    padding-right: 10px;
    align-self: center;
}

input, select, textarea {
    grid-column: 2 / 3;
    width: 100%;
    max-width: 400px;
}

#nights {
    max-width: 80px;
}

textarea {
    resize: none;
}

button {
    grid-column: 2 / 3;
    padding: 10px 20px;
    justify-self: start;
}

/* Narrow viewport styles */
@media (max-width: 600px) {
    form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    label {
        grid-column: 1 / 2;
        text-align: left;
    }

    input, select, textarea, button {
        grid-column: 1 / 2;
        max-width: 100%;
    }
}