/* =========================================
   WhatsApp Float + Extra Component Styles
   ========================================= */

/* ── WA CHAT WIDGET ─────────────────────────────────────────────────── */

#wa-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none !important;
}

/* FAB button */
.wac-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.3s ease;
  position: relative;
  flex-shrink: 0;
  /* Restaurar pointer-events en el FAB (heredaría none del contenedor) */
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
.wac-fab:hover {
  transform: scale(1.10);
  box-shadow: 0 12px 36px rgba(37,211,102,0.55);
}
.wac-fab-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.wac-fab-icon svg { width: 28px; height: 28px; }

/* Notification badge */
.wac-fab-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 20px;
  height: 20px;
  background: #f59e0b;
  color: #000;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  font-family: var(--font-head);
}
.wac-badge--pulse {
  animation: wacBadgePulse 2s ease-in-out infinite;
}
@keyframes wacBadgePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

/* Panel */
.wac-panel {
  width: 320px;
  background: #1a2130;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34,1.4,0.64,1);
}
.wac-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto !important;
}

/* Header */
.wac-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: #25D366;
}
.wac-header-avatar {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.20);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.wac-header-avatar svg { width: 22px; height: 22px; }
.wac-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wac-name {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
}
.wac-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
}
.wac-dot {
  width: 7px; height: 7px;
  background: #fff;
  border-radius: 50%;
  animation: wacDotBlink 2s ease-in-out infinite;
}
@keyframes wacDotBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}
.wac-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.2s;
}
.wac-close:hover { color: #fff; }
.wac-close svg { width: 18px; height: 18px; }

/* Message body */
.wac-body {
  padding: 20px 16px 12px;
  background: #111827;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
}
.wac-bubble-wrap {
  display: flex;
  justify-content: flex-start;
}
.wac-bubble {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0 14px 14px 14px;
  padding: 12px 16px;
  max-width: 88%;
  position: relative;
}
.wac-bubble p {
  font-size: 0.875rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin: 0 0 4px;
}
.wac-bubble p:last-of-type { margin-bottom: 8px; }
.wac-bubble strong { color: #25D366; }
.wac-time {
  display: block;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.35);
  text-align: right;
}

/* Footer / input */
.wac-footer {
  padding: 12px 14px 10px;
  background: #1a2130;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.wac-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 100px;
  padding: 6px 6px 6px 16px;
}
.wac-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: #e2e8f0;
  caret-color: #25D366;
}
.wac-input::placeholder { color: rgba(255,255,255,0.3); }
.wac-send {
  width: 36px; height: 36px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}
.wac-send:hover {
  background: #1ebe5d;
  transform: scale(1.08);
}
.wac-send svg { width: 18px; height: 18px; color: #fff; }
.wac-hint {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.25);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

/* ---- FEATURE LIST ---- */
.feature-list { margin-top: 24px; }

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--gray);
}

.feature-list li:last-child { border-bottom: none; }

.feature-list li::before {
  content: '→';
  color: var(--accent);
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 700;
  margin-top: 1px;
}

/* ---- PROCESS STEPS ---- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process-grid::before {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(12.5% + 20px);
  right: calc(12.5% + 20px);
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  z-index: 0;
  pointer-events: none !important;
  touch-action: none !important;
}

.process-step {
  text-align: center;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.step-num {
  width: 52px; height: 52px;
  background: var(--dark-2);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 auto 20px;
}

.process-step h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.process-step p { font-size: 0.82rem; color: var(--gray); }

/* ---- TECH STACK BADGES ---- */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tech-badge {
  background: var(--dark-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gray);
  transition: var(--transition);
}

.tech-badge:hover { border-color: rgba(245,166,35,0.3); color: var(--accent); }

/* ---- PAGE BREADCRUMB ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--gray);
  margin-bottom: 20px;
}

.breadcrumb a { color: var(--gray); transition: var(--transition); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--white); }
.breadcrumb::before { content: '/'; opacity: 0.3; }

/* ---- CTA BANNER ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--dark-3) 0%, var(--dark-2) 100%);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(245,166,35,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 12px; }
.cta-banner p { color: var(--gray); max-width: 500px; margin: 0 auto 32px; }
.cta-banner .btn-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---- SERVICE DETAIL LIST ---- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.service-detail-item {
  background: var(--dark-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: var(--transition);
}

.service-detail-item:hover {
  border-color: rgba(245,166,35,0.2);
  background: var(--dark-3);
}

.service-detail-item .icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.service-detail-item h4 { font-size: 0.92rem; margin-bottom: 4px; }
.service-detail-item p { font-size: 0.8rem; color: var(--gray); }

@media (max-width: 768px) {
  .process-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .process-grid::before { display: none; }
  .service-detail { grid-template-columns: 1fr; }

  .cta-banner { padding: 40px 24px; }
}

/* =========================================
   CLIENTES & RUBROS SECTION
   ========================================= */

/* Filter tabs */
.clients-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.ctab {
  background: rgba(19,25,33,0.70);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 9px 22px;
  font-family: var(--font-head);
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.03em;
}

.ctab:hover {
  border-color: rgba(245,166,35,0.35);
  color: var(--white);
}

.ctab.active {
  background: rgba(245,166,35,0.12);
  border-color: rgba(245,166,35,0.50);
  color: var(--accent);
}

/* Client cards grid */
.clients-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.client-card {
  flex: 0 1 200px;
  min-width: 160px;
}

.client-card {
  background: rgba(19,25,33,0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.client-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0;
  transition: var(--transition);
  pointer-events: none !important;
  touch-action: none !important;
}

.client-card:hover {
  border-color: rgba(245,166,35,0.28);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  background: rgba(26,35,50,0.85);
}

.client-card:hover::before { opacity: 1; }

.client-card.hidden {
  display: none;
}

.cc-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}

.client-card strong {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
}

.client-card span {
  font-size: 0.76rem;
  color: var(--gray);
  line-height: 1.45;
}

/* Stats bar */
.clients-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: rgba(19,25,33,0.72);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 40px;
}

.cstat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 36px;
}

.cstat-num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.cstat-lbl {
  font-size: 0.78rem;
  color: var(--gray);
  text-align: center;
  line-height: 1.3;
}

.cstat-divider {
  width: 1px;
  height: 48px;
  background: var(--border);
  flex-shrink: 0;
}

/* =========================================
   SCROLL TO TOP BUTTON
   ========================================= */

#scrollTopBtn {
  position: fixed;
  bottom: 90px;          /* 24px base + 56px fab + 10px gap */
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(19,25,33,0.90);
  border: 1px solid rgba(245,166,35,0.35);
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 960;          /* encima del WA widget (z-index:950) */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

#scrollTopBtn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto !important;
}

#scrollTopBtn:hover {
  background: rgba(245,166,35,0.15);
  border-color: rgba(245,166,35,0.65);
  box-shadow: 0 6px 28px rgba(245,166,35,0.20);
  transform: translateY(-2px);
}

/* Móvil: ajustar posición */
@media (max-width: 768px) {
  #scrollTopBtn {
    bottom: 86px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}



@media (max-width: 768px) {
  .clients-grid {
    gap: 10px;
  }
  .client-card {
    flex: 0 1 160px;
    min-width: 140px;
  }
  .cstat { padding: 0 18px; }
  .cstat-num { font-size: 1.7rem; }
  .clients-stats { padding: 20px 16px; }
  #wa-chat-widget { bottom: 20px; right: 16px; }
  #scrollTopBtn { bottom: 86px; right: 16px; }
  .wac-panel { width: calc(100vw - 32px); max-width: 320px; }
}

/* client-card entrance animation */
.client-card {
  animation: ccFadeIn 0.35s ease both;
}
@keyframes ccFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   PAGE IMAGE BLOCKS (inner pages)
   ========================================= */

.img-block-page img {
  transition: transform 8s ease;
}
.img-block-page:hover img {
  transform: scale(1.03);
}

@media (max-width: 900px) {
  .img-block-page > div {
    grid-template-columns: 1fr !important;
    min-height: unset !important;
  }
  .img-block-page > div > div[style*="height:420px"],
  .img-block-page > div > div[style*="height:380px"] {
    height: 280px !important;
    order: -1;
  }
}

@media (max-width: 600px) {
  .img-block-page > div > div[style*="height"],
  .img-block-page > div > div[style*="height:380px"] {
    height: 220px !important;
  }
}



/* Elementos interactivos dentro del widget: restaurar pointer-events */
.wac-close,
.wac-send,
.wac-input,
.wac-footer a {
  pointer-events: auto !important;
  touch-action: manipulation !important;
}
/* =========================================
   COMPONENTS — MOBILE TOUCH FIX DEFINITIVO
   ========================================= */

/* WAC Panel: pointer-events manejados por clase */
/* #wa-chat-widget: definición única arriba */

/* Todos los pseudo-elementos de components no bloquean */
.card::before,
.card::after,
.service-feature-card::before,
.service-feature-card::after {
  pointer-events: none !important;
  touch-action: none !important;
}

/* Mobile nav links: área de toque generosa */
@media (max-width: 1024px) {
  .mobile-nav a {
    padding: 16px 24px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(245, 166, 35, 0.2);
  }
}
