/* ==========================================================================
   Sitio público y autenticación. Reutiliza las variables y clases de app.css.
   ========================================================================== */

/* ---------- Encabezado de páginas interiores ---------- */
.page-hero { background: var(--lb-ink); color: #cfe0dc; padding: clamp(2.5rem, 6vw, 4.5rem) 0; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(255, 255, 255, .045) 39px 40px); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { color: #fff; max-width: 22ch; }
.page-hero .lead { color: #b3ccc6; max-width: 56ch; margin: 1rem 0 0; }
.page-hero .crumbs { margin: 0 0 .75rem; font-size: .9rem; }
.page-hero .crumbs a { color: var(--lb-marigold); }
.page-hero a { color: var(--lb-marigold); }

/* ---------- Hero de inicio ---------- */
.hero { background: radial-gradient(60rem 28rem at 78% 12%, rgba(20, 112, 106, .45), transparent 65%), var(--lb-ink); color: #cfe0dc; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 6.5rem); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(to bottom, transparent 0 47px, rgba(255, 255, 255, .04) 47px 48px); pointer-events: none; }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.2vw, 4rem); max-width: 16ch; text-wrap: balance; }
.hero-sub { font-family: var(--lb-serif); font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--lb-marigold); margin: 1.25rem 0 .75rem; max-width: none; }
.hero .lead { color: #b3ccc6; max-width: 46ch; }

/* Hoja de libro mayor: el elemento memorable del inicio */
.ledger { position: relative; max-width: 30rem; margin-inline: auto; padding: 0 0 3.5rem; }
.ledger-sheet { background: #fbfaf5 repeating-linear-gradient(to bottom, transparent 0 35px, rgba(20, 112, 106, .14) 35px 36px); color: var(--lb-ink); border-radius: 6px; padding: 1.4rem 1.5rem 1.2rem 3.2rem; position: relative; transform: rotate(-1.6deg); box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .55), 0 2px 0 rgba(255, 255, 255, .5) inset; }
.ledger-sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: 2.3rem; width: 2px; background: rgba(184, 125, 12, .55); }
.ledger-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .55rem; margin-bottom: .2rem; font-size: .8rem; color: var(--lb-muted); }
.ledger-head strong { font-family: var(--lb-serif); font-size: 1.05rem; color: var(--lb-ink); }
.ledger-rows { list-style: none; margin: 0; padding: 0; }
.ledger-rows li, .ledger-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; min-height: 36px; line-height: 36px; font-size: .98rem; }
.ledger .num { font-variant-numeric: tabular-nums lining-nums; font-weight: 600; }
.ledger .num.is-neg { color: var(--lb-muted); }
.ledger-total { margin-top: .35rem; border-top: 2px solid var(--lb-ink); font-family: var(--lb-serif); font-size: 1.5rem; font-weight: 700; line-height: 3rem; min-height: 3rem; }
.ledger-total .num { color: var(--lb-teal-700); }
.ledger-chip { position: absolute; right: -.5rem; bottom: 0; width: 15.5rem; background: #fff; color: var(--lb-ink); border-radius: 12px; padding: .9rem 1rem; box-shadow: 0 18px 40px -15px rgba(0, 0, 0, .55); font-size: .88rem; line-height: 1.25; }
.ledger-chip small { color: var(--lb-muted); }

/* ---------- Cómo funciona: secuencia real, numerada con contador ---------- */
.how-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; position: relative; }
.how-steps li { counter-increment: step; position: relative; padding: 3.2rem 1.25rem 0 0; }
.how-steps li::before { content: counter(step); position: absolute; top: 0; left: 0; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--lb-ink); color: var(--lb-marigold); font-family: var(--lb-serif); font-weight: 700; z-index: 1; }
.how-steps li::after { content: ""; position: absolute; top: 1.05rem; left: 2.2rem; right: 0; height: 2px; background: var(--lb-rule); }
.how-steps li:last-child::after { display: none; }
.how-steps h3 { font-family: var(--lb-sans); font-size: 1rem; font-weight: 650; letter-spacing: 0; margin-bottom: .35rem; }
.how-steps p { color: var(--lb-muted); font-size: .93rem; margin: 0; }

/* ---------- Confianza ---------- */
.trust-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.trust-list li { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.5rem; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.trust-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.trust-list h3 { font-family: var(--lb-sans); font-size: 1.05rem; font-weight: 650; letter-spacing: 0; margin: 0 0 .25rem; color: #fff; }
.trust-list p { margin: 0; color: #aac2bd; }
.section-ink .icon-chip.is-ink { background: rgba(231, 165, 43, .14); }

/* ---------- Llamada a la acción ---------- */
.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; padding: clamp(1.75rem, 4vw, 3rem); border-radius: 18px; background: var(--lb-marigold-100); border: 1px solid #f0d58d; }
.cta-band h2 { margin-bottom: .35rem; }
.cta-band p { color: #5b4a1e; }

/* ---------- Nosotros ---------- */
.about-quote { border-left: 4px solid var(--lb-marigold); }
.about-quote .panel-body { padding: clamp(1.5rem, 3vw, 2.25rem); }
.split-card { height: 100%; padding: 2rem; border: 1px solid var(--lb-rule); border-radius: var(--lb-radius); background: var(--lb-paper); }
.split-card h3 { margin: 1rem 0 .5rem; }
.split-card p { color: var(--lb-muted); }
.split-card a { font-weight: 650; }
.values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--lb-rule); }
.values > div { padding: 1.5rem 2rem 1.5rem 0; border-bottom: 1px solid var(--lb-rule); }
.values dt { font-family: var(--lb-serif); font-size: 1.25rem; font-weight: 600; color: var(--lb-ink); }
.values dd { margin: .25rem 0 0; color: var(--lb-muted); max-width: 40ch; }

/* ---------- Servicios ---------- */
.toc { list-style: none; margin: 0; padding: 0; position: sticky; top: 6rem; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li a { display: block; padding: .45rem .75rem; border-left: 2px solid var(--lb-rule); color: var(--lb-muted); text-decoration: none; font-size: .95rem; }
.toc li a:hover, .toc li a.is-current { border-left-color: var(--lb-marigold); color: var(--lb-ink); }
.service-block { padding: 0 0 2.5rem; margin: 0 0 2.5rem; border-bottom: 1px solid var(--lb-rule); scroll-margin-top: 6rem; }
.service-block header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.service-block h2 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.check-list { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .55rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list .icon { color: var(--lb-teal); margin-top: .2rem; }
#tax { scroll-margin-top: 4rem; }

/* ---------- Contacto ---------- */
.contact-info { padding: 0 0 0 1rem; border-left: 3px solid var(--lb-marigold); }
.contact-info ul { list-style: none; padding: 0; margin: 1.25rem 0; display: grid; gap: 1.1rem; }
.contact-info li { display: flex; gap: .85rem; align-items: flex-start; }
.contact-info .icon { color: var(--lb-teal); margin-top: .2rem; }

/* ---------- Curso (detalle público) ---------- */
.course-desc { font-size: 1.05rem; max-width: 62ch; }
.lesson-titles { list-style: none; margin: 0; padding: .5rem 0; }
.lesson-titles li { display: flex; align-items: center; gap: .75rem; padding: .55rem 1.5rem; }
.lesson-titles li + li { border-top: 1px solid #eef1ef; }
.lesson-titles .icon { color: var(--lb-teal); }
.enroll-box { position: sticky; top: 6rem; }
.facts { list-style: none; padding: 1.25rem 0 0; margin: 1.25rem 0 0; border-top: 1px solid var(--lb-rule); display: grid; gap: .65rem; font-size: .93rem; color: var(--lb-muted); }
.facts li { display: flex; gap: .6rem; align-items: center; }
.facts .icon { color: var(--lb-teal); }

/* ---------- Textos legales ---------- */
.legal-prose { max-width: 46rem; }
.legal-prose section { margin-bottom: 2.25rem; scroll-margin-top: 6rem; }
.legal-prose h2 { font-size: 1.35rem; margin-bottom: .75rem; }
.legal-prose p, .legal-prose li { line-height: 1.7; }
.legal-prose ul { padding-left: 1.2rem; display: grid; gap: .4rem; }
.legal-table { background: #fff; border: 1px solid var(--lb-rule); border-radius: 10px; overflow: hidden; }
.legal-table th[scope="row"] { font-weight: 600; color: var(--lb-ink); background: #fbfcfb; width: 36%; white-space: normal; font-size: .93rem; }
.legal-prose .toc { position: static; }

/* ---------- Autenticación ---------- */
.auth-card .form-text { font-size: .85rem; }
.consents .form-check-label { font-size: .93rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--lb-teal-700); }
details summary:focus-visible { outline: 3px solid var(--lb-marigold); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .how-steps { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .how-steps li { padding: 0 0 0 3.2rem; min-height: 2.8rem; }
  .how-steps li::after { top: 2.4rem; bottom: -1.25rem; left: 1.05rem; right: auto; width: 2px; height: auto; }
  .enroll-box, .toc { position: static; }
  .ledger { padding-bottom: 4.5rem; }
}
@media (max-width: 575.98px) {
  .values { grid-template-columns: minmax(0, 1fr); }
  .ledger-sheet { padding-left: 2.7rem; transform: rotate(-1deg); }
  .ledger-sheet::before { left: 1.9rem; }
  .ledger-chip { right: 0; width: 13.5rem; }
  .hero h1 { max-width: none; }
}

/* Evita desbordamiento horizontal en móvil: las filas con gutter grande (g-5) exceden el padding del contenedor */
@media (max-width: 575.98px) {
  .row.g-5 { --bs-gutter-x: 1.5rem; }
}
