* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    /* Prevent horizontal scrolling on mobile */
    overflow-x: hidden;
}

.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    z-index: 1000;
    border-bottom: 5px solid black;
    position: relative;
}

.nav-logo {
    float: left;
    height: 50px;
    padding-left: 20px;
    margin-top: 5px;
}

.heat-map-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 5.5px;
    padding: 10px 80px;
    background-color: #3C638E;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 18px;
    white-space: nowrap;
}

.nav-text {
    float: right;
    line-height: 55px;
    padding-right: 20px;
    color: rgb(0, 0, 0);
    text-decoration: none;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 34px;
    font-weight: bold;
}

.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 100px;
    background-color: #f7ac35;
    border-top: 5px solid black;
    z-index: 999;
}

.footer-text {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    line-height: 90px;
    color: #000000;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 44px;
    font-weight: bold;
}

.signed-in-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 5.5px;
    padding: 10px 80px;
    background-color: #6C935C;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 18px;
    cursor: pointer;
    white-space: nowrap;
}

.signed-out-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 5.5px;
    padding: 10px 80px;
    background-color: #6C935C;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 18px;
    cursor: pointer;
    white-space: nowrap;
}

.content h1 {
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 20px;
}

.content-image {
    display: block;
    margin: 20px auto;
    max-width: 10%;
    height: auto;
    margin-top: 30px;
    min-width: 60px; /* Ensure image isn't too small on mobile */
}

.r-heat-map-button {
    padding: 10px 20px;
    background-color: #3C638E;
    color: white;
    border: none;
    border-radius: 12px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 24px;
    display: block;
    margin: 50px auto 0 auto;
    text-decoration: none;
    width: fit-content;
    text-align: center;
}

.content h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
    margin-top: 68px;
}

.content {
    padding: 0;
    height: calc(100vh - 160px); /* 60px navbar + 100px footer */
}

#map {
    width: 100%;
    height: 100%;
}

.management-dashboard-button {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 5.5px;
    padding: 10px 80px;
    background-color: #6C935C;
    color: white;
    border: none;
    border-radius: 20px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 18px;
    cursor: pointer;
    white-space: nowrap;
}

/* MOBILE RESPONSIVE STYLES */

/* Tablets and small laptops */
@media screen and (max-width: 1024px) {
    .heat-map-button,
    .signed-in-button,
    .signed-out-button,
    .management-dashboard-button {
        padding: 8px 40px;
        font-size: 16px;
    }
}

/* Mobile devices - tablets in portrait, large phones */
@media screen and (max-width: 768px) {
    .navbar {
        height: 50px;
        border-bottom: 3px solid black;
    }

    .nav-logo {
        height: 40px;
        padding-left: 10px;
        margin-top: 5px;
    }

    .nav-text {
        font-size: 24px;
        line-height: 45px;
        padding-right: 10px;
    }

    .heat-map-button,
    .signed-in-button,
    .signed-out-button,
    .management-dashboard-button {
        padding: 7px 20px;
        font-size: 12px;
        top: 7px;
        border-radius: 15px;
    }

    .footer {
        height: 60px;
        border-top: 3px solid black;
    }

    .footer-text {
        font-size: 24px;
        line-height: 50px;
    }

    .content {
        height: calc(100vh - 110px);
        height: calc(100dvh - 110px); /* dvh for better mobile browser support */
    }

    .content h1 {
        font-size: 28px;
        margin-top: 15px;
    }

    .content h2 {
        font-size: 24px;
        margin-top: 40px;
    }

    .content-image {
        max-width: 20%;
        margin-top: 20px;
    }

    .r-heat-map-button {
        font-size: 18px;
        padding: 10px 20px;
        margin: 30px auto 0 auto;
    }
}

/* Standard smartphones */
@media screen and (max-width: 480px) {
    .navbar {
        height: 50px;
    }

    .nav-logo {
        height: 35px;
        padding-left: 8px;
    }

    .nav-text {
        font-size: 20px;
        padding-right: 8px;
    }

    .heat-map-button,
    .signed-in-button,
    .signed-out-button,
    .management-dashboard-button {
        padding: 6px 12px;
        font-size: 11px;
        top: 8px;
    }

    .footer {
        height: 50px;
    }

    .footer-text {
        font-size: 20px;
        line-height: 40px;
    }

    .content {
        height: calc(100vh - 100px);
        height: calc(100dvh - 100px);
    }

    .content h1 {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .content h2 {
        font-size: 20px;
        margin-top: 30px;
    }

    .content-image {
        max-width: 25%;
    }

    .r-heat-map-button {
        font-size: 16px;
        padding: 8px 16px;
        margin: 20px auto 0 auto;
    }
}

/* Extra small phones (iPhone SE, older Androids) */
@media screen and (max-width: 375px) {
    .heat-map-button,
    .signed-in-button,
    .signed-out-button,
    .management-dashboard-button {
        padding: 5px 10px;
        font-size: 10px;
    }

    .nav-text {
        font-size: 18px;
    }

    .footer-text {
        font-size: 18px;
    }

    .content h1 {
        font-size: 22px;
    }

    .content h2 {
        font-size: 18px;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .footer {
        height: 40px;
    }

    .footer-text {
        font-size: 18px;
        line-height: 30px;
    }

    .content {
        height: calc(100vh - 90px);
        height: calc(100dvh - 90px);
    }

    .help-button {
        bottom: 50px !important;
    }
}