html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.main-container {
    padding-top: 4rem;
    min-height: 100vh;
    background: linear-gradient(to bottom,  
    #005eb8 0%,
    #4AA3DF 35%,
    #89C6E8 75%, 
    #B0DBF4 85%,
    #D6ECF9 95%,
    #E4F2FB 100%);
}

.hero-image {
    position: relative;
    width: 95%;
    height: 25vh;
    border: 1px solid #080033;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 2rem;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 10px;
}

.main-nav {
    display: flex;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
    width: 95%;
    margin: 1rem auto;
    padding: 1rem;
    border: 1px solid #080033;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
}

.main-nav a {
    height: 3rem;
    display: block;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: rgba( 255, 255, 255, 1);
    padding: 5px 5px;
    position: relative;
    overflow: hidden;
    font-family: 'Source Serif 4', serif;
    font-size: 1.2rem;
}

.main-nav li:hover {
    color: rgba(0, 94, 195, .7);
    box-shadow: 0 0 25px rgb(255, 255, 255),
    inset 0 0 15px rgba(0, 94, 195, .7);
    transform: scale(1.005);
}

#nav-list {
    width: 100%;
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-text-wrapper {
    height: 200%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(0%);
    transition: transform 0.5s ease;
}

#nav-list li {
    height: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nav-default, .nav-hover {
    height: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
}

#nav-list li:hover .nav-text-wrapper {
    transform: translateY(-50%);
}

#nav1, #nav2, #nav3, #nav4 {
    border: 1px solid #080033;
}

#nav2, #nav3, #nav4 {
    border-left: none;
}

#nav1 {
    border-radius: 10px 0 0 10px;
}

#nav4 {
    border-radius: 0 10px 10px 0;
}


.hero-image{
    box-shadow: 0 0 25px rgb(0, 69, 134, 1);
}

.hero-image:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
    transform: scale(1.005);
}

.main-nav:hover, .main-content:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
    transform: scale(1.005);
}

.main-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 95%;
    margin: 0 auto;
    padding-top: 4rem;
    border: 1px solid #080033;
    border-radius: 15px;
    overflow: hidden;
}

.interior .main-content {
    gap: 1.5rem;
}

body.interior .main-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
    gap: 1rem;
}

.state-map {
    width: 99%;
    max-height: 60vh;
    aspect-ratio: 699/1000;
    object-fit: cover;
    border: 1px solid #080033;
    border-radius: 15px;
}

.location-intro, .location-stats {
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #080033;
    border-radius: 15px;
    overflow-x: hidden;
    overflow-y: scroll;
    font-family: 'Source Serif 4', serif;
    text-shadow: 0 0 5px hwb(0 100% 0% / 0.9);
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
}

.location-intro {
    width: 30%;
    overflow-x: auto;
}

.location-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 70%;
}

.location-intro:hover, .location-stats:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
}

.state-fun-facts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid #080033;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
}
.state-fun-facts:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
    transform: scale(1.005);
}

td, th {
    width: auto;
    font-size: 1rem;
    word-break: break-word;
}

table, th, td {
    border: 1px solid #080033;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.5rem;
    margin: 0.5rem;
    text-align: left;
    border-radius: 10px;
    box-shadow: 0 4px 5px rgba(0, 0, 0, .5),
     inset 0 0 5px rgba(0, 0, 0, .5);
    flex-grow: 0;
    flex-shrink: 0;
}

table:hover, td:hover {
    box-shadow: 0 0 5px rgb(255, 255, 255);
    transform: scale(1.005);
}

.city-location-intro {
    width: 25%;
    min-width: 250px;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.city-location-stats {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 30%;
    min-width: 220px;
}

.city-location-stats table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}


.city-location-gallery {
    width: 45%;
    min-width: 300px;
}

.city-location-intro, .city-location-stats {
    text-shadow: 0 0 5px hwb(0 100% 0% / 0.9);
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
}

.city-location-intro, .city-location-stats, .city-location-gallery {
    margin: 1rem;
    padding: 1rem;
    border: 1px solid #080033;
    border-radius: 15px;
    overflow-x: none;
    overflow-y: scroll;
    font-family: 'Source Serif 4', serif;
}

.city-location-intro, .city-location-stats, .city-location-gallery {
    border: 1px solid #080033;
    border-radius: 15px;
}

.city-location-intro:hover, .city-location-stats:hover, .city-location-gallery:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
    transform: scale(1.005);
}

.city-location-gallery {
    width: 50%;
    height: 60vh;
    max-height: 60vh;
    aspect-ratio: 16/9;
    overflow: hidden;
    position: relative;
    border: 1px solid #080033;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
}

.gallery-container, .gallery-track, .gallery-slide {
    height: 100%;
}

.gallery-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
    display: flex;
}

.gallery-track {
    display: flex;
    flex-direction: row;
    height: 100%;
    width: max-content;
    transition: transform 0.2s linear;
    will-change: transform;
    gap: 0;
}

.gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.caption {
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.5rem;
    font-size: 1rem;
    text-align: center;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    flex-shrink: 0;
}

.gallery-slide:hover .caption {
    opacity: 1;
}

table {
    table-layout: auto;
    width: 35%;
}

caption {
    font-size: 1.5rem;
    font-weight: bold;
    color: #080033;
    margin-bottom: 1rem;
}

.state-flag-container {
    width: 65%;
}

.state-flag {
    width: 100%;
    height: auto;
    max-height: 50vh;
    border: 1px solid #080033;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 94, 195, 0.85);
}

.state-flag:hover {
    box-shadow: 0 0 15px rgb(255, 255, 255);
    transform: scale(1.005);
}

.city-flag {
    width: 100%;
    height: auto;
    max-height: 50vh;
    border: 1px solid #080033;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 94, 195, 0.85);
}

.absolute-title {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff; 
    padding: 5px 10px;
    border-radius: 8px;
}

body.about-page .main-content {
    min-height: calc(100vh - 300px);
}

.about-intro {
    width: 60%;
    margin: 4rem auto;
    padding: 2rem;
    border: 1px solid #080033;
    border-radius: 15px;
    background-color: transparent; /* <-- Change this */
    box-shadow: none; /* Or tone it down if needed */
    font-family: 'Source Serif 4', serif;
    position: relative;
    overflow: hidden;
    text-align: center;
    transition: all 0.4s ease;
}

.about-logo {
    width: 200px;
    height: auto;
    margin: 1rem auto;
    display: block;
    float: right;
    position: relative;
}

.about-intro-inner {
    background-color: #E4F2FB;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
    padding: 2rem;
    border-radius: 15px;
}

.about-logo,
.about-description,
.about-links {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.about-intro:hover .about-logo,
.about-intro:hover .about-description,
.about-intro:hover .about-links {
    opacity: 1;
    transform: translateY(0);
}

.about-heading {
    font-size: 2rem;
    color: #080033;
    margin-bottom: 1rem;
    transition: transform 0.4s ease;
}

.about-intro:hover .about-heading {
    transform: translateY(-20px);
}


.about-description {
    font-size: 1rem;
    margin: 1rem auto;
    max-width: 500px;
}

.about-links {
    list-style: none;
    padding: 0;
}

.about-links li {
    margin: 0.5rem 0;
}

.about-links a {
    color: #002244;
    text-decoration: none;
    font-weight: bold;
}

.about-links a:hover {
    text-decoration: underline;
}

.contact-form {
    position: relative;
    width: 60%;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #080033;
    border-radius: 15px;
    background-color: #E4F2FB;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.85);
    font-family: 'Source Serif 4', serif;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: #002244;
}

.contact-form h2 {
        text-align: center;
        font-size: 2rem;
        color: #080033;
        margin-bottom: 1rem;
}

.contact-form label {
    font-weight: bold;
}

.contact-form input, .contact-form textarea {
    padding: 0.75rem;
    border: 1px solid #080033;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Source Serif 4', serif;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.contact-form button {
    align-self: center;
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: #005eb8;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 94, 195, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
    background-color: #004a94;
    transform: scale(1.03);
    box-shadow: 0 0 25px rgba(0, 94, 195, 0.9);
}

input.invalid {
    border: 2px solid red;
}

input.valid {
    border: 2px solid green;
}


.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(0, 94, 195, 0.5);
}

footer{
    background-color: #E4F2FB;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.about-footer{
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.footer-content {
    box-sizing: border-box;
    margin: 1rem;
    padding: 1rem;
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid #080033;
    border-radius: 15px;
}

.footer-content:hover {
    box-shadow: 0 0 35px rgb(38, 119, 196);
    transform: scale(1.005);
}


.footer-nav {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-nav {
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-nav a {
    text-decoration: none;
    color: #002244;
    font-weight: bold;
    margin: .1rem;
    text-decoration: none;
    padding: 10px 10px;
    position: relative;
    border: 2px solid #002244;
    border-radius: 10px;
    overflow: hidden;
    font-family: 'Source Serif 4', serif;
    font-size: 1.2rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4),
    inset 0 0 5px rgba(0, 0, 0, 0.4);
}


.footer-nav a:hover {
    color: #002244;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
    text-decoration: underline;
}



/*----Media Queries----*/

@media screen and (max-width: 768px) {
    body.interior .main-content {
        flex-direction: column;
        align-items: stretch;
    }

    .city-location-stats,
    .city-location-gallery,
    .city-location-intro {
        width: 100%;
    }
}
