.mapa-layout {
  display: flex;
  height: calc(100vh - 120px);
  min-height: 650px;
  overflow: hidden;
}

.mapa-wrapper {
  position: relative;
  flex: 1 1 70%;
}

#map {
  width: 100%;
  height: 100%;
  min-height: 650px;
}

#sidebar {
  flex: 0 0 380px;
  border-left: 1px solid #ddd;
  background: #fafafa;
  overflow-y: auto;
  padding: 16px;
  box-sizing: border-box;
}

#sidebar h2 {
  margin-top: 0;
  font-size: 20px;
}

.summary {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}

.card {
  border: 1px solid #ddd;
  border-radius: 8px;
  background: white;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
}

.card .meta {
  font-size: 13px;
  color: #555;
  margin-bottom: 6px;
  line-height: 1.45;
}

.card a {
  text-decoration: none;
}

.btn-reset {
  display: inline-block;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 6px;
  background: white;
  cursor: pointer;
  font-size: 13px;
}

.btn-reset:hover {
  background: #f0f0f0;
}

.mapa-llegenda {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  background: white;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.leaflet-tooltip {
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .mapa-layout {
    flex-direction: column;
    height: auto;
  }

  .mapa-wrapper {
    min-height: 500px;
  }

  #map {
    height: 500px;
    min-height: 500px;
  }

  #sidebar {
    flex: none;
    width: 100%;
    max-height: none;
    border-left: none;
    border-top: 1px solid #ddd;
  }
}