.jds-slider { position: relative; overflow: hidden; background: var(--jds-bg, black); color: var(--jds-fg, #eaeaea); width: 100%; box-sizing: border-box; }
.jds-fixed-height { height: var(--jds-height, 350px); min-height: var(--jds-height, 350px); display: flex; align-content: stretch; }
.jds-full-bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.jds-slider-track { display: flex; transition: transform 400ms ease; will-change: transform; height: 100%; }
.jds-slide { flex: 0 0 100%; box-sizing: border-box; height: 100%; }
.jds-slide-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; height: 100%; width: 100%;}
/* Ensure text is always above media and fully opaque; add a subtle background option class if needed */
.jds-slide-body { position: relative; z-index: 2; color: var(--jds-fg, #ffffff); opacity: 1; background: rgba(0,0,0,var(--jds-overlay, 0));}
.jds-text-panel { color: white; padding: 16px; border-radius: 6px; }
.jds-slide-body * { color: inherit; opacity: 1; }
/* Aspect wrapper to allow wide hero crop while supporting 4:3 sources */
.jds-slide-media { position: relative; width: 100%; height: 100%; }
.jds-slide-media a { display: flex; width: 100%; height: 100%; }
.jds-slide-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; display: block; filter: none; }
.jds-header-row { display:flex; align-items:center; gap:16px; }
.jds-title-align-left { justify-content:flex-start; }
.jds-title-align-center { justify-content:center; }
.jds-title-align-right { justify-content:flex-end; }
.jds-slide-title { margin: 0 0 15px 0; font-size: 1.5rem; line-height: 1.2; color: #4d4d4d !important; }
.jds-slide-text { display: flex; align-items: center; justify-content: center; }
.jds-slide-text p { margin: 0 0 12px; max-width: 35vw; color: inherit; }
.jds-slide-button { display: inline-block; padding: 12px 16px 10px; border-radius: 0; text-decoration: none; font-weight: 700; letter-spacing:.2px; font-size:13px; line-height:1; transition: all .4s ease-in-out; cursor: pointer; }
.jds-btn--dark { background:#000; color:#fff; border: 2px solid #2c2c2c; }
/* Brand accent button – square, bordered */
.jds-btn--accent { --accent:#00fc86; background:#000; color:var(--accent); border:2px solid var(--accent)!important; }
.jds-btn--accent:hover { background: var(--accent); color:#ffffff!important; }
.jds-slide-button:hover { opacity: 1; }
.jds-slide-button a:hover { color: white; }
.jds-btn-wrap { margin-top: 8px; margin-bottom: 10px; display:flex; }
.jds-btn-wrap-below { margin-top: 14px; margin-bottom: 18px; grid-column: 1 / -1; display:flex; }
.jds-btn-left { justify-content:flex-start; }
.jds-btn-right { justify-content:flex-end; }
.jds-btn-center { justify-content:center; }

/* Text alignment helpers */
.jds-text-align-left { text-align:left; }
.jds-text-align-center { text-align:center; }
.jds-text-align-right { text-align:right; }

/* Layout variants: large image (2/3) vs small image (1/3) and side control */
/* True 1/3–2/3 splits */
.jds-layout-large-left { grid-template-columns: 2fr 4fr; }
.jds-layout-large-right { grid-template-columns: 4fr 2fr; }
.jds-layout-small-left { grid-template-columns: 1fr 2fr; }
.jds-layout-small-right { grid-template-columns: 2fr 1fr; }
.jds-layout-equal-left, .jds-layout-equal-right { grid-template-columns: 1fr 1fr; }

/* When image is on the right, flip order visually */
.jds-layout-large-right .jds-slide-media,
.jds-layout-small-right .jds-slide-media { order: 2; }
.jds-layout-equal-right .jds-slide-media { order: 2; }
.jds-layout-large-right .jds-slide-body,
.jds-layout-small-right .jds-slide-body { order: 1; }
.jds-layout-equal-right .jds-slide-body { order: 1; }

.jds-slider-controls { position: absolute; inset: 0; pointer-events: none; }
.jds-prev, .jds-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  pointer-events: auto; border: 0; background: var(--jds-arrow-bg, rgba(0,0,0,.5)); color: var(--jds-arrow-color, #fff);
  width: 40px; height: 40px; border-radius: 999px; font-size: 22px; line-height: 40px; text-align: center;
}
.jds-prev { left: 10px; }
.jds-next { right: 10px; }

.jds-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 10px; z-index: 5; pointer-events: auto; }
.jds-dots button {
  width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--jds-fg, #ffffff); background: transparent; padding: 0; opacity: 0.9; cursor: pointer; color: var(--jds-fg, #ffffff);
}
.jds-dots button[aria-current="true"] { background: var(--jds-fg, #ffffff); border-color: var(--jds-fg, #ffffff); }

/* No extra vertical spacing by default around slider */
.jds-slider { margin-top: 0; margin-bottom: 0; }

@media (max-width: 900px) {
  .jds-fixed-height { height: var(--jds-height-md, var(--jds-height, 350px)); }
  /* medium: switch to 1/2 split for balance */
  .jds-slide-inner { grid-template-columns: 1fr 1fr; gap: 16px; }
  .jds-layout-large-right .jds-slide-media,
  .jds-layout-small-right .jds-slide-media { order: 1; }
  .jds-layout-large-right .jds-slide-body,
  .jds-layout-small-right .jds-slide-body { order: 2; }
}

@media (max-width: 640px) {
  /* On small screens let the slide auto-size so content isn't squashed */
  .jds-fixed-height { height: auto; min-height: var(--jds-height-sm, var(--jds-height-md, var(--jds-height, 350px))); }
  .jds-slider-track, .jds-slide, .jds-slide-inner { height: auto; }
  /* small: stack vertically */
  .jds-slide-inner { grid-template-columns: 1fr; }
  /* Give media a reasonable visible height and keep cover crop */
  .jds-slide-media { height: clamp(220px, 55vw, 380px); }
  .jds-slide-text p { margin: 0 0 12px; max-width: 80vw;}
  /* Breathing room at bottom so button/dots don't hit the edge */
  .jds-slider { padding-bottom: 18px; }
  
}

/* Typography clamp for better scaling */
.jds-slide-title { font-size: clamp(1.25rem, 2vw + .5rem, 2rem); }
.jds-slide-text { font-size: clamp(.95rem, 1.2vw + .5rem, 1.125rem); }
.jds-slide-text p { display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }

/* Per-slide image positioning overrides (for quick manual tuning) */
.jds-slider .jds-slide:nth-of-type(1) .jds-slide-media img { object-position: top center !important; }
.jds-slider .jds-slide:nth-of-type(2) .jds-slide-media img { object-position: top center !important; }
.jds-slider .jds-slide:nth-of-type(3) .jds-slide-media img { object-position: center center !important; }
.jds-slider .jds-slide:nth-of-type(4) .jds-slide-media img { object-position: center center !important; }