/* Axencia.co — Contact Location: World-Class Animated Real-Time Map */

.contact-location-section {
  position: relative;
  padding: 100px 24px 120px;
  overflow: hidden;
}

/* Live badge — top-right corner */
.location-live-badge {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(15, 23, 42, 0.9);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(34, 197, 94, 0.5);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #4ade80;
  letter-spacing: 0.15em;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.2);
  pointer-events: none;
  opacity: 0;
  animation: liveBadgeReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s forwards;
}

.location-live-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  animation: liveDotBlink 1.5s ease-in-out infinite;
}

@keyframes liveBadgeReveal {
  to { opacity: 1; }
}

@keyframes liveDotBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.2); }
}

/* Map overlay — scan line, grid, arcs */
.location-map-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
  border-radius: 24px;
  overflow: hidden;
}

.location-scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.6), transparent);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
  animation: scanSweep 4s linear infinite;
}

@keyframes scanSweep {
  0% { top: 0; opacity: 0.8; }
  50% { opacity: 1; }
  100% { top: 100%; opacity: 0.8; }
}

.location-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: gridPulse 6s ease-in-out infinite;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.location-arcs-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.location-arc {
  stroke-dashoffset: 0;
  animation: arcFlow 4s linear infinite;
}

.location-arc-1 { animation-delay: 0s; }
.location-arc-2 { animation-delay: 0.5s; }
.location-arc-3 { animation-delay: 1s; }
.location-arc-4 { animation-delay: 1.5s; }

@keyframes arcFlow {
  to { stroke-dashoffset: -5; }
}

/* Location header — section-header style with indicator */
.location-header {
  text-align: center;
  margin-bottom: 48px;
}

.location-header.section-header .section-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px 10px 32px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(6, 182, 212, 0.08));
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4ade80;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  animation: locationLivePulse 4s ease-in-out infinite;
  position: relative;
}

.location-header .section-tag::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: locationDotPulse 2s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.8);
}

@keyframes locationLivePulse {
  0%, 100% { border-color: rgba(34, 197, 94, 0.4); box-shadow: 0 0 20px rgba(34, 197, 94, 0.05); }
  50% { border-color: rgba(34, 197, 94, 0.7); box-shadow: 0 0 30px rgba(34, 197, 94, 0.15); }
}

@keyframes locationDotPulse {
  0%, 100% { opacity: 1; transform: translateY(-50%) scale(1); }
  50% { opacity: 0.7; transform: translateY(-50%) scale(1.3); }
}

.location-heading,
.contact-location-section .location-header h2 {
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e8e8ed 0%, #93c5fd 40%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.location-subtitle {
  color: #94a3b8;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Map container — glass, rounded, animated reveal, world-class glow */
.location-map-wrap {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 
    0 32px 80px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    0 0 60px -10px rgba(6, 182, 212, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 1s cubic-bezier(0.34, 1.56, 0.64, 1), transform 1s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

.location-map-wrap:hover {
  box-shadow: 
    0 40px 100px -24px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(59, 130, 246, 0.25),
    0 0 80px -8px rgba(6, 182, 212, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.location-map-wrap::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59,130,246,0.3), transparent 40%, transparent 60%, rgba(6,182,212,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 30;
  opacity: 0.6;
  animation: mapBorderGlow 5s ease-in-out infinite;
}

@keyframes mapBorderGlow {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.9; }
}

.contact-location-section.in-view .location-map-wrap {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#contactLocationMap {
  width: 100%;
  height: 420px;
  min-height: 320px;
  border-radius: 24px;
  z-index: 1;
}

/* Custom Leaflet dark overlay */
.leaflet-container {
  font-family: 'Outfit', system-ui, sans-serif;
  background: #0a0f1a !important;
}

.leaflet-tile-pane {
  filter: brightness(0.85) contrast(1.1) saturate(0.9);
}

/* Radar / pulse overlay on map */
.location-map-radar {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  border-radius: 24px;
  overflow: hidden;
}

.location-map-radar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border: 2px solid rgba(59, 130, 246, 0.25);
  border-radius: 50%;
  animation: radarPulse 3.5s ease-out infinite;
  opacity: 0;
}

.location-map-radar::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 140px;
  height: 140px;
  margin: -70px 0 0 -70px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 50%;
  animation: radarPulse 2.8s ease-out infinite 0.6s;
  opacity: 0;
}

@keyframes radarPulse {
  0% { transform: scale(0.2); opacity: 0.7; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Address card — glass overlay */
.location-address-card {
  position: absolute;
  bottom: 24px;
  left: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}

.location-address-glass {
  padding: 20px 28px;
  background: rgba(15, 23, 42, 0.85);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  box-shadow: 0 16px 48px -12px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: addressCardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s forwards;
}

@keyframes addressCardReveal {
  to { opacity: 1; transform: translateY(0); }
}

.location-address-glass h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.location-address-glass p {
  font-size: 1.1rem;
  font-weight: 600;
  color: #e8e8ed;
  margin: 0;
  line-height: 1.4;
}

.location-address-glass a {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.9rem;
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s, transform 0.2s;
}

.location-address-glass a:hover {
  color: #93c5fd;
  transform: translateX(4px);
}

/* Directions CTA */
.location-directions-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(6, 182, 212, 0.15));
  border: 1px solid rgba(59, 130, 246, 0.4);
  border-radius: 12px;
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(20px);
  animation: addressCardReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

.location-directions-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(6, 182, 212, 0.25));
  border-color: rgba(59, 130, 246, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.location-directions-btn svg {
  width: 18px;
  height: 18px;
}

/* Leaflet custom marker */
.location-custom-marker {
  background: none !important;
  border: none !important;
}

.location-marker-inner {
  position: relative;
  width: 40px;
  height: 40px;
}

.location-marker-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.6);
  z-index: 2;
}

/* Custom marker pulse */
.location-marker-inner .location-marker-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
  border-radius: 50%;
  animation: markerPulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes markerPulse {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(2); opacity: 0; }
}

/* Connection lines animation */
.location-connections {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.location-connection-dot {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(59, 130, 246, 0.8);
  border-radius: 50%;
  animation: connectionFloat 4s ease-in-out infinite;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.location-connection-dot:nth-child(1) { left: 15%; top: 25%; animation-delay: 0s; }
.location-connection-dot:nth-child(2) { left: 85%; top: 30%; animation-delay: 0.8s; }
.location-connection-dot:nth-child(3) { left: 45%; top: 15%; animation-delay: 1.6s; }
.location-connection-dot:nth-child(4) { left: 70%; top: 70%; animation-delay: 2.4s; }
.location-connection-dot:nth-child(5) { left: 25%; top: 65%; animation-delay: 3.2s; }
.location-connection-dot:nth-child(6) { left: 55%; top: 45%; animation-delay: 0.4s; }
.location-connection-dot:nth-child(7) { left: 38%; top: 72%; animation-delay: 2s; }

@keyframes connectionFloat {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

/* Responsive */
@media (max-width: 768px) {
  .contact-location-section {
    padding: 60px 16px 80px;
  }
  
  .location-header {
    margin-bottom: 32px;
  }
  
  .location-heading,
  .contact-location-section .location-header h2 {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
  }
  
  .contact-location-section .location-subtitle {
    font-size: 0.95rem;
    max-width: 100%;
  }
  
  .location-map-wrap { border-radius: 16px; }
  
  #contactLocationMap {
    height: 340px;
    min-height: 280px;
  }
  
  .location-live-badge {
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.7rem;
  }
  
  .location-address-card {
    flex-direction: column;
    align-items: stretch;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }
  
  .location-address-glass {
    padding: 16px 20px;
  }
  
  .location-directions-btn {
    justify-content: center;
  }
}
