/* General Body and Font Styles */
html, body {
    height: 100%;
    overflow: hidden; /* Prevent page-level scrolling */
}

body {
    background: #f0f2f5;
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
}

/* Main container constraints */
.container-fluid {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.row {
    height: 100%;
    max-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    background: #ffffff;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Prevent sidebar itself from scrolling */
    min-height: 0; /* Prevent flex item from growing beyond container */
}

.sidebar-header {
    padding: 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0; /* Prevent header from shrinking */
}

.sidebar-logo {
    max-width: 80px;
    border-radius: 50%;
}

.sidebar-title {
    color: #004085;
    font-weight: 600;
    font-size: 1.25em;
    margin-top: 0.75rem;
}

#sidebar-content {
    padding: 1rem;
    flex: 1; /* Take remaining space */
    overflow-y: auto; /* Add scroll to content area only */
    overflow-x: hidden;
}

.btn:hover {
    /*For about button*/
    background: none !important;
    color: #0d6efd !important;
}

/* --- Map Container --- */
#main-map {
    position: relative;
    height: 100vh;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

/* --- Accordion General --- */
.accordion, .accordion-item {
    border: none;
    background: none;
    box-shadow: none;
    margin-bottom: 0.5rem;
}

.accordion-header {
    margin-bottom: 0;
}

/* Category Button Styling */
.accordion-button {
    background-color: #f8f9fa;
    color: #212529;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.25rem;
}

.accordion-button:hover {
    background-color: #e9ecef;
}

/* Style for open category button */
.accordion-button.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Panel containing indicators */
.accordion-collapse {
    padding: 0.5rem 0 0.5rem 1rem; /* Indent the inner content */
    border-left: 2px solid #e9ecef;
    margin-left: 0.5rem;
    margin-top: 0.5rem;
}

/* --- Indicator Button Styling --- */
.indicator-button {
    background-color: transparent;
    color: #495057;
    font-weight: normal;
    border-radius: 0.25rem;
    border: none;
    width: 100%;
    text-align: left;
    padding: 0.5rem 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.indicator-button:hover {
    background-color: #e9ecef;
}

/* Style for open indicator button */
.indicator-button.active {
    background-color: #e7f1ff;
    color: #004085;
    font-weight: 500;
}

/* Panel containing year selector */
.indicator-panel {
    padding-left: 1.25rem;
}

/* --- Form Select (Year) --- */
select.form-select {
    border-radius: 0.25rem;
    font-size: 0.9rem;
}

/* --- Legend --- */
#legend-section {
    position: absolute;
    right: 20px;
    bottom: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border-radius: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    z-index: 10;
    min-width: 220px;
}

#legend-content > div {
    margin-bottom: 0.3rem;
}

#legend-content .small {
    color: #6c757d;
}

/* --- Footer --- */
footer {
    border-top: 1px solid #e9ecef;
    background-color: #f8f9fa;
    flex-shrink: 0; /* Prevent footer from shrinking */
}
