/* ==========================================
 * SPAIN MAPS — HOJA DE ESTILOS DEL MAPA INTERACTIVO (CSS)
 * Estilos para el mapa SVG vectorial, mapa de calor y panel lateral Cyber-Cortex.
 * ========================================== */

.spain-maps-main {
    padding: 2.5rem 1.5rem;
    min-height: calc(100vh - 80px);
}

.container-maps {
    max-width: 1200px;
    margin: 0 auto;
}

.maps-hero-card {
    background: rgba(18, 18, 24, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 25px rgba(0, 240, 255, 0.1);
}

.maps-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.maps-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.3rem;
}

.maps-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.badge-maps-live {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.1);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(0, 255, 102, 0.3);
}

.maps-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(18, 18, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.control-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mode-buttons {
    display: flex;
    gap: 0.8rem;
}

.btn-mode {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-mode.active, .btn-mode:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: #00f0ff;
    color: #00f0ff;
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.maps-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .maps-grid-layout {
        grid-template-columns: 1fr;
    }
}

.map-viewport-card {
    background: rgba(18, 18, 24, 0.85);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
}

.map-status-header {
    display: flex;
    justify-content: space-between;
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: #00f0ff;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 0.75rem;
}

.svg-map-wrapper {
    width: 100%;
    height: 480px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#spain-svg-map {
    width: 100%;
    height: 100%;
    max-height: 480px;
}

.region-path {
    fill: rgba(0, 240, 255, 0.15);
    stroke: #00f0ff;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.25s ease;
}

.region-path:hover, .region-path.active {
    fill: rgba(112, 0, 255, 0.6) !important;
    stroke: #00ff66 !important;
    stroke-width: 3.5;
    filter: drop-shadow(0 0 12px #00ff66);
}

.canarias-box {
    fill: rgba(0, 240, 255, 0.08);
    stroke: rgba(0, 240, 255, 0.4);
    stroke-width: 1.5;
    stroke-dasharray: 4;
}

.canarias-shape {
    fill: rgba(0, 240, 255, 0.2);
    stroke: #00f0ff;
    stroke-width: 1.5;
    transition: all 0.25s ease;
}

.city-node {
    fill: #00f0ff;
    stroke: #fff;
    stroke-width: 2;
    cursor: pointer;
    transition: all 0.2s ease;
}
.city-node:hover {
    fill: #00ff66;
    r: 18;
}

.map-legend-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-text {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.legend-gradient {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.2), rgba(112, 0, 255, 0.6), rgba(244, 63, 94, 0.9));
}

.region-detail-card {
    background: rgba(18, 18, 24, 0.85);
    border: 1px solid rgba(112, 0, 255, 0.3);
    border-radius: 12px;
    padding: 1.75rem;
    backdrop-filter: blur(12px);
    box-shadow: 0 0 20px rgba(112, 0, 255, 0.15);
}

.detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
}

.detail-flag {
    font-size: 2.5rem;
}

.detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.detail-iso {
    font-family: 'Space Mono', monospace;
    font-size: 0.75rem;
    color: #00f0ff;
}

.metric-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

.metric-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #7000ff;
    margin-bottom: 0.3rem;
}

.metric-ref {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ranking-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ranking-title {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ranking-badge {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: var(--neon-green);
    font-weight: bold;
}

.capital-box {
    font-size: 0.85rem;
    color: var(--text-muted);
}
