/* style.css */
body {
    margin: 0;
    font-family: 'Nunito', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    color: #2c3e50;
    background-color: #f9fbf9;
}

#main-container {
    display: flex;
    height: 100%;
    width: 100%;
}

#map-section {
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 3px solid #a5d6a7;
    position: relative;
}

.map-title { color: #2e7d32; margin-bottom: 0; }
.map-subtitle { color: #81c784; font-size: 0.9em; margin-top: 5px; }

#map-wrapper {
    width: 90%;
    height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#map-wrapper svg {
    width: 100%;
    height: 100%;
    display: block;
}

.dept-path {
    stroke: #ffffff;
    stroke-width: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.dept-path:hover {
    stroke: #2e7d32;
    stroke-width: 2px;
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2));
    z-index: 10;
}
.dept-path.active {
    fill: #ff9800 !important; 
    stroke: #e65100;
}

#map-legend {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8em;
    margin-bottom: 20px;
}
.gradient-bar {
    width: 150px;
    height: 10px;
    background: linear-gradient(to right, #e74c3c, #f1c40f, #2ecc71);
    border-radius: 5px;
}

#data-section {
    width: 50%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto; 
    background-color: #fff;
}

#dashboard-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px dashed #a5d6a7;
    padding-bottom: 10px;
}
#dashboard-header h2 { color: #2e7d32; margin: 0; }

.section-label {
    font-weight: bold;
    color: #888;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    text-align: center;
}

#filters-container {
    display: flex;
    justify-content: space-around;
    background: #f1f8e9;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.filter-box { text-align: center; width: 45%; }
.filter-box h4 { margin: 5px 0; font-size: 0.9em; color: #558b2f; }

.charts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.chart-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    width: 46%; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    box-sizing: border-box;
}
.full-width { width: 100%; }

.chart-card h3 {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: #37474f;
    text-align: center;
}
.chart-sub { text-align: center; font-size: 0.8em; color: #999; margin-top: -8px; margin-bottom: 10px; }

.chart-box { height: 200px; display: flex; justify-content: center; }
.chart-box-large { height: 280px; display: flex; justify-content: center; }

.eco-divider {
    border: 0; height: 1px;
    background: linear-gradient(to right, transparent, #a5d6a7, transparent);
    margin: 20px 0;
}

.tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    pointer-events: none;
    z-index: 999;
}

.chart-box-large { 
    height: 320px; 
    display: flex; 
    justify-content: center; 
    align-items: center;
}

.charts-grid {
    margin-bottom: 30px; 
}

.chart-card.full-width {
    margin-bottom: 30px; 
}

#chart-education {
    min-height: 430px;
}

.chart-card:has(#chart-education) {
    min-height: 480px;
    padding-bottom: 30px;
}

.chart-card h3 {
    font-size: 17px; 
    font-weight: 700;
    margin-bottom: 25px;
    margin-top: 15px;
    color: #000000;
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-container {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid rgba(46, 125, 50, 0.2);
    border-top: 6px solid #2e7d32;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-container h2 {
    color: #2e7d32;
    margin: 10px 0;
    font-size: 24px;
}

#loading-text {
    color: #558b2f;
    font-size: 14px;
    font-weight: 600;
}

#main-container {
    opacity: 0;
    transition: opacity 0.5s ease;
}

#main-container.loaded {
    opacity: 1;
}

#copyright-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(129, 199, 132, 0.3); 
    padding: 5px 0;
    text-align: center;
    z-index: 100;
    box-shadow: none;
    backdrop-filter: blur(3px);
}

#copyright-bar p {
    margin: 0;
    font-size: 13px;
    color: #2e7d32; 
    font-weight: 500;
}

#copyright-bar a {
    color: #1b5e20; 
    text-decoration: none;
    margin-left: 5px;
    font-weight: 600;
    transition: color 0.2s;
}

#copyright-bar a:hover {
    color: #2e7d32;
    text-decoration: underline;
}

#data-section {
    padding-bottom: 30px;
}

#chart-radar {
    min-height: 420px;  
}

#chart-radar svg {
    height: 420px !important;  
}

.chart-description {
    font-size: 0.85em;
    color: #1b5e20;             
    margin: -5px 0 15px 0;
    padding: 10px 12px;
    background: #f1f8e9;         
    border-left: 3px solid #4caf50;  
    border-radius: 4px;
    line-height: 1.5;
    font-style: italic;
}
