/* Ergänzungen für den Menschen-Tab – auf Basis des CGF-Templates */

/* Leaflet-Karte */
.cgf-map-wrap {
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 77, 255, 0.1);
}

#community-map {
  height: 480px;
  width: 100%;
  z-index: 1;
}

@media (min-width: 992px) {
  #community-map {
    height: 560px;
  }
}

.leaflet-container {
  font-family: inherit;
  background: #f2f2f2;
}

/* Dezenter Kartenstil – Profile im Vordergrund */
.leaflet-tile-pane {
  filter: saturate(0.75) contrast(0.95);
}

/* Karten-Marker mit Profilbild */
.leaflet-div-icon.cgf-marker-wrap,
.leaflet-div-icon.cgf-cluster-wrap {
  background: transparent !important;
  border: none !important;
  margin: 0 !important;
}

.cgf-marker-wrap {
  background: none !important;
  border: none !important;
}

.cgf-marker-avatar {
  box-sizing: border-box;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #004dff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  background-color: #e9ecef;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.cgf-marker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  margin: 0;
  padding: 0;
  border: none;
  vertical-align: middle;
}

.cgf-profile-card.highlighted ~ .cgf-marker-avatar,
.cgf-marker-wrap.cgf-marker-active .cgf-marker-avatar {
  border-color: #002a99;
  box-shadow: 0 0 0 3px rgba(0, 77, 255, 0.35), 0 3px 12px rgba(0, 0, 0, 0.3);
}

/* Cluster mit Profilbildern */
.cgf-cluster-wrap {
  background: none !important;
  border: none !important;
}

.cgf-cluster-avatars {
  position: relative;
  box-sizing: border-box;
}

.cgf-cluster-face {
  box-sizing: border-box;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  max-width: 36px;
  max-height: 36px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  background-color: #e9ecef;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: absolute;
  flex-shrink: 0;
}

.cgf-cluster-avatars--1 {
  width: 52px;
  height: 52px;
}

.cgf-cluster-avatars--1 .cgf-cluster-face {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  left: 4px;
  top: 4px;
}

.cgf-cluster-avatars--2 {
  width: 56px;
  height: 56px;
}

.cgf-cluster-avatars--2 .cgf-cluster-face:nth-child(1) { left: 2px; top: 10px; z-index: 1; }
.cgf-cluster-avatars--2 .cgf-cluster-face:nth-child(2) { left: 18px; top: 10px; z-index: 2; }

.cgf-cluster-avatars--3 {
  width: 60px;
  height: 60px;
}

.cgf-cluster-avatars--3 .cgf-cluster-face:nth-child(1) { left: 12px; top: 2px; z-index: 1; }
.cgf-cluster-avatars--3 .cgf-cluster-face:nth-child(2) { left: 2px; bottom: 2px; z-index: 2; }
.cgf-cluster-avatars--3 .cgf-cluster-face:nth-child(3) { right: 2px; bottom: 2px; z-index: 3; }

.cgf-cluster-avatars--many {
  width: 52px;
  height: 52px;
}

.cgf-cluster-face--solo {
  position: absolute;
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  left: 4px;
  top: 4px;
}

.cgf-cluster-count {
  position: absolute;
  right: -2px;
  bottom: -2px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: #004dff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.cgf-map-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: #666;
}

.cgf-map-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #004dff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #004dff;
}

/* Profil-Vorschau (Sidebar) */
.cgf-profile-preview {
  background: #f8f9fa;
  min-height: 200px;
}

.cgf-profile-preview .preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
  text-align: center;
  color: #666;
}

.cgf-profile-preview .preview-placeholder p {
  max-width: 260px;
  line-height: 1.5;
  margin: 0;
}

.cgf-profile-preview .preview-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9ecef;
}

.cgf-profile-preview .preview-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cgf-ai-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  text-align: center;
}

.cgf-profile-preview .preview-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.cgf-profile-preview .preview-meta {
  font-size: 0.875rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.cgf-profile-preview .preview-occupation {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.cgf-profile-preview .preview-bio {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
}

/* Tags */
.cgf-tag-group {
  margin-bottom: 0.65rem;
}

.cgf-tag-group-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #888;
  margin-bottom: 0.35rem;
}

.cgf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cgf-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
}

.cgf-tag-schwerpunkt {
  background: #e8f0ff;
  color: #004dff;
}

.cgf-tag-skill {
  background: #f0f0f0;
  color: #333;
}

/* Filter – immer schwarzer Text (guter Kontrast) */
.cgf-filter-section {
  width: 100%;
}

.cgf-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cgf-filter-bar .filter-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #000;
  margin-right: 0.25rem;
  flex: 0 0 100%;
}

@media (min-width: 768px) {
  .cgf-filter-bar .filter-label {
    flex: 0 0 auto;
  }
}

.cgf-filter-bar .btn-filter {
  font-size: 0.82rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #adb5bd;
  background: #fff;
  color: #000 !important;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.cgf-filter-bar .btn-filter:hover {
  background: #f0f0f0;
  border-color: #666;
  color: #000 !important;
}

.cgf-filter-bar .btn-filter.active {
  background: #e9ecef;
  border-color: #004dff;
  border-width: 2px;
  color: #000 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 77, 255, 0.15);
}

/* Profil-Karten in der Liste */
.cgf-profile-card {
  background: #fff;
  border: 1px solid #dee2e6;
  transition: box-shadow 0.2s, transform 0.2s, outline 0.2s;
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.cgf-profile-card:hover {
  box-shadow: 0 6px 24px rgba(0, 77, 255, 0.12);
  transform: translateY(-2px);
}

.cgf-profile-card.highlighted {
  outline: 3px solid #004dff;
  outline-offset: 2px;
}

.cgf-profile-card .card-image-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e9ecef;
}

.cgf-profile-card .card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cgf-profile-card .card-body {
  padding: 1.25rem;
  flex: 1;
}

.cgf-profile-card .card-meta {
  font-size: 0.82rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.cgf-profile-card .card-occupation {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Leaflet-Popup */
.cgf-popup .leaflet-popup-content {
  margin: 12px 14px;
  min-width: 180px;
}

.cgf-popup-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #004dff;
  margin-bottom: 0.5rem;
}

.cgf-popup-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cgf-popup-name {
  font-weight: 700;
  font-size: 1rem;
  color: #004dff;
  margin-bottom: 0.15rem;
}

.cgf-popup-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.cgf-popup-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: #004dff;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  text-decoration: underline;
}

.cgf-popup-link:hover {
  color: #0036b3;
}

/* Nav: aktiver Menüpunkt */
.navbar-mainnavigation .nav-item-menschen .nav-link {
  font-weight: 700;
}
