/* ================= BASE ================= */

body {
  background: linear-gradient(180deg, #f4f6f8, #eef1f5);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  margin: 0;
}

/* ================= HEADER ================= */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;

  background: #2952be;
  color: #ffffff;
  padding: 14px 16px;
  text-align: center;
}

/* ================= CONTENIDO ================= */

.content {
  padding: 16px;
  text-align: center;
}

/* ================= MAPA ================= */

.mapa-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: #f4f6f8;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mapa-container iframe,
.mapa-container .leaflet-container {
  width: 100%;
  height: 100%;
}

/* ================= BOTONES ================= */

.btn-mapa {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e88e5, #42a5f5);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 10px rgba(30, 136, 229, 0.3);
}

.btn-mapa:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(30, 136, 229, 0.4);
}

.btn-ocultar {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 14px;
  border: none;
  border-radius: 20px;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.btn-ocultar:hover {
  background: rgba(0,0,0,0.85);
}

/* ================= FILTROS ================= */

.filtros-seccion {
  max-width: 1200px;
  padding: 0 20px;
}

/* 🔥 AJUSTAR ESTE VALOR SEGÚN ALTURA REAL DEL HEADER */

/* Barra sticky */
.filtros-barra {
  position: sticky;
  top: 84px;
  z-index: 900;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.filtros-seccion {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 25px;
}

/* Título */
.filtros-titulo {
  font-size: 18px;
  font-weight: 600;
  color: #1e3a8a;
  margin: 0;
  white-space: nowrap;
}

/* Controles */
.filtros-controles {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

/* Inputs */
.filtros-controles select,
.filtros-controles input {
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 140px;
}

/* Botones */
.btn-filtro {
  padding: 7px 12px;
  border: 1px solid #1e3a8a;
  background: white;
  color: #1e3a8a;
  border-radius: 4px;
  cursor: pointer;
}

.btn-filtro.activo {
  background: #1e3a8a;
  color: white;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 768px) {

  .filtros-barra {
    flex-wrap: wrap;
    gap: 10px;
  }

  .filtros-controles {
    flex-wrap: wrap;
    justify-content: center;
  }

  .filtros-controles select,
  .filtros-controles input {
    width: auto;
  }
}

/* ================= LOADER ================= */

.loader {
  width: 35px;
  height: 35px;
  border: 4px solid #ddd;
  border-top: 4px solid #1976d2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}
@keyframes resaltarBarra {
  0%   { box-shadow: 0 0 0 0 rgba(21,101,192, 0.0); }
  50%  { box-shadow: 0 0 25px 8px rgba(21,101,192, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(21,101,192, 0.0); }
}

.filtros-resaltado {
  animation: resaltarBarra 0.8s ease;
  border-radius: 8px;
}