/* ==========================================
   INTERACTIVE MAP WITH PULSING MARKERS
   ========================================== */

.map-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--bg-light);
}

#interactive-map {
  width: 100%;
  height: 500px !important;
  z-index: 1;
}

/* Leaflet marker styles */
.leaflet-marker-icon {
  animation: none !important;
}

.location-marker {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 3px solid var(--bg-white);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.location-marker--pulsing {
  animation: pulse 2s ease-in-out infinite;
}

.location-marker:hover {
  transform: scale(1.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  z-index: 1000;
}

.location-marker:hover .marker-image {
  opacity: 1;
  transform: scale(1.05);
}

.location-marker:hover .marker-label {
  opacity: 1;
  transform: translateY(-15px);
}

.marker-image {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.marker-label {
  position: absolute;
  bottom: -30px;
  background: var(--primary);
  color: var(--bg-white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(0);
  transition: all 0.3s ease;
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(74, 95, 127, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 4px 20px rgba(74, 95, 127, 0.7);
    transform: scale(1.05);
  }
  100% {
    box-shadow: 0 4px 12px rgba(74, 95, 127, 0.4);
    transform: scale(1);
  }
}

.map-popup {
  background: var(--bg-white);
  padding: 1rem;
  border-radius: 8px;
  max-width: 220px;
  text-align: center;
}

.map-popup__image {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

.map-popup__title {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.map-popup__link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--primary);
  color: var(--bg-white);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 0.75rem;
}

.map-popup__link:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Leaflet popup customization */
.leaflet-popup-content-wrapper {
  border-radius: 8px !important;
  background: var(--bg-white) !important;
  box-shadow: var(--shadow-lg) !important;
}

.leaflet-popup-tip {
  background: var(--bg-white) !important;
}

/* Single location map (внизу страницы города) */
.single-location-map {
  padding: 5rem 2rem;
  background: var(--bg-light);
  margin-top: 3rem;
}

.single-location-map__wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

.single-location-map__title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 2rem;
  text-align: center;
}

.single-location-map__container {
  margin-bottom: 3rem;
}

#single-location-map {
  width: 100%;
  height: 600px !important;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.single-location-marker--active {
  animation: pulse 1.5s ease-in-out infinite;
}

.single-location-marker--active .location-marker {
  transform: scale(1.5);
  box-shadow: 0 8px 30px rgba(74, 95, 127, 0.5);
}

.map-cities-navigation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.city-nav-link {
  padding: 1rem;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.city-nav-link:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--bg-white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.city-nav-link--active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--bg-white);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #interactive-map,
  #single-location-map {
    height: 400px !important;
  }

  .location-marker {
    width: 40px;
    height: 40px;
  }

  .marker-label {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .map-cities-navigation {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #interactive-map,
  #single-location-map {
    height: 300px !important;
  }

  .location-marker {
    width: 35px;
    height: 35px;
  }

  .map-popup {
    max-width: 180px;
  }

  .map-cities-navigation {
    grid-template-columns: 1fr;
  }
}
