/* General Styles */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
}

/* Mobile-First Quick Access FAB */
.quick-access-fab {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 2500;
    text-decoration: none;
    color: #e74c3c;
    font-size: 20px;
    transition: all 0.3s ease;
    border: 3px solid #e74c3c;
    backdrop-filter: blur(10px);
}

.fab-text {
    font-size: 10px;
    font-weight: bold;
    margin-top: 2px;
    color: #e74c3c;
    text-shadow: none;
}

.quick-access-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(231, 76, 60, 0.4);
    border-color: #c0392b;
}

.quick-access-fab:active {
    transform: scale(0.95);
}

/* Always show FAB on mobile, hide on desktop */
@media (max-width: 768px) {
    .quick-access-fab {
        display: flex;
    }
}

@media (min-width: 769px) {
    .quick-access-fab {
        display: none;
    }
}

.app-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    margin-top: 80px; /* Add top margin to account for fixed navbar */
}

/* Fixed Navbar */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    box-sizing: border-box;
    min-height: 60px; /* Ensure consistent navbar height */
}

/* Hamburger icon hidden on larger screens */
.header__hamburger {
    display: none;
}

.header__hamburger-icon {
    display: none;
}

/* Navbar Title Styling */
.nav-title {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Navbar Links */
.nav-links {
    display: flex;
    gap: 20px;
}

/* Individual Nav Item Styles */
.nav-item {
    color: white;
    text-decoration: none;
    font-size: 1em;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-item.active {
    background-color: #8a2be2;
    font-weight: bold;
}

.nav-item-primary {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    font-weight: 600;
}

.nav-item-primary:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}



/* Page Titles */
h1,
h2 {
    text-align: center;
    margin-bottom: 15px;
    color: #34495e;
}

/* Card and Container Styles */
.card,
.community-reports,
.emergency-contacts {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.report-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

/* Parking List Layout */
.parking-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

/* Parking Item Styles */
.parking-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.parking-item h3 {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.parking-item h3 i {
    margin-right: 8px;
    font-size: 1.5em;
}

.parking-item p {
    margin: 2px 0;
    font-size: 1em;
    color: #555;
    line-height: 1.5;
}

.emergency-contacts {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: nowrap;
    margin-top: 20px;
}

.contact-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    width: 30%;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item h3 {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.contact-item h3 i {
    margin-right: 8px;
    font-size: 1.5em;
}

.contact-item p {
    margin: 0;
    font-size: 1em;
    color: #555;
    line-height: 1.5;
}

.parking-item:last-child,
.contact-item:last-child,
.report-card:last-child {
    border-bottom: none;
}

/* Buttons */
button {
    cursor: pointer;
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    color: white;
    margin: 5px;
}

.safe-btn {
    background-color: #28a745;
}

.danger-btn {
    background-color: #dc3545;
}

.alert-close {
    background-color: #6c757d;
}

/* Status Styles */
.status-safe {
    background-color: #d4edda;
    color: #155724;
    padding: 5px;
    border-radius: 4px;
}

.status-danger {
    background-color: #f8d7da;
    color: #721c24;
    padding: 5px;
    border-radius: 4px;
}

.legend-labels span {
    font-weight: bold;
    font-size: 15px;
    text-align: left;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.legend-bar {
    height: 220px;
}

.legend-labels {
    padding-top: 12px;
    padding-bottom: 12px;
}

/* Responsive Design */
@media (max-width: 920px) {
    .app-container {
        padding: 10px;
        margin-top: 0; /* Let page-specific cards handle top spacing to avoid double offset */
    }

    .emergency-contacts {
        flex-direction: column;
    }

    .contact-item {
        width: 90%;
    }

    .parking-list {
        grid-template-columns: 1fr;
    }
}

/* Mobile Navigation Buttons */
.mobile-nav-buttons {
    display: none;
    width: 100%;
    justify-content: space-between;
    margin-top: 15px;
    padding: 0 10px;
    min-height: 50px; /* Ensure consistent mobile nav height */
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #2c3e50;
    padding: 8px 4px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(44, 62, 80, 0.2);
    min-width: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-nav-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: rgba(44, 62, 80, 0.3);
}

.mobile-nav-icon {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.mobile-nav-text {
    font-size: 0.7rem;
    font-weight: 500;
    text-align: center;
    line-height: 1;
}

/* Responsive Navbar */
@media (max-width: 920px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .nav-title {
        margin-bottom: 0;
    }
    
    .mobile-nav-buttons {
        display: flex;
    }

    .nav-links {
        display: none; /* Hide nav-links on mobile */
    }

    /* Hide hamburger button on smaller screens */
    .header__hamburger {
        display: none;
    }

    .header__hamburger-icon {
        width: 2rem;
        height: 2rem;
    }

    .header__hamburger-icon {
        display: block;
    }

    .app-container {
        margin-top: 0;
    }

    .legend-labels span {
        font-weight: bold;
        font-size: 15px;
        text-align: left;
    }

    .legend-bar {
        height: 220px;
    }

    .legend-labels {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .controls {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
        max-width: 300px;
        margin: auto;
        padding-top: 20px;
    }
    
    .controls button {
        width: 100%;
        margin: 0;
        min-height: 48px;
        font-size: 16px;
    }
    
    #map {
        height: 300px;
    }

    .parking-list {
        margin-top: 0;
    }

    .emergency-contacts {
        margin-top: 0;
    }
}

