/* ================================
   GLOBAL STYLING & VARIABLES
================================ */
:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #555555;
    --accent-color: #89CFF0;
    --filter-bg: #ffffff;
    --filter-active: #333333;
    --border-radius: 12px;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Inter', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-color);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* ================================
   CONTAINER
================================ */
#container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ================================
   SIDEBAR & FILTERS
================================ */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sidebar-title {
    font-family: 'Quicksand', sans-serif;
    text-decoration: none;

    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #0ea5e9;
}

.sidebar-header a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
}

#sidebar {
    width: 250px;
    padding: 20px;
    background: #f5f5f5;
    border-right: 1px solid #d1d5db;
    display: flex;    
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    flex-shrink: 0;
    box-sizing: border-box; 
}

#sidebar h3 {
    margin: 15px 0 8px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-main);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Hidden container for less common filters on mobile */
.secondary-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.filter-btn {
    display: inline-block;
    width: fit-content;
    padding: 8px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: var(--filter-bg);
    color: var(--text-main);
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: #e5e7eb;
}

.filter-btn[data-active="true"] {
    background: var(--filter-active);
    color: white;
    border-color: var(--filter-active);
}

.action-btn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

#clear-filters {
    background: #f9e7e7;
    color: #a01d1d;
    border-color: #fca5a5;
}

#toggle-filters-btn {
    display: none; /* Hidden on desktop */
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
    font-weight: 600;
}

/* ================================
   MAIN CONTENT
================================ */
#main-content {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 20px;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-color);
}

/* ================================
   MAP BOX (Preserved Original Sizing)
================================ */
.map-box {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 650px;
    height: 300px; /* Kept exact desktop size */
    border: 1px solid #e5e7eb;
    border-radius: var(--border-radius);
    background: var(--card-bg);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.map-container {
    flex: 1;
    position: relative;
    min-width: 300px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
    position: absolute;
    top: 0;
    left: 0;
    background: #e5e7eb;
}

/* =================================
   MAP INFO SECTION
================================= */
.map-info {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.section-block {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    padding: 5px;
    min-width: 0;
}

.section-block h2 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
}

.highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.highlight-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
    min-width: 0;
}

.highlight-list li span:last-child {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-symbols-outlined {
    font-size: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

#no-results {
    display: none;
    width: 100%;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 16px;
}

/* ================================
   MOBILE RESPONSIVE (<900px)
================================ */
@media (max-width: 900px) {
    #container {
        flex-direction: column;
        height: auto;
    }

    /* Sticky Mobile Header */
    #sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
        border-right: none;
        border-bottom: 1px solid #d1d5db;
        padding: 12px 16px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .sidebar-header {
        margin-bottom: 8px;
    }

.sidebar-header a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    background: ; /* Adds a light gray button background */
    padding: 6px 12px;   /* Makes the touch area larger */
    border-radius: 16px; /* Rounds the edges */
}

    .sidebar-title {
        font-size: 20px;
    }

    #sidebar h3 {
        font-size: 11px;
        margin: 6px 0;
    }

    .filter-group {
        margin-bottom: 4px;
    }

    .filter-row {
        gap: 6px;
    }

    .filter-btn {
        font-size: 12px;
        padding: 6px 10px;
    }

    /* Toggle visibility of less common filters */
    .secondary-filters {
        display: none; /* Hidden by default on mobile */
        margin-top: 6px;
    }

    .secondary-filters.show {
        display: flex;
    }

    #toggle-filters-btn {
        display: inline-block; /* Show toggle button on mobile */
    }

    #main-content {
        padding: 16px;
    }

    /* Preserved Original Mobile Sizing */
    .map-box {
        flex-direction: column;
        height: auto;
    }

    .map-container {
        width: 100%;
        height: 260px;
        min-height: 260px;
        position: relative;
    }

    .map-info {
        flex: 1;
        padding: 15px;
        display: flex;
        flex-direction: row; 
        gap: 10px;
    }

    .section-block h2 {
        font-size: 15px;
        margin: 0 0 8px 0;
    }

    .highlight-list li {
        font-size: 12px;
    }
}
