.animated-map-block {
  position: relative;
  width: 100%;
  min-height: 500px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 60px 40px;
  overflow: hidden;
}

.animated-map-wrapper {
  display: flex;
  align-items: center;
  width:100%;
  margin: 0 auto;
  gap: 60px;
}

.animated-map-content {
  flex: 1;
  max-width: 500px;
  z-index: 10;
  position: absolute;
}

.animated-map-content .wp-block-paragraph:first-child {
  color: #e74c3c;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.animated-map-content h1,
.animated-map-content h2 {
  color: #2c3e50;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 25px;
}

.animated-map-content h1 {
  font-size: 2.8rem;
}

.animated-map-content h2 {
  font-size: 2.2rem;
}

.animated-map-content p:not(:first-child) {
  color: #5a6c7d;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 20px;
}

.animated-map-content .wp-block-button {
  margin-top: 30px;
}

.animated-map-content .wp-block-button .wp-block-button__link {
  background-color: #e74c3c;
  color: white;
  border-radius: 30px;
  padding: 15px 35px;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: none;
}

.animated-map-content .wp-block-button .wp-block-button__link:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.animated-map-container {
  flex: 1;
  position: relative;
  max-width: 100%;
  aspect-ratio: 1720 / 916;
  margin-left: auto;
}

.map-layers {
  position: relative;
  width: 100%;
  height: 100%;
}

.map-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.9) translateY(20px);
  transition: all 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.map-layer.animate {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.map-base {
  z-index: 1;
}

.map-poland {
  z-index: 2;
}

.map-points {
  z-index: 3;
}

.map-lines {
  z-index: 4;
}

/* Responsywność */
@media (max-width: 1024px) {
  .animated-map-wrapper {
    gap: 40px;
  }

  .animated-map-content h1 {
    font-size: 2.2rem;
  }

  .animated-map-container {
    max-width: 500px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .animated-map-block {
    padding: 40px 20px;
  }

  .animated-map-wrapper {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .animated-map-content {
    max-width: 100%;
    order: 2;
  }

  .animated-map-container {
    max-width: 100%;
    height: 300px;
    order: 1;
  }

  .animated-map-content h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .animated-map-block {
    padding: 30px 15px;
  }

  .animated-map-container {
    height: 250px;
  }

  .animated-map-content h1 {
    font-size: 1.5rem;
  }

  .animated-map-content p {
    font-size: 14px;
  }
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .map-layer {
    transition: opacity 0.3s ease;
    transform: none;
  }

  .map-layer.animate {
    transform: none;
  }
}
