/*
Theme Name: Somos tu Web
Theme URI: https://somostuweb.cl
Author: Somos tu Web
Description: Theme one-page para Somos tu Web (agencia de desarrollo de software y sitios web). Fondo blanco, con bordes y textos en degradado morado-azul-celeste tomado del logo como único acento de color. Servicios, proceso de trabajo, testimonios y footer de contacto. Editable desde el Personalizador (Apariencia > Personalizar), sin tocar código.
Version: 1.54.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: somostuweb
*/

/* ==========================================================================
   1. Variables y reset base
   ========================================================================== */
:root {
  --stw-bg:        #ffffff;
  --stw-bg-soft:   #fbfcff;
  --stw-card:      #ffffff;
  --stw-border:    #e6eaf5;
  --stw-border-strong: #2e52de;
  --stw-text:      #0a1638;
  --stw-text-dim:  #667089;
  --stw-purple:    #7c4dff;
  --stw-blue:      #2e52de;
  --stw-cyan:      #0aa2e4;
  --stw-teal:      #12c4b0;
  --stw-gradient:  linear-gradient(120deg, var(--stw-purple) 0%, var(--stw-blue) 50%, var(--stw-cyan) 100%);
  --stw-shadow:    0 8px 24px rgba(20, 34, 90, 0.06);
  --stw-shadow-lg: 0 16px 36px rgba(20, 34, 90, 0.1);
  --stw-radius:    18px;
  --stw-radius-sm: 12px;
  --stw-font:      'Manrope', system-ui, -apple-system, sans-serif;
  --stw-font-head: 'Sora', 'Manrope', system-ui, sans-serif;
  --stw-max:       clamp(1180px, 94vw, 2400px);
}

/* El ancho de contenido ahora crece de forma continua y proporcional
   con el ancho real de la pantalla (no en saltos fijos a números
   "de catálogo" como 1920 o 2560, que a veces no se activaban por el
   escalado de Windows/Mac en pantallas grandes) — nunca baja de
   1180px, nunca pasa de 2200px, y en el medio se ajusta solo. */

/* ---- Modo oscuro ----
   Contraste verificado contra WCAG AA (mínimo 4.5:1 para texto normal,
   3:1 para texto grande/íconos):
   --stw-text (#f4f6fd) sobre --stw-bg (#0b1330)      ≈ 16.8:1
   --stw-text-dim (#a7afce) sobre --stw-bg (#0b1330)  ≈  8.4:1
   --stw-blue (#7c93ff) sobre --stw-bg (#0b1330)      ≈  6.3:1
   --stw-text (#f4f6fd) sobre --stw-card (#131c42)    ≈ 15.3:1  */
html[data-theme="dark"] {
  --stw-bg:        #0b1330;
  --stw-bg-soft:   #101a3e;
  --stw-card:      #131c42;
  --stw-border:    #2a3564;
  --stw-border-strong: #5b7dff;
  --stw-text:      #f4f6fd;
  --stw-text-dim:  #a7afce;
  --stw-purple:    #a084ff;
  --stw-blue:      #7c93ff;
  --stw-cyan:      #4cc8f2;
  --stw-teal:      #2fe0c9;
  --stw-shadow:    0 8px 24px rgba(0, 0, 0, 0.35);
  --stw-shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.5);
}

/* Transición suave al cambiar de modo, sin afectar el resto de animaciones. */
body, .stw-header, .stw-offcanvas, .stw-hero, .stw-section, .stw-final-cta,
.stw-footer, .stw-page-hero, .stw-service-card, .stw-process-card,
.stw-testimonial-card, .stw-plan-card, .stw-project-card, .stw-related-card,
.stw-plantilla-card, .stw-plantilla-viewer, .stw-sidebar-cta, .stw-btn,
.stw-footer-contact-box, .stw-filter-pill {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
@media (prefers-reduced-motion: reduce) {
  body, .stw-header, .stw-offcanvas, .stw-hero, .stw-section, .stw-final-cta,
  .stw-footer, .stw-page-hero, .stw-service-card, .stw-process-card,
  .stw-testimonial-card, .stw-plan-card, .stw-project-card, .stw-related-card,
  .stw-plantilla-card, .stw-plantilla-viewer, .stw-sidebar-cta, .stw-btn,
  .stw-footer-contact-box, .stw-filter-pill { transition: none; }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: clamp(16px, 0.355vw + 12.4px, 26px); }

body {
  margin: 0;
  background: var(--stw-bg);
  color: var(--stw-text);
  font-family: var(--stw-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--stw-font-head);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--stw-text);
}

p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

.stw-wrap {
  max-width: var(--stw-max);
  margin: 0 auto;
  padding: 0 24px;
}

.stw-dim { color: var(--stw-text-dim); }

.stw-gradient-text {
  background: var(--stw-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   2. Scroll reveal (animación de entrada)
   ========================================================================== */
.stw-reveal {
  opacity: 0;
  transform: var(--stw-reveal-transform, translateY(28px)) scale(var(--stw-reveal-scale, 1));
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.stw-reveal.stw-in { opacity: 1; transform: translate(0, 0) scale(1); }
.stw-reveal[data-delay="1"] { transition-delay: 0.06s; }
.stw-reveal[data-delay="2"] { transition-delay: 0.16s; }
.stw-reveal[data-delay="3"] { transition-delay: 0.26s; }
.stw-reveal[data-delay="4"] { transition-delay: 0.36s; }

/* Las 5 variantes de entrada — se eligen en Personalizar → Somos tu
   Web — Identidad → "Efecto de entrada de las tarjetas". */
body[data-entrance="fade"]        { --stw-reveal-transform: translateY(0); }
body[data-entrance="fade-up"]     { --stw-reveal-transform: translateY(28px); }
body[data-entrance="slide-left"]  { --stw-reveal-transform: translateX(-46px); }
body[data-entrance="slide-right"] { --stw-reveal-transform: translateX(46px); }
body[data-entrance="zoom"]        { --stw-reveal-transform: translateY(10px); --stw-reveal-scale: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .stw-reveal, html { transition: none !important; scroll-behavior: auto !important; opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   3. Header
   ========================================================================== */
.stw-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 0;
  background: var(--stw-card);
  transition: padding 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.stw-header.is-scrolled {
  padding: 12px 0;
  border-bottom-color: var(--stw-border);
  box-shadow: 0 4px 16px rgba(20, 34, 90, 0.05);
}
.stw-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.stw-header-logo { position: relative; display: flex; align-items: center; }
.stw-header-logo img {
  position: relative;
  z-index: 1;
  height: 42px !important;
  width: auto !important;
  max-width: 220px !important;
  transition: height 0.35s ease;
}
@media (max-width: 767px) {
  .stw-header-logo img {
    height: 48px !important;
  }
  .stw-header.is-scrolled .stw-header-logo img {
    height: 38px !important;
  }
  html[data-theme="dark"] .stw-header.is-scrolled .stw-header-logo::before {
    width: 120px;
    height: 80px;
  }
}

/* Mismo halo que el footer y el hero: solo en modo oscuro. */
html[data-theme="dark"] .stw-header-logo::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 100px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 72%);
  z-index: 0;
  transition: width 0.35s ease, height 0.35s ease;
}
.stw-header-right { display: flex; align-items: center; gap: 14px; }
.stw-logo-fallback {
  font-family: var(--stw-font-head);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--stw-text);
}
.stw-logo-fallback em { font-style: normal; color: var(--stw-blue); }

.stw-desktop-nav { display: none; align-items: center; gap: clamp(32px, 1vw + 20px, 48px); }
.stw-desktop-nav a {
  font-size: clamp(1.05rem, 0.31vw + 0.85rem, 1.6rem);
  font-weight: 500;
  color: var(--stw-text-dim);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.stw-desktop-nav a:hover { color: var(--stw-blue); }

/* El tamaño de letra y el espacio entre ítems se achican solos según
   cuántos links terminen mostrándose (varía porque "Proyectos" y
   "Quiénes somos" son opcionales) — así siempre entra todo en una línea
   sin que el navegador tenga que partir ningún texto en dos. */
@media (max-width: 1200px) {
  .stw-desktop-nav[data-count="7"] { gap: 22px; }
  .stw-desktop-nav[data-count="7"] a { font-size: 0.89rem; }
  .stw-desktop-nav[data-count="8"] { gap: 16px; }
  .stw-desktop-nav[data-count="8"] a { font-size: 0.83rem; }
}

.stw-desktop-nav a.stw-nav-cta {
  color: var(--stw-blue);
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  padding: 9px 18px;
  border-radius: 999px;
}
.stw-desktop-nav a.stw-nav-cta:hover { background: var(--stw-bg-soft); }

/* "Mi panel" — bien destacado, azul profundo sólido, siempre primero. */
.stw-desktop-nav a.stw-nav-panel {
  color: #ffffff;
  background: var(--stw-blue);
  border: 1.5px solid var(--stw-blue);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
}
.stw-desktop-nav a.stw-nav-panel:hover { background: #253fb0; border-color: #253fb0; }

.stw-offcanvas-nav a.stw-nav-panel--mobile {
  display: inline-block;
  color: #ffffff !important;
  background: var(--stw-blue);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 6px;
  border-bottom: none;
}

.stw-theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  border-radius: 10px;
  color: var(--stw-blue);
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}
.stw-theme-icon { position: absolute; transition: opacity 0.25s ease, transform 0.25s ease; }
.stw-theme-icon--moon { opacity: 0; transform: scale(0.5) rotate(-40deg); }
html[data-theme="dark"] .stw-theme-icon--sun { opacity: 0; transform: scale(0.5) rotate(40deg); }
html[data-theme="dark"] .stw-theme-icon--moon { opacity: 1; transform: scale(1) rotate(0); }

/* Punto rojo de "apagar" — solo en el botón de cerrar sesión. */
.stw-power-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  background-color: #e0433f;
  border-radius: 50%;
  pointer-events: none;
}
.stw-power-dot::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
  background-color: #e0433f;
  border-radius: 50%;
  animation: stw-power-dot-ping 1.2s ease-out infinite;
}
@keyframes stw-power-dot-ping {
  0%   { width: 1px; height: 1px; background-color: #e0433f; }
  100% { width: 22px; height: 22px; background-color: rgba(224, 67, 63, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .stw-power-dot::before { animation: none; }
}

.stw-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.stw-hamburger span {
  display: block; height: 2px; width: 18px;
  margin: 0 auto;
  background: var(--stw-blue);
  border-radius: 2px;
}

@media (min-width: 900px) {
  .stw-desktop-nav { display: flex; }
  .stw-hamburger { display: none; }
}

/* Off-canvas menu (mobile) */
.stw-offcanvas-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 22, 56, 0.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 150;
}
.stw-offcanvas-backdrop.show { opacity: 1; visibility: visible; }

.stw-offcanvas {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(84vw, 360px);
  background: var(--stw-card);
  border-left: 1px solid var(--stw-border);
  box-shadow: -18px 0 40px rgba(20, 34, 90, 0.1);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 160;
  display: flex;
  flex-direction: column;
}
.stw-offcanvas.show { transform: translateX(0); }
.stw-offcanvas-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--stw-border);
}
.stw-offcanvas-title { margin: 0; font-size: 1.05rem; }
.stw-offcanvas-close {
  background: none; border: none; color: var(--stw-text);
  font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.stw-offcanvas-body { padding: 22px; flex: 1; }
.stw-offcanvas-nav { list-style: none; margin: 0 0 24px; padding: 0; }
.stw-offcanvas-nav li { margin-bottom: 6px; }
.stw-offcanvas-nav a {
  display: block; padding: 12px 4px;
  font-size: 1.05rem; font-weight: 600; color: var(--stw-text);
  border-bottom: 1px solid var(--stw-border);
}
.stw-offcanvas-whatsapp {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  color: var(--stw-blue); font-weight: 700;
  padding: 13px 20px; border-radius: 999px;
  text-align: center;
}

/* ==========================================================================
   4. Hero
   ========================================================================== */
.stw-hero {
  position: relative;
  padding: 110px 0 100px;
  overflow: hidden;
  text-align: center;
  background: var(--stw-bg);
}
.stw-hero--404 { padding: 190px 0 140px; }

.stw-hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  animation: stwFloatGlow 18s ease-in-out infinite;
}
.stw-hero-glow--1 {
  width: 420px; height: 420px;
  top: -140px; left: -120px;
  background: radial-gradient(circle, var(--stw-purple) 0%, transparent 70%);
  animation-duration: 19s;
}
.stw-hero-glow--2 {
  width: 380px; height: 380px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, var(--stw-cyan) 0%, transparent 70%);
  animation-duration: 15s;
  animation-delay: -6s;
}
@keyframes stwFloatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(26px, -20px) scale(1.08); }
  66%      { transform: translate(-20px, 16px) scale(0.94); }
}

/* ---- Cables de luz animados (efecto "beams") ---- */
.stw-hero-beams {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.stw-hero-beam {
  position: absolute;
  width: 1px;
  height: 160%;
  top: -30%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--stw-blue) 55%, transparent) 45%, transparent);
  transform-origin: top center;
  opacity: 0.55;
  animation: stw-beam-sweep 7s ease-in-out infinite;
}
.stw-hero-beam--1 { left: 18%; transform: rotate(12deg); animation-delay: 0s; }
.stw-hero-beam--2 { left: 52%; transform: rotate(-8deg); animation-delay: -2.4s; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--stw-purple) 55%, transparent) 45%, transparent); }
.stw-hero-beam--3 { left: 80%; transform: rotate(16deg); animation-delay: -4.8s; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--stw-cyan) 55%, transparent) 45%, transparent); }
@keyframes stw-beam-sweep {
  0%, 100% { opacity: 0.2; }
  50%      { opacity: 0.7; }
}
@media (max-width: 767px) {
  .stw-hero-beam { opacity: 0.7; }
}

/* ---- Burbuja flotante extra ---- */
.stw-hero-float-bubble {
  position: static;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin: 24px auto 0;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--stw-card);
  border: 1px solid var(--stw-border-strong);
  box-shadow: var(--stw-shadow-lg);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--stw-text);
  animation: stw-bubble-float 4.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes stw-bubble-float {
  0%, 100% { transform: translateY(0) rotate(-1.5deg); }
  50%      { transform: translateY(-10px) rotate(1.5deg); }
}
/* Solo en escritorio: usa el espacio vacío al costado de la columna
   de texto. "left: 100%" la ubica justo después del borde derecho
   del bloque de texto — nunca puede quedar encima de él, porque
   empieza exactamente donde ese bloque termina, no antes. Centrada
   verticalmente respecto a todo el bloque, así no depende de dónde
   esté el título o los botones específicamente. */
@media (min-width: 1200px) {
  .stw-hero-float-bubble {
    position: absolute;
    left: 100%;
    top: 50%;
    margin: 0 0 0 28px;
    transform: translateY(-50%);
    white-space: nowrap;
  }
}
@media (max-width: 900px) {
  .stw-hero-float-bubble {
    padding: 8px 16px;
    font-size: 0.78rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stw-hero-beam, .stw-hero-float-bubble { animation: none; }
}

/* ---- Cables conectores animados entre elementos reales ---- */
.stw-hero-connectors {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}
@media (max-width: 767px) {
  .stw-hero-connectors { z-index: 0; }
}
.stw-connector-line {
  fill: none;
  stroke: color-mix(in srgb, var(--stw-blue) 28%, transparent);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  animation: stw-cable-wa-sync-line 6s ease-in-out infinite;
}
.stw-connector-flow {
  fill: none;
  stroke: var(--stw-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px var(--stw-blue));
  stroke-dasharray: 46 500;
  stroke-dashoffset: 546;
  opacity: 0;
  animation: stw-connector-travel 6s ease-in-out infinite, stw-cable-wa-sync-flow 6s ease-in-out infinite;
}
/* Los cables se ponen verdes justo cuando el botón de WhatsApp se
   pone verde (mismo ciclo de 6s, mismo tramo 78%-90%) — para que se
   sientan parte de la misma "conexión" encendiéndose junta. */
@keyframes stw-cable-wa-sync-line {
  0%, 65%, 100% {
    stroke: color-mix(in srgb, var(--stw-blue) 28%, transparent);
    stroke-width: 1.5;
    filter: none;
  }
  78%, 90% {
    stroke: #25d366;
    stroke-width: 3;
    filter: drop-shadow(0 0 5px #25d366);
  }
}
@keyframes stw-cable-wa-sync-flow {
  0%, 65%, 100% { stroke: var(--stw-blue); filter: drop-shadow(0 0 5px var(--stw-blue)); }
  78%, 90%      { stroke: #25d366; filter: drop-shadow(0 0 6px #25d366); opacity: 1; }
}
@keyframes stw-connector-travel {
  0%   { stroke-dashoffset: 546; opacity: 0; }
  8%   { opacity: 1; }
  85%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stw-connector-flow { animation: none; opacity: 0; }
}

/* Al pasar el mouse sobre el botón de WhatsApp, los cables se ponen
   verdes al instante — pero el movimiento del pulso sigue corriendo
   normal, solo se fuerza el color mientras dure el hover. */
.stw-hero.stw-wa-hover .stw-connector-line {
  stroke: #25d366 !important;
  stroke-width: 3 !important;
  filter: drop-shadow(0 0 5px #25d366) !important;
}
.stw-hero.stw-wa-hover .stw-connector-flow {
  stroke: #25d366 !important;
  filter: drop-shadow(0 0 6px #25d366) !important;
}

.stw-hero-content { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }

.stw-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--stw-blue);
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.stw-hero-title {
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.stw-hero-subtitle {
  font-size: 1.08rem;
  color: var(--stw-text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
}

.stw-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 56px;
}

.stw-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 15px 26px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.stw-btn-solid {
  background: var(--stw-card);
  border: 2px solid var(--stw-border-strong);
  color: var(--stw-blue);
}
.stw-btn-solid:hover { transform: translateY(-2px); background: var(--stw-bg-soft); box-shadow: var(--stw-shadow-lg); }
.stw-btn-outline {
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border);
  color: var(--stw-text);
}
.stw-btn-outline:hover { border-color: var(--stw-border-strong); color: var(--stw-blue); transform: translateY(-2px); }

/* Botón "Necesito asistencia": de vez en cuando crece un poco y se pinta
   de verde WhatsApp con texto blanco, para llamar la atención sin ser
   parpadeante, y vuelve suave a su estado normal. */
.stw-btn-wa-pulse {
  animation: stw-btn-wa-loop 6s ease-in-out infinite, stw-btn-wa-neon 2s ease-in-out infinite;
  transition: none; /* la animación ya controla estas propiedades, evita choques con :hover */
}
@keyframes stw-btn-wa-neon {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50%      { box-shadow: 0 0 14px 4px rgba(37, 211, 102, 0.65); }
}
.stw-btn-wa-pulse:hover {
  animation-play-state: paused, running;
  transform: scale(1.06) translateY(-2px);
  background: #25d366;
  border-color: #25d366;
  color: #ffffff;
}
.stw-btn-wa-pulse .stw-btn-icon-wa { animation: none; } /* el color ya lo maneja el botón completo */
@keyframes stw-btn-wa-loop {
  0%, 65%, 100% {
    transform: scale(1) translateY(0);
    background: var(--stw-card);
    border-color: var(--stw-border);
    color: var(--stw-text);
  }
  78%, 90% {
    transform: scale(1.06) translateY(-2px);
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
  }
}
@media (prefers-reduced-motion: reduce) {
  .stw-btn-wa-pulse { animation: none; }
}

/* Variante con destello: el brillo solo recorre el botón MIENTRAS está
   verde (78%-90% del mismo ciclo), nunca antes de que cambie de color. */
.stw-btn-wa-pulse-shine { position: relative; overflow: hidden; }
.stw-btn-wa-pulse-shine::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.65), transparent);
  animation: stw-btn-wa-shine 6s ease-in-out infinite;
}
@keyframes stw-btn-wa-shine {
  0%, 77% { left: -60%; }
  90%     { left: 130%; }
  100%    { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .stw-btn-wa-pulse-shine::after { animation: none; }
}

/* Flecha que "empuja" hacia adelante, invitando a seguir el clic. */
.stw-btn-icon-arrow { animation: stw-arrow-nudge 1.8s ease-in-out infinite; }
@keyframes stw-arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* Ícono de WhatsApp que de vez en cuando "recuerda" su color verde real. */
.stw-btn-icon-wa { animation: stw-wa-color-pulse 3.4s ease-in-out infinite; }
@keyframes stw-wa-color-pulse {
  0%, 78%, 100% { color: currentColor; }
  88%           { color: #25d366; }
}

@media (prefers-reduced-motion: reduce) {
  .stw-btn-icon-arrow, .stw-btn-icon-wa { animation: none; }
}

.stw-hero-mark { position: relative; display: flex; justify-content: center; }
.stw-hero-mark img { position: relative; z-index: 1; max-height: 130px !important; width: auto !important; max-width: 90vw !important; margin: 0 auto; }

/* Halo difuminado detrás del logo del hero: solo hace falta en modo
   oscuro (en claro el logo ya tiene contraste natural contra el blanco). */
html[data-theme="dark"] .stw-hero-mark::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 260px;
  height: 260px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.22) 38%, rgba(255,255,255,0) 68%);
  z-index: 0;
}

/* ==========================================================================
   5. Secciones generales
   ========================================================================== */
.stw-section { padding: 90px 0; position: relative; background: var(--stw-bg); }
.stw-section--alt { background: var(--stw-bg-soft); }

.stw-eyebrow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--stw-blue);
  margin-bottom: 14px;
}

.stw-section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  max-width: 680px;
  margin: 0 auto 56px;
}

/* ---- Servicios ---- */
.stw-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .stw-services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .stw-services-grid { grid-template-columns: repeat(3, 1fr); }
}

.stw-service-card {
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius);
  padding: 32px 26px;
  box-shadow: var(--stw-shadow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.stw-service-card:hover {
  transform: translateY(-4px);
  border-color: var(--stw-border-strong);
  box-shadow: var(--stw-shadow-lg);
}
.stw-service-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  color: var(--stw-blue);
  margin-bottom: 20px;
}
.stw-service-icon svg { width: 24px; height: 24px; }
.stw-service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.stw-service-card p { color: var(--stw-text-dim); font-size: 0.95rem; margin: 0; }

/* ---- Proceso ---- */
.stw-process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) {
  .stw-process-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .stw-process-grid { grid-template-columns: repeat(4, 1fr); }
}
.stw-process-card {
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius);
  padding: 30px 24px;
  box-shadow: var(--stw-shadow);
  position: relative;
}
.stw-process-number {
  display: block;
  font-family: var(--stw-font-head);
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--stw-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 14px;
}
.stw-process-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.stw-process-card p { color: var(--stw-text-dim); font-size: 0.92rem; margin: 0; }

/* ---- Testimonios ---- */
.stw-testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 900px) {
  .stw-testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}
.stw-testimonial-card {
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius);
  padding: 32px 28px;
  box-shadow: var(--stw-shadow);
  display: flex;
  flex-direction: column;
}
.stw-quote-mark { color: var(--stw-blue); opacity: 0.8; margin-bottom: 14px; }
.stw-testimonial-quote { color: var(--stw-text); font-size: 1rem; flex: 1; margin-bottom: 22px; }
.stw-testimonial-author { display: flex; flex-direction: column; gap: 2px; }
.stw-testimonial-author strong { font-size: 0.95rem; }
.stw-testimonial-author span { font-size: 0.85rem; color: var(--stw-text-dim); }

/* ==========================================================================
   6. Franja final (CTA) + Footer
   ========================================================================== */
.stw-final-cta {
  padding: 90px 0;
  text-align: center;
  background: var(--stw-bg);
  border-top: 1px solid var(--stw-border);
}
.stw-final-cta h2 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  max-width: 600px;
  margin: 0 auto 32px;
}

.stw-footer {
  background: var(--stw-bg);
  border-top: 1px solid var(--stw-border);
  padding: 64px 0 28px;
}
.stw-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (min-width: 720px) {
  .stw-footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
}
.stw-footer-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.stw-footer-logo::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 170px;
  height: 170px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.25) 38%, rgba(255,255,255,0) 68%);
  z-index: 0;
}
.stw-footer-logo img {
  position: relative;
  z-index: 1;
  height: 40px !important;
  width: auto !important;
  max-width: 220px !important;
  margin-bottom: 0;
}
.stw-footer-tagline { color: var(--stw-text-dim); font-size: 0.92rem; max-width: 260px; }
.stw-footer-social { display: flex; gap: 12px; }
.stw-footer-social a {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: 10px;
  color: var(--stw-text-dim);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.stw-footer-social a:hover { color: var(--stw-blue); border-color: var(--stw-border-strong); }

.stw-footer-col h4 {
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stw-text);
  margin-bottom: 18px;
}
.stw-footer-col ul { list-style: none; margin: 0; padding: 0; }
.stw-footer-col li { margin-bottom: 10px; }
.stw-footer-col a {
  color: var(--stw-text-dim);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.stw-footer-col a:hover { color: var(--stw-blue); }

.stw-footer-contact-box {
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius-sm);
  padding: 18px 20px;
  box-shadow: var(--stw-shadow);
}
.stw-footer-contact-box p { margin: 0 0 6px; font-size: 0.9rem; }
.stw-footer-contact-box p:last-child { margin-bottom: 0; }
.stw-footer-contact-box a:hover { color: var(--stw-blue); }

.stw-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--stw-border);
  font-size: 0.85rem;
  color: var(--stw-text-dim);
}
.stw-footer-bottom p { margin: 0; }

/* ==========================================================================
   7. WhatsApp flotante
   ========================================================================== */
.stw-whatsapp-float {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.35);
  z-index: 90;
  transition: transform 0.2s ease;
}
.stw-whatsapp-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25d366;
  z-index: -1;
  animation: stw-wa-pulse 2.8s ease-out infinite;
}
@keyframes stw-wa-pulse {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.7); opacity: 0; }
  100% { transform: scale(1.7); opacity: 0; }
}
.stw-whatsapp-float:hover { transform: scale(1.08); }
@media (prefers-reduced-motion: reduce) {
  .stw-whatsapp-float::before { animation: none; display: none; }
}

/* ==========================================================================
   8. Contenido básico (index.php fallback)
   ========================================================================== */
.stw-basic-article { max-width: 760px; margin: 0 auto; }
.stw-basic-content { color: var(--stw-text-dim); }

/* ==========================================================================
   9. Páginas individuales (plantillas de servicio/página)
   ========================================================================== */
.stw-page-hero {
  padding: 110px 0 20px;
  text-align: center;
  background: var(--stw-bg);
}
.stw-page-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--stw-text-dim);
  margin-bottom: 22px;
  transition: color 0.2s ease;
}
.stw-page-back:hover { color: var(--stw-blue); }

.stw-page-title {
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  max-width: 780px;
  margin: 0 auto 30px;
}

.stw-page-banner {
  max-width: var(--stw-max);
  margin: 0 auto;
  padding: 0 24px;
}
.stw-page-banner-inner {
  border-radius: var(--stw-radius);
  overflow: hidden;
  border: 1px solid var(--stw-border);
  box-shadow: var(--stw-shadow-lg);
  max-height: 440px;
}
.stw-page-banner-inner img {
  width: 100%;
  height: 100%;
  max-height: 440px;
  object-fit: cover;
}

/* ---- Cifras destacadas ---- */
.stw-stats-section {
  background: var(--stw-bg-soft);
  border-top: 1px solid var(--stw-border);
  border-bottom: 1px solid var(--stw-border);
  padding: 42px 0;
  margin-top: 56px;
}
.stw-stats-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 48px;
  text-align: center;
}
.stw-stat-item { min-width: 120px; }
.stw-stat-num {
  display: block;
  font-family: var(--stw-font-head);
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--stw-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
}
.stw-stat-label { font-size: 0.9rem; color: var(--stw-text-dim); }

/* ---- Contenido de página ---- */
.stw-page-content { padding: 60px 0 30px; }
.stw-page-wrap { max-width: 760px; margin: 0 auto; }
.stw-page-wrap h2, .stw-page-wrap h3 { margin-top: 1.4em; }
.stw-page-wrap img { border-radius: var(--stw-radius-sm); }
.stw-page-wrap a { color: var(--stw-blue); text-decoration: underline; text-decoration-color: var(--stw-border-strong); }

/* Párrafos con una línea vertical sutil al lado, que le da ritmo a bloques
   largos de texto en vez de verse como un muro plano. */
.stw-page-wrap p {
  color: var(--stw-text-dim);
  margin: 0 0 1.3em;
  padding-left: 16px;
  border-left: 3px solid var(--stw-border);
  transition: border-color 0.3s ease;
}
.stw-page-wrap p:hover { border-left-color: var(--stw-border-strong); }

/* Clase para "meter hacia adentro" un párrafo o lista puntual, sin
   depender de tabs (WordPress los borra al pegar). Se activa poniendo
   "stw-indent" en el campo "Clases CSS adicionales" del bloque, dentro
   del panel Avanzado del editor. */
.stw-page-wrap .stw-indent {
  margin-left: 26px;
}
.stw-page-wrap p.stw-indent { padding-left: 16px; }
.stw-page-wrap ul.stw-indent li,
.stw-page-wrap ol.stw-indent li { padding-left: 32px; }

/* Listas con marcador propio en degradado de marca, en vez del punto
   genérico del navegador. */
.stw-page-wrap ul {
  list-style: none;
  margin: 0 0 1.3em;
  padding: 0;
}
.stw-page-wrap ul li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 14px;
  color: var(--stw-text-dim);
  line-height: 1.55;
}
.stw-page-wrap ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--stw-gradient);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--stw-blue) 12%, transparent);
}

.stw-page-wrap ol {
  list-style: none;
  counter-reset: stw-ol;
  margin: 0 0 1.3em;
  padding: 0;
}
.stw-page-wrap ol li {
  counter-increment: stw-ol;
  position: relative;
  padding-left: 38px;
  margin-bottom: 14px;
  color: var(--stw-text-dim);
  line-height: 1.55;
}
.stw-page-wrap ol li::before {
  content: counter(stw-ol);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--stw-gradient);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: var(--stw-font-head);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stw-page-wrap ul ul, .stw-page-wrap ol ol,
.stw-page-wrap ul ol, .stw-page-wrap ol ul { margin-top: 10px; }

/* ---- Layout con sidebar CTA (plantilla 3) ---- */
.stw-page-with-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  max-width: var(--stw-max);
  align-items: start;
}
@media (min-width: 900px) {
  .stw-page-with-sidebar { grid-template-columns: 1fr 320px; }
}
.stw-page-with-sidebar .stw-page-wrap { max-width: none; margin: 0; }

.stw-sidebar-cta {
  position: sticky;
  top: 110px;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  border-radius: var(--stw-radius);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--stw-shadow);
  overflow: hidden;
}
.stw-sidebar-cta img { position: relative; z-index: 1; max-height: 44px !important; width: auto !important; margin: 0 auto 16px; }
html[data-theme="dark"] .stw-sidebar-cta img { position: relative; }
html[data-theme="dark"] .stw-sidebar-cta::before {
  content: "";
  position: absolute;
  top: 52px;
  left: 50%;
  width: 130px;
  height: 90px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 72%);
  z-index: 0;
  pointer-events: none;
}
.stw-sidebar-cta h3 { font-size: 1.1rem; margin-bottom: 10px; }
.stw-sidebar-cta p { color: var(--stw-text-dim); font-size: 0.9rem; margin-bottom: 20px; }
.stw-sidebar-cta .stw-btn { width: 100%; justify-content: center; }
.stw-sidebar-cta-email {
  display: block;
  margin-top: 14px;
  font-size: 0.85rem;
  color: var(--stw-text-dim);
}
.stw-sidebar-cta-email:hover { color: var(--stw-blue); }

/* ---- Carrusel "Conoce también" ---- */
.stw-related {
  padding: 70px 0 90px;
  background: var(--stw-bg-soft);
  border-top: 1px solid var(--stw-border);
}
.stw-related-heading {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--stw-blue);
  margin-bottom: 28px;
}
.stw-related-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.stw-related-nav {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  color: var(--stw-blue);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.stw-related-nav:hover { background: var(--stw-bg-soft); }

.stw-related-track {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 18px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px;
  justify-content: center;
  justify-content: safe center; /* si hay pocas tarjetas se centran; si sobran, se comporta como scroll normal desde el borde, sin cortar contenido */
}
.stw-related-track::-webkit-scrollbar { display: none; }

.stw-related-card {
  flex: 0 0 250px;
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius-sm);
  overflow: hidden;
  box-shadow: var(--stw-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stw-related-card:hover { transform: translateY(-4px); box-shadow: var(--stw-shadow-lg); }
.stw-related-photo {
  height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--stw-bg-soft);
}
.stw-related-photo--logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stw-related-photo--logo img {
  position: relative;
  z-index: 1;
  max-width: 55%;
  max-height: 55%;
  object-fit: contain;
}
html[data-theme="dark"] .stw-related-photo--logo::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 72%);
  z-index: 0;
}
.stw-related-name { padding: 14px 16px; font-weight: 700; font-size: 0.95rem; }

/* ==========================================================================
   10. Carrusel grande de Proyectos (portada)
   ========================================================================== */
.stw-projects { padding: 20px 0 90px; overflow: hidden; }
.stw-projects .stw-wrap { margin-bottom: 36px; }

.stw-projects-row {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: var(--stw-max);
  margin: 0 auto;
  padding: 0 24px;
}

.stw-carousel-nav {
  flex: 0 0 auto;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border-strong);
  color: var(--stw-blue);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}
.stw-carousel-nav:hover { background: var(--stw-bg-soft); }

.stw-projects-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 6px 2px 16px;
}
.stw-projects-track::-webkit-scrollbar { display: none; }

.stw-project-card {
  flex: 0 0 auto;
  width: min(420px, 78vw);
  scroll-snap-align: start;
  display: block;
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius);
  overflow: hidden;
  box-shadow: var(--stw-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stw-project-card:hover { transform: translateY(-6px); box-shadow: var(--stw-shadow-lg); }

@media (max-width: 640px) {
  .stw-carousel-nav { display: none; }
  .stw-projects-row { padding: 0; gap: 0; }
  .stw-projects-track { padding-left: 24px; padding-right: 24px; scroll-padding-left: 24px; }
}

.stw-project-photo {
  height: 260px;
  background-size: cover;
  background-position: center;
  background-color: var(--stw-bg-soft);
}
.stw-project-info { padding: 20px 22px 24px; }
.stw-project-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--stw-blue);
  background: var(--stw-bg-soft);
  border: 1px solid var(--stw-border);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.stw-project-title { font-family: var(--stw-font-head); font-weight: 700; font-size: 1.15rem; margin: 0; color: var(--stw-text); }

/* ==========================================================================
   11. Carrusel chico de Testimonios (una tarjeta, con puntos)
   ========================================================================== */
.stw-testi-carousel{
  max-width:620px;
  margin:0 auto;
  overflow:hidden;
  position:relative;
}

.stw-testi-track{
  display:flex;
  width:100%;
  transition:transform .5s cubic-bezier(.22,1,.36,1);
  will-change:transform;
}

.stw-testi-slide{
  flex:0 0 100%;
  min-width:100%;
  box-sizing:border-box;
}

.stw-testi-slide .stw-testimonial-card{
  box-shadow:var(--stw-shadow);
  margin:4px;
}

.stw-testi-dots{
  display:flex;
  justify-content:center;
  gap:10px;
  margin-top:24px;
}

.stw-testi-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--stw-border);
  border:none;
  padding:0;
  cursor:pointer;
  transition:background .2s ease,transform .2s ease;
}

.stw-testi-dot.is-active{
  background:var(--stw-blue);
  transform:scale(1.2);
}

/* ==========================================================================
   12. Hero con diapositivas (imagen / video / planes)
   ========================================================================== */
.stw-hero-slider { padding: 0; text-align: left; }

.stw-hero-slides {
  position: relative;
  overflow: hidden;
}
.stw-hero-slides--tall { min-height: 640px; }
@media (max-width: 767px) {
  .stw-hero-slides--tall { min-height: 480px; }
}

.stw-hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stw-hero-slide.is-active {
  position: relative;
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.stw-hero-slide-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}


.stw-hero-slide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 10, 30, 0.35) 0%, rgba(5, 10, 30, 0.6) 100%);
}

.stw-hero-slide-overlay {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: 150px 24px 100px;
  text-align: center;
}
.stw-hero-slide-overlay .stw-hero-title,
.stw-hero-slide-overlay .stw-hero-subtitle { color: #ffffff; }
.stw-hero-slide-overlay .stw-badge { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.4); color: #ffffff; }
.stw-hero-slide-overlay .stw-btn-outline { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); color: #ffffff; }

/* La diapositiva 0 (contenido general) NO tiene foto detrás, así que usa
   el mismo esquema de texto oscuro de siempre — nunca texto blanco. */
.stw-hero-slide-plain .stw-hero-slide-overlay .stw-hero-title,
.stw-hero-slide-plain .stw-hero-slide-overlay .stw-hero-subtitle {
  color: var(--stw-text);
  /* Filtro preventivo: un halo suave del mismo color de fondo detrás
     del texto, para que nunca se pierda contra fondos con textura o
     brillos de cerca (los círculos difuminados, los cables, etc.) —
     se adapta solo entre modo claro y oscuro, sin tener que definirlo
     dos veces. */
  text-shadow: 0 1px 14px color-mix(in srgb, var(--stw-bg) 75%, transparent);
}
/* La parte del título con degradado de color ("sitio web") no debe
   heredar el halo de arriba — como usa un truco de color transparente
   con el degradado de fondo asomando a través de las letras, ese halo
   se mezclaba encima y le restaba viveza al color. */
.stw-hero-slide-plain .stw-hero-slide-overlay .stw-hero-title .stw-gradient-text {
  text-shadow: none;
}
.stw-hero-slide-plain .stw-hero-slide-overlay .stw-badge { background: var(--stw-card); border-color: var(--stw-border-strong); color: var(--stw-blue); }
.stw-hero-slide-plain .stw-hero-slide-overlay .stw-btn-outline { background: var(--stw-card); border-color: var(--stw-border); color: var(--stw-text); }

/* Diapositiva sin imagen/video (ej. solo Planes con overlay) hereda el
   fondo blanco normal del sitio, sin scrim oscuro. */
.stw-hero-slide:not(.stw-hero-slide--planes) .stw-hero-slide-overlay { min-height: 640px; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 70px; }
@media (max-width: 767px) {
  .stw-hero-slide:not(.stw-hero-slide--planes) .stw-hero-slide-overlay {
    min-height: 480px;
    justify-content: center;
    padding-bottom: 0;
    gap: 10px;
  }
  .stw-hero-slide-overlay .stw-hero-title {
    font-size: clamp(1.7rem, 7vw, 2.3rem);
    margin-bottom: 8px;
  }
  .stw-hero-slide-overlay .stw-hero-subtitle {
    font-size: 0.92rem;
    margin-bottom: 4px;
  }
  .stw-hero-slide-overlay .stw-badge { margin-bottom: 2px; }
  .stw-hero-float-bubble { margin-top: 10px; }
}

.stw-hero-planes-wrap { padding: 130px 24px 90px; width: 100%; }
@media (max-width: 767px) {
  .stw-hero-planes-wrap { padding-top: 150px; }
}
.stw-hero-planes-header { padding: 0 0 50px; text-align: center; }
.stw-hero-planes-header .stw-hero-title,
.stw-hero-planes-header .stw-hero-subtitle { color: var(--stw-text); }

.stw-hero-dots {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}
.stw-hero-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(46, 82, 222, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.stw-hero-dot.is-active { background: var(--stw-blue); transform: scale(1.3); }

.stw-hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--stw-card) 78%, transparent);
  border: 1.5px solid var(--stw-border-strong);
  color: var(--stw-blue);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.2s ease;
}
.stw-hero-nav:hover { background: var(--stw-card); transform: translateY(-50%) scale(1.08); }
.stw-hero-nav:active { transform: translateY(-50%) scale(0.96); }
.stw-hero-nav-prev { left: 10px; }
.stw-hero-nav-next { right: 10px; }
@media (min-width: 700px) {
  .stw-hero-nav-prev { left: 20px; }
  .stw-hero-nav-next { right: 20px; }
}

/* ---- Tarjetas de Planes ---- */
.stw-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  max-width: var(--stw-max);
  margin: 0 auto;
}
@media (min-width: 901px) {
  .stw-plans-grid { grid-template-columns: repeat(3, 1fr); }
}

.stw-plan-card {
  --plan-accent: var(--stw-blue);
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-top: 4px solid var(--plan-accent);
  border-radius: var(--stw-radius);
  box-shadow: var(--stw-shadow);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.stw-plan-card:hover { transform: translateY(-4px); box-shadow: var(--stw-shadow-lg); }

/* Brillo tipo neón — se activa por turnos en cada tarjeta cuando
   nadie ha tocado nada por un rato, para invitar a interactuar. */
.stw-plan-card--neon {
  animation: stw-plan-neon 1.8s ease-in-out infinite;
}
@keyframes stw-plan-neon {
  0%, 100% {
    box-shadow: var(--stw-shadow), 0 0 0 0 color-mix(in srgb, var(--plan-accent) 55%, transparent);
  }
  50% {
    box-shadow: var(--stw-shadow-lg), 0 0 22px 3px color-mix(in srgb, var(--plan-accent) 65%, transparent);
  }
}
@media (prefers-reduced-motion: reduce) {
  .stw-plan-card--neon { animation: none; }
}
.stw-plan-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(180px circle at var(--mouse-x, 50%) var(--mouse-y, 0%), color-mix(in srgb, var(--plan-accent) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: -1;
}
.stw-plan-card:hover::before,
.stw-plan-card.stw-plan-card--glow::before { opacity: 1; }

/* Encabezado del acordeón (celular/tablet) — en escritorio es solo
   el encabezado visual de la tarjeta, sin función de acordeón. */
.stw-plan-card-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  background: none;
  border: none;
  padding: 22px 24px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.stw-plan-toggle-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.stw-plan-name { font-size: 1.15rem; font-weight: 800; }
.stw-plan-price { font-family: var(--stw-font-head); font-weight: 800; font-size: 1.25rem; color: var(--plan-accent); }
.stw-plan-chevron { flex: 0 0 auto; color: var(--stw-text-dim); transition: transform 0.3s ease; }
.stw-plan-card.is-open .stw-plan-chevron { transform: rotate(180deg); }

.stw-plan-icon {
  position: relative;
  width: 48px; height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--plan-accent) 14%, var(--stw-card));
  color: var(--plan-accent);
}
.stw-plan-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--plan-accent) 45%, transparent);
  animation: stwPlanPulse 3.6s ease-out infinite;
}
@keyframes stwPlanPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--plan-accent) 40%, transparent); }
  70%  { box-shadow: 0 0 0 10px color-mix(in srgb, var(--plan-accent) 0%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--plan-accent) 0%, transparent); }
}

.stw-plan-desc { color: var(--stw-text-dim); font-size: 0.9rem; margin-bottom: 18px; }

.stw-plan-features { list-style: none; margin: 0 0 26px; padding: 0; flex: 1; }
.stw-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--stw-text);
  margin-bottom: 10px;
}
.stw-plan-features li svg {
  flex: 0 0 auto;
  color: #ffffff;
  background: var(--plan-accent);
  border-radius: 50%;
  padding: 3px;
  width: 16px; height: 16px;
  box-sizing: border-box;
  margin-top: 1px;
}

.stw-plan-btn {
  position: relative;
  overflow: hidden;
  justify-content: center;
  width: 100%;
  background: var(--plan-accent) !important;
  border-color: var(--plan-accent) !important;
  color: #ffffff !important;
}
.stw-plan-btn:hover { filter: brightness(0.92); }
.stw-plan-btn::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: stw-btn-shine 4.5s ease-in-out infinite;
}
@keyframes stw-btn-shine {
  0%   { left: -60%; }
  35%  { left: 130%; }
  100% { left: 130%; }
}

/* ---- Acordeón: solo en celular y tablet (hasta 900px) ---- */
@media (max-width: 900px) {
  .stw-plan-chevron { display: block; }
  .stw-plan-card-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 24px;
    transition: max-height 0.45s ease, opacity 0.35s ease, padding 0.45s ease;
  }
  .stw-plan-card.is-open .stw-plan-card-body {
    max-height: 900px;
    opacity: 1;
    padding: 0 24px 24px;
  }
}

/* ---- En escritorio, siempre expandido: no hay acordeón ---- */
@media (min-width: 901px) {
  .stw-plan-card-toggle { cursor: default; padding: 34px 28px 0; flex-direction: column; align-items: flex-start; gap: 0; }
  .stw-plan-icon { margin-bottom: 18px; }
  .stw-plan-toggle-text { flex-direction: column; }
  .stw-plan-name { margin-bottom: 6px; }
  .stw-plan-price { margin-bottom: 4px; }
  .stw-plan-chevron { display: none; }
  .stw-plan-card-body {
    padding: 0 28px 34px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  /* El botón siempre queda pegado al fondo de la tarjeta, sin
     importar si la descripción o la lista de características de ese
     plan en particular es más corta o más larga que las de al lado —
     así los 3 botones quedan a la misma altura. */
  .stw-plan-btn { margin-top: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .stw-plan-card-body { transition: none !important; }
}

/* Mismo destello, reutilizable en cualquier botón, en versión más rápida. */
.stw-btn-shine { position: relative; overflow: hidden; }
.stw-btn-shine::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: stw-btn-shine 2.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .stw-plan-icon::after,
  .stw-plan-btn::after,
  .stw-btn-shine::after { animation: none; }
}

/* ==========================================================================
   13. Página de Plantillas (privada, con link directo)
   ========================================================================== */
.stw-plantillas-group { margin-bottom: 64px; }
.stw-plantillas-group:last-child { margin-bottom: 0; }
.stw-plantillas-group.is-filtered-out { display: none; }

.stw-plantillas-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}
.stw-filter-pill {
  background: var(--stw-card);
  border: 1.5px solid var(--stw-border);
  color: var(--stw-text-dim);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.stw-filter-pill:hover { border-color: var(--stw-border-strong); color: var(--stw-text); }
.stw-filter-pill.is-active { background: var(--stw-gradient); border-color: transparent; color: #ffffff; }

.stw-plantillas-group-title {
  font-size: 1.4rem;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--stw-border-strong);
  display: inline-block;
}

.stw-plantillas-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 640px) {
  .stw-plantillas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .stw-plantillas-grid { grid-template-columns: repeat(3, 1fr); }
}

.stw-plantillas-more-row {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}
.stw-plantillas-more-btn { cursor: pointer; }

.stw-plantilla-card {
  display: block;
  background: var(--stw-card);
  border: 1px solid var(--stw-border);
  border-radius: var(--stw-radius);
  overflow: hidden;
  box-shadow: var(--stw-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stw-plantilla-card:hover { transform: translateY(-5px); box-shadow: var(--stw-shadow-lg); }

.stw-plantilla-photo {
  height: 190px;
  background-size: cover;
  background-position: top center;
  background-color: var(--stw-bg-soft);
}
.stw-plantilla-info { padding: 18px 20px 22px; }
.stw-plantilla-title { font-family: var(--stw-font-head); font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; color: var(--stw-text); }
.stw-plantilla-desc { color: var(--stw-text-dim); font-size: 0.88rem; margin: 0 0 10px; }
.stw-plantilla-link { color: var(--stw-blue); font-weight: 600; font-size: 0.88rem; }

/* ==========================================================================
   14. Visor de plantillas (modal con iframe, sin salir del sitio)
   ========================================================================== */
.stw-plantilla-card[data-viewer-src] { cursor: pointer; }

.stw-plantilla-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 499;
  background: rgba(6, 12, 30, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
.stw-plantilla-viewer-backdrop.is-open { opacity: 1; visibility: visible; }

.stw-plantilla-viewer {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--stw-card);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
  box-shadow: -18px 0 40px rgba(20, 34, 90, 0.18);
}
.stw-plantilla-viewer.is-open { transform: translateX(0); visibility: visible; }

.stw-plantilla-viewer-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--stw-card);
  border-bottom: 1px solid var(--stw-border);
}
.stw-plantilla-viewer-title { font-weight: 700; color: var(--stw-text); font-size: 0.95rem; }
.stw-plantilla-viewer-close {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--stw-border-strong);
  background: var(--stw-card);
  color: var(--stw-blue);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.stw-plantilla-viewer-close:hover { background: var(--stw-bg-soft); }

.stw-plantilla-viewer iframe {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  border: none;
  background: var(--stw-card);
}

/* ---- Mini-vista previa automática (sin necesidad de subir captura) ---- */
.stw-plantilla-photo-live {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}
.stw-plantilla-photo-live iframe {
  position: absolute;
  top: 0; left: 0;
  width: 400%;
  height: 400%;
  border: none;
  transform: scale(0.25);
  transform-origin: top left;
}

/* ==========================================================================
   Loader de carga inicial — se esconde solo, maximo 1 segundo, nunca
   retrasa el contenido real. Ver footer.php para la logica de cierre.
   ========================================================================== */
#stwLoader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0a1638;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3vw, 40px);
  overflow: hidden;
  transition: opacity 0.35s ease;
}
#stwLoader.stw-loader-hide { opacity: 0; pointer-events: none; }

/* La lluvia de números cubre toda la pantalla, de lado a lado. */
.stw-loader-matrix {
  position: relative;
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 8px;
}
.stw-loader-digit {
  color: #6f8bff;
  font-family: 'Courier New', monospace;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: 700;
  text-align: center;
  align-self: center;
  text-shadow: 0 0 10px rgba(111, 139, 255, 0.9);
  animation: stw-loader-fall 1.6s infinite, stw-loader-flicker 0.6s infinite;
  opacity: 0;
}

.stw-loader-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(46, 82, 222, 0.25) 0%, transparent 70%);
  animation: stw-loader-pulse 1.4s infinite;
}

.stw-loader-label {
  position: relative;
  z-index: 1;
  font-family: var(--stw-font-head);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #ffffff;
}
.stw-loader-label img {
  position: relative;
  z-index: 1;
  height: clamp(110px, 16vw, 240px);
  width: auto;
  display: block;
}
.stw-loader-label a { display: block; line-height: 0; }

/* Mismo halo blanco que usamos en el header/hero en modo oscuro —
   acá siempre está activo, porque el fondo del loader siempre es
   oscuro (no depende del modo claro/oscuro del sitio). Al no tener
   transform propio, gira y se encoge junto con el logo cuando el
   contenedor .stw-loader-label recibe la animación de cierre. */
.stw-loader-label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(220px, 22vw, 320px);
  height: clamp(220px, 22vw, 320px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.2) 40%, rgba(255,255,255,0) 72%);
  z-index: 0;
}

/* Últimos segundos: el logo (y su halo, que va pegado a él) gira y
   se encoge hasta quedar en un pequeño círculo — la lluvia de
   números se apaga aparte, para que toda la atención quede en el
   giro final, y el fondo se va aclarando hacia el color de la
   página, para que la transición no se sienta como un corte. */
#stwLoader.stw-loader-closing {
  background: var(--stw-bg, #ffffff);
  transition: background-color 1.6s ease-in-out;
}
#stwLoader.stw-loader-closing .stw-loader-matrix {
  opacity: 0;
  transition: opacity 0.3s ease;
}
#stwLoader.stw-loader-closing .stw-loader-label {
  --stw-target-x: 0px;
  --stw-target-y: 0px;
  animation-name: stw-loader-spin-away;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}
/* El recorte circular es SOLO del logo — la nube de fondo (::before)
   no se recorta nunca, así que se mueve/gira suave, sin bordes
   duros apareciendo de golpe. */
#stwLoader.stw-loader-closing .stw-loader-label img {
  overflow: hidden;
  animation-name: stw-loader-img-round;
  animation-timing-function: ease-in-out;
  animation-fill-mode: forwards;
}
@keyframes stw-loader-spin-away {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  35%  { transform: translate(0, 0) rotate(220deg) scale(1); }
  100% { transform: translate(var(--stw-target-x), var(--stw-target-y)) rotate(720deg) scale(0.08); }
}
@keyframes stw-loader-img-round {
  0%   { border-radius: 0; }
  35%  { border-radius: 30%; }
  100% { border-radius: 50%; }
}

@keyframes stw-loader-fall {
  0% { transform: translateY(-30px) rotateX(90deg); opacity: 0; }
  20%, 80% { transform: translateY(0) rotateX(0deg); opacity: 0.9; }
  100% { transform: translateY(30px) rotateX(-90deg); opacity: 0; }
}
@keyframes stw-loader-flicker {
  0%, 19%, 21%, 100% { opacity: 0.9; }
  20% { opacity: 0.3; }
}
@keyframes stw-loader-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

@media (prefers-reduced-motion: reduce) {
  #stwLoader { display: none; }
}
