
:root{
  --navy:#0b3568;
  --blue:#1e78ba;
  --blue2:#29a3c8;
  --aqua:#20b8c1;
  --green:#22b985;
  --ink:#102f4f;
  --muted:#6f8398;
  --line:#d8e6ef;
  --soft:#f5f9fc;
  --soft2:#edf6fb;
  --white:#fff;
  --shadow:0 18px 50px rgba(16,67,111,.09);
  --max:1240px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  background:#f4f9fc;
  color:var(--ink);
  font:16px/1.55 Inter,Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%;height:auto}
h1,h2,h3{margin:0;font-family:Manrope,Inter,sans-serif;line-height:1.08;letter-spacing:-.035em}
p{margin:0}
.container{width:min(var(--max),calc(100% - 44px));margin-inline:auto}

/* Header: un solo logo */
.topbar{
  position:sticky;
  top:0;
  z-index:100;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(14px);
}
.nav{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{display:flex;align-items:center;flex:0 0 auto}
.brand img{
  width:92px;
  max-height:68px;
  object-fit:contain;
}
.links{
  display:flex;
  align-items:center;
  gap:24px;
}
.links a{
  color:#426079;
  font-size:.86rem;
  font-weight:750;
}
.links a:hover{color:var(--blue)}
.nav-current{
  display:inline-flex;
  align-items:center;
  min-height:42px;
  padding:0 17px;
  border-radius:999px;
  background:#eaf6fb;
  border:1px solid #cde5ef;
  color:#176fae;
  font-size:.82rem;
  font-weight:850;
}
.menu{
  display:none;
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#fff;
  color:var(--blue);
  font-size:1.15rem;
  cursor:pointer;
}

/* Layout */
.wizard-page{
  min-height:calc(100vh - 82px);
  padding:38px 0 64px;
  background:
    radial-gradient(circle at 15% 8%,rgba(36,185,193,.055),transparent 25%),
    linear-gradient(180deg,#f7fbfd 0%,#eef6fa 100%);
}
.wizard-shell{
  display:grid;
  grid-template-columns:300px minmax(0,1fr);
  gap:24px;
  align-items:start;
}

/* Sidebar: sin logo repetido */
.wizard-aside{
  position:sticky;
  top:106px;
  overflow:hidden;
  padding:28px 25px 24px;
  border-radius:26px;
  color:#fff;
  background:linear-gradient(155deg,#176faf 0%,#258dc1 55%,#2aa6c5 100%);
  box-shadow:0 20px 46px rgba(23,111,175,.16);
}
.aside-glow{
  position:absolute;
  width:300px;
  height:300px;
  right:-170px;
  top:-145px;
  border-radius:50%;
  background:radial-gradient(circle,rgba(178,255,246,.25),transparent 68%);
  pointer-events:none;
}
.aside-head,
.wizard-steps,
.aside-note{position:relative;z-index:1}
.smart-kicker{
  color:#d8fff8;
  font-size:.69rem;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.aside-head h2{
  margin-top:10px;
  font-size:1.85rem;
  line-height:1.08;
}
.aside-head p{
  margin-top:11px;
  color:#e1f2f8;
  font-size:.83rem;
  line-height:1.55;
}
.wizard-steps{
  display:grid;
  gap:9px;
  margin-top:25px;
}
.wstep{
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  align-items:center;
  padding:10px 11px;
  border-radius:14px;
  color:#d7e9f3;
  background:rgba(255,255,255,.045);
  border:1px solid transparent;
}
.wstep i{
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.11);
  border:1px solid rgba(255,255,255,.18);
  font-style:normal;
  font-size:.72rem;
  font-weight:900;
}
.wstep b{
  display:block;
  color:#fff;
  font-size:.79rem;
}
.wstep span{
  display:block;
  margin-top:1px;
  color:#c9e0ec;
  font-size:.66rem;
}
.wstep.active{
  background:rgba(255,255,255,.13);
  border-color:rgba(255,255,255,.18);
}
.wstep.active i{
  background:#48d2c5;
  border-color:#48d2c5;
  color:#073d5d;
}
.aside-note{
  margin-top:22px;
  padding:15px;
  border-radius:16px;
  background:rgba(8,56,105,.18);
  border:1px solid rgba(255,255,255,.12);
}
.aside-note span{
  display:block;
  color:#c8f7f1;
  font-size:.65rem;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.08em;
}
.aside-note b{
  display:block;
  margin-top:3px;
  font-size:1.05rem;
}
.aside-note small{
  display:block;
  margin-top:5px;
  color:#d7eaf4;
  font-size:.65rem;
  line-height:1.45;
}

/* Main card */
.wizard-main{
  min-width:0;
  padding:34px 38px 30px;
  border:1px solid var(--line);
  border-radius:26px;
  background:#fff;
  box-shadow:var(--shadow);
}
.wizard-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:28px;
  padding-bottom:23px;
  border-bottom:1px solid var(--line);
}
.kicker{
  display:inline-flex;
  align-items:center;
  gap:9px;
  color:#18aeb8;
  font-size:.71rem;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.kicker:before{
  content:"";
  width:25px;
  height:2px;
  background:linear-gradient(90deg,var(--blue),var(--aqua));
}
.wizard-top h1{
  margin-top:8px;
  font-size:clamp(2rem,3vw,2.6rem);
}
.time-chip{
  flex:0 0 auto;
  min-width:112px;
  padding:11px 14px;
  border-radius:14px;
  background:#f1f8fb;
  border:1px solid #dbeaf2;
  text-align:center;
}
.time-chip b{
  display:block;
  color:var(--blue);
  font-size:.98rem;
}
.time-chip span{
  display:block;
  color:#71869a;
  font-size:.65rem;
  margin-top:1px;
}

.progress{
  height:6px;
  margin:21px 0 29px;
  overflow:hidden;
  border-radius:99px;
  background:#eaf1f5;
}
.progress span{
  display:block;
  width:25%;
  height:100%;
  border-radius:99px;
  background:linear-gradient(90deg,var(--blue),var(--aqua));
  transition:.3s;
}

.form-step{display:none}
.form-step.active{
  display:block;
  animation:stepIn .28s ease;
}
@keyframes stepIn{
  from{opacity:0;transform:translateX(7px)}
  to{opacity:1;transform:none}
}
.form-step h2{
  margin-bottom:22px;
  font-size:1.5rem;
}

.grid2{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:15px 16px;
}
.field{margin-bottom:16px}
.field label,
.field legend{
  display:block;
  margin-bottom:7px;
  color:#60788e;
  font-size:.72rem;
  font-weight:850;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.field input,
.field select,
.field textarea{
  width:100%;
  min-height:48px;
  padding:12px 13px;
  border:1px solid #cedee9;
  border-radius:13px;
  background:#fbfdff;
  color:var(--ink);
  font:inherit;
  outline:none;
  transition:.18s;
}
.field textarea{
  min-height:116px;
  resize:vertical;
}
.field input:hover,
.field select:hover,
.field textarea:hover{
  border-color:#b8d3e3;
}
.field input:focus,
.field select:focus,
.field textarea:focus{
  border-color:#69b5d6;
  background:#fff;
  box-shadow:0 0 0 4px rgba(41,157,197,.09);
}
.choices{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
}
.check{
  min-width:0;
  display:flex;
  align-items:flex-start;
  gap:9px;
  padding:11px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  color:#455f76;
  font-size:.8rem;
  line-height:1.4;
  cursor:pointer;
}
.check:hover{
  background:#f8fcfe;
  border-color:#a9ccdd;
}
.check input{
  margin-top:3px;
  accent-color:var(--aqua);
}

.wizard-actions{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:26px;
  padding-top:22px;
  border-top:1px solid var(--line);
}
.btn{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 20px;
  border:1px solid transparent;
  border-radius:999px;
  font:800 .83rem Inter,Arial,sans-serif;
  cursor:pointer;
}
.btn-primary{
  color:#fff;
  background:linear-gradient(110deg,#1d74b5,#25a5c4);
  box-shadow:0 10px 24px rgba(29,116,181,.16);
}
.btn-outline{
  color:#446078;
  background:#fff;
  border-color:#cbdde8;
}
.errorbox{
  display:none;
  margin-bottom:16px;
  padding:11px 13px;
  border:1px solid #f0c6cb;
  border-radius:12px;
  background:#fff2f3;
  color:#a1414a;
  font-size:.8rem;
}

/* Processing */
.processing{
  position:fixed;
  inset:0;
  z-index:2000;
  display:none;
  place-items:center;
  background:rgba(7,35,64,.70);
  backdrop-filter:blur(8px);
}
.processing.show{display:grid}
.processing-card{
  width:min(420px,calc(100% - 36px));
  padding:31px;
  border-radius:24px;
  background:#fff;
  text-align:center;
  box-shadow:0 24px 70px rgba(0,0,0,.18);
}
.spin{
  width:60px;
  height:60px;
  margin:0 auto 18px;
  border:5px solid #e4eef4;
  border-top-color:var(--aqua);
  border-right-color:var(--blue);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
.processing-card h3{font-size:1.4rem}
.processing-card p{
  margin-top:8px;
  color:var(--muted);
  font-size:.82rem;
}

/* Tablet */
@media(max-width:1020px){
  .wizard-shell{
    grid-template-columns:1fr;
  }
  .wizard-aside{
    position:relative;
    top:auto;
    padding:22px;
  }
  .aside-head{
    max-width:680px;
  }
  .wizard-steps{
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:8px;
  }
  .wstep{
    grid-template-columns:1fr;
    text-align:center;
    padding:11px 8px;
  }
  .wstep i{margin:auto}
  .wstep span{display:none}
  .aside-note{display:none}
}

/* Mobile */
@media(max-width:780px){
  .container{width:calc(100% - 30px)}
  .nav{min-height:72px}
  .brand img{width:76px;max-height:58px}
  .menu{
    display:inline-flex;
    align-items:center;
    justify-content:center;
  }
  .links{display:none}
  .links.open{
    position:absolute;
    top:calc(100% + 8px);
    left:15px;
    right:15px;
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:4px;
    padding:12px;
    border:1px solid var(--line);
    border-radius:17px;
    background:#fff;
    box-shadow:var(--shadow);
  }
  .links.open a,
  .links.open .nav-current{
    width:100%;
    min-height:42px;
    justify-content:flex-start;
    padding:10px 12px;
    border-radius:11px;
  }
  .wizard-page{
    padding:24px 0 46px;
  }
  .wizard-shell{gap:14px}
  .wizard-aside{
    padding:18px;
    border-radius:20px;
  }
  .aside-head h2{
    font-size:1.45rem;
  }
  .aside-head p{
    font-size:.78rem;
  }
  .wizard-steps{
    margin-top:18px;
    grid-template-columns:repeat(4,1fr);
  }
  .wstep{
    padding:8px 5px;
    background:rgba(255,255,255,.055);
  }
  .wstep b{
    margin-top:4px;
    font-size:.65rem;
    line-height:1.2;
  }
  .wstep i{
    width:29px;
    height:29px;
  }
  .wizard-main{
    padding:23px 18px 20px;
    border-radius:21px;
  }
  .wizard-top{
    align-items:flex-start;
    gap:14px;
  }
  .wizard-top h1{
    font-size:1.9rem;
  }
  .time-chip{
    min-width:88px;
    padding:9px;
  }
  .grid2,
  .choices{
    grid-template-columns:1fr;
  }
  .form-step h2{
    font-size:1.3rem;
  }
}

/* Small phones */
@media(max-width:520px){
  .wizard-top{
    flex-direction:column;
  }
  .time-chip{
    display:flex;
    align-items:center;
    gap:7px;
    min-width:0;
    text-align:left;
  }
  .wizard-steps{
    grid-template-columns:repeat(2,1fr);
  }
  .wstep{
    grid-template-columns:30px minmax(0,1fr);
    text-align:left;
  }
  .wstep i{margin:0}
  .wizard-actions{
    flex-direction:column-reverse;
  }
  .wizard-actions .btn{
    width:100%;
  }
}


/* Ayudas contextuales del formulario */
.field-help{
  display:block;
  margin-top:6px;
  color:#8296a8;
  font-size:.68rem;
  line-height:1.45;
  text-transform:none;
  letter-spacing:0;
  font-weight:500;
}


/* ===== Paso 3: selector visual de necesidades de financiamiento ===== */
.project-picker legend{
  margin-bottom:6px;
}
.choices-visual{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.choice-card{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:14px;
  min-height:112px;
  padding:16px 18px;
  border:1px solid #cfe0eb;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fcff 100%);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
  box-shadow:0 8px 22px rgba(16,67,111,.04);
}
.choice-card:hover{
  transform:translateY(-2px);
  border-color:#afd3e4;
  box-shadow:0 16px 30px rgba(16,67,111,.08);
}
.choice-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.choice-ui{
  position:relative;
  flex:0 0 auto;
}
.choice-icon{
  width:56px;
  height:56px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg,#eaf6fb 0%,#d9eef7 100%);
  border:1px solid #d4e6f0;
  font-size:1.55rem;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7);
}
.choice-tick{
  position:absolute;
  right:-4px;
  top:-4px;
  width:22px;
  height:22px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#1fbf86;
  color:#fff;
  font-size:.78rem;
  font-weight:900;
  box-shadow:0 8px 18px rgba(31,191,134,.28);
  opacity:0;
  transform:scale(.75);
  transition:.18s ease;
}
.choice-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:5px;
  padding-top:2px;
}
.choice-copy strong{
  color:#163d67;
  font-size:.93rem;
  line-height:1.25;
}
.choice-copy small{
  color:#70869b;
  font-size:.76rem;
  line-height:1.45;
}

/* checked state */
.choice-card:has(input:checked){
  border-color:#79c9ce;
  background:linear-gradient(180deg,#f5fefe 0%,#eefafd 100%);
  box-shadow:0 16px 32px rgba(41,157,197,.10);
}
.choice-card input:checked ~ .choice-ui .choice-icon{
  background:linear-gradient(135deg,#d9faf5 0%,#cfeefb 100%);
  border-color:#99d8df;
}
.choice-card input:checked ~ .choice-ui .choice-tick{
  opacity:1;
  transform:scale(1);
}
.choice-card input:checked ~ .choice-copy strong{
  color:#0f5f85;
}

/* small screens */
@media(max-width:780px){
  .choices-visual{
    grid-template-columns:1fr;
    gap:12px;
  }
  .choice-card{
    min-height:98px;
    padding:14px;
    border-radius:18px;
  }
  .choice-icon{
    width:50px;
    height:50px;
    border-radius:14px;
    font-size:1.35rem;
  }
}


/* ===== Paso 4: fondos ejecutados anteriormente con logos ===== */
.prior-funds-picker{
  margin-top:2px;
}
.choices-funds{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  margin-top:14px;
}
.fund-card{
  position:relative;
  display:flex;
  align-items:center;
  gap:16px;
  min-height:108px;
  padding:16px 18px;
  border:1px solid #cfe0eb;
  border-radius:20px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fcff 100%);
  box-shadow:0 8px 22px rgba(16,67,111,.04);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.fund-card:hover{
  transform:translateY(-2px);
  border-color:#afd3e4;
  box-shadow:0 16px 30px rgba(16,67,111,.08);
}
.fund-card input{
  position:absolute;
  opacity:0;
  pointer-events:none;
}
.fund-logo-wrap{
  flex:0 0 auto;
  width:92px;
  height:58px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:8px;
  border-radius:16px;
  background:#ffffff;
  border:1px solid #d7e6ef;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.72);
}
.fund-logo{
  width:100%;
  height:100%;
  object-fit:contain;
}
.fund-card-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:5px;
}
.fund-card-copy strong{
  color:#163d67;
  font-size:.95rem;
  line-height:1.2;
}
.fund-card-copy small{
  color:#70869b;
  font-size:.76rem;
  line-height:1.4;
}
.fund-tick{
  position:absolute;
  right:14px;
  top:14px;
  width:24px;
  height:24px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#1fbf86;
  color:#fff;
  font-size:.78rem;
  font-weight:900;
  opacity:0;
  transform:scale(.72);
  transition:.18s ease;
  box-shadow:0 8px 18px rgba(31,191,134,.28);
}
.fund-card:has(input:checked){
  border-color:#79c9ce;
  background:linear-gradient(180deg,#f5fefe 0%,#eefafd 100%);
  box-shadow:0 16px 32px rgba(41,157,197,.10);
}
.fund-card:has(input:checked) .fund-logo-wrap{
  border-color:#99d8df;
  background:#fdfefe;
}
.fund-card:has(input:checked) .fund-card-copy strong{
  color:#0f5f85;
}
.fund-card:has(input:checked) .fund-tick{
  opacity:1;
  transform:scale(1);
}

@media(max-width:780px){
  .choices-funds{
    grid-template-columns:1fr;
    gap:12px;
  }
  .fund-card{
    min-height:96px;
    padding:14px;
    border-radius:18px;
    gap:13px;
  }
  .fund-logo-wrap{
    width:82px;
    height:54px;
    border-radius:14px;
  }
}
