/* ===== Layout ===== */
.container { max-width: 1280px; }
.mb-30 { margin-bottom: 30px; }
.mb-15 { margin-bottom: 15px; }
.p-30 { padding: 30px; }
.p-15 { padding: 15px; }
.gap-30 { gap: 30px; }

.card {
  background: #fff;
  border: 1px solid #e9edf3;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(20,24,35,.06);
}
.card-item {
  background: #fafbff;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20,24,35,.08);
  border-color: #e4e9f1;
}

/* ===== Map ===== */
#map {
  height: clamp(420px, 70vh, 750px);
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e9edf3;
  overflow: hidden;
}

/* Marker (DivIcon) */
.custom-marker {
  background: linear-gradient(180deg,#3b82f6,#2563eb);
  border-radius: 50%;
  border: 2px solid #fff;
  width: 14px;
  height: 14px;
  box-shadow: 0 2px 8px rgba(37,99,235,.5);
}
.custom-marker:hover { filter: brightness(1.05) saturate(1.05); }

/* Clustery */
.marker-cluster-small div { background: #e0ecff; color:#0f172a; }
.marker-cluster-medium div { background: #bfd6ff; }
.marker-cluster-large div { background: #9fc1ff; }
.marker-cluster div {
  border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(37,99,235,.35);
}

/* ===== Filters bar ===== */
.filters {
  padding: 14px 16px;
  background: #f7f9fc;
  border: 1px solid #e9edf3;
  border-radius: 12px;
  position: sticky;
  top: 10px;                 /* lekki odstęp od topu */
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(20,24,35,.04);
}
.filters .form-select, .filters .form-control {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 10px;
  margin-bottom: 0;
}
#search-input{
    margin-bottom: 0;
}
.filters .form-select:focus, .filters .form-control:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .2rem rgba(59,130,246,.15);
}

/* Aktywne filtry (badge) */
.filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  margin: 4px 6px 0 0;
  background: #2563eb;
  color: #fff;
  border-radius: 999px;
  font-size: .85rem;
  line-height: 1.8;
  cursor: pointer;
  transition: background .15s ease;
}
.filter-badge:hover { background: #1d4ed8; }

/* Search box dropdown */
.search-box { position: relative; }
.search-results {
  position: absolute; inset-inline: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  box-shadow: 0 12px 28px rgba(20,24,35,.08);
  max-height: 260px; overflow: auto; display: none; z-index: 1100;
}
.search-result-item {
  padding: 10px 12px; cursor: pointer; border-bottom: 1px solid #f3f4f6;
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: #f8fafc; }

/* ===== Popup Leaflet ===== */
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  border: 1px solid #e9edf3;
  box-shadow: 0 14px 32px rgba(20,24,35,.14);
}
.leaflet-popup-content {
  margin: 10px 14px;
  max-width: 280px;
}
.serviceman-popup h5 {
  margin: 0 0 8px 0;
  font-size: 1.05rem;
  color: #0f172a;
  font-weight: 700;
}
.serviceman-popup p { margin: 6px 0; color: #334155; font-size: .95rem; }
.specializations { margin-top: 10px; }
.specializations span {
  display: inline-block; background: #eef2ff; color: #3730a3;
  padding: 2px 10px; border-radius: 999px; margin: 2px; font-size: .8rem; font-weight: 600;
}

/* ===== Right column list ===== */
.contact-info { color: #475569; }
.contact-info .icon { margin-right: 6px; }

/* ===== Utilities ===== */
.text-blue { color: #1e40af; }

/* ===== Dark mode (opcjonalnie – gdy dodasz .theme-dark na body) ===== */
.theme-dark .card { background:#0b1220; border-color:#1b2335; box-shadow: none; }
.theme-dark #map { border-color:#1b2335; }
.theme-dark .filters { background:#0b1220; border-color:#1b2335; }
.theme-dark .filters .form-select,
.theme-dark .filters .form-control { background:#0f172a; color:#e5e7eb; border-color:#1f2937; }
.theme-dark .search-results { background:#0f172a; border-color:#1f2937; }
.theme-dark .search-result-item { border-color:#111827; color:#e5e7eb; }
.theme-dark .search-result-item:hover { background:#111827; }
.theme-dark .filter-badge { background:#3b82f6; }
.theme-dark .leaflet-popup-content-wrapper { background:#0f172a; border-color:#1f2937; }
.theme-dark .serviceman-popup h5 { color:#e5e7eb; }
.theme-dark .serviceman-popup p { color:#cbd5e1; }
.theme-dark .specializations span { background:#1e293b; color:#93c5fd; }

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .lg50 { width: 100% !important; }
  .filters { position: static; }
  #map { height: 60vh; }
}
