/* Home Page Specific Styles */

/* Map Container */
.map-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Map SVG Styles */
#mapSvg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

/* Municipio Path Hover Effects */
.map-path {
    transition: all 0.3s ease;
    cursor: pointer;
    transform-origin: center;
}

.map-path:hover {
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.8)) brightness(1.2);
    stroke: #ffffff;
    stroke-width: 2px;
    fill-opacity: 0.8 !important;
}

/* Municipio Label Styles */
.map-label {
    display: none; /* Ocultar etiquetas quemadas obsoletas */
}

/* Search Input */
#municipioSearch::placeholder {
    color: rgba(156, 163, 175, 0.8);
}

#municipioSearch:focus {
    outline: none;
}

/* Zoom Controls */
.zoom-btn {
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    transform: scale(1.1);
}

.zoom-btn:active {
    transform: scale(0.95);
}

/* Stats Cards */
.stat-card {
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* Progress Bars */
.progress-bar {
    transition: width 1s ease-out;
}

/* Impact List Items */
.impact-item {
    transition: all 0.2s ease;
}

.impact-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Municipio Info Modal */
.municipio-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.municipio-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.municipio-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.municipio-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Loading Spinner */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .map-container {
        height: 50vh;
    }
    
    .sidebar {
        height: 50vh;
    }
}

/* Animation for Stats */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.5s ease-out;
}

/* Tooltip Styles */
.tooltip {
    position: absolute;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    pointer-events: none;
    z-index: 1000;
    min-width: 200px;
    backdrop-filter: blur(8px);
}

.tooltip-title {
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
}

.tooltip-content {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Priority Badges */
.priority-alta {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.priority-normal {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.priority-baja {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Gender Distribution Bars */
.gender-bar {
    transition: width 0.8s ease-out;
}

/* Selected Municipio */
.map-path.selected {
    fill: #38bdf8 !important;
    fill-opacity: 0.9 !important;
    filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.8));
    stroke: #fff;
    stroke-width: 2px;
}

/* Dimmed Municipio (when searching) */
.map-path.dimmed {
    opacity: 0.3;
    filter: none;
}

/* Scrollbar for Sidebar */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
    border-radius: 3px;
}

.sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.8);
}

/* Landing Page Scrollbar */
.landing-section::-webkit-scrollbar {
    width: 4px;
}

.landing-section::-webkit-scrollbar-track {
    background: transparent;
}

.landing-section::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.2);
    border-radius: 2px;
}

.landing-section::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.4);
}
