/* ============================================================
   FUNDETEC Leads System v2 — Barranquilla
   Professional minimalist design
   Palette: Navy #1a3a8a · Gold #f5c200 · White
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1a3a8a;
  --navy-dark:  #0f2460;
  --navy-light: #2553c5;
  --gold:       #f5c200;
  --gold-dark:  #d4a900;
  --gold-light: #ffe066;
  --green:      #25d366;
  --green-dark: #1da851;
  --white:      #ffffff;
  --bg:         #f4f6fb;
  --bg-warm:    #fafbff;
  --text:       #1a1a2e;
  --text-muted: #6b7194;
  --border:     #e2e6f0;
  --radius:     14px;
  --radius-sm:  10px;
  --shadow-sm:  0 2px 8px rgba(26,58,138,.06);
  --shadow-md:  0 8px 24px rgba(26,58,138,.10);
  --shadow-lg:  0 16px 48px rgba(26,58,138,.14);
  --font:       'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 16px 12px 120px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* === CARD CONTAINER === */
.funnel-card {
  background: var(--white);
  border-radius: 20px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

/* === HEADER === */
.header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  padding: 18px 22px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.logo-img {
  height: 42px;
  width: auto;
  display: block;
}
.logo-fallback {
  display: flex;
  align-items: center;
}
.logo-text {
  font-weight: 800;
  font-size: 20px;
  color: var(--navy);
  letter-spacing: 2px;
}
.sede-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--navy);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 50px;
  white-space: nowrap;
}
.sede-badge svg {
  flex-shrink: 0;
  stroke: var(--gold);
}

/* === CONTENT AREA === */
.content {
  padding: 22px 22px 28px;
}

/* === PROGRESS === */
.progress-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.progress-bar {
  flex: 1;
  height: 5px;
  background: #e8ecf4;
  border-radius: 50px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--navy), var(--gold));
  border-radius: 50px;
  transition: width .4s cubic-bezier(.4,0,.2,1);
}
.progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* === STEPS === */
.step { display: none; }
.step.active {
  display: block;
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.step-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  line-height: 1.3;
  margin-bottom: 4px;
}
h2.step-title { font-size: 18px; }
.step-desc {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.4;
}

/* === 2-COLUMN PROGRAMS GRID === */
.programs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.program-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  transition: all .2s ease;
  position: relative;
  min-height: 0;
}
.program-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.program-card:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,138,.12);
}
.program-card.selected {
  border-color: var(--navy);
  background: linear-gradient(145deg, #f0f4ff, #e8eeff);
  box-shadow: var(--shadow-md);
}
.program-card.selected .program-icon {
  background: var(--navy);
  color: var(--gold);
}
.program-card.selected .program-chip {
  background: var(--navy);
  color: var(--white);
}

/* Icon */
.program-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef1fa;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.program-icon svg { width: 20px; height: 20px; }
.program-card:hover .program-icon {
  background: var(--navy);
  color: var(--gold);
}

/* Name */
.program-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Chip */
.program-chip {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .6px;
  padding: 3px 8px;
  border-radius: 50px;
  background: var(--gold);
  color: var(--navy-dark);
  transition: all .2s ease;
}

/* === BACK BUTTON === */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  margin-bottom: 16px;
  transition: transform .2s;
}
.back-btn:hover { transform: translateX(-3px); }

/* === SELECTED PROGRAM BOX === */
.selected-program {
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  color: var(--white);
}
.selected-program .sp-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.6);
  font-weight: 700;
  margin-bottom: 2px;
}
.selected-program .sp-name {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
}
.selected-program .sp-desc {
  font-size: 12.5px;
  color: rgba(255,255,255,.8);
  line-height: 1.45;
  margin-top: 6px;
}

/* === FORM === */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.form-group input:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(26,58,138,.08);
}
.form-group input::placeholder { color: #b0b6cc; }
.form-group input.error {
  border-color: #e53e3e;
  box-shadow: 0 0 0 3px rgba(229,62,62,.08);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* === SUBMIT BUTTON === */
.btn-submit {
  width: 100%;
  padding: 15px;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  background: var(--green);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(37,211,102,.3);
  transition: all .2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,.4); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}
.btn-loading { display: flex; align-items: center; gap: 8px; }
.spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === LEGAL & TRUST === */
.legal {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
  line-height: 1.4;
}
.trust-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}
.trust-badges span {
  background: #f4f6fb;
  border: 1px solid var(--border);
  padding: 6px 10px;
  border-radius: 50px;
  font-size: 11px;
  color: var(--navy);
  font-weight: 600;
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  max-width: 480px;
  width: calc(100% - 24px);
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  border-top: 3px solid var(--gold);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  transition: transform .5s cubic-bezier(.2,.9,.3,1.2);
}
.cookie-banner.show { transform: translateX(-50%) translateY(0); }
.cookie-banner p {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.cookie-accept {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
  transition: all .15s;
}
.cookie-accept:hover { background: var(--navy-dark); }

@media (max-width: 480px) {
  .cookie-banner { flex-direction: column; text-align: center; }
  .cookie-accept { width: 100%; }
}

/* ============================================================
   GRACIAS PAGE
   ============================================================ */

.card-thanks .content { text-align: center; }

.check-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 16px;
}
.check-svg { width: 80px; height: 80px; }
.check-circle {
  fill: none;
  stroke: var(--navy);
  stroke-width: 4;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: drawCircle .6s ease-out forwards;
}
.check-path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: drawCheck .4s ease-out .5s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawCheck  { to { stroke-dashoffset: 0; } }

.thanks-title {
  font-size: 24px;
  color: var(--navy);
  font-weight: 800;
  margin-bottom: 6px;
}
.thanks-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.carrera-tag {
  background: var(--navy);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
  text-align: left;
}
.carrera-tag .ct-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255,255,255,.6);
  font-weight: 700;
  margin-bottom: 2px;
}
.carrera-tag .ct-name {
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
}

.frase-motivacional {
  background: #f4f6fb;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
}
.frase-icono { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.frase-texto {
  font-size: 14px;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}

/* WhatsApp CTA */
.btn-wa {
  display: block;
  width: 100%;
  padding: 16px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--green);
  box-shadow: 0 6px 20px rgba(37,211,102,.35);
  transition: all .2s;
  animation: pulseWa 2s infinite;
}
.btn-wa:hover { background: var(--green-dark); transform: translateY(-2px); }

@keyframes pulseWa {
  0%   { box-shadow: 0 6px 20px rgba(37,211,102,.35); }
  50%  { box-shadow: 0 8px 28px rgba(37,211,102,.6); }
  100% { box-shadow: 0 6px 20px rgba(37,211,102,.35); }
}

.wa-urgencia {
  text-align: center;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 12px;
  margin: 6px 0 0;
}

/* Social */
.social-section { margin-top: 24px; }
.social-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 700;
  margin-bottom: 10px;
  text-align: center;
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.social-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  background: #f4f6fb;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 11px;
  transition: all .2s;
}
.social-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--navy);
}
.social-ico { font-size: 20px; }

.back-home {
  display: block;
  text-align: center;
  margin-top: 18px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color .2s;
}
.back-home:hover { color: var(--navy); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 380px) {
  body { padding: 8px 8px 100px; }
  .funnel-card { border-radius: 16px; }
  .content { padding: 18px 16px 24px; }
  .header { padding: 14px 16px; }
  .programs-grid { gap: 8px; }
  .program-card { padding: 12px 8px 10px; }
  .program-name { font-size: 11.5px; }
  .program-icon { width: 36px; height: 36px; }
  .program-icon svg { width: 18px; height: 18px; }
  .form-row { grid-template-columns: 1fr; }
  .sede-badge { font-size: 10px; padding: 5px 10px; }
}

@media (min-width: 381px) and (max-width: 520px) {
  .program-card { padding: 14px 10px 12px; }
  .program-name { font-size: 12px; }
}
