.famap-map {
  width: 100%;
  height: 750px;
  min-height: 750px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #dff4ff 0%, #b9dcff 100%);
  box-shadow:
    0 20px 60px rgba(15, 23, 42, 0.12),
    0 8px 24px rgba(15, 23, 42, 0.08);
}

.famap-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

.famap-search-wrapper {
  position: absolute !important;
  top: 26px !important;
  left: 26px !important;
  z-index: 1000 !important;
  width: 360px !important;
  max-width: calc(100vw - 64px) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  pointer-events: auto !important;
}

.famap-search-shell {
  position: relative !important;
  width: 100% !important;
}

.famap-search-icon {
  position: absolute !important;
  left: 18px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: #0284c7 !important;
  font-size: 20px !important;
  z-index: 3 !important;
  line-height: 1 !important;
  pointer-events: none !important;
}

.famap-wrapper .famap-search-input {
  width: 100% !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 20px 0 52px !important;
  margin: 0 !important;
  border: 1px solid rgba(255,255,255,0.75) !important;
  border-radius: 20px !important;
  outline: none !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 58px !important;
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  box-shadow:
    0 18px 45px rgba(15, 23, 42, 0.20),
    0 2px 8px rgba(15, 23, 42, 0.08) !important;
  transition: all 0.22s ease !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.famap-wrapper .famap-search-input:focus {
  transform: translateY(-1px) !important;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.22),
    0 2px 12px rgba(15, 23, 42, 0.10) !important;
}

.famap-wrapper .famap-search-input::placeholder {
  color: #64748b !important;
  opacity: 0.9 !important;
}

.famap-search-results {
  display: none;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.20);
  max-height: 430px;
  overflow-y: auto;
}

.search-item,
.search-empty {
  padding: 15px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.search-item {
  cursor: pointer;
  transition: all 0.18s ease;
}

.search-item:hover {
  background: #f8fafc;
  transform: translateX(4px);
}

.search-item strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.search-item span,
.search-empty {
  font-size: 12px;
  color: #64748b;
}

.famap-map .leaflet-control-zoom {
  border: none !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(15,23,42,0.20) !important;
  margin: 0 22px 22px 0 !important;
}

.famap-map .leaflet-control-zoom a {
  width: 38px !important;
  height: 38px !important;
  line-height: 38px !important;
  background: rgba(255,255,255,0.95) !important;
  border: none !important;
  color: #0f172a !important;
  font-weight: 700 !important;
}

.famap-map .leaflet-tile {
  filter: saturate(1.22) contrast(1.04) brightness(1.02);
}

.famap-map .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.famap-map .leaflet-popup-content {
  margin: 0;
  width: 320px !important;
}

.famap-map .leaflet-popup-tip {
  background: rgba(255,255,255,0.96);
}

.famap-map .leaflet-popup-close-button {
  color: #ffffff !important;
  padding: 12px 12px 0 0 !important;
  font-size: 18px !important;
  z-index: 999;
}

.popup-link-wrapper {
  color: inherit !important;
  text-decoration: none !important;
  display: block;
}

.popup-card {
  width: 320px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.popup-image {
  width: 100%;
  height: 168px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.popup-link-wrapper:hover .popup-image {
  transform: scale(1.04);
}

.popup-content {
  padding: 16px;
}

.popup-group {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0369a1;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
}

.popup-content h3 {
  margin: 0 0 7px;
  font-size: 19px;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 750;
}

.popup-content p {
  margin: 0 0 11px;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.48;
}

.popup-section {
  padding: 9px 10px;
  background: #f8fafc;
  border-radius: 12px;
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: #475569;
}

.popup-section strong {
  display: block;
  color: #0f172a;
  font-size: 11px;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hidden-gem {
  background: #fff7ed;
}

.custom-map-marker {
  transition: transform 0.2s ease;
}

.custom-map-marker:hover {
  transform: scale(1.15);
}

.marker-pin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 10;
  border: 2px solid #ffffff;
  box-shadow: 0 3px 12px rgba(0,0,0,0.24);
}

.marker-pulse {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: famapPulse 2s infinite ease-out;
  opacity: .45;
}

.coastline-icon .marker-pin,
.coastline-icon .marker-pulse {
  background: linear-gradient(135deg, #00c6ff, #0072ff);
}

.south-icon .marker-pin,
.south-icon .marker-pulse {
  background: linear-gradient(135deg, #ff7b00, #ff3d00);
}

.archipelago-icon .marker-pin,
.archipelago-icon .marker-pulse {
  background: linear-gradient(135deg, #ffd000, #ff8c00);
}

@keyframes famapPulse {
  0% { transform: scale(.55); opacity: .75; }
  100% { transform: scale(1.9); opacity: 0; }
}

@media (max-width: 768px) {
  .famap-map {
    height: 680px;
    min-height: 680px;
  }

  .famap-search-wrapper {
    top: 16px !important;
    left: 16px !important;
    width: calc(100vw - 48px) !important;
  }

  .popup-card,
  .famap-map .leaflet-popup-content {
    width: 285px !important;
  }

  .popup-image {
    height: 150px;
  }
}
