/* =============================================================
   VOKS Hero Slider Block – style.css
   v2: per-slide caption + windowed 3-panel display
   ============================================================= */

.wp-block-voks-hero-slider {
  position: relative;
  width: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Outer ─────────────────────────────────────────────────── */
.voks-hs__outer {
  position: relative;
  overflow: hidden;
}

/* ── Panel row ─────────────────────────────────────────────── */
.voks-hs__panels {
  display: flex;
  align-items: stretch;
  gap: 0;
  
  overflow: hidden;
  position: relative;
   flex: 0 0 calc(100% / var(--voks-hs-count, 3));
}

/* ── Single panel ──────────────────────────────────────────── */
/*
 * Only 3 panels are visible at a time (the "window").
 * Panels outside the window are hidden via JS toggling .voks-hs--hidden.
 * Clip-path + overlap fix applied via CSS vars set inline.
 */

.voks-hs__panel {
  display: flex;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.45s cubic-bezier(.4,0,.2,1),
              opacity 0.35s ease,
              filter 0.35s ease;
}

/* Hidden panels (outside the 3-window) */
.voks-hs__panel.voks-hs--hidden {
  display: none;
  flex: unset;
}

/* Panel clip-path: applied via nth-child of VISIBLE panels
   We handle this with data-pos attribute set by JS */

.voks-hs__panel[data-pos="first"] {
  clip-path: polygon(
    0 0,
    100% 0,
    calc(100% - var(--voks-hs-skew-px, 28px)) 100%,
    0 100%
  );
}

.voks-hs__panel[data-pos="mid"] {
  clip-path: polygon(
    var(--voks-hs-skew-px, 28px) 0,
    100% 0,
    calc(100% - var(--voks-hs-skew-px, 28px)) 100%,
    0 100%
  );
  margin-left: calc(var(--voks-hs-overlap, 24px) * -1);
}

.voks-hs__panel[data-pos="last"] {
  clip-path: polygon(
    var(--voks-hs-skew-px, 28px) 0,
    100% 0,
    100% 100%,
    0 100%
  );
  margin-left: calc(var(--voks-hs-overlap, 24px) * -1);
}

/* Single panel (only 1 slide total) */
.voks-hs__panel[data-pos="only"] {
  clip-path: none;
  flex: 1;
  margin-left: 0;
}

/* Active panel highlight */
.voks-hs__panel.is-active {
  flex: 0 0 60%;
  z-index: 2;
}
.voks-hs__panel[data-pos="only"] {
  flex: 1;
}
/* ── Panel inner (background image) ───────────────────────── */
.voks-hs__panel-inner {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  transition: filter 0.4s ease, transform 0.5s ease;
}

.voks-hs__panel:not(.is-active) .voks-hs__panel-inner {
  filter: brightness(0.65) saturate(0.8);
}

.voks-hs__panel:hover .voks-hs__panel-inner {
  transform: scale(1.04);
}

.voks-hs__panel.is-active .voks-hs__panel-inner {
  filter: brightness(1) saturate(1);
}

/* ── Caption overlay ───────────────────────────────────────── */
.voks-hs__caption {
  position: absolute;
  bottom: 18px;
  right: 20px;
  z-index: 5;
  max-width: 260px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 12px 16px 12px 12px;
  display: flex;
  gap: 7px;
  align-items: flex-start;
  pointer-events: none;

  /* transition for per-slide caption swap */
  transition: opacity 0.3s ease;
}

.voks-hs__caption.voks-hs--fade-out {
  opacity: 0;
}

.voks-hs__caption-quote {
  font-size: 2rem;
  line-height: 0.9;
  color: #C9924A;
  font-family: Georgia, serif;
  flex-shrink: 0;
  margin-top: -3px;
}

.voks-hs__caption-text {
  margin: 0;
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
}

/* ── Dots ──────────────────────────────────────────────────── */
.voks-hs__dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.voks-hs__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(0,0,0,.22);
  cursor: pointer;
  transition: background 0.3s, width 0.3s;
  outline: none;
}

.voks-hs__dot.is-active {
  background: #0D1E3D;
  width: 22px;
  border-radius: 4px;
}

/* ── Arrows ────────────────────────────────────────────────── */
.voks-hs__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
  padding: 0;
}

.voks-hs__outer:hover .voks-hs__arrow { opacity: 1; }
.voks-hs__arrow:hover { background: rgba(255,255,255,.34); }
.voks-hs__arrow--prev { left: 10px; }
.voks-hs__arrow--next { right: 10px; }

.voks-hs__arrow svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Placeholder ───────────────────────────────────────────── */
.voks-hs__panel-placeholder {
  position: absolute;
  inset: 0;
  background: #d0d8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8899bb;
  font-size: 13px;
  font-weight: 500;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 767px) {
  .voks-hs__panels { height: 260px !important; }

  /* Single panel on mobile */
  .voks-hs__panel {
    flex: 0 0 0;
    opacity: 0;
    clip-path: none !important;
    margin-left: 0 !important;
    transition: none;
  }
  .voks-hs__panel.is-active {
    flex: 0 0 100%;
    opacity: 1;
    clip-path: none !important;
    margin-left: 0 !important;
  }
  .voks-hs__panel.voks-hs--hidden { display: none; }

  .voks-hs__caption { max-width: 200px; padding: 10px 12px; }
  .voks-hs__caption-text { font-size: 12px; }
  .voks-hs__caption-quote { font-size: 1.5rem; }
  .voks-hs__arrow { opacity: 1; width: 30px; height: 30px; }
}
