/* ====================== VISUALIZADOR DE NECESIDADES ====================== */

#necesidades .dashboard {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 20px;
}

#necesidades .dashboard-header {
  text-align: center;
  margin-bottom: 20px;
}

#necesidades #titulo-visualizador {
  font-size: 2.2rem;
  color: #134a2c;
  margin: 0;
  font-weight: 550;
}

/* Contenedor principal */
#necesidades .dashboard-content {
  display: flex;
  gap: 20px;
  height: 78vh; /* Ajusta según necesites */
  min-height: 650px;
}

/* MAPA - 80% del espacio */
#necesidades .dashboard-mapa {
  flex: 4; /* Más espacio para el mapa */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: #fff;
}

#mapa-necesidades {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Control de capas de Leaflet */
#panel-capas .leaflet-control-layers {
  width: 100%;
  border: none;
  box-shadow: none;
  background: transparent;
}

#panel-capas .leaflet-control-layers-toggle {
  display: none;
}

#panel-capas .leaflet-control-layers-list {
  background: white;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
}

/* Botón volver */
#necesidades .btn-home {
  margin: 25px auto 0;
  display: block;
}

/* Contenedor de la leyenda */
.legend {
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  min-width: 140px; /* Asegura un ancho mínimo para que no se corte el texto */
}

.legend h4 {
  margin: 0 0 10px 0;
  font-size: 1rem;
  font-weight: bold;
}

/* Cada fila de la leyenda (Icono + Texto) */
.legend-row {
  display: flex; /* Alinea icono y texto en línea */
  align-items: center; /* Los centra verticalmente */
  margin-bottom: 6px; /* Espacio entre filas */
  font-size: 0.9rem;
}

/* El cuadro de color */
.legend-row i {
  width: 20px;
  height: 20px;
  margin-right: 10px; /* Espacio entre el cuadro y el texto */
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: inline-block;
}

.legend-row i {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 3px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: inline-block;
  flex-shrink: 0;
}

/* ====================== REGIONES====================== */

/* ======================================
   MENU PRINCIPAL
====================================== */

.menu-oferta {
  display: flex;
  justify-content: center;
  gap: 35px;
  list-style: none;
  padding: 0;
  margin: 25px 0;
  position: relative;
  z-index: 9999;
}

/* ======================================
   ÁREAS
====================================== */

.menu-area {
  position: relative;
}
.menu-area-title {
  color: #2f3a2f;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.2s ease;
  padding: 8px 0;
}

.menu-area-title:hover {
  color: #b08b3e;
}

/* ======================================
   MUNICIPIOS
====================================== */

.menu-municipios {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  padding-top: 8px;
  min-width: 220px;
  list-style: none;
  z-index: 99999;
}

.menu-area:hover > .menu-municipios {
  display: block;
}

/* ======================================
   MUNICIPIO ITEM
====================================== */

.menu-municipio {
  position: relative;
  padding: 6px 0;
}

.menu-municipio-title {
  color: #4d5a4d;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.menu-municipio-title:hover {
  color: #b08b3e;
  transform: translateX(3px);
}

/* ======================================
   CARRERAS
====================================== */

.menu-carreras {
  display: none;
  position: absolute;
  top: -5px;
  left: 90%;
  padding-left: 5px;
  min-width: 280px;
  list-style: none;
  z-index: 99999;
}

.menu-municipio:hover > .menu-carreras {
  display: block;
}

/* ======================================
   ITEMS CARRERAS
====================================== */

.menu-carreras li {
  color: #687768;
  font-size: 14px;
  padding: 6px 0;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
}

.menu-carreras li:hover {
  color: #b08b3e;
  transform: translateX(3px);
}

/* ======================================
   MINI VISUALIZADOR OFERTA
====================================== */

.oferta-dashboard {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* MAPA */

/* PANEL LATERAL */

.mini-panel-oferta {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 230px;
  max-height: 85%;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-radius: 18px;
  padding: 16px;
  z-index: 999;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* TITULOS */

.mini-panel-oferta h4 {
  margin-bottom: 12px;
  font-size: 14px;
  color: #134a2c;
  font-weight: 700;
}

/* ITEMS CAPAS */

.capa-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #3d3d3d;
}

/* LEYENDA */

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
}

.legend-color {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

/* ESTILO MAPA */

.leaflet-tile-pane {
  filter: saturate(0.75) brightness(1.02) contrast(0.95);
}

/* POPUPS */

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.leaflet-popup-content {
  font-family: "DM Sans", sans-serif;
  font-size: 13px;
}

/* =========================================================
   ESTILOS CLONADOS PARA LA REGIÓN SUR (Igual a Oriente)
   ========================================================= */

/* 3. Leyenda dinámica nativa del Sur (Mismo diseño que el visualizador principal) */
#leyenda-dinamica-sur {
  background: white;
  padding: 10px 15px;
  border-radius: 5px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
  font-family: "DM Sans", sans-serif;
  color: #333;
}

#leyenda-dinamica-sur h4 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #134a2c;
  text-align: center;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}

/* =====================================================
   OFERTA REGIONAL
===================================================== */

.oferta-wrapper {
  width: 98%;
  max-width: 1800px;
  height: 88vh;
  min-height: 820px;
  margin: 15px auto 30px auto;
}

/* CONTENEDOR GENERAL */
.oferta-dashboard {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* MAPA */
#mapa-reutilizable {
  width: 100%;
  height: 100%;
  min-height: 820px;
  z-index: 1;
}

/* ==================================================
   CONTROL DE CAPAS / SIMBOLOGÍA
================================================== */

.leaflet-control-container .leaflet-top,
.leaflet-control-container .leaflet-right {
  z-index: 99999 !important;
}

.leaflet-control-layers {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 10px !important;
  padding: 10px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  font-family: "DM Sans", sans-serif !important;
}

#leyenda-container-regional {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
}

/* ==================================================
   CONTROL de Fichas
================================================== */

/* =========================================================
   VISTA POR DEFECTO (IMÁGENES COMPACTAS A MITAD DE PANTALLA)
   ========================================================= */

.default-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px 0 50px 0;
}

/* Contenedor principal que ocupa buen porcentaje de la pantalla */
.default-images-container {
  display: flex;
  flex-direction: row; /* Lado a lado */
  justify-content: center;
  align-items: stretch; /* Hace que ambas columnas tengan la misma altura base */
  gap: 60px; /* Separación amplia y elegante entre las dos regiones */
  width: 95%; /* Aprovecha casi todo el ancho disponible */
  max-width: 1200px; /* Tope para que no se deforme en pantallas gigantes */
  margin: 0 auto;
}

/* Cada bloque es exactamente igual al otro (50% / 50%) */
.default-image-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px; /* Espacio entre el título y la imagen */
}

/* Las imágenes grandes y simétricas */
.default-image-card img {
  width: 100%; /* Toma todo el ancho de su mitad de pantalla */
  max-height: 700px; /* Altura generosa. Puedes subirle a 450px o bajarle a 350px si lo ves necesario */
  object-fit: contain; /* IMPORTANTE: 'contain' evita que se corten textos o pedazos de tu mapa */
  background-color: #fbfbfb; /* Fondo tenue por si la imagen tiene un formato diferente */
  border-radius: 12px; /* Bordes suaves */
}

/* Efecto al pasar el mouse */
.default-image-card img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   MENÚ MINIMALISTA SITUACIÓN REGIONAL
   ========================================================= */

.dashboard-main-title {
  text-align: center;
  color: #134a2c;
  font-weight: bold;
  margin-bottom: 20px;
}

/* Contenedor centralizado para los dos títulos */
.menu-minimalista-container {
  display: flex;
  justify-content: center;
  gap: 80px; /* Separación entre Oriente y Sur */
  margin-bottom: 30px;
}

/* Cada bloque (Título + Lista) */
.menu-minimalista-item {
  position: relative; /* Clave para que la lista flote debajo de este texto */
  display: inline-block;
}

/* El texto principal ("Región Oriente ▼") */
.menu-minimalista-titulo {
  font-size: 16px;
  color: #333;
  cursor: pointer;
  padding-bottom: 15px; /* Espacio invisible para no perder el hover al bajar el mouse */
  display: block;
}

.menu-minimalista-titulo small {
  font-size: 10px;
  color: #888;
  margin-left: 5px;
}

/* La lista desplegable oculta por defecto */
.menu-minimalista-dropdown {
  display: none;
  position: absolute;
  top: 100%; /* Justo debajo del texto */
  left: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08); /* Sombra muy suave y limpia */
  padding: 10px 0;
  margin: 0;
  list-style: none;
  z-index: 999; /* Asegura que flote sobre la imagen */
  border-radius: 4px;
}

/* Magia: Mostrar la lista al pasar el mouse por el contenedor */
.menu-minimalista-item:hover .menu-minimalista-dropdown {
  display: block;
}

/* Estilo de los municipios (Limpio y sin cajas pesadas) */
.menu-minimalista-dropdown li {
  color: #000000; /* Color sutil azulado */
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Al pasar el mouse por un municipio */
.menu-minimalista-dropdown li:hover {
  background-color: #fcfcfc;
  color: #000000; /* Dorado institucional al hacer hover */
}

/* Botones de pasar imagenes de las fichas */
.controles-ficha {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 15px;
}

.controles-ficha button {
  background: #134a2c;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
}

.controles-ficha button:hover {
  background: #1d6b42;
}

/* =========================================
   ESTILOS PARA MAPA DE INCUBADORAS
   ========================================= */
#incubadoras .geo-wrapper {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  width: 100%;
  height: auto !important;
}

#map-incubadoras {
  width: 80% !important;
  max-width: 1000px;
  height: 70vh !important;
  min-height: 650px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 0 auto;
}

/* =========================================
   ESTILOS PARA SIMBOLOGÍA (LEYENDA ULTRA LIMPIA)
   ========================================= */
.legend-incubadoras {
  font-family: "DM Sans", sans-serif;
  font-size: 11.5px; /* TAREA 2: Letra considerablemente más pequeña */
  line-height: 1.35;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

.legend-inc-main {
  padding: 2px;
  margin-bottom: 4px;
  max-width: 250px; /* Se comprime más para no estorbar el mapa */
}

.legend-inc-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
  font-weight: 700;
}

.legend-inc-list li {
  margin-bottom: 1.5px; /* Menos espacio entre renglones */
}

.text-gold {
  color: #b3975d;
}

.text-green {
  color: #134a2c;
}

.text-light {
  font-weight: 400;
  color: #666666;
}

.legend-inc-note {
  padding: 2px;
  font-size: 11px;
  max-width: 200px; /* Reducción de ancho */
}

/* =========================================
   ESTILOS PARA MAPAS (TAMAÑOS INDEPENDIENTES)
   ========================================= */
#emprendimiento .geo-wrapper {
  display: flex !important;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  width: 100%;
  height: auto !important;
}

/* Mapa de Emprendimiento MENOS ANCHO */
#map-emprendimiento {
  width: 70% !important; /* Reducido del 90% al 70% */
  max-width: 900px; /* Límite máximo más angosto */
  height: 60vh !important; /* Un poco menos alto para que luzca proporcionado */
  min-height: 600px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 90px auto 0px auto !important;
}

/* =========================================
   ESTILOS PARA MAPA EMPRENDIMIENTO (INFORMACIÓN OPACA)
   ========================================= */
.tooltip-emprendimiento {
  /* Fondo blanco semi-transparente (90% opaco) */
  background: rgba(255, 255, 255, 0.9) !important;
  /* Borde muy sutil para delimitar el cuadro */
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  /* Sombra elegante tipo tarjeta flotante */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12) !important;
  border-radius: 10px !important;
  padding: 10px 15px !important; /* Aire alrededor del texto */
  backdrop-filter: blur(5px); /* Efecto de cristal esmerilado en el fondo */
}

/* Ocultar la flechita/triángulo por defecto de Leaflet */
.tooltip-emprendimiento::before {
  display: none !important;
}

/* =========================================================
   FORZAR MENÚ DE CAPAS SIEMPRE DESPLEGADO (ANTI-BUG LEAFLET)
   ========================================================= */

/* 1. Ocultar para siempre el ícono de la bolita */
.leaflet-control-layers-toggle {
  display: none !important;
}

/* 2. Forzar que la lista de capas siempre esté visible */
.leaflet-control-layers-list {
  display: block !important;
  position: relative !important;
}

/* 3. Darle un fondo blanco y formato para que se vea bien como panel fijo */
.leaflet-control-layers {
  background-color: white !important;
  padding: 10px 12px !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
  border: 2px solid rgba(0, 0, 0, 0.2) !important;
}

/* ====================== EQUIPAMIENTO PARA LA CULTURA ====================== */

#cultura {
  max-width: 1500px;
  margin: 0 auto;
}

#cultura h2 {
  margin-bottom: 20px;
}

.cultura-filtros {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 12px;
}

.btn-filtro-cultura {
  border: 1px solid #134a2c;
  background: #ffffff;
  color: #134a2c;
  padding: 10px 24px;
  border-radius: 25px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-filtro-cultura:hover {
  background: #eef4ef;
}

.btn-filtro-cultura.active {
  background: #134a2c;
  color: #ffffff;
}

.contador-cultura {
  text-align: center;
  color: #687768;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.cultura-map-container {
  width: 100%;
  height: 650px;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.14);
}

#map-cultura {
  width: 100%;
  height: 100%;
}

.cultura-popup {
  min-width: 260px;
  max-width: 340px;
  font-family: "DM Sans", sans-serif;
}

.cultura-popup-direccion {
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid #dddddd;
  color: #555555;
  line-height: 1.4;
}

.cultura-popup-lista {
  max-height: 250px;
  overflow-y: auto;
}

.cultura-popup-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 2px;
  border-bottom: 1px dotted #cccccc;
}

.cultura-popup-item:last-child {
  border-bottom: none;
}

.cultura-popup-item strong {
  color: #134a2c;
  font-size: 0.93rem;
  line-height: 1.3;
}

.cultura-popup-item span {
  color: #8b6e32;
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .cultura-map-container {
    height: 550px;
  }

  .cultura-filtros {
    flex-direction: column;
    align-items: center;
  }

  .btn-filtro-cultura {
    width: 220px;
  }
}
