/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: black;
    background: linear-gradient(to bottom, #f0f0f0, #ffffff);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header styles */
header {
    background-color: #003B95;
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
}

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

.logo {
    font-family: 'Permanent Marker', cursive;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.desktop-nav {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-nav {
    display: none;
}

/* Main content styles */
main {
    padding-top: 60px; /* Height of the header */
    flex: 1 0 auto;
}

/* Map hero section styles */
.map-hero {
    background-color: #003B95;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.map-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.map-hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.show-restaurants-button {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.show-restaurants-button:hover {
    background-color: #003d82;
}

/* Map container styles */
.map-container {
    height: 400px;
    width: 100%;
    margin-bottom: 2rem;
}

#map {
    height: 100%;
    width: 100%;
}

/* Restaurant list styles */
.restaurant-list {
    padding: 2rem 0;
}

.section-title {
    font-size: 1.75rem;
    color: #333;
    text-align: left;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #003B95;
}

.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.restaurant-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.restaurant-card:hover {
    transform: translateY(-5px);
}

.restaurant-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    font-size: 0.9rem;
    color: #666;
    margin-top: auto;
}

.rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.star-icon {
    color: #FFD700;
    fill: #FFD700;
}

/* Footer styles */
footer {
    background-color: black;
    color: white;
    padding: 3rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3, .footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style-type: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
}

.copyright {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
    color: #ddd;
}

/* Side menu styles */
.menu-toggle {
    display: none;
    position: fixed;
    top: 19px;
    left: 10px;
    z-index: 1002;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #003B95;
    z-index: 1001;
    transition: left 0.3s ease-in-out;
    padding: 60px 20px 20px;
    box-sizing: border-box;
}

.side-menu a {
    display: block;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
}

#nearbyRestaurantsTitle {
    text-align: center;
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
    margin-top: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        padding-bottom: 70px; /* Adjusted for mobile navbar */
    }

    #nearbyRestaurantsTitle {
        font-size: 20px;
        margin-top: 70px;
    }

    header .container {
        justify-content: center;
    }

    .logo {
        font-size: 1.2rem;
    }

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #003B95;
        justify-content: space-around;
        padding: 10px 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .mobile-nav .nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 5px;
        color: white;
        text-decoration: none;
        font-size: 0.7rem;
    }

    .mobile-nav .nav-link i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }

    .map-hero {
        padding: 1rem 0;
    }

    .map-hero h1 {
        font-size: 1.5rem;
    }

    .map-hero p {
        font-size: 0.9rem;
    }

    .map-container {
        height: 300px;
    }

    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding-bottom: 20px; /* Extra padding to ensure last card is visible */
    }

    .restaurant-card {
        margin-bottom: 15px;
    }

    .restaurant-card img {
        height: 120px;
    }

    .card-content {
        padding: 10px;
    }

    .card-content h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }

    .card-content p {
        font-size: 0.75rem;
        margin-bottom: 0.3rem;
    }

    

    footer {
        padding: 2rem 0;
        display: none;
    }
}

@media (max-width: 480px) {
    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@supports (padding: max(0px)) {
    .mobile-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    body {
        padding-bottom: max(70px, calc(70px + env(safe-area-inset-bottom)));
    }
}