/* 
  TEAMWORK LOGISTICA - STITCH COMPONENTS
*/

/* HERO: IMMERSIVE MODULE */
.hero-stitch {
  width: 100vw;
  height: 100vh; /* 100dvh for mobile support */
  margin-left: calc(-50vw + 50%);
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('../images/hero.png') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
  border-bottom: 1px solid var(--border);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Degradado más profundo para fundirse con el fondo del body */
  background: linear-gradient(180deg, 
              rgba(5, 6, 8, 0.2) 0%, 
              rgba(5, 6, 8, 0.6) 70%, 
              var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 900px;
  padding: 0 2rem;
}

.hero-title {
  margin-bottom: 2.5rem;
  line-height: 0.9;
  letter-spacing: -2px;
}

.teamwork {
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 900;
  text-transform: uppercase;
  display: inline-block;
  filter: drop-shadow(0 0 15px rgba(13, 185, 242, 0.3));
  position: relative;
  /* Efecto de Brillo Animado (Shimmer) */
  background: linear-gradient(
    to right, 
    #0db9f2 20%, 
    #ffffff 45%, 
    #ffffff 55%, 
    #0db9f2 80%
  );
  background-size: 200% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: none; /* Quitamos el shimmer viejo */
  opacity: 1 !important;
  position: relative;
  overflow: hidden;
}

.teamwork::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transform: skewX(-25deg);
  animation: scan-line 4s infinite;
}

@keyframes scan-line {
  0% { left: -100%; }
  30% { left: 150%; }
  100% { left: 150%; }
}

.logistica {
  font-size: clamp(2rem, 6vw, 4rem); /* 50% más chico */
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 5px;
  text-transform: uppercase;
  opacity: 0.8;
  margin-top: -10px;
  display: inline-block;
}

/* Efecto hover premium para TEAMWORK */
.teamwork:hover {
  filter: drop-shadow(0 0 25px rgba(13, 185, 242, 0.6));
  transform: scale(1.02);
  transition: all 0.4s var(--round);
}



/* SERVICES GRID */
.services-grid {
  display: grid;
  grid-template-columns: repeat(Auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.service-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 3rem;
  border-radius: 1.5rem;
  transition: all 0.4s var(--round);
  opacity: 1 !important;
  display: flex;
  flex-direction: column;
  height: 100%; /* Force equal height in the grid */
}

.service-item:hover {
  background: rgba(13, 185, 242, 0.05);
  border-color: var(--accent);
  transform: translateY(-8px);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: var(--accent-glow);
  border: 1px solid var(--accent);
  border-radius: 12px;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 800;
}

/* TECH SPLIT */
.tech-split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 4rem;
}

.tech-visual {
  position: relative;
  border-radius: 1.5rem;
  overflow: hidden;
  height: auto; /* Dejar que el contenido defina la altura para evitar cuadros fantasma */
  min-height: 400px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-module);
}

.tech-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.8; /* Aumentado para ver mejor el tracking */
}

.tracking-wrapper {
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border-active);
  margin: 1rem; /* Margen uniforme */
  width: 100%;
}

.tracking-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* COVERAGE MAP */
.map-module {
  height: 500px;
  position: relative;
  overflow: hidden;
  background: var(--bg-module);
}

.map-module img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Cambiado a cover para llenar todo el espacio sin bordes negros */
  opacity: 0.7; /* Ligeramente más visible para mayor claridad */
  display: block;
}

.map-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Gradiente más suave para no "comerse" los bordes del mapa */
  background: radial-gradient(circle, transparent 50%, var(--bg-module) 100%);
  z-index: 1;
}

/* INTERACTIVE MAP ELEMENTS */
.map-marker {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
  z-index: 2;
}

.signal-dot {
  position: absolute;
  top: 30%; /* Punto inicial: P1 */
  left: 20%;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  z-index: 5;
  box-shadow: 0 0 20px #fff;
  pointer-events: none;
  /* Eliminamos transition para que GSAP tenga control total sin conflictos */
}

.signal-wave {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border: 2px solid #fff;
  border-radius: 50%;
  animation: pulse-wave 2s infinite;
}

@keyframes pulse-wave {
  0% { width: 100%; height: 100%; opacity: 0.8; }
  100% { width: 500%; height: 500%; opacity: 0; }
}

/* FOOTER */
.footer-stitch {
  width: 100%;
  padding: 6rem 0 3rem;
  text-align: center;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* IMPACTO EN EL NEGOCIO */
.impact-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.impact-row {
  margin-bottom: 2rem;
}

.impact-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.bar-bg {
  width: 100%;
  height: 35px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.bar-fill {
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 1.5rem;
  border-radius: 100px;
  position: relative;
  transition: width 1.5s var(--ease);
}

.bar-fill span {
  font-size: 0.75rem;
  font-weight: 900;
  color: #000;
  text-transform: uppercase;
}

.bar-fill.cian {
  background: var(--accent);
  box-shadow: 0 0 20px rgba(13, 185, 242, 0.3);
}

.bar-fill.lime {
  background: #ccff00;
  box-shadow: 0 0 20px rgba(204, 255, 0, 0.3);
}

.impact-footer-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* POST-VENTA REDISEÑADO */
.post-venta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pv-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  padding: 2.5rem;
  border-radius: 1.5rem;
  transition: all 0.4s var(--round);
}

.pv-card:hover {
  background: rgba(13, 185, 242, 0.05);
  border-color: var(--accent);
  transform: translateY(-5px);
}

.pv-icon {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.pv-card h4 {
  color: #fff;
  margin-bottom: 0.8rem;
  font-size: 1.1rem;
}

.pv-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.pv-highlight {
  grid-column: span 3;
  margin-top: 1rem;
  background: var(--bg-module);
  border: 1px dashed var(--border-active);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
}

.pv-highlight p {
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* SOPORTE Y VISIBILIDAD REDISEÑADO E INTEGRADO */
.support-map-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: center;
}

.support-items {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.s-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.s-icon {
  font-size: 1.8rem;
  min-width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.s-text h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.s-text p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.map-module-mini {
  position: relative;
  height: 450px;
  border-radius: 2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-module);
}

.map-module-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

@media (max-width: 1024px) {
  .post-venta-grid { grid-template-columns: 1fr; }
  .pv-highlight { grid-column: span 1; }
  .support-map-layout { grid-template-columns: 1fr; }
  .map-module-mini { height: 350px; }
}

/* METRICS AREA */
.metrics-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 2rem;
}

.metric-val {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
}

/* INFRASTRUCTURE */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.infra-card {
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  transition: border-color 0.3s ease;
}

.infra-card:hover {
  border-color: var(--accent);
}

/* TECH LIST */
.tech-list {
  list-style: none;
  margin: 2rem 0;
  padding: 0;
}

.tech-list li {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 1024px) {
  .tech-split, .metrics-container { grid-template-columns: 1fr; }
  .hero-content h1 { font-size: 4rem; }
}
/* MINI FOOTER SURGICAL */
.mini-footer {
  width: 100%;
  max-width: 1280px;
  margin: 4rem auto 2rem;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-right {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.footer-right a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.footer-right a:hover {
  color: var(--accent);
}

@media (max-width: 768px) {
  .mini-footer, .footer-right {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
}

/* FLOATING ACTIONS */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 1000;
}

.float-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.4s var(--round);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.whatsapp-btn {
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
  color: #fff; /* Blanco por defecto para armonía */
  font-size: 4rem;
  text-decoration: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.whatsapp-btn:hover {
  background: transparent !important;
  color: #2be214 !important; /* Verde solo en hover */
  transform: scale(1.1) rotate(10deg);
  filter: drop-shadow(0 0 20px rgba(43, 226, 20, 0.8));
  opacity: 1;
}

.whatsapp-btn i {
  text-decoration: none !important;
}

.top-btn {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

@media (max-width: 768px) {
  .float-btn {
    width: 50px;
    height: 50px;
  }
}
