/* ==========================================================
   STEAMLAB - Página de inicio pública (login.php)
   Catálogo de cursos + modales de propuesta y preinscripción.
   Usa las variables de color de assets/style.css
   ========================================================== */

.landing{min-height:100vh;display:flex;flex-direction:column}
.landing.con-modal{overflow:hidden}
.wrap{width:min(1180px,100%);margin:0 auto;padding:0 22px}
.mut{color:var(--muted)}
.req{color:var(--danger)}
[hidden]{display:none!important}

.eyebrow{
  display:inline-block;font-size:11.5px;font-weight:800;letter-spacing:.12em;
  text-transform:uppercase;color:var(--royal-600);margin-bottom:10px;
}

/* ---------- Barra superior ---------- */
.topbar{
  position:sticky;top:0;z-index:20;
  background:rgba(255,255,255,.86);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}
.topbar-in{display:flex;align-items:center;justify-content:space-between;gap:16px;height:68px}
.logo img{height:42px;width:auto;display:block}
.topnav{display:flex;align-items:center;gap:22px}
.topnav a:not(.btn){font-weight:700;font-size:14px;color:var(--royal-800)}
.topnav a:not(.btn):hover{color:var(--royal-500)}

/* ---------- Portada ---------- */
.hero{padding:56px 0 64px}
.hero-in{display:grid;grid-template-columns:1.15fr .85fr;gap:48px;align-items:center}
.hero h1{
  font-size:clamp(30px,4.2vw,48px);line-height:1.08;font-weight:900;
  color:var(--royal-900);letter-spacing:-.02em;margin-bottom:18px;
}
.hero-txt p{font-size:17px;line-height:1.6;color:var(--muted);max-width:560px}
.hero-cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.login-card{width:100%;max-width:440px;justify-self:end;scroll-margin-top:90px}
.login-card .auth-title{font-size:22px}
.login-foot{margin-top:18px;text-align:center;font-size:13px}

/* ---------- Catálogo ---------- */
#cursos{scroll-margin-top:80px;padding-bottom:72px;flex:1}
.sec-head{text-align:center;margin-bottom:34px}
.sec-head h2{font-size:clamp(26px,3vw,34px);font-weight:900;color:var(--royal-900);margin-bottom:8px}
.sec-head p{color:var(--muted)}

.cursos-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:26px}
.curso{
  display:flex;flex-direction:column;overflow:hidden;
  background:var(--surface);border:1px solid var(--border);border-radius:22px;
  box-shadow:var(--shadow-sm);transition:transform .2s ease, box-shadow .2s ease;
}
.curso:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.curso-img{
  position:relative;display:block;aspect-ratio:1/1;overflow:hidden;
  background:linear-gradient(135deg,var(--surface-2),#f5f3ff);
}
.curso-img img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .35s ease}
.curso:hover .curso-img img{transform:scale(1.03)}
.curso-ph{display:grid;place-items:center;height:100%;font-size:54px}
.precio{
  position:absolute;left:14px;bottom:14px;
  background:rgba(10,31,77,.88);color:#fff;
  font-size:13px;font-weight:800;padding:6px 12px;border-radius:999px;
}
.curso-body{display:flex;flex-direction:column;flex:1;padding:20px 22px 22px}
.curso h3{font-size:18.5px;line-height:1.3;font-weight:850;color:var(--royal-900);margin-bottom:10px}
.curso-desc{
  color:var(--muted);font-size:14px;line-height:1.55;margin-bottom:20px;
  display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden;
}
.curso-acc{display:flex;gap:10px;margin-top:auto}
.curso-acc .btn{flex:1}

.vacio{text-align:center;padding:40px;background:var(--surface);border:1px dashed var(--border);border-radius:22px}
.vacio p{color:var(--muted);margin-bottom:16px}

/* ---------- Pie ---------- */
.pie{border-top:1px solid var(--border);background:rgba(255,255,255,.6);font-size:13px;color:var(--muted)}
.pie-in{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:20px;padding-bottom:20px}

/* ---------- Modales ---------- */
.modal{
  border:0;padding:0;background:transparent;
  width:min(720px,calc(100% - 24px));max-height:calc(100dvh - 32px);margin:auto;
  overflow:visible;
}
.modal::backdrop{background:rgba(10,31,77,.55);backdrop-filter:blur(3px)}
.modal[open]{animation:modal-in .22s ease}
@keyframes modal-in{from{opacity:0;transform:translateY(14px) scale(.98)}to{opacity:1;transform:none}}
.modal-box{
  position:relative;background:var(--surface);border-radius:24px;
  max-height:calc(100dvh - 32px);overflow:auto;
  box-shadow:0 30px 80px rgba(10,31,77,.35);
}
.modal-x{
  position:absolute;top:12px;right:12px;z-index:2;
  width:38px;height:38px;padding:0;border-radius:50%;
  background:rgba(255,255,255,.92);color:var(--royal-900);
  font-size:24px;line-height:1;box-shadow:0 4px 14px rgba(10,31,77,.18);
}
.modal-x:hover{background:#fff;transform:none}
.modal-body{padding:26px 30px 8px}
.modal-body h2{font-size:24px;line-height:1.25;font-weight:900;color:var(--royal-900);margin-bottom:8px;padding-right:30px}
.modal-foot{
  position:sticky;bottom:0;display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap;
  padding:16px 30px 20px;background:linear-gradient(to top,#fff 75%,rgba(255,255,255,0));
}
.modal-foot.en-form{position:static;padding:22px 0 18px;background:none}
.btn.wa{background:linear-gradient(135deg,#22c55e,#15803d);box-shadow:0 10px 24px rgba(22,163,74,.25)}

.mp-img{display:flex;justify-content:center;padding:22px 22px 0;background:linear-gradient(180deg,var(--surface-2),#fff)}
.mp-img img{width:auto;max-width:100%;max-height:300px;object-fit:contain;display:block;border-radius:18px;box-shadow:var(--shadow-sm)}
.mp-img.sin-img{align-items:center;height:160px;font-size:60px;padding:0}
.mp-precio{
  display:inline-block;margin:2px 0 12px;padding:6px 14px;border-radius:999px;
  background:var(--royal-100);color:var(--royal-800);font-weight:800;font-size:14px;
}
.mp-desc p{color:#334766;line-height:1.65;font-size:15px;margin-bottom:10px}
.mp-sub{font-size:16px;font-weight:850;color:var(--royal-900);margin:20px 0 10px}
.mp-lista{list-style:none;display:grid;gap:8px;margin-bottom:12px}
.mp-lista li{
  background:var(--surface-2);border:1px solid var(--border);border-radius:12px;
  padding:10px 14px;font-size:14px;line-height:1.45;color:var(--text);
}
.mp-lista.incluye{grid-template-columns:1fr 1fr}
.mp-lista.incluye li{background:#fff}

/* Formulario dentro del modal */
.modal-form{max-width:640px;margin:0 auto}
.modal-form .modal-body{padding-bottom:4px}
.modal-form .alert{display:block;font-weight:600}
.modal-form .alert ul{margin:6px 0 0 18px}
.modal-form textarea{min-height:76px}
.fila{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}
.tipos{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.tipo{
  position:relative;margin:0;text-transform:none;letter-spacing:0;font-size:13.5px;font-weight:700;color:var(--text);
  border:1.6px solid var(--border);border-radius:14px;padding:12px 8px;text-align:center;cursor:pointer;background:#fff;transition:.15s;
}
.tipo span{display:block;font-size:22px;margin-bottom:4px}
.tipo input{position:absolute;opacity:0;pointer-events:none}
.tipo:has(input:checked){border-color:var(--royal-500);background:var(--surface-2);box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.chk{display:flex;gap:10px;align-items:flex-start;margin:14px 0 0;text-transform:none;letter-spacing:0;font-size:13px;font-weight:500;color:var(--muted);line-height:1.45}
.chk input{width:18px;height:18px;flex-shrink:0;margin-top:1px;accent-color:var(--royal-600)}
.trampa{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.gracias{text-align:center;padding:40px 34px 30px}
.gracias h2{padding:0}
.gracias p{color:var(--muted);margin:6px 0 22px;line-height:1.55}
.ok-ico{font-size:52px;margin-bottom:6px}

/* ---------- Responsive ---------- */
@media(max-width:900px){
  .hero{padding:34px 0 44px}
  .hero-in{grid-template-columns:1fr;gap:30px}
  .login-card{justify-self:stretch;max-width:none}
}
@media(max-width:560px){
  .wrap{padding:0 16px}
  .topnav{gap:14px}
  .topnav a[href^="https://wa.me"]{display:none}
  .logo img{height:34px}
  .auth-card.login-card{padding:26px 20px}
  .cursos-grid{grid-template-columns:1fr}
  .modal-body{padding:22px 20px 6px}
  .modal-foot{padding:14px 20px 18px}
  .modal-foot .btn{flex:1}
  .mp-lista.incluye,.fila{grid-template-columns:1fr}
  .mp-img img{max-height:220px}
  .tipos{gap:6px}
  .tipo{font-size:12px;padding:10px 4px}
}
