/* ============================================================
   Cinematic Story Slider — Frontend Styles  v1.0.0
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────────── */
.css-slider-wrapper *,
.css-slider-wrapper *::before,
.css-slider-wrapper *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.css-slider-wrapper {
  position: relative;
  width: 100%;
  max-height: 500px;
  overflow: hidden;
  background: #0d0d0d;
  font-family: Georgia, 'Times New Roman', serif;
  -webkit-user-select: none;
  user-select: none;
  /* Prevent content reflow from slides below */
  contain: layout;
}

/* ── Track ───────────────────────────────────────────────────── */
.css-slider-track {
  position: relative;
  width: 100%;
  height: 500px;
  max-height: 500px;
}

/* ── Individual Slide ────────────────────────────────────────── */
.css-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity;
  z-index: 1;
}

.css-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* ── Background ──────────────────────────────────────────────── */
.css-slide-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.css-slide-image,
.css-slide-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  /* Subtle Ken Burns zoom-in while slide is inactive */
  transform: scale(1.06);
  transition: transform 7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.css-slide.is-active .css-slide-image,
.css-slide.is-active .css-slide-video {
  transform: scale(1);
}

/* ── Cinematic Overlay ───────────────────────────────────────── */
/*
   Gradient darkens left edge gently, then sweeps to a strong
   dark vignette on the right where the text lives — matching
   the reference image's warm, editorial mood.
*/
.css-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background:
    /* Right-side text legibility */
    linear-gradient(
      to left,
      rgba(0, 0, 0, calc(var(--ov, 0.6) * 1.0)) 0%,
      rgba(0, 0, 0, calc(var(--ov, 0.6) * 0.55)) 38%,
      rgba(0, 0, 0, calc(var(--ov, 0.6) * 0.15)) 62%,
      transparent 100%
    ),
    /* Global cinematic tint */
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, calc(var(--ov, 0.6) * 0.30)) 0%,
      transparent 50%,
      rgba(0, 0, 0, calc(var(--ov, 0.6) * 0.45)) 100%
    );
}

/* ── Play Button ─────────────────────────────────────────────── */
.css-slide-play {
  position: absolute;
  /* Horizontally centered, vertically centered */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  width: 84px;
  height: 84px;
  background: transparent;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.25s ease;
  opacity: 0.92;
}

.css-slide-play:hover,
.css-slide-play:focus-visible {
  transform: translate(-50%, -50%) scale(1.13);
  opacity: 1;
  outline: none;
}

.css-slide-play:focus-visible {
  box-shadow: 0 0 0 3px rgba(255,255,255,0.6);
  border-radius: 50%;
}

.css-slide-play svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

/* ── Content Panel ───────────────────────────────────────────── */
.css-slide-content {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 52px 44px 40px;
  /* Transition in when slide becomes active */
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease 0.3s, transform 0.6s ease 0.3s;
}

.css-slide.is-active .css-slide-content {
  opacity: 1;
  transform: translateY(0);
}

/* Alignment variants */
.css-align-right {
  right: 0;
  left: auto;
  width: min(46%, 520px);
  align-items: flex-start;
  text-align: left;
}

.css-align-left {
  left: 0;
  right: auto;
  width: min(46%, 520px);
  align-items: flex-start;
  text-align: left;
}

.css-align-center {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: min(60%, 620px);
  align-items: center;
  text-align: center;
}

.css-slide.is-active .css-align-center {
  transform: translateX(-50%) translateY(0);
}

/* ── Heading ─────────────────────────────────────────────────── */
.css-slide-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 14px;
  text-shadow:
    0 2px 4px rgba(0,0,0,0.4),
    0 6px 24px rgba(0,0,0,0.25);
}

/* ── Subheading ──────────────────────────────────────────────── */
.css-slide-subheading {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: clamp(0.8rem, 1.35vw, 1.05rem);
  font-weight: 400;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 26px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.css-slide-subheading strong {
  font-weight: 700;
  color: #fff;
}

/* ── CTA Button ──────────────────────────────────────────────── */
.css-slide-btn {
  display: inline-block;
  padding: 10px 24px;
  background: #285A3D;
  color: #fff;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
}

.css-slide-btn:hover,
.css-slide-btn:focus-visible {
  background: #14532d;
	color: #fff;
  transform: translateY(-2px);
  outline: none;
/*   border-color: rgba(255,255,255,0.4); */
}

/* ── Navigation Arrows ───────────────────────────────────────── */
.css-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 90px;
  background: rgba(0, 0, 0, 0.28);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition:
    background 0.25s ease,
    transform 0.2s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.css-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.css-arrow:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: -2px;
}

.css-arrow-prev { left: 0; border-radius: 0 4px 4px 0; }
.css-arrow-next { right: 0; border-radius: 4px 0 0 4px; }

.css-arrow svg {
  width: 22px;
  height: 36px;
  flex-shrink: 0;
}
button.css-arrow:focus,
button.css-arrow:active {
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}
/* ── Pagination Dots ─────────────────────────────────────────── */
.css-pagination {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 9px;
  align-items: center;
}

.css-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition:
    background 0.35s ease,
    transform 0.35s ease,
    width 0.35s ease,
    border-radius 0.35s ease;
}

.css-dot.is-active {
  background: #f5c518;
  border-color: #f5c518;
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(245, 197, 24, 0.6);
}

.css-dot:hover:not(.is-active) {
  background: rgba(255,255,255,0.7);
}

.css-dot:focus-visible {
  outline: 2px solid #f5c518;
  outline-offset: 3px;
}

/* ── Video Modal ─────────────────────────────────────────────── */
.css-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.css-modal[hidden] {
  display: none;
}

.css-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
  animation: cssModalBgIn 0.3s ease forwards;
}

@keyframes cssModalBgIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.css-modal-inner {
  position: relative;
  z-index: 1;
  width: 90vw;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  animation: cssModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes cssModalIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.css-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.css-modal-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.css-modal-close:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.css-modal-close svg {
  width: 18px;
  height: 18px;
}

/* ── No Slides Placeholder ───────────────────────────────────── */
.css-slider-no-slides {
  padding: 20px;
  color: #888;
  font-style: italic;
}

/* ============================================================
   Responsive
   ============================================================ */

/* ── Tablet (≤ 900px) ────────────────────────────────────────── */
@media (max-width: 900px) {
  .css-slider-track { height: 420px; }
  .css-slider-wrapper { max-height: 420px; }

  .css-align-right,
  .css-align-left {
    width: min(55%, 400px);
  }
}

/* ── Mobile landscape / small tablet (≤ 680px) ──────────────── */
@media (max-width: 680px) {
  .css-slider-track { height: 360px; }
  .css-slider-wrapper { max-height: 360px; }

  /* On small screens all content goes bottom-center */
  .css-slide-content {
    inset: auto 0 44px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    left: 0 !important;
    right: 0 !important;
    padding: 20px 24px;
    align-items: center;
    text-align: center;
    /* Gradient from bottom */
  }

  .css-slide.is-active .css-slide-content {
    transform: none !important;
  }

  .css-slide-heading {
    font-size: clamp(1.4rem, 5.5vw, 2rem);
  }

  .css-slide-subheading {
    font-size: 0.82rem;
    margin-bottom: 14px;
  }

  .css-slide-play {
    width: 62px;
    height: 62px;
    top: 38%;
  }

  .css-arrow {
    width: 34px;
    height: 64px;
  }

  .css-arrow svg {
    width: 16px;
    height: 28px;
  }

  .css-pagination {
    bottom: 14px;
  }
}

/* ── Mobile portrait (≤ 480px) ──────────────────────────────── */
@media (max-width: 480px) {
  .css-slider-track { height: 280px; }
  .css-slider-wrapper { max-height: 280px; }

  .css-slide-play {
    width: 50px;
    height: 50px;
    top: 35%;
  }

  .css-slide-btn {
    font-size: 0.7rem;
    padding: 8px 18px;
  }
}

/* ── Reduced motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .css-slide,
  .css-slide-image,
  .css-slide-video,
  .css-slide-content,
  .css-slide-play,
  .css-arrow,
  .css-dot {
    transition: none !important;
    animation: none !important;
  }
}
