/* Abogados EC · slider de la portada: el estudio, la escalera y el costo de esperar */
.hs { --s1: #B48C42; --s2: #AD733A; --s3: #A75932; --s4: #A0402A; --oxide-on-dark: #E48C72; --oxide-strong: #8C3522; --oxide-soft: #F6E8E2; --accent-text: #7A5C22;  }
.hero.has-hs { padding-bottom: 28px; }
.hs-view { display: grid; align-items: center; }
.hs-slide { grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; scroll-margin-top: 92px; }
.hs-slide.is-active { opacity: 1; visibility: visible; transition: opacity .45s ease, visibility 0s; }
@media (max-width: 860px) { .hs-view { align-items: start; overflow: hidden; transition: height .3s ease; } }

.hs-t { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.9rem); line-height: 1.06; margin-bottom: 22px; color: var(--on-dark); }
.hs-t em { color: var(--accent); }
.hs-fact { max-width: 600px; margin-bottom: 24px; padding: 12px 16px 12px 14px; border: 1px solid rgba(228,140,114,.28); border-left: 3px solid var(--oxide-on-dark); border-radius: var(--r-sm); background: rgba(160,64,42,.14); color: #ECE9E2; font-size: .98rem; line-height: 1.5; }
.hs-fact-k { display: block; margin-bottom: 4px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oxide-on-dark); }
.hs .ref { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: .76rem; line-height: 1.5; color: var(--muted-dark); }
.hs-ref { margin: -22px 0 28px; font-family: var(--font-mono); font-size: .76rem; line-height: 1.5; color: var(--muted-dark); max-width: 560px; }
.hs-id { margin-top: 16px; max-width: 560px; font-size: .82rem; line-height: 1.5; color: var(--muted-dark); }
.hs button.btn { font: inherit; font-weight: 600; cursor: pointer; }

/* Mapa de la escalera */
.hs .map-card { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-lg); max-width: 560px; width: 100%; justify-self: end; }
.hs .map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.hs .map-title { color: var(--accent-text); }
.hs .map-count { color: var(--muted); }
.hs .map-stair { --u: 22px; position: relative; }
.hs .map-steps { display: grid; grid-auto-rows: 1fr; list-style: none; margin: 0; padding: 0; }
.hs .map-step { display: grid; }
.hs .map-step:nth-child(1) { --k: 1; --c: var(--s1); }
.hs .map-step:nth-child(2) { --k: 2; --c: var(--s2); }
.hs .map-step:nth-child(3) { --k: 3; --c: var(--s3); }
.hs .map-step:nth-child(4) { --k: 4; --c: var(--s4); }
.hs .map-row { position: relative; display: grid; grid-template-columns: calc(var(--k) * var(--u)) calc(var(--u) * .5 + 1.6em) minmax(0, 1fr); column-gap: 10px; align-items: center; min-height: 60px; padding-right: 4px; }
.hs .map-row::before { content: ""; position: absolute; top: 0; right: 0; height: 1px; left: calc(var(--k) * var(--u)); background: var(--line); }
.hs .map-step:first-child .map-row::before { display: none; }
.hs .map-bar { position: relative; align-self: stretch; background: var(--c); }
.hs .map-step:first-child .map-bar { border-top-left-radius: 4px; border-top-right-radius: 4px; }
.hs .map-step:last-child .map-bar { border-bottom-left-radius: 4px; }
.hs .map-bar::after { content: ""; position: absolute; z-index: 2; top: -4px; right: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px #fff; }
.hs .map-num { justify-self: end; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.hs .map-text { display: grid; gap: 3px; padding-block: 10px; min-width: 0; }
.hs .map-text b { font-weight: 600; font-size: .92rem; line-height: 1.25; }
.hs .map-text small { font-size: .76rem; line-height: 1.32; color: var(--oxide-strong); }
.hs .map-text small .alt { color: var(--muted); }
.hs .here-note { display: inline-flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; line-height: 1.3; color: var(--accent-text); }
.hs .here-note .pulse { flex-shrink: 0; }
.hs .map-rail { position: absolute; left: 0; top: 0; z-index: 1; width: calc(var(--u) * 4); height: 100%; overflow: visible; pointer-events: none; }
.hs .map-rail line { stroke: var(--accent); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hs .map-exit { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: .86rem; font-weight: 600; line-height: 1.35; color: var(--accent-text); }
.hs .rail-key { width: 24px; height: 14px; flex-shrink: 0; overflow: visible; }
.hs .rail-key line { stroke: var(--accent); stroke-width: 2; }
.hs .rail-key circle { fill: var(--accent); }
.hs .map-lane { margin: 14px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); }
.hs .map-lane-t { display: block; padding-left: 14px; border-left: 2px dashed var(--muted); font-size: .84rem; line-height: 1.45; color: var(--text); }
.hs .map-lane-t b { font-weight: 600; }
@media (min-width: 640px) { .hs .map-stair { --u: 30px; } }

/* Calculadora */
#costo .hero-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.hs .calc { container-type: inline-size; background: var(--ink-2); border: 1px solid var(--ink-3); border-radius: var(--r); padding: 20px 22px 16px; color: var(--on-dark); box-shadow: 0 24px 60px rgba(0,0,0,.28); min-width: 0; }
.hs .calc-k { margin: 0; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-dark); }
.hs .calc-total { margin: 8px 0 4px; font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; font-size: clamp(2.1rem, 10cqi, 3.1rem); white-space: nowrap; color: var(--on-dark); }
.hs .calc-total .cur { font-size: .36em; letter-spacing: .06em; color: var(--muted-dark); vertical-align: .95em; margin-right: .4em; }
.hs .calc-tag { display: inline-block; margin: 2px 0 0; padding: 3px 8px; border: 1px dashed rgba(180,140,66,.6); border-radius: 4px; font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hs .calc.es-propio .calc-tag { border-style: solid; }
.hs .calc-dia { margin: 10px 0 0; font-size: .9rem; color: var(--on-dark); }
.hs .calc-dia b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hs .calc-vivo { margin: 2px 0 0; font-family: var(--font-mono); font-size: .74rem; color: var(--muted-dark); font-variant-numeric: tabular-nums; }
.hs .calc-regla { margin: 6px 0 0; font-size: .8rem; line-height: 1.45; color: var(--muted-dark); }
.hs .calc-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--ink-3); }
@container (max-width: 400px) { .hs .calc-in { grid-template-columns: minmax(0, 1fr); } }
.hs .calc .field { display: grid; gap: 5px; min-width: 0; align-content: end; }
.hs #c-fact-w[hidden] { display: none; }
.hs #c-fact-w { margin-top: 6px; }
.hs .calc .field label { font-size: .78rem; font-weight: 500; color: var(--on-dark); }
.hs .calc .field input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: var(--r-sm); border: 1px solid var(--ink-3); background: var(--ink); color: var(--on-dark); font-family: var(--font-mono); font-size: 1rem; font-variant-numeric: tabular-nums; color-scheme: dark; }
.hs .calc .field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(180,140,66,.25); }
.hs .calc-sw { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: .82rem; line-height: 1.35; color: var(--on-dark); cursor: pointer; min-height: 44px; }
.hs .calc-sw input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.hs .calc-mype-txt { margin: 4px 0 0; font-size: .78rem; line-height: 1.45; color: var(--muted-dark); }
.hs .calc-proj { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 0; }
.hs .calc-proj div { padding: 8px 12px; border: 1px solid var(--ink-3); border-radius: var(--r-sm); }
.hs .calc-proj dt { font-size: .72rem; color: var(--muted-dark); }
.hs .calc-proj dd { margin: 2px 0 0; font-family: var(--font-mono); font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--oxide-on-dark); }
@container (max-width: 340px) { .hs .calc-proj dd { font-size: .82rem; } }
.hs .calc-multa { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--oxide-on-dark); background: rgba(160,64,42,.12); border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .84rem; line-height: 1.45; }
.hs .calc-multa b { font-family: var(--font-mono); color: var(--oxide-on-dark); font-weight: 500; }
.hs .calc-multa .ref { margin-top: 3px; font-size: .72rem; }
.hs .calc-nota { margin: 10px 0 0; font-size: .72rem; line-height: 1.45; color: var(--muted-dark); }
.hs .calc-ejemplo { margin-top: 4px; background: none; border: 0; padding: 6px 0; min-height: 44px; color: var(--accent); font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer; }

/* Navegación */
.hs-nav { display: flex; align-items: center; gap: 24px; margin-top: clamp(32px, 4vw, 56px); }
.hs-tabs { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.hs-tab { position: relative; display: flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 12px 0 8px; background: none; border: 0; border-top: 1px solid rgba(255,255,255,.2); color: var(--muted-dark); font: inherit; font-size: .92rem; font-weight: 500; line-height: 1.25; text-align: left; cursor: pointer; transition: color .2s ease; }
.hs-tab:hover, .hs-tab.is-active { color: var(--on-dark); }
.hs-n { font-family: var(--font-mono); font-size: .74rem; color: var(--accent); }
.hs-bar { position: absolute; top: -1px; left: 0; width: 100%; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.hs-tab.is-active .hs-bar { transform: scaleX(1); }
.hs.is-auto .hs-tab.is-active .hs-bar { animation: hs-avance var(--dur, 11s) linear forwards; }
.hs.is-pausa .hs-tab.is-active .hs-bar { animation-play-state: paused; }
@keyframes hs-avance { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.hs-arrows { display: flex; gap: 8px; flex-shrink: 0; }
.hs-arrows button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.06); color: var(--on-dark); font: inherit; font-size: 1.05rem; cursor: pointer; transition: border-color .2s ease; }
.hs-arrows button:hover { border-color: var(--on-dark); }
.hs-tab:focus-visible, .hs-arrows button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 860px) {
  .hs-arrows [data-paso] { display: none; }
  .hs .map-card { justify-self: stretch; max-width: none; }
  #costo .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hs-ref { margin-top: -22px; }
}
@media (max-width: 560px) {
  .hs-tabs { gap: 8px; }
  .hs-tab { font-size: .8rem; gap: 6px; }
  .hs-n { display: none; }
  .hs .calc { padding: 18px 16px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hs-slide, .hs-slide.is-active, .hs-view { transition: none; }
}

/* Ajustes */
.hs .sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hero.has-hs { padding-top: calc(73px + clamp(32px, 4vw, 56px)); }
.hs-nav { margin-top: clamp(20px, 2.4vw, 32px); }
@media (max-width: 860px) {
  .hs { display: flex; flex-direction: column; }
  .hs-nav { order: -1; width: 100%; margin: 0 0 28px; }
}

/* Diapositiva principal: riesgos de la entidad y sus funcionarios */
.hero h1.hs-t { font-size: clamp(2rem, 1.25rem + 2.3vw, 3.15rem); line-height: 1.07; margin-bottom: 22px; }
.hero .hs-h1 { font-size: clamp(2.6rem, 1.6rem + 3.8vw, 4.9rem); margin-bottom: 24px; }
.hero .hs-h1 em { color: var(--accent); }
.hs-riesgos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; max-width: 660px; margin-bottom: 10px; }
.hs-riesgos-k { margin: 0 0 8px; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--oxide-on-dark); }
.hs-riesgos ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hs-riesgos li { position: relative; padding-left: 18px; font-size: .95rem; line-height: 1.4; color: #ECE9E2; }
.hs-riesgos li::before { content: ""; position: absolute; left: 0; top: .62em; width: 9px; height: 2px; background: var(--oxide-on-dark); }
.hs-riesgos-ref { margin: 0 0 24px; max-width: 660px; font-family: var(--font-mono); font-size: .72rem; line-height: 1.5; color: var(--muted-dark); }
.hs-id a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.hs-pausa { display: inline-grid; place-items: center; }
.hs-pausa svg { width: 14px; height: 14px; fill: currentColor; }
.hs-pausa .i-play { display: none; }
.hs-pausa.is-detenido .i-play { display: block; }
.hs-pausa.is-detenido .i-pausa { display: none; }
@media (max-width: 560px) { .hs-riesgos { grid-template-columns: minmax(0, 1fr); } }
