/* =====================================================================
   PROLINKER — SISTEMA DE DISEÑO
   Paleta extraída técnicamente del archivo LOGO_PROLINKER.png (no inventada).
   ===================================================================== */

:root {
  /* Paleta de marca (del logo) */
  --pl-navy-950:   #000423;   /* texto principal / fondo oscuro */
  --pl-blue-800:   #021f7a;   /* azul profundo */
  --pl-blue-600:   #004bce;   /* azul eléctrico */
  --pl-cyan-500:   #01a9c9;   /* cian */
  --pl-teal-400:   #00d1cf;   /* turquesa */

  /* Neutros */
  --pl-white:      #ffffff;
  --pl-gray-50:    #f6f8fb;
  --pl-gray-100:   #ebecef;
  --pl-gray-300:   #c4c8d2;
  --pl-gray-500:   #7f8394;
  --pl-gray-700:   #3a3d4a;

  /* Gradiente de marca (hero, botones primarios) */
  --pl-gradient-brand: linear-gradient(120deg, var(--pl-blue-800) 0%, var(--pl-blue-600) 45%, var(--pl-cyan-500) 75%, var(--pl-teal-400) 100%);
  --pl-gradient-soft:  linear-gradient(135deg, #eef4ff 0%, #eafbfb 100%);

  /* Tipografía */
  --pl-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Espaciado y forma */
  --pl-radius-sm: 8px;
  --pl-radius-md: 14px;
  --pl-radius-lg: 24px;
  --pl-shadow-card: 0 4px 24px rgba(0, 8, 38, 0.08);
  --pl-shadow-hover: 0 12px 32px rgba(0, 75, 206, 0.16);
  --pl-max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--pl-font-sans);
  color: var(--pl-navy-950);
  background: var(--pl-white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--pl-blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 16px; font-weight: 800; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 16px; color: var(--pl-gray-700); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--pl-radius-sm);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 48px; /* tamaño táctil accesible */
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 3px solid var(--pl-cyan-500); outline-offset: 2px; }

.btn-primary {
  background: var(--pl-gradient-brand);
  color: var(--pl-white);
  box-shadow: var(--pl-shadow-hover);
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-secondary {
  background: var(--pl-white);
  color: var(--pl-blue-800);
  border: 2px solid var(--pl-gray-100);
}
.btn-secondary:hover { border-color: var(--pl-blue-600); }

.btn-whatsapp {
  background: #1fbf5c;
  color: var(--pl-white);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--pl-gray-100);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.site-header .logo img { height: 34px; }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a { color: var(--pl-navy-950); font-weight: 600; font-size: .95rem; }
.header-cta { display: flex; gap: 12px; align-items: center; }

/* ---------- Hero ---------- */
.hero {
  background: var(--pl-gradient-soft);
  padding: 72px 0 56px;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero-badge {
  display: inline-block; background: var(--pl-white); border: 1px solid var(--pl-gray-100);
  color: var(--pl-blue-800); font-weight: 700; font-size: .8rem;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero-price { font-weight: 700; color: var(--pl-blue-800); margin-top: 18px; }
.hero-cta-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Secciones generales ---------- */
section { padding: 64px 0; }
.section-alt { background: var(--pl-gray-50); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head p { color: var(--pl-gray-500); }

/* ---------- Cards de planes ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.plan-card {
  background: var(--pl-white);
  border: 1px solid var(--pl-gray-100);
  border-radius: var(--pl-radius-lg);
  padding: 32px 28px;
  box-shadow: var(--pl-shadow-card);
  display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--pl-shadow-hover); }
.plan-card.featured { border: 2px solid var(--pl-cyan-500); position: relative; }
.plan-card.featured::before {
  content: 'Más elegido';
  position: absolute; top: -14px; left: 28px;
  background: var(--pl-gradient-brand); color: #fff;
  font-size: .72rem; font-weight: 800; padding: 5px 12px; border-radius: 999px;
}
.plan-name { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.plan-promise { color: var(--pl-gray-500); font-size: .9rem; min-height: 40px; }
.plan-price { font-size: 2.1rem; font-weight: 800; color: var(--pl-blue-800); margin: 12px 0 2px; }
.plan-price small { font-size: .95rem; font-weight: 600; color: var(--pl-gray-500); }
.plan-features { list-style: none; padding: 0; margin: 20px 0; flex-grow: 1; }
.plan-features li { padding: 7px 0; font-size: .92rem; padding-left: 26px; position: relative; }
.plan-features li::before {
  content: '✓'; position: absolute; left: 0; color: var(--pl-teal-400); font-weight: 800;
}

/* ---------- Cómo funciona / pasos ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.step-card { text-align: center; }
.step-number {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--pl-gradient-brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; margin: 0 auto 14px;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--pl-gray-100); padding: 18px 0; }
.faq-item summary { font-weight: 700; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; float: right; font-weight: 400; color: var(--pl-blue-600); }
.faq-item[open] summary::after { content: '−'; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pl-navy-950); color: var(--pl-gray-300); padding: 56px 0 24px; }
.site-footer a { color: var(--pl-gray-300); }
.site-footer a:hover { color: var(--pl-teal-400); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { color: #fff; font-size: .9rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; font-size: .88rem; }
.footer-bottom { border-top: 1px solid #1a1f42; padding-top: 20px; font-size: .8rem; text-align: center; }

/* ---------- WhatsApp flotante ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #1fbf5c; color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,.2); font-size: 1.6rem;
}
.wa-float:hover { text-decoration: none; }

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge-iva { font-size: .75rem; color: var(--pl-gray-500); }
.skip-link {
  position: absolute; left: -999px; top: 0; background: #fff; padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; } /* Fase 1: menú simplificado; menú móvil hamburguesa se añade en app.js */
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- CTA flotante de WhatsApp (Sección 5) ---------- */
.pl-floating-whatsapp {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.pl-floating-whatsapp.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .pl-floating-whatsapp { transition: opacity 0.15s linear; transform: none; }
}
@media (max-width: 480px) {
  .pl-floating-whatsapp { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 1.4rem; }
}

/* ---------- Validación en tiempo real (Sección 19) ---------- */
.pl-field-error {
  display: none;
  color: #C0392B;
  font-size: 0.82rem;
  margin-top: 4px;
}
input.pl-invalid, textarea.pl-invalid, select.pl-invalid {
  border-color: #C0392B !important;
  background: #FDF3F2;
}
input.pl-invalid + .pl-field-error,
textarea.pl-invalid + .pl-field-error,
select.pl-invalid + .pl-field-error {
  display: block;
}
input.pl-valid, textarea.pl-valid, select.pl-valid {
  border-color: #2E7D32 !important;
}

/* ---------- Menú móvil pantalla completa (Sección 4) ---------- */
.pl-mobile-menu-overlay {
  position: fixed; inset: 0; z-index: 100; background: #fff;
  display: flex; flex-direction: column; padding: 24px;
  transform: translateY(-100%); transition: transform 0.3s ease;
}
.pl-mobile-menu-overlay.is-open { transform: translateY(0); }
.pl-mobile-menu-overlay .pl-menu-close {
  align-self: flex-end; background: none; border: none; font-size: 1.8rem; cursor: pointer; padding: 8px;
}
.pl-mobile-menu-overlay nav { display: flex; flex-direction: column; gap: 8px; margin-top: 40px; }
.pl-mobile-menu-overlay nav a {
  font-size: 1.5rem; font-weight: 700; padding: 14px 4px; color: var(--pl-navy-950);
  border-bottom: 1px solid var(--pl-gray-100); text-decoration: none;
  opacity: 0; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease;
}
.pl-mobile-menu-overlay.is-open nav a { opacity: 1; transform: translateY(0); }
.pl-mobile-menu-overlay nav a:nth-child(1) { transition-delay: 0.05s; }
.pl-mobile-menu-overlay nav a:nth-child(2) { transition-delay: 0.10s; }
.pl-mobile-menu-overlay nav a:nth-child(3) { transition-delay: 0.15s; }
.pl-mobile-menu-overlay nav a:nth-child(4) { transition-delay: 0.20s; }
.pl-mobile-menu-overlay nav a:nth-child(5) { transition-delay: 0.25s; }
.pl-mobile-menu-overlay .pl-menu-cta { margin-top: auto; }
@media (prefers-reduced-motion: reduce) {
  .pl-mobile-menu-overlay, .pl-mobile-menu-overlay nav a { transition: none; }
}

/* ---------- Formulario multipaso — armar tarjeta (Sección 6) ---------- */
.pl-step-dot {
  flex: 1; text-align: center; padding-bottom: 10px; border-bottom: 3px solid var(--pl-gray-100);
  font-size: .78rem; color: var(--pl-gray-500); transition: border-color 0.25s ease, color 0.25s ease;
}
.pl-step-dot span {
  display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--pl-gray-100);
  color: var(--pl-gray-500); font-weight: 700; margin: 0 auto 6px; line-height: 26px; font-size: .82rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.pl-step-dot.is-active { border-color: var(--pl-navy-950); color: var(--pl-navy-950); }
.pl-step-dot.is-active span { background: var(--pl-navy-950); color: #fff; }
.pl-step-dot.is-done { border-color: #2E7D32; }
.pl-step-dot.is-done span { background: #2E7D32; color: #fff; }
.pl-step-nav { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 8px; }
@media (prefers-reduced-motion: reduce) {
  .pl-step-dot, .pl-step-dot span { transition: none; }
}

/* ---------- AI Card Design System v2 — componentes base ---------- */
.pl-card-v2 {
  background: var(--card-bg, #0b1220); color: var(--card-text, #fff);
  border-radius: var(--card-radius, 16px); box-shadow: var(--card-shadow, 0 8px 24px rgba(0,0,0,.15));
  overflow: hidden; font-family: inherit;
}
.pl-hero { padding: 48px 32px 32px; text-align: center; background: var(--card-surface, transparent); }
.pl-hero-headline { font-family: 'Space Grotesk', sans-serif; font-size: clamp(1.6rem, 5vw, 2.2rem); margin: 0 0 8px; color: var(--card-primary, inherit); }
.pl-hero-sub { color: var(--card-muted, rgba(255,255,255,.7)); margin: 0; }
.pl-about { padding: 0 32px 24px; text-align: center; }
.pl-about p { color: var(--card-muted, rgba(255,255,255,.85)); line-height: 1.6; }
.pl-services { padding: 0 24px 24px; }
.pl-services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; }
.pl-service-card { background: rgba(255,255,255,.06); border-radius: 12px; padding: 16px; }
.pl-service-card h3 { font-size: .95rem; margin: 0 0 6px; color: var(--card-accent, inherit); }
.pl-service-card p { font-size: .82rem; margin: 0; color: var(--card-muted, rgba(255,255,255,.7)); }
.pl-cta { padding: 8px 32px 24px; text-align: center; }
.pl-cta-primary {
  display: inline-block; background: var(--card-secondary, #25D366); color: #fff; font-weight: 700;
  padding: 14px 32px; border-radius: 999px; text-decoration: none;
}
.pl-social { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; padding: 0 24px 24px; }
.pl-social-link {
  background: rgba(255,255,255,.08); padding: 8px 16px; border-radius: 999px; text-decoration: none;
  color: inherit; font-size: .82rem; text-transform: capitalize;
}
.pl-card-footer { text-align: center; padding: 16px; font-size: .78rem; color: var(--card-muted, rgba(255,255,255,.5)); border-top: 1px solid rgba(255,255,255,.08); }
.pl-card-footer a { color: inherit; }

/* ---------- Formularios — estilo base para todo el sitio ---------- */
form label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  color: var(--pl-navy-950);
  margin: 20px 0 6px;
}
form label:first-of-type { margin-top: 0; }
.pl-input,
form input[type="text"], form input[type="email"], form input[type="tel"],
form input[type="url"], form input[type="number"], form select, form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: .95rem;
  border: 1.5px solid var(--pl-gray-100);
  border-radius: 10px;
  background: #fff;
  color: var(--pl-navy-950);
  font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pl-input:focus, form input:focus, form select:focus, form textarea:focus {
  outline: none;
  border-color: var(--pl-navy-950);
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}
form textarea { resize: vertical; min-height: 70px; line-height: 1.5; }
.pl-color-input {
  width: 56px; height: 44px; padding: 4px; border: 1.5px solid var(--pl-gray-100);
  border-radius: 10px; cursor: pointer; background: #fff;
}
.pl-file-input { padding: 10px; background: var(--pl-gray-50, #f7f8fa); cursor: pointer; }
.pl-file-feedback { font-size: .8rem; margin: 4px 0 4px; }
.pl-file-feedback.ok { color: #2E7D32; }
.pl-file-feedback.error { color: #C0392B; }

/* Agrupación visual: cada .pl-step es una "tarjeta" propia, separada del resto de la página */
.pl-step {
  background: #fff;
  border: 1px solid var(--pl-gray-100);
  border-radius: 16px;
  padding: 28px 28px 8px;
  box-shadow: 0 2px 12px rgba(10,24,50,.04);
}
.pl-step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.15rem;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pl-gray-50, #f0f2f5);
}
.pl-step h3:not(:first-child) { margin-top: 32px; }
.pl-step h4 { font-size: .95rem; margin: 20px 0 8px; color: var(--pl-navy-950); }
.pl-step > p { font-size: .85rem; color: var(--pl-gray-500); margin-top: -2px; }

/* Checkboxes/radios en línea con su texto (términos, incluir mapa, etc.) */
form label:has(input[type="checkbox"]:only-of-type),
form label:has(input[type="radio"]) {
  display: flex; align-items: flex-start; gap: 8px; font-weight: 400; margin: 10px 0;
}
form input[type="checkbox"], form input[type="radio"] { width: auto; margin-top: 2px; flex-shrink: 0; }
.pl-chip { display: inline-flex !important; margin: 0; }
.pl-direction-option { display: block !important; }
@media (max-width: 900px) {
  .pl-form-grid { grid-template-columns: 1fr !important; }
  .pl-step { padding: 20px 18px 8px; }
}
