.contenedor-vertical {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 20px;
}

.tablero-superior {
  width: 100%;
  height: auto;
  min-height: 120px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}

.estadistica-box {
  flex: 1 1 200px;
  background: #f8f9fa;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  text-align: center;
}

.estadistica-box h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gris-pizarra);
  margin: 0 0 0.5rem 0;
}

.estadistica-box p {
  font-size: 2rem;
  font-weight: 700;
  color: var(--verde-musgo-profundo);
  margin: 0;
  line-height: 1;
}



.mapa-superior {
  width: 100%;
  height: 70vh;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px var(--sombra);
  overflow: hidden;
  position: relative;
}

.mapa-superior #mapa {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.filtros-inferiores {
  width: 100%;
  height: auto;
  min-height: 120px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);

  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem;
}

.filtros-inferiores h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--verde-musgo-profundo);
  margin: 0 0 1rem 0;
  flex-basis: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.filtros-inferiores h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, #eee, transparent);
  margin-left: 10px;
}

.filtro-grupo {
  flex: 1 1 220px;
  background: #f8f9fa;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e0 transparent;
}

.filtro-grupo:hover {
  background: #ffffff;
  border-color: #e2e8f0;
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.filtro-grupo::-webkit-scrollbar {
  width: 5px;
}

.filtro-grupo::-webkit-scrollbar-thumb {
  background-color: #cbd5e0;
  border-radius: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}

.checkbox-item:hover {
  background-color: rgba(58, 90, 64, 0.08);
}

.checkbox-item input {
  margin-right: 10px;
  accent-color: var(--verde-musgo-profundo);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-item label {
  font-size: 0.95rem;
  color: #334155;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.btn-reset {
  min-width: 160px;
  padding: 0.9rem 1.5rem;
  margin-top: 1rem;
  align-self: center;

  background-color: var(--verde-musgo-profundo);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(58, 90, 64, 0.25);
  transition: all 0.3s ease;
}

.btn-reset:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(58, 90, 64, 0.35);
}

.btn-reset:active {
  transform: translateY(0);
}

.leyenda {
  flex-basis: 100%;
  margin-top: 1rem;
  padding-top: 1.2rem;
  border-top: 1px dashed #cbd5e0;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.leyenda h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--gris-pizarra);
  font-weight: 700;
  margin-right: 0.5rem;
}

.leyenda-item {
  display: flex;
  align-items: center;
  background: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.2s ease;
  cursor: default;
}

.leyenda-item:hover {
  background: #f8f9fa;
  transform: translateY(-1px);
}

[class*="leyenda-color"] {
  width: 20px;
  height: 20px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.leyenda-color1 {
  background: #ffa07a;
}
.leyenda-color2 {
  background: #ff7f50;
}
.leyenda-color3 {
  background: #ff6347;
}
.leyenda-color4 {
  background: #ff4500;
}
.leyenda-color5 {
  background: #dc143c;
}
.leyenda-color6 {
  background: #b22222;
}

section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: auto;
}

section h1 {
  font-size: 2.5rem;
  font-weight: 700;
  border-left: 6px solid var(--verde-musgo-profundo);
  padding-left: 15px;
  margin-bottom: 1rem;
  color: var(--gris-pizarra);
}

section h2 {
  font-size: 2rem;
  padding-left: 10px;
  margin-bottom: 1.5rem;
  font-weight: 400;
  color: var(--gris-pizarra);
}

@media (max-width: 768px) {
  .contenedor-vertical {
    padding: 0 15px;
    gap: 15px;
  }

  .mapa-superior {
    height: 50vh;
  }

  .filtros-inferiores {
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
  }

  .filtro-grupo {
    width: 100%;
    max-height: none;
  }

  .btn-reset {
    width: 100%;
    margin-top: 0.5rem;
  }

  .leyenda {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .leyenda-item {
    width: 100%;
    margin-bottom: 5px;
  }
}

