/* =====================================================
   SYSSA — ENHANCEMENTS v2
   Status Bar · Profile Tabs · Timeline · ROI ·
   Quiz · Support Portal · Modal · Ticket
   ===================================================== */

/* =====================================================
   BUTTON LOADING STATE
   ===================================================== */

/* Por defecto: muestra texto, oculta spinner */
.btn .btn-loading {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

/* Cuando el botón tiene clase .loading */
.btn.loading .btn-text {
  display: none;
}

.btn.loading .btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn.loading .btn-loading svg {
  animation: btn-spin 0.75s linear infinite;
  flex-shrink: 0;
}

.btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
  pointer-events: none;
}

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* =====================================================
   LOGO IMG
   ===================================================== */
.logo-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
}

/* =====================================================
   HERO TYPING — fix layout shift
   ===================================================== */
.hero-title {
  min-height: 4.5em; /* reserva espacio para evitar saltos */
}

/* =====================================================
   HERO SHIELD VISUAL
   ===================================================== */
.hero-shield-wrap {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-shield-svg {
  width: 280px;
  height: 308px;
  filter: drop-shadow(0 0 40px rgba(6,182,212,0.25))
          drop-shadow(0 0 80px rgba(29,78,216,0.15));
  animation: shieldFloat 6s ease-in-out infinite;
}
.hero-shield-svg svg { width: 100%; height: 100%; }

@keyframes shieldFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* Animated rings */
.shield-ring-1 { animation: ringPulse 3s ease-in-out infinite; }
.shield-ring-2 { animation: ringPulse 3s ease-in-out infinite 1s; }
@keyframes ringPulse {
  0%, 100% { opacity: 0.15; r: 58; }
  50%       { opacity: 0.4;  r: 62; }
}

/* Third floating badge (uptime) */
.badge-uptime {
  top: 50%;
  right: -24px;
  transform: translateY(-50%);
  animation-delay: -1.5s;
}

/* =====================================================
   HERO cursor blink — OVERRIDE: sin desplazamiento
   ===================================================== */
.hero-title .gradient-text {
  display: inline;
  white-space: nowrap;
}
.hero-title .gradient-text::after {
  content: '|';
  animation: cursorBlink 1.1s step-end infinite;
  -webkit-text-fill-color: var(--brand-400);
  font-weight: 300;
  margin-left: 1px;
  display: inline;
}
@keyframes cursorBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

[hidden] { display: none !important; }

/* =====================================================
   STATUS BAR
   ===================================================== */
.status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1100;
  background: linear-gradient(90deg, #071a38 0%, #0d0a2a 100%);
  border-bottom: 1px solid rgba(59,130,246,0.18);
  font-size: 0.8rem;
  color: #94afc8;
  transition: transform 0.3s ease;
}
.status-bar.hidden { transform: translateY(-100%); }

.status-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.4rem;
  flex-wrap: wrap;
}

.status-left  { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.status-right { display: flex; align-items: center; gap: 0.85rem; }

.status-live {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: #34d399;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.pulse-dot-sm {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulseSm 2s infinite;
  flex-shrink: 0;
}
@keyframes pulseSm {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(52,211,153,0.5); }
  50%       { opacity: 0.7; box-shadow: 0 0 0 4px rgba(52,211,153,0); }
}
.status-sep { color: rgba(255,255,255,0.15); }
.status-msg strong { color: #f0f6ff; }

.status-link {
  font-size: 0.75rem;
  font-weight: 700;
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
  transition: color 0.15s;
}
.status-link:hover { color: #93c5fd; }

.status-close {
  display: flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 5px;
  color: rgba(255,255,255,0.35);
  border: none; background: transparent;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.status-close:hover { color: rgba(255,255,255,0.8); background: rgba(255,255,255,0.08); }

/* =====================================================
   ALPINE.JS
   ===================================================== */
[x-cloak] { display: none !important; }

.profile-enter        { transition: opacity 0.28s ease, transform 0.28s ease; }
.profile-enter-start  { opacity: 0; transform: translateY(10px); }
.profile-enter-end    { opacity: 1; transform: translateY(0); }

/* =====================================================
   TRUSTED-BY STRIP
   ===================================================== */
.trusted-by {
  padding-block: 2.5rem;
  background: var(--surface-2);
  border-block: 1px solid var(--border-subtle);
}
.trusted-by-label {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.trusted-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  flex-wrap: wrap;
}
.trusted-logo {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
}
.trusted-logo:hover { opacity: 0.85; }
[data-theme="light"] .trusted-logo { opacity: 0.35; }

/* =====================================================
   TIMELINE — connector desktop
   ===================================================== */
@media (min-width: 900px) {
  .timeline-grid { position: relative; }
  .timeline-grid::after {
    content: '';
    position: absolute;
    top: calc(1.2rem + 32px);
    left: calc(12.5% + 24px);
    right: calc(12.5% + 24px);
    height: 1px;
    background: linear-gradient(90deg,
      rgba(59,130,246,0.5),
      rgba(139,92,246,0.4),
      rgba(6,182,212,0.3),
      rgba(16,185,129,0.2));
    pointer-events: none;
    z-index: 0;
  }
  .timeline-step { z-index: 1; }
}

/* =====================================================
   TICKET MODAL
   ===================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(1,11,24,0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideUp 0.25s cubic-bezier(0.16,1,0.3,1);
}
.modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-brand), transparent);
  border-radius: inherit;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.modal-title    { font-size: var(--text-xl); font-weight: 800; color: var(--text-primary); letter-spacing: -0.03em; }
.modal-subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 0.25rem; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.15s;
  cursor: pointer;
  background: none;
}
.modal-close:hover { color: var(--text-primary); border-color: var(--border-strong); }

.modal-form { display: flex; flex-direction: column; gap: 1.25rem; }

.priority-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 0.65rem; }
.priority-option { display: none; }
.priority-label {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-align: center;
  transition: all 0.15s;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.priority-label:hover { border-color: var(--border-brand); color: var(--text-secondary); }
.priority-option:checked + .priority-label {
  background: rgba(59,130,246,0.1);
  border-color: var(--border-brand);
  color: var(--brand-400);
}
.priority-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.p-critico .priority-dot { background: var(--rose-500); }
.p-alto    .priority-dot { background: var(--amber-500); }
.p-normal  .priority-dot { background: var(--emerald-500); }

.modal-submit-row { display: flex; gap: 0.75rem; padding-top: 0.5rem; }

.modal-success { text-align: center; padding: 1.5rem 0; }
.modal-success-icon { font-size: 2.75rem; margin-bottom: 0.75rem; }
.modal-success h3   { font-size: var(--text-lg); font-weight: 700; margin-bottom: 0.4rem; color: var(--text-primary); }
.modal-success p    { font-size: var(--text-sm); color: var(--text-secondary); }
.modal-ticket-id    { font-family: monospace; color: var(--brand-400); font-weight: 700; }

/* =====================================================
   SWIPER overrides
   ===================================================== */
.testimonials-swiper { overflow: visible !important; padding-bottom: 3.5rem !important; }
.testimonials-swiper .swiper-slide { height: auto; }

.swiper-button-prev,
.swiper-button-next {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md) !important;
  width: 44px !important; height: 44px !important;
  color: var(--brand-400) !important;
  top: auto !important; bottom: 0 !important;
  margin-top: 0 !important;
  transition: all 0.2s;
}
.swiper-button-prev { left: calc(50% - 52px) !important; }
.swiper-button-next { right: calc(50% - 52px) !important; left: auto !important; }
.swiper-button-prev:hover,
.swiper-button-next:hover {
  background: var(--grad-brand) !important;
  color: #fff !important;
  border-color: transparent !important;
}
.swiper-button-prev::after,
.swiper-button-next::after { font-size: 1rem !important; font-weight: 900 !important; }

.swiper-pagination { bottom: 12px !important; }
.swiper-pagination-bullet {
  background: var(--border-strong);
  opacity: 1;
  transition: all 0.25s;
}
.swiper-pagination-bullet-active {
  background: var(--brand-500);
  width: 18px !important;
  border-radius: 99px;
}

/* =====================================================
   SUBMIT LOADING SPINNER
   ===================================================== */
#submit-btn.loading { pointer-events: none; opacity: 0.65; }
#submit-btn.loading::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 0.5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   FOOTER gradient top
   ===================================================== */
.footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-brand) 35%, rgba(139,92,246,0.4) 65%, transparent 100%);
}
.footer { position: relative; }

/* =====================================================
   HERO cursor blink (typed effect)
   ===================================================== */
.hero-title .gradient-text::after {
  content: '|';
  animation: cursorBlink 1.1s step-end infinite;
  -webkit-text-fill-color: var(--brand-400);
  font-weight: 300;
  margin-left: 1px;
}
@keyframes cursorBlink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* =====================================================
   CONTACT LINE (footer address)
   ===================================================== */
.footer-address { font-style: normal; display: flex; flex-direction: column; gap: 0.65rem; margin-bottom: 0.5rem; }
.contact-line { display: flex; align-items: center; gap: 0.6rem; font-size: var(--text-sm); color: var(--text-secondary); }
.contact-line svg { color: var(--brand-400); flex-shrink: 0; }
.contact-line a { color: var(--text-secondary); transition: color 0.15s; }
.contact-line a:hover { color: var(--brand-400); }

/* =====================================================
   FAB (floating action button)
   ===================================================== */
.fab-container {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  z-index: 800;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 0.6rem;
}
.fab-main {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--grad-brand);
  border: none;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
  transition: all 0.2s;
  cursor: pointer;
}
.fab-main:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(59,130,246,0.55); }
.fab-icon--close { display: none; }
.fab-container.open .fab-icon--open  { display: none; }
.fab-container.open .fab-icon--close { display: flex; }

.fab-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: all 0.2s;
}
.fab-container.open .fab-actions {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}

.fab-action {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 1rem 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-sm); font-weight: 600;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: all 0.15s;
  cursor: pointer;
  white-space: nowrap;
}
.fab-action:hover { border-color: var(--border-brand); color: var(--text-primary); background: var(--grad-card); }
.fab-action--whatsapp svg { color: #25d366; }
.fab-action--call    svg { color: var(--brand-400); }
.fab-action--ticket  svg { color: var(--violet-400); }

/* =====================================================
   BACK-TO-TOP — offset for chat widget
   ===================================================== */
#back-to-top { bottom: 7.5rem; right: 1.5rem; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 600px) {
  .modal-box        { padding: 1.75rem; border-radius: var(--radius-xl); }
  .priority-grid    { grid-template-columns: 1fr; }
  .modal-submit-row { flex-direction: column; }
  .profile-tab      { flex: 1; text-align: center; }
  .trusted-logos    { gap: 1.25rem; }
}

/* =====================================================
   AGENTES IA PARA PYMES — Section Styles
   ===================================================== */

/* Nav highlight link */
.nav-link--highlight {
  color: var(--amber-400);
  font-weight: 600;
  position: relative;
}
.nav-link--highlight::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--amber-400);
  border-radius: 99px;
  opacity: 0.6;
}

/* Pain Strip */
.ia-pain-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 3.5rem;
  flex-wrap: wrap;
}
.pain-item {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.5rem 1.5rem;
  min-width: 200px;
}
.pain-icon-wrap {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-400);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pain-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}
.pain-text strong { color: var(--text-primary); }
.pain-divider {
  width: 1px;
  height: 60px;
  background: var(--border-default);
  flex-shrink: 0;
}

/* Use cases label */
.ia-usecases-label {
  text-align: center;
  margin-bottom: 2rem;
}
.ia-section-label {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

/* Result badge inside service card */
.ia-result-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
}
.ia-result-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--amber-400);
  line-height: 1;
  flex-shrink: 0;
}
.ia-result-badge--accent .ia-result-num { color: var(--emerald-400); }
.ia-result-text {
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Pricing section spacing */
.ia-pricing-header { margin-top: 5rem; }

/* Pricing Grid */
.ia-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
.ia-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.ia-plan-card:hover {
  border-color: var(--border-brand);
  transform: translateY(-4px);
}
.ia-plan-card--featured {
  border-color: var(--brand-500);
  background: linear-gradient(145deg, rgba(59,130,246,0.08) 0%, rgba(139,92,246,0.06) 100%);
  box-shadow: 0 0 0 1px var(--brand-500), 0 20px 60px rgba(59,130,246,0.18);
}
.ia-plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad-brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.3rem 1rem;
  border-radius: 99px;
  white-space: nowrap;
}
.ia-plan-header { display: flex; flex-direction: column; gap: 0.5rem; }
.ia-plan-name {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
}
.ia-plan-price { display: flex; align-items: baseline; gap: 0.35rem; flex-wrap: wrap; }
.ia-price-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.ia-price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.ia-plan-tagline {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}
.ia-plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}
.ia-plan-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.ia-plan-features li svg { color: var(--emerald-400); flex-shrink: 0; }

/* Webinar CTA */
.ia-webinar-cta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: center;
  background: linear-gradient(135deg, rgba(59,130,246,0.1) 0%, rgba(139,92,246,0.08) 100%);
  border: 1px solid var(--border-brand);
  border-radius: var(--radius-2xl);
  padding: 2.5rem 3rem;
  margin-top: 4rem;
}
.ia-webinar-badge {
  display: inline-block;
  background: rgba(245,158,11,0.15);
  color: var(--amber-400);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  border: 1px solid rgba(245,158,11,0.3);
  margin-bottom: 0.75rem;
}
.ia-webinar-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem;
  line-height: 1.3;
}
.ia-webinar-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 1.5rem;
  max-width: 560px;
}
.ia-webinar-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: center;
  min-width: 140px;
}
.webinar-stat { display: flex; flex-direction: column; gap: 0.25rem; }
.ws-num {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}
.ws-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Responsive */
@media (max-width: 900px) {
  .ia-pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .ia-webinar-cta { grid-template-columns: 1fr; }
  .ia-webinar-stats { flex-direction: row; justify-content: space-around; }
  .pain-divider { display: none; }
  .pain-item { padding: 0.75rem 0.5rem; }
}
@media (max-width: 600px) {
  .ia-pain-strip { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .ia-webinar-cta { padding: 1.75rem; }
  .ia-webinar-title { font-size: 1.15rem; }
}
