/* SNU — slider engine (Content › Sliders). Draws on the hero's own rules in style.css / portal.css / responsive.css
   (.hero, .hero-slide, .hero-img, .hero-shade, .hero-content, .hero-kicker, .hero-title, .hero-text, .hero-actions, .hero-controls…)
   and adds what the engine needs: transitions, layer entrances, free layers, the progress bar and the preview canvas.
   Everything per slider (heights, widths, breakpoints, boxes, layer type) is in the <style> the server writes into each slider. */

/* ---------- the stage ---------- */
.snu-slider { position: relative; overflow: hidden; isolation: isolate; --sl-tr: 1000ms; }
.snu-slider .hero-slides { position: absolute; inset: 0; min-height: 0; }
.snu-slider .hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; z-index: 0;
  transition: opacity var(--sl-tr) ease, visibility var(--sl-tr), transform var(--sl-tr) var(--ease, ease); }
.snu-slider .hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.snu-slider .hero-slide.is-leaving { z-index: 0; }
.snu-slider .hero-content { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; }
.snu-slider .hero-content > * { max-width: var(--sl-box-w, 660px); }
.snu-slider .sl-link { position: absolute; inset: 0; z-index: 1; }
.snu-slider .sl-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.snu-slider .sl-video { background: var(--navy-900, #0a2742); }
.snu-slider .sl-color { transform: none !important; transition: none !important; }

/* height "auto" (the content decides): the server writes, per device, .hero-slides {position: relative} and
   .hero-slide.is-active {position: relative}, so the active slide is in the flow and the others stack behind it */

/* boxed */
.snu-slider.sl-boxed { border-radius: var(--radius-lg, 16px); }
@media (max-width: 767.98px) { .snu-slider.sl-boxed { border-radius: 0; } }

/* ---------- Ken Burns (the hero's slow zoom), per slider and per slide ---------- */
.snu-slider.sl-no-kb .hero-img, .snu-slider .hero-slide[data-sl-kb="0"] .hero-img { transform: none; transition: none; }
.snu-slider .hero-slide[data-sl-kb="1"] .hero-img { transform: scale(1.06); transition: transform 7s ease-out; }
.snu-slider .hero-slide.is-active[data-sl-kb="1"] .hero-img { transform: scale(1); }

/* ---------- transitions ---------- */
.snu-slider.sl-tr-slide .hero-slide { opacity: 1; transform: translateX(100%); transition: transform var(--sl-tr) var(--ease, ease), visibility 0s var(--sl-tr); }
.snu-slider.sl-tr-slide .hero-slide.is-active { transform: none; transition: transform var(--sl-tr) var(--ease, ease), visibility 0s; }
.snu-slider.sl-tr-slide .hero-slide.is-leaving { visibility: visible; transform: translateX(-100%); }
.snu-slider.sl-tr-slide.sl-back .hero-slide { transform: translateX(-100%); }
.snu-slider.sl-tr-slide.sl-back .hero-slide.is-active { transform: none; }
.snu-slider.sl-tr-slide.sl-back .hero-slide.is-leaving { transform: translateX(100%); }

.snu-slider.sl-tr-zoom .hero-slide { transform: scale(1.12); }
.snu-slider.sl-tr-zoom .hero-slide.is-active { transform: none; }
.snu-slider.sl-tr-zoom .hero-slide.is-leaving { transform: scale(1); }

.snu-slider.sl-tr-reveal .hero-slide { opacity: 1; clip-path: inset(0 0 0 100%); transition: clip-path var(--sl-tr) var(--ease, ease), visibility 0s var(--sl-tr); }
.snu-slider.sl-tr-reveal .hero-slide.is-active { clip-path: inset(0); transition: clip-path var(--sl-tr) var(--ease, ease), visibility 0s; }
.snu-slider.sl-tr-reveal .hero-slide.is-leaving { visibility: visible; clip-path: inset(0); }
.snu-slider.sl-tr-reveal.sl-back .hero-slide { clip-path: inset(0 100% 0 0); }
.snu-slider.sl-tr-reveal.sl-back .hero-slide.is-active, .snu-slider.sl-tr-reveal.sl-back .hero-slide.is-leaving { clip-path: inset(0); }

.snu-slider.sl-tr-none .hero-slide { transition: none; }

/* ---------- layers: entrances ---------- */
.snu-slider .hero-slide .hero-content > * { animation: none; }
.snu-slider .sl-layer { --sl-anim: none; }
.snu-slider .sl-in-up { --sl-anim: slUp; }
.snu-slider .sl-in-down { --sl-anim: slDown; }
.snu-slider .sl-in-left { --sl-anim: slLeft; }
.snu-slider .sl-in-right { --sl-anim: slRight; }
.snu-slider .sl-in-fade { --sl-anim: slFade; }
.snu-slider .sl-in-zoom { --sl-anim: slZoom; }
.snu-slider .hero-slide.is-active .sl-layer.sl-layer { animation: var(--sl-anim) var(--sl-dur, 900ms) var(--ease, ease) var(--sl-delay, 0ms) both; }
.snu-slider .hero-slide.is-active .sl-layer.sl-in-none { animation: none; }
.snu-slider .sl-layer + .sl-layer { margin-top: 0; }
.snu-slider .hero-kicker.sl-layer { margin-bottom: .6rem; }
.snu-slider .sl-free { position: absolute; z-index: 2; max-width: none; }
.snu-slider .sl-image .sl-image-img { display: block; max-width: 100%; height: auto; }
.snu-slider .sl-html { color: inherit; }
.snu-slider .sl-html :where(p, ul, ol) { margin: 0 0 .8rem; }
@keyframes slUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes slDown { from { opacity: 0; transform: translateY(-26px); } to { opacity: 1; transform: none; } }
@keyframes slLeft { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes slRight { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes slFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slZoom { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }

/* ---------- controls ---------- */
.snu-slider .hero-controls { pointer-events: none; }
.snu-slider .hero-controls > * { pointer-events: auto; }
.snu-slider .hero-btn[disabled] { opacity: .35; cursor: default; }
.snu-slider .hero-btn[disabled]:hover { background: rgba(10, 39, 66, .35); color: var(--white, #fff); border-color: rgba(255, 255, 255, .45); }
.snu-slider .sl-thumb-plain { display: block; background: linear-gradient(135deg, var(--navy-800, #10345a), var(--navy-900, #0a2742)); }
.snu-slider .sl-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .2); pointer-events: none; }
.snu-slider .sl-progress span { display: block; height: 100%; width: 0; background: var(--gold, #d4a017); }
.snu-slider .sl-progress.is-running span { animation: slProgress var(--sl-run, 7000ms) linear forwards; }
.snu-slider .sl-progress.is-paused span { animation-play-state: paused; }
@keyframes slProgress { from { width: 0; } to { width: 100%; } }

/* ---------- the editor's canvas (/slider-preview) ---------- */
body.sl-preview-body > :not(main), body.sl-preview-body main > :not(.sl-preview-page) { display: none !important; }
body.sl-preview-body main { padding: 0; margin: 0; min-height: 0; }
.sl-preview-page .sl-empty { padding: 3rem 0; color: var(--muted, #64748b); }
[data-sl-preview] .sl-slide.is-editing { outline: 2px dashed rgba(255, 255, 255, .5); outline-offset: -2px; }
[data-sl-preview] .sl-layer.is-editing { outline: 2px dashed var(--gold, #d4a017); outline-offset: 4px; }

/* ---------- less motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .snu-slider .hero-slide { transition: opacity .3s ease, visibility .3s !important; transform: none !important; clip-path: none !important; }
  .snu-slider .hero-slide.is-active .sl-layer.sl-layer { animation: none; }
  .snu-slider .hero-img { transform: none !important; transition: none !important; }
  .snu-slider .sl-progress.is-running span { animation: none; width: 100%; }
}
