/* ==========================================================================
   ProDev Labs — Estilos personalizados (complementan TailwindCSS)
   ========================================================================== */

:root {
  --color-primary: #3B4BC8;
  --color-primary-dark: #2E3AA0;
  --color-teal: #3ECFBF;
  --color-teal-dark: #2FA99C;
  --color-dark: #2D2F3E;
  --color-light: #F4FFFE;
  --brand-gradient: linear-gradient(135deg, #3ECFBF, #3B4BC8);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  scroll-padding-top: 5rem;
}

/* Anclas: que no queden tapadas por el navbar fijo */
section[id],
main [id] {
  scroll-margin-top: 5rem;
}

/* ---------- Enlace "saltar al contenido" (accesibilidad) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #fff;
  color: var(--color-primary);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.5rem 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Utilidades de marca ---------- */
.brand-gradient {
  background-image: var(--brand-gradient);
}

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

.btn-gradient {
  background-image: var(--brand-gradient);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-gradient:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
}

/* ---------- Navbar ---------- */
#navbar {
  background: transparent;
}
#navbar.navbar-scrolled {
  background: rgba(244, 255, 254, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px -8px rgba(45, 47, 62, 0.12);
}

.nav-link {
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background-image: var(--brand-gradient);
  transition: width 0.25s ease;
}
.nav-link:hover {
  color: var(--color-primary);
}
.nav-link:hover::after {
  width: 100%;
}

.mobile-nav-link {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-nav-link:hover {
  background-color: rgba(59, 75, 200, 0.08);
  color: var(--color-primary);
}

/* ---------- Hero: formas decorativas ---------- */
.hero-shape {
  position: absolute;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(2px);
}
.hero-shape-1 {
  width: 22rem;
  height: 22rem;
  top: -8rem;
  right: -6rem;
}
.hero-shape-2 {
  width: 16rem;
  height: 16rem;
  bottom: -4rem;
  left: -4rem;
  background: rgba(255, 255, 255, 0.1);
}
.hero-shape-3 {
  width: 8rem;
  height: 8rem;
  top: 30%;
  left: 8%;
  border-radius: 1.5rem;
  transform: rotate(20deg);
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- Stats ---------- */
.stat-card {
  background: #fff;
  border: 1px solid rgba(45, 47, 62, 0.06);
  border-radius: 1.25rem;
  padding: 1.75rem 1.25rem;
  text-align: center;
  box-shadow: 0 10px 30px -18px rgba(45, 47, 62, 0.25);
}
.stat-number {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--color-primary);
  line-height: 1;
}
.stat-label {
  margin-top: 0.5rem;
  color: rgba(45, 47, 62, 0.65);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ---------- Servicios ---------- */
.service-card {
  background: #fff;
  border: 1px solid rgba(45, 47, 62, 0.08);
  border-radius: 1.5rem;
  padding: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -20px rgba(59, 75, 200, 0.35);
  border-color: var(--color-primary);
}
.service-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.25rem;
  width: 3.25rem;
  border-radius: 1rem;
  background: rgba(59, 75, 200, 0.08);
  color: var(--color-primary);
}
.service-card:hover .service-icon {
  background-image: var(--brand-gradient);
  color: #fff;
}

/* ---------- Por qué elegirnos ---------- */
.why-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 1.25rem;
  padding: 1.75rem;
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease, background-color 0.25s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
}

/* ---------- Proceso ---------- */
.process-step {
  text-align: center;
  position: relative;
}
.process-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 4rem;
  width: 4rem;
  border-radius: 9999px;
  background-image: var(--brand-gradient);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  box-shadow: 0 10px 25px -8px rgba(59, 75, 200, 0.5);
}

/* ---------- Stack de tecnologías ---------- */
.tech-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border-radius: 9999px;
  background: var(--color-light);
  border: 1px solid rgba(45, 47, 62, 0.08);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-dark);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tech-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px -10px rgba(59, 75, 200, 0.4);
}
.tech-dot {
  height: 0.55rem;
  width: 0.55rem;
  border-radius: 9999px;
  background-image: var(--brand-gradient);
  flex-shrink: 0;
}

/* ---------- Contacto ---------- */
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 500;
  transition: opacity 0.2s ease;
}
.contact-link:hover {
  opacity: 0.85;
}
.contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
}
.form-input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  border: 1.5px solid rgba(45, 47, 62, 0.15);
  background: var(--color-light);
  color: var(--color-dark);
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 75, 200, 0.15);
}
/* El estilo de "campo inválido" solo se aplica después de que el usuario
   interactuó con el campo (clase .touched añadida por main.js al perder el
   foco). Esto evita que el <select>, que no soporta :placeholder-shown,
   se muestre en rojo apenas carga la página. */
.form-input.touched:invalid:not(:focus) {
  border-color: #e0736c;
}

/* ---------- Footer ---------- */
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.footer-social:hover {
  background-image: var(--brand-gradient);
  transform: translateY(-3px);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  width: 3.5rem;
  border-radius: 9999px;
  background: #25D366;
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(37, 211, 102, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: wa-pulse 2.4s ease-in-out infinite;
}
.whatsapp-float:hover {
  transform: scale(1.08);
}
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45), 0 12px 28px -10px rgba(37, 211, 102, 0.6); }
  50% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0), 0 12px 28px -10px rgba(37, 211, 102, 0.6); }
}

/* ---------- Foco visible accesible ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}
