/* Bloquea el rebote horizontal de toda la página */
html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Estructura base para el efecto RGB */
.btn-rgb,
.social-rgb-hover {
  position: relative;
  background: #000;
  color: inherit;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Borde RGB animado */
.btn-rgb::before,
.social-rgb-hover::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(120deg, #00c6ff, #0072ff, #3a7bd5, #00c6ff);
  background-size: 300% 300%;
  animation: blueRGB 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* El botón de postularse SIEMPRE tiene el borde visible */
.btn-rgb::before {
  opacity: 1;
}

/* Las redes sociales OCULTAN el borde por defecto y lo muestran en HOVER */
.social-rgb-hover::before {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-rgb-hover:hover::before {
  opacity: 1;
}

@keyframes blueRGB {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

/* Brillo suavizado */
.text-white-rgb {
  color: #ffffff;
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Badges dinámicos */
.badge-blue {
  background: rgba(30, 64, 175, 0.2);
  color: #93c5fd;
}

.badge-red {
  background: rgba(153, 27, 27, 0.2);
  color: #fca5a5;
}

.badge-green {
  background: rgba(22, 101, 52, 0.2);
  color: #86efac;
}

.badge-purple {
  background: rgba(107, 33, 168, 0.2);
  color: #d8b4fe;
}

/* Animación para que el borde gire */
@keyframes rotateBorder {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.stat-circle {
  position: relative;
  width: 180px;
  height: 180px;
  background: #000;
  /* Fondo interno negro */
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1;
  margin: auto;
}

/* El borde animado azul */
.stat-circle::before {
  content: "";
  position: absolute;
  inset: -3px;
  /* Grosor del borde */
  border-radius: 50%;
  padding: 3px;
  /* Degradado azul para el efecto de carga en los circulos */
  background: conic-gradient(from 0deg, transparent, #00c6ff, #0072ff, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  -webkit-mask-composite: destination-out;
  animation: rotateBorder 3s linear infinite;
  z-index: -1;
}

/* Brillo exterior sutil */
.stat-circle::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: #0072ff;
  filter: blur(15px);
  opacity: 0.15;
  z-index: -2;
}

/* Forzamos el diseño circular para el botón de WhatsApp */
#whatsapp-chat .social-rgb-hover {
  border-radius: 50% !important;
}

#whatsapp-chat .social-rgb-hover::before {
  border-radius: 50% !important;
}

/* Animación de aparición */
@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(20px);
  }

  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#whatsapp-chat {
  animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Contenedor del Mapa con scroll */
.arcos-map-container {
  position: relative;
  width: 100%;
  max-width: 1000px;
  border-radius: 40px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);

  /* NUEVO: Barra inferior para mover el mapa */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Forzamos que el mapa mantenga sus 1000px para que se active el scroll */
.mapa-svg-profesional {
  min-width: 1000px;
  height: auto;
}

/* Estilo para la barra de scroll (opcional para que no sea tosca) */
.arcos-map-container::-webkit-scrollbar {
  height: 8px;
}

.arcos-map-container::-webkit-scrollbar-thumb {
  background: #1D6FA3;
  border-radius: 10px;
}

/* Header scrollable en móviles */
.header-container {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
}

/* Ocultamos la barra de scroll del head por estética */
.header-container::-webkit-scrollbar {
  display: none;
}

/* Estilo para los estados de México (Datos de INFOMAP.JS) */
.mx-state-path {
  fill: #0a0a0a;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 0.8;
  transition: all 0.3s ease;
}

.mx-state-path:hover {
  fill: #111;
  stroke: #1D6FA3;
  /* Tu azul secundario */
}

/* Estilo para los estados de EUA (Frontera) */
.us-state-path {
  fill: #050505;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 0.8;
}

/* Puntos de presencia (Glow Dots) */
.dot-glow {
  fill: #00c6ff;
  filter: drop-shadow(0 0 8px #00c6ff);
  animation: mapPulse 2s infinite ease-in-out;
}

@keyframes mapPulse {
  0% {
    r: 2;
    opacity: 0.6;
  }

  50% {
    r: 4;
    opacity: 1;
  }

  100% {
    r: 2;
    opacity: 0.6;
  }
}

/* Etiquetas de ciudades */
.label-ciudad {
  fill: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  pointer-events: none;
  text-shadow: 0 0 10px #000;
}

/* Cuadro de información flotante */
/* Definición de la animación: Aparece y sube */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
    /* Empieza 20px más abajo */
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    /* Llega a su posición original */
  }
}

/* Cuadro de información flotante */
.map-overlay-card {
  position: absolute;
  bottom: 30px;
  left: 30px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  padding: 20px;
  border-radius: 15px;
  border-left: 4px solid #00c6ff;
  max-width: 260px;
  text-align: left;

  /* --- NUEVO: Aplicación de la animación --- */
  animation: fadeInUp 0.8s ease-out forwards;
  /* 0.8s es la duración, ease-out para que sea fluido al final, maybe y deberia ser mas lento*/
}

@media (max-width: 768px) {
  .label-ciudad {
    font-size: 14px;
  }

  .map-overlay-card {
    position: relative;
    left: 0;
    bottom: 0;
    margin-top: 20px;
    max-width: 100%;
    /* La animación también se aplicará aquí automáticamente */
  }
}

/*footer*/
footer {
  background-color: #323232 !important;
}

body {
  /* Establece la imagen de fondo */
  background-image: url('/assets/fondo2.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  min-height: 100vh;
}

/* Efecto de desvanecimiento hacia negro/transparente en los extremos */
.carousel-mask {
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

#carousel {
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  width: max-content;
  /* Aseguramos que el contenedor sea lo suficientemente ancho para todos los elementos */
}

.carousel-item {
  transition: all 0.5s ease-in-out;
  transform: scale(0.85);
  /* Elementos inactivos más pequeños */
  filter: blur(4px);
  /* Elementos inactivos difuminados */
  opacity: 0.4;
  /* Elementos inactivos semitransparentes */
  flex-shrink: 0;
  cursor: pointer;
}

/* Clase que se añade mediante JS al elemento central */
.carousel-item.active {
  transform: scale(1);
  filter: blur(0px);
  opacity: 1;
}

/* --- NUEVA ANIMACIÓN: LÍNEA NEÓN VIAJERA --- */
.connection-line {
  fill: none;
  stroke: #00c6ff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #00c6ff);
  opacity: 0.6;

  /* El truco del dibujado */
  stroke-dasharray: 2000;
  /* Longitud suficiente para cubrir el mapa */
  stroke-dashoffset: 2000;
  /* Empieza escondida */
  animation: drawNetwork 10s linear infinite;
}

@keyframes drawNetwork {
  0% {
    stroke-dashoffset: 2000;
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  80% {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}