/* Lecciones de curso (Comercio Electrónico, Herramientas Electrónicas).
   Portada, pestañas y anchos con la paleta del sitio; claro y oscuro.
   Los colores de los plugins de curso en modo oscuro los adapta oscuro.js. */

body.jl-leccion .jt-head { display: none; }
body.jl-leccion .jt-main { padding-top: 32px; }

/* ---------- Portada ---------- */
body.jl-leccion .jl-hero {
  --jl-navy: #13294b;
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
  margin: 0 0 22px; padding: 30px 34px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, #0e2a55 0%, #13294b 55%, #091631 100%); color: #fff;
  box-shadow: 0 24px 50px -30px rgba(9, 22, 49, .75);
  isolation: isolate;
}
body.jl-leccion .jl-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 82% 18%, rgba(245, 196, 0, .16), transparent 42%),
    radial-gradient(circle at 18% 120%, rgba(34, 158, 217, .35), transparent 55%),
    radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.3px) 0 0 / 24px 24px;
}
body.jl-leccion .jl-hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px;
  background: linear-gradient(90deg, #f5c400 0 25%, #1d73b8 25% 50%, #5aa9ef 50% 75%, #01dbfe 75%);
}
html.lw-dark body.jl-leccion .jl-hero { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 50px -30px #000; }
body.jl-leccion .jl-kick {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px;
  background: #f5c400; color: #15181f; font: 800 11.5px/1 var(--jt-font, Inter, sans-serif); letter-spacing: .1em; text-transform: uppercase;
}
body.jl-leccion .jl-title {
  margin: 0; max-width: 24ch; color: #fff;
  font: 800 clamp(28px, 3.6vw, 44px)/1.08 var(--jt-display, "Inter Tight", Inter, sans-serif); letter-spacing: -.02em;
  text-wrap: balance;
}
body.jl-leccion .jl-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
body.jl-leccion .jl-meta li {
  margin: 0; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06); color: rgba(255, 255, 255, .86); font: 600 13px/1.2 var(--jt-font, Inter, sans-serif);
}
body.jl-leccion .jl-mark {
  display: grid; place-items: center; gap: 10px; width: 148px; padding: 18px 14px 16px; border-radius: 18px; text-align: center;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .16); backdrop-filter: blur(4px);
}
body.jl-leccion .jl-mark img { display: block; width: 54px; height: 54px; object-fit: contain; border-radius: 0; }
body.jl-leccion .jl-mark b { display: block; color: #fff; font: 800 13px/1.2 var(--jt-font, Inter, sans-serif); letter-spacing: .02em; }
body.jl-leccion .jl-mark span { display: block; margin-top: 3px; color: #f5c400; font: 800 10.5px/1.2 var(--jt-font, Inter, sans-serif); letter-spacing: .12em; text-transform: uppercase; }
@media (max-width: 760px) {
  body.jl-leccion .jl-hero { grid-template-columns: 1fr; padding: 24px 20px 26px; border-radius: 18px; gap: 0; }
  body.jl-leccion .jl-mark { display: none; }
  body.jl-leccion .jl-meta li { font-size: 12px; padding: 5px 10px; }
}

/* ---------- Pestañas ---------- */
body.jl-leccion .learndash-wrapper .ld-tabs { margin: 0; }
body.jl-leccion .learndash-wrapper .ld-tabs-navigation {
  gap: 4px; padding: 5px; border: 1px solid var(--jt-line); border-radius: 16px; background: var(--jt-bg2);
}
body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab {
  gap: 8px; padding: 12px 18px; border-radius: 12px; color: var(--jt-mute); font: 700 14.5px/1.2 var(--jt-font);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab:hover { color: var(--jt-ink); background: rgba(127, 140, 160, .1); }
body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active {
  color: var(--jt-ink); background: var(--jt-card); box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 6px 16px -8px rgba(16, 24, 40, .25);
}
html.lw-dark body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active { background: #262b35; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active::after {
  left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 3px; background: var(--jt-gold);
}
body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab:focus-visible { outline: 3px solid var(--jt-gold); outline-offset: 1px; }
body.jl-leccion .learndash-wrapper .ld-tab .ld-icon { color: inherit; opacity: .9; }
body.jl-leccion .learndash-wrapper .ld-tab.ld-active .ld-icon { color: var(--jt-acc); opacity: 1; }
body.jl-leccion .learndash-wrapper .ld-tab-content { padding: 26px 0 8px; }
@media (max-width: 640px) {
  body.jl-leccion .learndash-wrapper .ld-tabs-navigation { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; padding: 5px 12px; }
  body.jl-leccion .learndash-wrapper .ld-tabs-navigation .ld-tab { padding: 11px 13px; font-size: 13.5px; }
  body.jl-leccion .learndash-wrapper .ld-tab-content { padding-top: 18px; }
}

/* ---------- Un solo ancho: todo el contenido se alinea con la portada y las pestañas ---------- */
body.jl-leccion .ld-tab-content [class$="-experience"],
body.jl-leccion .ld-tab-content .ce1x,
body.jl-leccion .ld-tab-content .ce1-ext,
body.jl-leccion #jc-ej-fijo:not(.is-pinned) > #jc-ej-banner,
body.jl-leccion #jc-ej-fijo:not(.is-pinned) > #jc-ej-progreso { max-width: none !important; margin-left: 0 !important; margin-right: 0 !important; }
body.jl-leccion #jc-ej-fijo:not(.is-pinned) > #jc-ej-banner,
body.jl-leccion #jc-ej-fijo:not(.is-pinned) > #jc-ej-progreso { width: auto !important; }
body.jl-leccion .ld-tab-content .jt-divi > :first-child,
body.jl-leccion .ld-tab-content > :first-child { margin-top: 0; }

/* ---------- Modo oscuro: mientras se adaptan los colores de los plugins no se ve el blanco ---------- */
@keyframes jl-ver { to { visibility: visible; } }
html.lw-dark:not(.jl-dk) body.jl-leccion .ld-tabs-content,
html.lw-dark:not(.jl-dk) body.jl-leccion .ce-nav,
html.lw-dark:not(.jl-dk) body.jl-leccion [class$="-gate"] { visibility: hidden; animation: jl-ver 0s 1.2s forwards; }
/* Imágenes claras sobre superficies oscuras: un borde tenue las separa del fondo. */
html.lw-dark body.jl-leccion .ld-tab-content img:not([src*="Logotipo"]):not([src*=".svg"]) { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }

@media print {
  body.jl-leccion .jl-hero { background: none; color: #000; box-shadow: none; padding: 0; }
  body.jl-leccion .jl-hero::before, body.jl-leccion .jl-hero::after, body.jl-leccion .jl-mark, body.jl-leccion .jl-meta { display: none; }
  body.jl-leccion .jl-title { color: #000; }
}
html.lw-dark body.jl-leccion .jl-tinta { color: #15181f !important; -webkit-text-fill-color: #15181f; }
html.jl-quieto *, html.jl-quieto *::before, html.jl-quieto *::after { transition: none !important; }
