/* =================================================================
   Dana Duhok — Slideshow (homepage hero) + its admin editor
   Token-driven so it inherits the active theme + light/dark mode.
   ================================================================= */

/* =================================================================
   PUBLIC SLIDESHOW
   ================================================================= */
.slideshow {
    --ss-radius: 20px;
    position: relative;
    margin: 0 0 8px;
}
.slideshow--full    { --ss-h: calc(100vh - 92px); }
.slideshow--tall    { --ss-h: 80vh; }
.slideshow--medium  { --ss-h: clamp(440px, 66vh, 660px); }
.slideshow--compact { --ss-h: clamp(360px, 50vh, 520px); }

.slideshow__viewport {
    position: relative;
    height: var(--ss-h);
    overflow: hidden;
    border-radius: var(--ss-radius);
    margin-inline: clamp(0px, 2vw, 22px);
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    isolation: isolate;
    background: var(--c-bg-2);
}
@media (max-width: 720px) {
    .slideshow__viewport { border-radius: 0; margin-inline: 0; border-inline: 0; }
}

/* Full-bleed (edge-to-edge, no box) */
.slideshow--bleed { margin-bottom: 0; }
.slideshow--bleed .slideshow__viewport {
    margin-inline: 0;
    border-radius: 0;
    border: 0;            /* edge-to-edge: no frame, incl. the stray top/bottom line */
    box-shadow: none;
}

.slideshow__track { position: relative; height: 100%; width: 100%; }

/* ---- Slide ---- */
.slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.slide__media {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.02);
    will-change: transform;
}
.slide__overlay {
    position: absolute; inset: 0;
    opacity: var(--ov, .55);
    background:
        linear-gradient(180deg, rgba(4,8,20,.50), rgba(4,8,20,.18) 38%, rgba(4,8,20,.62)),
        radial-gradient(130% 120% at 28% 50%, rgba(4,8,20,.70), transparent 68%);
}
/* Overlay styles */
.slideshow--ov-solid    .slide__overlay { background: #04081e; }
.slideshow--ov-vignette .slide__overlay { background: radial-gradient(120% 120% at 50% 50%, transparent 28%, rgba(4,8,20,.92)); }
.slideshow--ov-none     .slide__overlay { display: none; }

/* Gradient (image-less) slides — always legible under white text */
.slide--gradient::before {
    content: '';
    position: absolute; inset: 0;
    background: var(--grad-hero);
}
.slide--g1::before { background: linear-gradient(135deg, var(--c-primary-2), var(--c-teal)); }
.slide--g2::before { background: linear-gradient(160deg, var(--c-primary), var(--c-teal)); }
.slide--g3::before { background: linear-gradient(135deg, var(--c-teal), var(--c-primary-2)); }
.slide--gradient::after {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(110% 120% at 80% 0%, rgba(255,255,255,.18), transparent 55%),
        linear-gradient(180deg, rgba(6,10,24,.30), rgba(6,10,24,.52));
}

/* ---- Copy ---- */
.slide__inner {
    position: relative;
    z-index: 2;
    width: 100%;
}
.slide__copy {
    max-width: 660px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-block: 24px;
}
.slide__copy--center { max-width: 760px; margin-inline: auto; text-align: center; align-items: center; }
.slide__copy--right  { margin-inline-start: auto; text-align: right; align-items: flex-end; }

.slide__eyebrow {
    color: #fff;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.30);
}
.slide__eyebrow .eyebrow__dot { background: #fff; }

.slide__title {
    margin: 0;
    color: #fff;
    font-size: clamp(2.1rem, 4.4vw + .5rem, 4rem);
    line-height: 1.04;
    letter-spacing: -.03em;
    text-shadow: 0 2px 30px rgba(0,0,0,.35);
}
.slide__subtitle {
    margin: 0;
    color: rgba(255,255,255,.92);
    font-size: clamp(1rem, .6vw + .9rem, 1.22rem);
    line-height: 1.55;
    max-width: 56ch;
    text-shadow: 0 1px 16px rgba(0,0,0,.30);
}
.slide__copy--center .slide__subtitle { margin-inline: auto; }
.slide__copy--right  .slide__subtitle { margin-inline-start: auto; }
.slide__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.slide__copy--center .slide__actions { justify-content: center; }
.slide__copy--right  .slide__actions { justify-content: flex-end; }

/* =================================================================
   Transitions
   data-transition drives the look. The JS toggles .is-active and,
   for the "slide" (track) transition, translates .slideshow__track.
   ================================================================= */

/* ---- STACKED transitions (fade / zoom / blur) — slides are absolutely
   stacked; only the active one is visible. The active state resets every
   effect (transform + filter) so each variant settles to a clean slide. ---- */
.slideshow[data-transition="fade"] .slide,
.slideshow[data-transition="zoom"] .slide,
.slideshow[data-transition="blur"] .slide {
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--ss-speed, .8s) cubic-bezier(.4,0,.2,1),
                transform var(--ss-speed, .8s) cubic-bezier(.2,.7,.2,1),
                filter var(--ss-speed, .8s) ease;
    will-change: opacity, transform;
}
.slideshow[data-transition="fade"] .slide.is-active,
.slideshow[data-transition="zoom"] .slide.is-active,
.slideshow[data-transition="blur"] .slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    filter: none;
}
/* ZOOM — incoming scales down into place, outgoing scales up & away */
.slideshow[data-transition="zoom"] .slide { transform: scale(1.12); }
/* BLUR — incoming sharpens & settles, outgoing softens out */
.slideshow[data-transition="blur"] .slide { filter: blur(18px); transform: scale(1.05); }

/* ---- TRACK transition (slide) — slides sit in a non-wrapping flex row
   that translates horizontally. Explicit flex/size so the row can never
   collapse, wrap, or mis-measure. ---- */
.slideshow[data-transition="slide"] .slideshow__track {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    height: 100%;
    transition: transform var(--ss-speed, .7s) cubic-bezier(.6,.01,.1,1);
    will-change: transform;
}
.slideshow[data-transition="slide"] .slide {
    position: relative;
    inset: auto;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

/* ---- Caption animation (independent of the slide transition) ---- */
.slideshow--anim-rise .slide__copy > *,
.slideshow--anim-fade .slide__copy > *,
.slideshow--anim-zoom .slide__copy > * {
    opacity: 0;
    transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.slideshow--anim-rise .slide__copy > * { transform: translateY(22px); }
.slideshow--anim-zoom .slide__copy > * { transform: scale(.94); }
.slideshow--anim-rise .slide.is-active .slide__copy > *,
.slideshow--anim-fade .slide.is-active .slide__copy > *,
.slideshow--anim-zoom .slide.is-active .slide__copy > * { opacity: 1; transform: none; }
.slide.is-active .slide__copy > *:nth-child(2) { transition-delay: .08s; }
.slide.is-active .slide__copy > *:nth-child(3) { transition-delay: .16s; }
.slide.is-active .slide__copy > *:nth-child(4) { transition-delay: .24s; }

/* Ken Burns — slow zoom on the active slide's media */
.slideshow[data-kenburns="1"] .slide.is-active .slide__media {
    animation: kenburns 9s ease-out forwards;
}
@keyframes kenburns {
    from { transform: scale(1.02); }
    to   { transform: scale(1.12); }
}

/* =================================================================
   Controls — floating dock: counter · segmented progress · arrows
   ================================================================= */
.slideshow__dock {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
    padding-block: clamp(40px, 8vh, 90px) clamp(18px, 3.2vh, 30px);
    background: linear-gradient(to top, rgba(4,8,20,.62), rgba(4,8,20,.20) 55%, transparent);
    pointer-events: none;                       /* dead space stays click-through */
}
.slideshow__dock-inner {
    display: flex; align-items: center; gap: clamp(16px, 2.6vw, 30px);
}
.slideshow__dock-inner > * { pointer-events: auto; }

/* counter — 01 / 03 */
.slideshow__count {
    display: inline-flex; align-items: center; gap: 11px;
    color: #fff; font-family: var(--font-display);
    font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.slideshow__count b { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 800; line-height: 1; }
.slideshow__count-sep { width: 26px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.45); }
.slideshow__count [data-ss-total] { font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.6); }

/* segmented progress (replaces dots) — each segment fills with autoplay */
.slideshow__progress { display: flex; align-items: center; gap: 9px; min-width: 0; }
.slideshow__seg {
    position: relative; flex: 0 1 48px; height: 4px; min-width: 24px;
    padding: 0; border: 0; cursor: pointer; border-radius: 999px;
    overflow: hidden; background: rgba(255,255,255,.30);
    transition: height .2s ease, background-color .2s ease;
}
.slideshow__seg:hover { background: rgba(255,255,255,.5); }
.slideshow__seg.is-active { height: 5px; }
.slideshow__seg-fill {
    position: absolute; inset: 0; border-radius: inherit;
    background: #fff; transform-origin: left center; transform: scaleX(0);
}
.slideshow__seg.is-active .slideshow__seg-fill { transform: scaleX(1); }   /* fallback: no autoplay → full */
.slideshow[data-autoplay="1"] .slideshow__seg.is-active .slideshow__seg-fill {
    transform: scaleX(0);
    animation: ssSegFill var(--ss-interval, 6000ms) linear forwards;
}
.slideshow[data-autoplay="1"].is-paused .slideshow__seg.is-active .slideshow__seg-fill { animation-play-state: paused; }
@keyframes ssSegFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* arrows — grouped bottom-right, glassy */
.slideshow__nav { display: flex; gap: 10px; margin-left: auto; flex-shrink: 0; }
.slideshow__arrow {
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(255,255,255,.10);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
            backdrop-filter: blur(10px) saturate(140%);
    color: #fff; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.slideshow__arrow:hover { background: #fff; color: #0B1220; border-color: transparent; transform: translateY(-2px); }
.slideshow__arrow:active { transform: translateY(0); }
.slideshow__arrow svg { width: 20px; height: 20px; }

@media (max-width: 560px) {
    .slideshow__arrow { width: 42px; height: 42px; }
    .slideshow__arrow svg { width: 18px; height: 18px; }
    .slideshow__seg { flex-basis: 32px; }
    .slideshow__count b { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
    .slideshow[data-autoplay="1"] .slideshow__seg.is-active .slideshow__seg-fill { animation: none; transform: scaleX(1); }
}

/* =================================================================
   Respect reduced motion
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
    .slideshow .slide { transition: opacity .2s linear !important; transform: none !important; }
    .slideshow .slide__copy > * { transition: none !important; transform: none !important; opacity: 1 !important; }
    .slideshow[data-kenburns="1"] .slide.is-active .slide__media { animation: none; }
    .slideshow__track { transition: none !important; }
}

/* =================================================================
   LAYOUT OPTIONS  (admin-selectable: Vertical position + Content width)
   Placed before the design variants so opinionated designs can still
   override these where they intentionally anchor their copy.
   ================================================================= */
.slideshow--vpos-top .slide           { align-items: flex-start; }
.slideshow--vpos-top .slide__inner    { padding-top: clamp(40px, 9vh, 110px); }
.slideshow--vpos-center .slide        { align-items: center; }
.slideshow--vpos-bottom .slide        { align-items: flex-end; }
.slideshow--vpos-bottom .slide__inner { padding-bottom: clamp(84px, 15vh, 160px); }

.slideshow--cw-narrow   .slide__copy { max-width: 520px; }
.slideshow--cw-standard .slide__copy { max-width: 660px; }
.slideshow--cw-wide     .slide__copy { max-width: 900px; }

/* =================================================================
   DESIGN VARIANTS  (admin-selectable via Slideshow → Design)
   Each is a CSS-only override layer scoped under its own
   .slideshow--design-<name> class. "classic" is the base look
   above and needs no extra rules.
   ================================================================= */

/* ---------- Minimal ----------
   Pared-back & airy: lighter title, hairline eyebrow, hidden counter,
   centered circular dots, ghosted side arrows that fade in on hover. */
.slideshow--design-minimal .slide__copy { gap: 22px; padding-block: 32px; }
.slideshow--design-minimal .slide__title {
    font-size: clamp(1.8rem, 3.4vw + .4rem, 3.1rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -.02em;
    text-shadow: 0 1px 18px rgba(0,0,0,.32);
}
.slideshow--design-minimal .slide__subtitle {
    color: rgba(255,255,255,.86);
    font-weight: 400;
}
.slideshow--design-minimal .slide__eyebrow {
    background: transparent;
    border-color: rgba(255,255,255,.45);
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .72rem;
}
/* Restretch the dock to full height so arrows can pin to vertical center;
   children re-enable pointer-events, so the layer stays click-through. */
.slideshow--design-minimal .slideshow__dock {
    top: 0;
    padding: 0;
    background: none;
}
.slideshow--design-minimal .slideshow__dock-inner {
    height: 100%;
    align-items: stretch;
    gap: 0;
}
.slideshow--design-minimal .slideshow__count { display: none; }
.slideshow--design-minimal .slideshow__progress {
    position: absolute;
    left: 0; right: 0; bottom: clamp(18px, 3vh, 30px);
    justify-content: center;
    gap: 12px;
    pointer-events: none;
}
.slideshow--design-minimal .slideshow__seg {
    pointer-events: auto;
    flex: 0 0 auto;
    width: 9px; height: 9px; min-width: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.40);
    transition: background-color .25s ease, transform .25s ease;
}
.slideshow--design-minimal .slideshow__seg:hover { background: rgba(255,255,255,.70); }
.slideshow--design-minimal .slideshow__seg.is-active {
    height: 9px;
    transform: scale(1.15);
    background: rgba(255,255,255,.35);
}
.slideshow--design-minimal .slideshow__seg-fill { background: #fff; }
.slideshow--design-minimal .slideshow__nav {
    position: absolute;
    inset: 0;
    margin: 0;
    align-items: center;
    justify-content: space-between;
    padding-inline: clamp(8px, 2vw, 20px);
    pointer-events: none;
}
.slideshow--design-minimal .slideshow__arrow {
    pointer-events: auto;
    width: 40px; height: 40px;
    border: 0;
    background: rgba(255,255,255,.06);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    color: rgba(255,255,255,.6);
    opacity: 0;
    transition: opacity .25s ease, background-color .25s ease, color .25s ease;
}
.slideshow--design-minimal .slideshow__arrow svg { width: 18px; height: 18px; }
.slideshow--design-minimal .slideshow__viewport:hover .slideshow__arrow,
.slideshow--design-minimal .slideshow__arrow:focus-visible { opacity: 1; }
.slideshow--design-minimal .slideshow__arrow:hover {
    background: rgba(255,255,255,.16);
    color: #fff;
    transform: none;
}
@media (max-width: 720px) {
    .slideshow--design-minimal .slideshow__arrow { opacity: .55; width: 38px; height: 38px; }
    .slideshow--design-minimal .slideshow__progress { bottom: 16px; gap: 10px; }
}

/* ---------- Editorial card ----------
   Frosted "magazine cover" panel around the copy, anchored to the
   lower band, with a slim border-topped control bar. */
.slideshow--design-editorial .slide { align-items: flex-end; }
.slideshow--design-editorial .slide__inner {
    padding-bottom: clamp(70px, 12vh, 120px);
}
.slideshow--design-editorial .slide__copy {
    max-width: 540px;
    gap: 16px;
    padding: clamp(24px, 3vw, 38px);
    border-radius: var(--radius-2xl);
    background: rgba(8, 12, 26, .46);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow:
        0 24px 60px -24px rgba(0, 0, 0, .65),
        inset 0 1px 0 rgba(255, 255, 255, .10);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
            backdrop-filter: blur(16px) saturate(135%);
}
.slideshow--design-editorial .slide__copy--center { max-width: 600px; }
.slideshow--design-editorial .slide__copy--left   { margin-inline-end: auto; }
.slideshow--design-editorial .slide__copy--center  { margin-inline: auto; }
.slideshow--design-editorial .slide__copy--right   { margin-inline-start: auto; }
.slideshow--design-editorial .slide__eyebrow {
    align-self: flex-start;
    background: rgba(255, 255, 255, .10);
    border-color: rgba(255, 255, 255, .22);
    letter-spacing: .14em;
    text-transform: uppercase;
    font-size: .72rem;
}
.slideshow--design-editorial .slide__copy--center .slide__eyebrow { align-self: center; }
.slideshow--design-editorial .slide__copy--right  .slide__eyebrow { align-self: flex-end; }
.slideshow--design-editorial .slide__title {
    font-family: var(--font-display);
    font-size: clamp(1.9rem, 3.2vw + .5rem, 3.1rem);
    line-height: 1.06;
    letter-spacing: -.035em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
}
.slideshow--design-editorial .slide__subtitle {
    font-size: clamp(.96rem, .4vw + .9rem, 1.1rem);
    line-height: 1.5;
    color: rgba(255, 255, 255, .88);
    max-width: 46ch;
}
.slideshow--design-editorial .slideshow__dock {
    padding-block: clamp(14px, 2.4vh, 22px);
    background: linear-gradient(to top, rgba(4, 8, 20, .55), transparent);
}
.slideshow--design-editorial .slideshow__dock-inner {
    gap: clamp(14px, 2vw, 24px);
    padding-block: 11px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}
.slideshow--design-editorial .slideshow__count b { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.slideshow--design-editorial .slideshow__count-sep { width: 18px; }
.slideshow--design-editorial .slideshow__seg {
    height: 3px;
    flex-basis: 40px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, .26);
}
.slideshow--design-editorial .slideshow__seg.is-active { height: 4px; }
.slideshow--design-editorial .slideshow__seg-fill { border-radius: inherit; }
.slideshow--design-editorial .slideshow__arrow {
    width: 42px; height: 42px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .20);
}
.slideshow--design-editorial .slideshow__arrow:hover {
    background: #fff; color: #0B1220; transform: translateY(-1px);
}
@media (max-width: 720px) {
    .slideshow--design-editorial .slide__copy { max-width: none; }
    .slideshow--design-editorial .slide__inner { padding-bottom: clamp(64px, 14vh, 96px); }
}
@media (max-width: 560px) {
    .slideshow--design-editorial .slideshow__arrow { width: 40px; height: 40px; }
    .slideshow--design-editorial .slideshow__seg { flex-basis: 28px; }
}

/* ---------- Cinematic ----------
   Movie-poster drama: baked-in bottom vignette, oversized display
   titles, a large film-chapter counter, wide progress, big glassy arrows. */
.slideshow--design-cinematic .slideshow__viewport::after {
    content: '';
    position: absolute; inset: 0; z-index: 3;
    pointer-events: none;
    background:
        linear-gradient(to top, rgba(2,5,14,.88) 0%, rgba(2,5,14,.42) 26%, transparent 52%),
        radial-gradient(150% 120% at 50% 120%, rgba(2,5,14,.55), transparent 60%);
}
.slideshow--design-cinematic .slide__overlay { opacity: .68; }
.slideshow--design-cinematic .slide__copy { gap: 22px; }
.slideshow--design-cinematic .slide__title {
    font-size: clamp(2.8rem, 7vw + .4rem, 6.2rem);
    line-height: .96;
    letter-spacing: -.045em;
    font-weight: 800;
    text-shadow: 0 4px 44px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.4);
}
.slideshow--design-cinematic .slide__subtitle {
    font-size: clamp(1.05rem, .7vw + .95rem, 1.4rem);
    text-shadow: 0 2px 22px rgba(0,0,0,.5);
}
.slideshow--design-cinematic .slide__eyebrow {
    letter-spacing: .22em;
    text-transform: uppercase;
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.40);
    font-size: .76rem;
}
.slideshow--design-cinematic .slideshow__dock {
    background: none;
    padding-block: 0 clamp(20px, 3.6vh, 36px);
}
.slideshow--design-cinematic .slideshow__dock-inner {
    align-items: flex-end;
    gap: clamp(18px, 3vw, 38px);
    position: relative; z-index: 5;
}
.slideshow--design-cinematic .slideshow__count { align-items: baseline; gap: 8px; }
.slideshow--design-cinematic .slideshow__count b {
    font-size: clamp(2.6rem, 5.5vw, 4.4rem);
    font-weight: 800;
    letter-spacing: -.04em;
    text-shadow: 0 3px 26px rgba(0,0,0,.6);
}
.slideshow--design-cinematic .slideshow__count-sep {
    width: 18px; height: 2px; background: rgba(255,255,255,.55);
    align-self: center; margin-bottom: 6px;
}
.slideshow--design-cinematic .slideshow__count [data-ss-total] {
    font-size: 1.05rem; font-weight: 700; color: rgba(255,255,255,.7);
}
.slideshow--design-cinematic .slideshow__progress { flex: 1 1 auto; gap: 12px; margin-bottom: 18px; }
.slideshow--design-cinematic .slideshow__seg {
    flex: 1 1 auto; height: 3px; min-width: 0; border-radius: 2px;
    background: rgba(255,255,255,.24);
}
.slideshow--design-cinematic .slideshow__seg:hover { background: rgba(255,255,255,.45); }
.slideshow--design-cinematic .slideshow__seg.is-active { height: 4px; }
.slideshow--design-cinematic .slideshow__seg-fill { background: #fff; border-radius: 2px; }
.slideshow--design-cinematic .slideshow__nav { gap: 14px; }
.slideshow--design-cinematic .slideshow__arrow {
    width: 60px; height: 60px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,.30);
    background: rgba(255,255,255,.08);
    color: #fff;
    -webkit-backdrop-filter: blur(14px) saturate(150%);
            backdrop-filter: blur(14px) saturate(150%);
    box-shadow: 0 8px 30px -10px rgba(0,0,0,.6);
}
.slideshow--design-cinematic .slideshow__arrow svg { width: 24px; height: 24px; }
.slideshow--design-cinematic .slideshow__arrow:hover {
    background: #fff; color: #04081e;
}
@media (prefers-reduced-motion: no-preference) {
    .slideshow--design-cinematic .slideshow__arrow:hover { transform: translateY(-3px); }
}
@media (max-width: 720px) {
    .slideshow--design-cinematic .slideshow__dock-inner { flex-wrap: wrap; row-gap: 14px; }
    .slideshow--design-cinematic .slideshow__progress { order: 3; flex-basis: 100%; margin-bottom: 0; }
    .slideshow--design-cinematic .slideshow__count b { font-size: clamp(2rem, 11vw, 3rem); }
    .slideshow--design-cinematic .slideshow__arrow { width: 50px; height: 50px; }
    .slideshow--design-cinematic .slideshow__nav { margin-left: auto; }
}

/* ---------- Spotlight ----------
   Keynote title-card: a radial spotlight vignettes the corners and
   concentrates light on forcibly-centered copy. */
.slideshow--design-spotlight .slideshow__viewport::before {
    content: '';
    position: absolute; inset: 0; z-index: 3;
    pointer-events: none;
    background:
        radial-gradient(72% 86% at 50% 46%, transparent 38%, rgba(3,6,16,.55) 82%, rgba(3,6,16,.82) 100%),
        radial-gradient(120% 120% at 50% 50%, transparent 50%, rgba(3,6,16,.40));
}
.slideshow--design-spotlight .slide__overlay { --ov: .50; }
.slideshow--design-spotlight .slide { align-items: center; }
.slideshow--design-spotlight .slide__inner { position: relative; z-index: 4; }
.slideshow--design-spotlight .slide__copy,
.slideshow--design-spotlight .slide__copy--left,
.slideshow--design-spotlight .slide__copy--right,
.slideshow--design-spotlight .slide__copy--center {
    max-width: 640px;
    margin-inline: auto;
    text-align: center;
    align-items: center;
    gap: 26px;
    padding-block: 36px;
}
.slideshow--design-spotlight .slide__subtitle {
    margin-inline: auto;
    max-width: 50ch;
    color: rgba(255,255,255,.9);
    text-shadow: 0 1px 22px rgba(0,0,0,.45);
}
.slideshow--design-spotlight .slide__actions { justify-content: center; }
.slideshow--design-spotlight .slide__eyebrow {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.32);
    letter-spacing: .22em;
    text-transform: uppercase;
    font-size: .72rem;
}
.slideshow--design-spotlight .slide__title {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4.8vw + .5rem, 4.4rem);
    line-height: 1.02;
    letter-spacing: -.035em;
    text-shadow: 0 2px 40px rgba(0,0,0,.55);
}
.slideshow--design-spotlight .slideshow__dock {
    top: 0; padding: 0;
    background: linear-gradient(to top, rgba(3,6,16,.55), transparent 40%);
}
.slideshow--design-spotlight .slideshow__dock-inner {
    position: absolute; left: 0; right: 0; bottom: clamp(22px, 4vh, 40px);
    flex-direction: column;
    align-items: center;
    gap: clamp(14px, 2vh, 20px);
    pointer-events: none;
}
.slideshow--design-spotlight .slideshow__count { display: none; }
.slideshow--design-spotlight .slideshow__progress {
    justify-content: center;
    gap: 12px;
    pointer-events: auto;
}
.slideshow--design-spotlight .slideshow__seg {
    flex: 0 0 auto;
    width: 34px; height: 3px; min-width: 0;
    border-radius: 999px;
    background: rgba(255,255,255,.30);
}
.slideshow--design-spotlight .slideshow__seg:hover { background: rgba(255,255,255,.5); }
.slideshow--design-spotlight .slideshow__seg-fill { background: #fff; border-radius: inherit; }
.slideshow--design-spotlight .slideshow__nav {
    margin-left: 0;
    gap: clamp(18px, 4vw, 32px);
    pointer-events: auto;
}
.slideshow--design-spotlight .slideshow__arrow {
    width: 40px; height: 40px;
    border: 1px solid rgba(255,255,255,.26);
    background: rgba(255,255,255,.07);
}
.slideshow--design-spotlight .slideshow__arrow svg { width: 17px; height: 17px; }
.slideshow--design-spotlight .slideshow__arrow:hover {
    background: #fff; color: #04081e; border-color: transparent;
}
@media (max-width: 720px) {
    .slideshow--design-spotlight .slide__copy { max-width: none; gap: 20px; }
    .slideshow--design-spotlight .slideshow__seg { width: 26px; }
}
@media (prefers-reduced-motion: no-preference) {
    .slideshow--design-spotlight .slideshow__arrow:hover { transform: translateY(-2px); }
}

/* ---------- Lower third (broadcast chyron) ----------
   On-air "name band": copy locked to the lower-left, a solid accent TAB
   eyebrow above a strong name-band title, a thinner translucent subtitle
   strip, and a bright ticker rule for broadcast energy. */
.slideshow--design-lowerthird .slide { align-items: flex-end; }
.slideshow--design-lowerthird .slide__inner {
    padding-bottom: clamp(64px, 11vh, 120px);
}
.slideshow--design-lowerthird .slide__copy,
.slideshow--design-lowerthird .slide__copy--center,
.slideshow--design-lowerthird .slide__copy--right {
    max-width: min(760px, 92%);
    margin-inline: 0;
    text-align: left;
    align-items: flex-start;
    gap: 10px;
    padding-block: 0;
}
.slideshow--design-lowerthird .slide__eyebrow {
    align-self: flex-start;
    border: 0;
    border-radius: 3px 3px 0 0;
    padding: 6px 14px;
    background: var(--grad-primary);
    box-shadow: 0 6px 18px -8px var(--c-glow);
    letter-spacing: .2em;
    text-transform: uppercase;
    font-size: .68rem;
    font-weight: 700;
}
.slideshow--design-lowerthird .slide__eyebrow .eyebrow__dot { background: #fff; }
.slideshow--design-lowerthird .slide__title {
    align-self: flex-start;
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4vw + .4rem, 3.7rem);
    line-height: 1.18;
    letter-spacing: -.02em;
    text-shadow: 0 2px 10px rgba(0,0,0,.45);
    background: var(--grad-hero);
    box-shadow: 0 14px 34px -16px rgba(0,0,0,.65);
    padding: .12em .42em;
    -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
}
.slideshow--design-lowerthird .slide__subtitle {
    align-self: flex-start;
    margin: 0;
    max-width: 52ch;
    padding: 9px 14px;
    font-size: clamp(.95rem, .5vw + .85rem, 1.14rem);
    line-height: 1.5;
    color: rgba(255,255,255,.95);
    background: color-mix(in srgb, var(--c-primary-2) 58%, rgba(6,10,24,.7));
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
    text-shadow: none;
}
.slideshow--design-lowerthird .slide__actions { margin-top: 6px; }
.slideshow--design-lowerthird .slideshow__viewport::after {
    content: '';
    position: absolute; left: 0; right: 0; z-index: 1;
    bottom: clamp(40px, 7vh, 74px);
    height: 2px;
    pointer-events: none;
    background: linear-gradient(90deg,
        var(--c-primary) 0%, var(--c-teal) 42%, transparent 72%);
    box-shadow: 0 0 14px color-mix(in srgb, var(--c-primary) 60%, transparent);
}
.slideshow--design-lowerthird .slideshow__dock {
    padding-block: 0 clamp(12px, 2.4vh, 22px);
    background: linear-gradient(to top, rgba(4,8,20,.45), transparent 56%);
}
.slideshow--design-lowerthird .slideshow__count b { font-size: clamp(.95rem, 1.6vw, 1.2rem); font-weight: 700; }
.slideshow--design-lowerthird .slideshow__count-sep { width: 14px; }
.slideshow--design-lowerthird .slideshow__count [data-ss-total] { font-size: .82rem; }
.slideshow--design-lowerthird .slideshow__progress { flex: 1 1 auto; gap: 8px; }
.slideshow--design-lowerthird .slideshow__seg {
    flex: 1 1 auto; height: 2px; min-width: 0; border-radius: 0;
    background: rgba(255,255,255,.26);
}
.slideshow--design-lowerthird .slideshow__seg:hover { background: rgba(255,255,255,.5); }
.slideshow--design-lowerthird .slideshow__seg.is-active { height: 3px; }
.slideshow--design-lowerthird .slideshow__seg-fill { background: var(--c-teal); border-radius: 0; }
.slideshow--design-lowerthird .slideshow__nav { gap: 8px; }
.slideshow--design-lowerthird .slideshow__arrow {
    width: 38px; height: 38px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.30);
    background: rgba(255,255,255,.06);
    -webkit-backdrop-filter: none; backdrop-filter: none;
}
.slideshow--design-lowerthird .slideshow__arrow svg { width: 17px; height: 17px; }
.slideshow--design-lowerthird .slideshow__arrow:hover { background: #fff; color: #0B1220; border-color: transparent; transform: none; }
@media (max-width: 720px) {
    .slideshow--design-lowerthird .slide__copy,
    .slideshow--design-lowerthird .slide__copy--center,
    .slideshow--design-lowerthird .slide__copy--right { max-width: 100%; }
    .slideshow--design-lowerthird .slide__inner { padding-bottom: clamp(58px, 13vh, 92px); }
}
@media (max-width: 560px) {
    .slideshow--design-lowerthird .slideshow__arrow { width: 34px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
    .slideshow--design-lowerthird .slideshow__viewport::after { box-shadow: none; }
}

/* ---------- Side rail ----------
   A vertical control rail pinned along the RIGHT edge of the stage:
   stacked arrows, a vertical column of segment bars, and a counter
   rotated to read vertically. Copy is anchored lower-left, clear of
   the rail. Collapses to a compact horizontal bottom row on mobile. */
.slideshow--design-siderail { --rail-w: clamp(56px, 6vw, 78px); }
.slideshow--design-siderail .slideshow__viewport::after {
    content: '';
    position: absolute; top: 0; bottom: 0; z-index: 3;
    right: var(--rail-w); width: 1px;
    pointer-events: none;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,.34) 18%, rgba(255,255,255,.34) 82%, transparent);
}
.slideshow--design-siderail .slide { align-items: flex-end; }
.slideshow--design-siderail .slide__inner {
    padding-right: calc(var(--rail-w) + clamp(10px, 1.8vw, 26px));
    padding-bottom: clamp(34px, 7vh, 76px);
}
.slideshow--design-siderail .slide__copy,
.slideshow--design-siderail .slide__copy--center,
.slideshow--design-siderail .slide__copy--right {
    max-width: 600px; gap: 16px; padding-block: 0;
    margin-inline: 0; text-align: left; align-items: flex-start;
}
.slideshow--design-siderail .slide__eyebrow {
    align-self: flex-start;
    background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.28);
    letter-spacing: .18em; text-transform: uppercase; font-size: .7rem;
}
.slideshow--design-siderail .slide__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.8vw + .5rem, 3.5rem);
    line-height: 1.04; letter-spacing: -.035em;
    text-shadow: 0 2px 18px rgba(4,8,20,.45);
}
.slideshow--design-siderail .slide__subtitle {
    max-width: 46ch; color: rgba(255,255,255,.88);
    text-shadow: 0 1px 12px rgba(4,8,20,.4);
}
.slideshow--design-siderail .slideshow__dock {
    top: 0; bottom: 0; left: auto; right: 0; width: var(--rail-w);
    padding: 0; background: none;
}
.slideshow--design-siderail .slideshow__dock-inner {
    flex-direction: column; align-items: center; justify-content: center;
    width: 100%; height: 100%; gap: clamp(18px, 3vh, 30px);
    padding-block: clamp(16px, 3vh, 28px);
}
.slideshow--design-siderail .slideshow__nav { flex-direction: column; gap: 12px; margin: 0; order: 1; }
.slideshow--design-siderail .slideshow__arrow {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(255,255,255,.07);
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.slideshow--design-siderail .slideshow__arrow svg { width: 18px; height: 18px; }
.slideshow--design-siderail .slideshow__arrow:hover { background: #fff; color: #04081e; border-color: transparent; transform: translateX(-3px); }
.slideshow--design-siderail .slideshow__progress { flex-direction: column; align-items: center; gap: 8px; order: 2; min-width: 0; }
.slideshow--design-siderail .slideshow__seg {
    flex: 0 0 auto; width: 4px; height: 26px; min-width: 0;
    border-radius: 999px; background: rgba(255,255,255,.28);
    transition: width .2s ease, background-color .2s ease;
}
.slideshow--design-siderail .slideshow__seg:hover { background: rgba(255,255,255,.5); width: 5px; }
.slideshow--design-siderail .slideshow__seg.is-active { width: 5px; }
.slideshow--design-siderail .slideshow__seg-fill {
    display: block; width: 100%; height: 100%;
    background: #fff; border-radius: inherit;
    transform-origin: top center; transform: scaleY(0);
}
.slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill { transform: scaleY(1); }
.slideshow[data-autoplay="1"].slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill {
    transform: scaleY(0); animation: ssRailFill var(--ss-interval, 6000ms) linear forwards;
}
.slideshow[data-autoplay="1"].slideshow--design-siderail.is-paused .slideshow__seg.is-active .slideshow__seg-fill { animation-play-state: paused; }
@keyframes ssRailFill { from { transform: scaleY(0); } to { transform: scaleY(1); } }
.slideshow--design-siderail .slideshow__count {
    order: 3; flex-direction: column; gap: 8px;
    writing-mode: vertical-rl; text-orientation: mixed;
}
.slideshow--design-siderail .slideshow__count b { font-size: clamp(1.1rem, 1.8vw, 1.4rem); }
.slideshow--design-siderail .slideshow__count-sep { width: 2px; height: 18px; }
@media (prefers-reduced-motion: reduce) {
    .slideshow[data-autoplay="1"].slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill { animation: none; transform: scaleY(1); }
}
@media (max-width: 720px) {
    .slideshow--design-siderail { --rail-w: 0px; }
    .slideshow--design-siderail .slideshow__viewport::after { display: none; }
    .slideshow--design-siderail .slide__inner { padding-right: 0; padding-bottom: clamp(70px, 15vh, 110px); }
    .slideshow--design-siderail .slide__copy { max-width: none; }
    .slideshow--design-siderail .slideshow__dock {
        top: auto; bottom: 0; left: 0; right: 0; width: auto; height: auto;
        padding-block: clamp(36px, 8vh, 60px) clamp(16px, 3vh, 24px);
        background: linear-gradient(to top, rgba(4,8,20,.55), transparent);
    }
    .slideshow--design-siderail .slideshow__dock-inner { flex-direction: row; align-items: center; justify-content: flex-start; gap: 18px; height: auto; padding-block: 0; }
    .slideshow--design-siderail .slideshow__nav { flex-direction: row; order: 0; margin-left: auto; }
    .slideshow--design-siderail .slideshow__progress { flex-direction: row; order: 0; }
    .slideshow--design-siderail .slideshow__seg,
    .slideshow--design-siderail .slideshow__seg:hover,
    .slideshow--design-siderail .slideshow__seg.is-active { width: 28px; height: 4px; }
    .slideshow--design-siderail .slideshow__seg-fill { transform-origin: left center; transform: scaleX(0); }
    .slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill { transform: scaleX(1); }
    .slideshow[data-autoplay="1"].slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill {
        transform: scaleX(0); animation: ssRailFillH var(--ss-interval, 6000ms) linear forwards;
    }
    @keyframes ssRailFillH { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .slideshow--design-siderail .slideshow__count { order: 0; flex-direction: row; writing-mode: horizontal-tb; }
    .slideshow--design-siderail .slideshow__count-sep { width: 18px; height: 2px; }
    .slideshow--design-siderail .slideshow__arrow:hover { transform: translateY(-2px); }
}
@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
    .slideshow[data-autoplay="1"].slideshow--design-siderail .slideshow__seg.is-active .slideshow__seg-fill { animation: none; transform: scaleX(1); }
}

/* =================================================================
   ADMIN — slideshow settings panel, switches, media uploader
   ================================================================= */
.ss-settings { margin-bottom: 26px; }
.ss-settings__master {
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--c-border);
}
.ss-settings__master h2 { margin: 0 0 4px; font-size: 1.2rem; }
.ss-settings__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid var(--c-border);
}
.ss-toggles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 6px 28px;
    padding: 22px 0 4px;
}
.switch-row {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--c-border);
    cursor: pointer;
}
.switch-row__text { display: flex; flex-direction: column; gap: 2px; }
.switch-row__text strong { font-weight: 600; font-size: .96rem; }
.switch-row__text small { font-size: .8rem; }

/* Toggle switch */
.switch { position: relative; display: inline-flex; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track {
    width: 46px; height: 26px;
    border-radius: 999px;
    background: var(--c-border-strong);
    border: 1px solid var(--c-border);
    transition: background-color .25s;
    display: inline-flex; align-items: center;
    padding: 2px;
}
.switch__thumb {
    width: 20px; height: 20px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.switch input:checked + .switch__track { background: var(--grad-primary); border-color: transparent; }
.switch input:checked + .switch__track .switch__thumb { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-primary) 26%, transparent); }
.switch--lg .switch__track { width: 58px; height: 32px; }
.switch--lg .switch__thumb { width: 26px; height: 26px; }
.switch--lg input:checked + .switch__track .switch__thumb { transform: translateX(26px); }

/* Range slider */
.range {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 6px;
    border-radius: 999px;
    background: var(--c-border-strong);
    cursor: pointer;
}
.range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 999px;
    background: var(--grad-primary);
    border: 2px solid var(--c-bg-1);
    box-shadow: 0 2px 8px -2px var(--c-glow);
}
.range::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--c-bg-1);
    background: var(--c-primary);
}

/* Media uploader widget */
.media-upload {
    display: flex; gap: 18px; align-items: center;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed var(--c-border-strong);
    background: var(--c-surface-glass);
}
.media-upload__preview {
    width: 150px; height: 92px;
    flex-shrink: 0;
    border-radius: 12px;
    background-color: var(--c-bg-2);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}
.media-upload__preview::after {
    content: 'No image';
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .72rem; letter-spacing: .08em; text-transform: uppercase;
    color: var(--c-text-3);
}
.media-upload__preview.has-image::after { content: none; }
.media-upload__body { flex: 1; min-width: 0; }
.media-upload__hint { margin: 0 0 12px; font-size: .82rem; color: var(--c-text-3); }
.media-upload__controls { display: flex; gap: 10px; flex-wrap: wrap; }
.media-upload .btn { position: relative; overflow: hidden; }

/* Colour picker field */
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] {
    -webkit-appearance: none; appearance: none;
    width: 52px; height: 42px;
    padding: 0;
    border: 1px solid var(--c-border-strong);
    border-radius: var(--radius-md);
    background: var(--c-surface);
    cursor: pointer;
}
.color-field input[type="color"]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-field input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-field__hex {
    width: 120px;
    padding: 11px 13px;
    border-radius: var(--radius-md);
    border: 1px solid var(--c-border-strong);
    background: var(--c-bg-base);
    color: var(--c-text);
    font-family: ui-monospace, 'SF Mono', monospace;
    font-size: .9rem;
    text-transform: uppercase;
}
.color-field__hex:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-primary) 16%, transparent); }

/* Slide list thumbnail */
.slide-thumb {
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 50px;
    border-radius: 10px;
    background-size: cover; background-position: center;
    border: 1px solid var(--c-border);
    font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--c-text-3);
}
.slide-thumb--empty { background: var(--grad-primary); color: var(--c-text-invert); font-weight: 600; }

@media (max-width: 560px) {
    .ss-settings__master { flex-direction: row; }
    .media-upload { flex-direction: column; align-items: stretch; }
    .media-upload__preview { width: 100%; height: 120px; }
}
