@import url('https://fonts.googleapis.com/css2?family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css?family=Eczar');

/* Reset default margin and padding for body */
body {
    margin: 0;
    padding: 0;
    background-color: #eee;
}

/* Center align the h1 title */
h1 {
    text-align: center;
}

/* CSS styles for header */
header {
    background-color: #898AA6;
    height: 45px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 16px;
    position: relative;
}

/* CSS styles for navigation */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo img {
    height: 80px;
    width: auto;
}

.logo span {
    color: #fff;
    font-size: 1.5rem;
    font-family: 'Eczar', serif;
    font-weight: bold;
    margin-left: 10px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    margin-right: 10px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: #C9BBCF;
}

.nav-link.active {
    background-color: #B7D3DF;
}

.nav-link:active {
    background-color: #D6EFED;
}

/* CSS styles for intro section */
.intro-section {
    padding: 0;
    background-color: #432948;
    color: #fff;
    text-align: center;
}

.intro-container {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.intro-image {
    flex: 1;
    margin-right: 20px;
}

.intro-text {
    flex: 1;
    margin: 30px;
    line-height: 1.5;
}

.intro-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.intro-title {
    font-size: 2rem;
    margin-bottom: 20px;
}

#home_title {
    font-size: 50px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #f8d2ff;
}

.intro-title h1 {
    font-size: 60px;
}

.intro-text p {
    font-size: 1.1rem;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #e7e7e7;
}

/* Map section styles */
.map-section {
    padding: 40px; /* Reduced padding to make the map container closer to the edge */
    background-color: #FDFDF6;
    text-align: center;
}

.map-container {
    height: 600px;
    width: 90%;
    margin: 0 auto;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Table section styles */
.table-section {
    padding: 40px;
    text-align: center;
}

.table-title {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.pollution-table {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed;
}

th {
    font-weight: bold;
    background-color: #f8f8f8;
    padding: 15px;
    color: #333;
}

td {
    padding: 15px;
    color: #555;
    word-wrap: break-word;
}

.index-cell {
    width: 15%;
}

.index-badge {
    display: block;
    padding: 8px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

.good {
    background-color: #009966;
    color: #FFFFFF;
}

.moderate {
    background-color: #ffde33;
    color: #FFFFFF;
}

.unhealthy {
    background-color: #ff9933;
    color: #FFFFFF;
}

.unhealthy-services {
    background-color: #cc0033;
    color: #FFFFFF;
}

.very-unhealthy {
    background-color: #660099;
    color: #FFFFFF;
}

.hazardous {
    background-color: #7e0023;
    color: #FFFFFF;
}

.description-cell {
    text-align: left;
}

#map-title {
    font-size: 28px;
    margin-bottom: 40px;
    color: #333; /* Updated color for better contrast with background */
}

.footer {
    background-color: #f8f8f8;
    padding: 20px;
    text-align: center;
    font-size: 17px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
}

.footer-logo {
    flex: 0 0 auto;
    max-width: 200px;
}

.footer-logo img {
    max-width: 100%;
}

#footer-copyright {
    margin-left: 10px;
}

.footer-right {
    display: flex;
    align-items: center;
}

.footer-links {
    margin-left: 20px;
}

.footer-link {
    display: inline-block;
    margin-left: 10px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #007bff;
}

.footer-social {
    margin-left: 20px;
}

.social-link {
    display: inline-block;
    margin-right: 10px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #007bff;
}

/* Hamburger Menu Styles */
.header {
    position: relative;
}

.menu-btn {
    display: none;
}

.menu-icon {
    display: block;
    cursor: pointer;
    padding: 10px;
    width: 40px; /* Adjust the width as needed */
}

.menu-btn:checked + .menu-icon {
    display: block;
}

.menu {
    display: block;
}

.menu a {
    display: inline-block;
    margin-right: 15px;
}

/* Media Query for Phone Screens */
@media only screen and (max-width: 767px) {
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #898AA6;
        padding: 10px;
        text-align: center;
    }

    .menu a {
        display: block;
        margin: 10px 0;
    }

    .menu-icon {
        display: block;
        cursor: pointer;
        padding: 10px;
    }

    .menu-icon .navicon {
        background: #333;
        display: block;
        height: 2px;
        position: relative;
        transition: background 0.2s ease-out;
        width: 100%;
    }

    .menu-icon .navicon:before,
    .menu-icon .navicon:after {
        background: #333;
        content: '';
        display: block;
        height: 100%;
        position: absolute;
        transition: all 0.2s ease-out;
        width: 100%;
    }

    .menu-icon .navicon:before {
        top: 5px;
    }

    .menu-icon .navicon:after {
        top: -5px;
    }

    .menu-btn:checked + .menu-icon .navicon {
        background: transparent;
    }

    .menu-btn:checked + .menu-icon .navicon:before {
        transform: rotate(-45deg);
        top: 0;
    }

    .menu-btn:checked + .menu-icon .navicon:after {
        transform: rotate(45deg);
        bottom: 0;
    }

    .menu-btn:checked ~ .menu {
        display: block;
    }

    .intro-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .intro-image {
        position: relative;
        width: 100%;
        height: 0;
        padding-bottom: 60%; /* Adjust the aspect ratio as needed */
        overflow: hidden;
    }

    .intro-image img {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: 100%;
        min-height: 100%;
    }
}
