/* ===== HOJA DE ESTILO SOBERANA - GUARDIÁN v3.4 (VISUALMENTE UNIFICADA) ===== */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

:root {
    --primary-bg: #111827;
    --secondary-bg: #1f2937;
    --accent-main: #3b82f6;
    --text-light: #f3f4f6;
    --text-muted: #9ca3af;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-light);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    overflow: hidden;
}

/* ===== Pantalla de Carga ===== */
#loading-screen { transition: opacity 0.5s ease-out; }
.loader-bar { width: 150px; height: 4px; background-color: var(--secondary-bg); border-radius: 2px; overflow: hidden; position: relative; }
.loader-bar::after { content: ''; position: absolute; top: 0; left: 0; height: 100%; width: 50px; background-color: var(--accent-main); animation: loading-anim 1.5s infinite ease-in-out; }
@keyframes loading-anim { 0% { transform: translateX(-50px); } 100% { transform: translateX(150px); } }

/* ===== Contenedor del Mapa y Capas ===== */
#map-container { position: relative; height: 100%; width: 100%; z-index: 10; }
.leaflet-tile-pane { filter: brightness(0.7) invert(1) contrast(4) hue-rotate(200deg) saturate(0.25) brightness(0.5); }
.leaflet-control-container { z-index: 5 !important; opacity: 0.8; }
.leaflet-control-attribution { display: none !important; }

/* ===== UI Sobre el Mapa ===== */
#search-bar-header { z-index: 1010; }
#search-bar-header select, #search-bar-header input { background-color: rgba(31, 41, 55, 0.7) !important; color: var(--text-light) !important; border: 1px solid #4b5563; }

#floating-actions-bar { position: absolute; bottom: 4rem; left: 50%; transform: translateX(-50%); z-index: 1000; pointer-events: none; }
#floating-actions-bar > div > div { pointer-events: auto; }
#floating-actions-bar .floating-actions-container { background-color: transparent !important; backdrop-filter: none !important; box-shadow: none !important; padding: 0 !important; display: flex; align-items: center; gap: 0.75rem; }

.share-button, .category-icon, .ztv-button { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; font-size: 20px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); border: 2px solid rgba(255, 255, 255, 0.1); cursor: pointer; }
.share-button:hover, .category-icon:hover, .ztv-button:hover { transform: translateY(-5px) scale(1.1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); }
.ztv-button { width: 48px; height: 48px; font-size: 20px; background-color: var(--accent-main); }
.share-whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }
.share-facebook { background: linear-gradient(135deg, #1877F2, #166FE5); }
.share-twitter { background: linear-gradient(135deg, #000000, #333333); }
.share-button i { color: white !important; }

/* ===== Ticker de Noticias ===== */
#news-ticker-bar { position: absolute; bottom: 0; left: 0; right: 0; background-color: rgba(17, 24, 39, 0.85); backdrop-filter: blur(8px); overflow: hidden; color: white; display: flex; align-items: center; height: 40px; z-index: 1000; }
#news-ticker-content { display: inline-block; animation: ticker-scroll 120s linear infinite; white-space: nowrap; padding-left: 100%; }
#news-ticker-bar:hover #news-ticker-content { animation-play-state: paused; }
@keyframes ticker-scroll { from { transform: translateX(0%); } to { transform: translateX(-100%); } }

/* ===== PROTOCOLO DE IDENTIDAD VISUAL SOBERANA v3.0 (BLOQUE REEMPLAZADO) ===== */
.custom-div-icon {
    background: transparent;
    border: none;
}
.marker-base {
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid rgba(255, 255, 255, 0.9);
}
.marker-base:hover {
    transform: scale(1.15);
    z-index: 1000 !important; /* Asegura que el marcador hover esté por encima de los demás */
}
/* Colores de fondo por tipo */
.marker-comercio { background-color: #3B82F6; } /* Azul */
.marker-canal { background-color: #8B5CF6; } /* Violeta */
.marker-servicio-red { background-color: #EAB308; } /* Amarillo */
.marker-municipal { background-color: #10B981; } /* Verde */
.marker-default { background-color: #6B7280; } /* Gris */
/* Estilo especial para Eventos */
.marker-evento {
    background: linear-gradient(45deg, #EF4444, #F59E0B); /* Rojo/Naranja */
    animation: pulse-live 2s infinite;
    position: relative;
}
.marker-evento::before {
    content: 'LIVE';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #EF4444;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
    animation: blink-live 1.5s infinite;
}
@keyframes pulse-live {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
@keyframes blink-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Estilos para el Modal de la Consola Soberana ===== */
#consola-modal-container.hidden { display: none; }
#consola-modal-container { display: flex; }

/* ===== HOJA DE ESTILO SOBERANA - SISMO CULTURAL v1.0 ===== */
/* ... (todo el código CSS anterior de style.css va aquí) ... */

/* ===== PALETA DE COLORES DE ENTIDADES (AÑADIR AL FINAL) ===== */

/* Entidades Culturales */
.marker-agente { background-color: #0891b2; } /* Cian para los creadores */
.marker-espacio { background-color: #6d28d9; } /* Violeta para los lugares */
.marker-proyecto { background-color: #d97706; } /* Ámbar para las ideas */
.marker-oportunidad { background-color: #059669; } /* Esmeralda para las oportunidades */

/* Entidades de Apoyo y Difusión (Reutilizamos y renombramos) */
.marker-comercio { background-color: #3B82F6; } /* Azul (sin cambios) */
.marker-servicio_red { background-color: #EAB308; } /* Amarillo (sin cambios) */
.marker-canal { background-color: #8B5CF6; } /* Violeta claro (sin cambios) */
.marker-evento {
    background: linear-gradient(45deg, #EF4444, #F59E0B); /* Rojo/Naranja (sin cambios) */
    animation: pulse-live 2s infinite;
    position: relative;
}

/* Paleta de Colores Psicológicos para Marcadores */
.marker-color-identidad { background-color: #E30613; /* Rojo/Fucsia */ }
.marker-color-contenido { background-color: #FFDD00; /* Amarillo */ }
.marker-color-conexion { background-color: #00A9E0; /* Cian/Azul */ }
.marker-color-soporte { background-color: #10B981; /* Verde */ }
.marker-color-especial { background-color: #8B5CF6; /* Púrpura */ }
.marker-color-default { background-color: #6B7280; /* Gris */ }

/* Estilos base para los marcadores */
.marker-base {
    width: 40px;
    height: 40px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    border: 2px solid white;
}

.marker-base i {
    transform: rotate(45deg);
}

/* Contenedor del Modal para centrar la ficha */
#consola-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.7);
    z-index: 1000;
    padding: 1rem;
}

.map-tiles-dark {
    filter: invert(100%) grayscale(100%) brightness(0.8) contrast(1.2);
}