/* ============================================
   Map page — Projects map layout
   Responsive, dark theme, marker cards
   ============================================ */

.map-page .map-container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 2rem);
}

@media (min-width: 768px) {
  .map-page .map-container {
    grid-template-columns: 1fr 320px;
  }
}

.map-canvas {
  min-height: 400px;
  height: clamp(400px, 50vh, 560px);
  border-radius: var(--proj-radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--proj-border, rgba(255, 255, 255, 0.08));
  background: rgba(0, 0, 0, 0.3);
}

.map-markers-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 560px;
  overflow-y: auto;
}

.map-marker-card {
  background: var(--proj-surface, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--proj-border, rgba(255, 255, 255, 0.08));
  border-radius: var(--proj-radius, 12px);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.map-marker-card:hover,
.map-marker-card.is-active {
  background: var(--proj-accent-soft, rgba(212, 175, 55, 0.12));
  border-color: rgba(212, 175, 55, 0.35);
}

.map-marker-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
  color: var(--proj-text, #f5f5f5);
}

.map-marker-address {
  font-size: 0.85rem;
  color: var(--proj-text-muted, rgba(255, 255, 255, 0.55));
  margin: 0;
  line-height: 1.5;
}

.map-marker-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--proj-accent, #d4af37);
  text-decoration: none;
}

.map-marker-link:hover {
  text-decoration: underline;
}

.map-empty,
.projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--proj-text-muted, rgba(255, 255, 255, 0.55));
  padding: 2rem;
}

/* Leaflet dark theme overrides */
.leaflet-container {
  font-family: inherit;
  background: #0a0a0a;
}

.leaflet-popup-content-wrapper {
  background: rgba(20, 20, 20, 0.95);
  color: #f5f5f5;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
}

.leaflet-popup-tip {
  background: rgba(20, 20, 20, 0.95);
}

.leaflet-popup-content {
  margin: 0.75rem 1rem;
  font-size: 0.9rem;
}

.leaflet-control-zoom {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.leaflet-control-zoom a {
  background: rgba(20, 20, 20, 0.9) !important;
  color: #f5f5f5 !important;
  border: none !important;
}

.leaflet-control-zoom a:hover {
  background: rgba(212, 175, 55, 0.2) !important;
}

.leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 10px;
}

.leaflet-control-attribution a {
  color: rgba(212, 175, 55, 0.8);
}
