/* ── Zhapes Banner v4.0 ───────────────────────────────────────────────────── */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.zbw-banner-wrapper {
  position: relative;
  width: 100%;
}

/* ── Banner principal ────────────────────────────────────────────────────── */
.zbw-banner {
  width: 100%;
  height: 600px;
  overflow: hidden;
  position: relative;
  display: block;
}

/* ── Slides ──────────────────────────────────────────────────────────────── */
/* Slides stack via position:absolute + inset:0.
   JS toggles .zbw-slide-active; CSS drives opacity + z-index. */
.zbw-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 9;
  overflow: hidden;
  transition: opacity 600ms ease; /* overridden by Elementor fade_duration selector */
}

.zbw-slide.zbw-slide-active {
  opacity: 1;
  z-index: 10;
}

/* ── Background layer ────────────────────────────────────────────────────── */
.zbw-slide-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  transition: transform 8s ease;
}

/* Ken Burns: only fires when the slide has both .zbw-ken-burns and .zbw-slide-active */
.zbw-ken-burns.zbw-slide-active .zbw-slide-bg-layer       { transform: scale(1.08); }
.zbw-ken-burns:not(.zbw-slide-active) .zbw-slide-bg-layer { transform: scale(1); }

/* ── Background video ────────────────────────────────────────────────────── */
.zbw-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* ── Overlay ─────────────────────────────────────────────────────────────── */
.zbw-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Slide content ───────────────────────────────────────────────────────── */
/*
  Full-size flex container so Elementor content is centred by default.
  Alignment overridable via Elementor controls on the inner template.
*/
.zbw-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  box-sizing: border-box;
}

/* ── Placeholder (editor only) ───────────────────────────────────────────── */
.zbw-placeholder-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 32px;
  background: rgba(0,0,0,0.35);
  border: 1px dashed rgba(255,255,255,0.4);
  border-radius: 8px;
}
.zbw-placeholder-label { color: #fff; font-size: 1.1rem; font-weight: 600; }
.zbw-placeholder-hint  { color: rgba(255,255,255,0.65); font-size: 0.8rem; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
/*
  Positioned inside .zbw-banner. z-index is above the active slide (10).
  Default: bottom-center. All position properties overridden by Elementor
  dots_pos_x / dots_pos_y selectors — no margin adjustments needed.
*/
.zbw-pagination {
  position: absolute !important;
  z-index: 50 !important;
  display: flex !important;
  align-items: center;
  pointer-events: auto !important;
  bottom: 20px;
  top: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
}

/* ── Dots ─────────────────────────────────────────────────────────────────── */
/* <span> instead of <button> avoids all theme/Elementor button-size inflation.
   !important on the resets ensures no theme rule can override them. */
.zbw-dot {
  display: inline-block !important;
  flex-shrink: 0;
  width: 10px !important;
  height: 10px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,0.5);
  margin: 0 5px;
  padding: 0 !important;
  border: none !important;
  cursor: pointer;
  pointer-events: auto;
  box-sizing: content-box !important;
  transition: background 0.3s, width 0.35s, height 0.35s, border-radius 0.35s;
}

.zbw-dot:focus-visible {
  outline: 2px solid rgba(255,255,255,0.8);
  outline-offset: 2px;
}

.zbw-dot.zbw-dot-active {
  background: #fff;
}

/* ── Arrow wrappers ───────────────────────────────────────────────────────── */
/*
  Positioned absolute inside .zbw-banner-wrapper (position:relative).
  Wrapper height equals banner height, so top:50% centres vertically.
  Exact position is driven by Elementor arrow_pos_x / arrow_pos_y selectors.
*/
.zbw-arrow-prev-wrap,
.zbw-arrow-next-wrap {
  position: absolute;
  z-index: 200;
  pointer-events: none;
  top: 50%;
  transform: translateY(-50%);
}

.zbw-arrow-prev-wrap { left: 20px; }
.zbw-arrow-next-wrap { right: 20px; }

/* ── Arrow button ─────────────────────────────────────────────────────────── */
.zbw-arrow {
  pointer-events: auto;
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.3);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* backdrop-filter driven entirely by Elementor selectors on arrow_blur_enable / arrow_blur_amount */
  transition: background 0.25s, transform 0.25s, border-color 0.25s;
  user-select: none;
  padding: 0;
  outline: none;
}

.zbw-arrow svg {
  width: 22px;
  height: 22px;
  display: block;
  pointer-events: none;
}

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

.zbw-arrow:hover {
  background: rgba(0,0,0,0.6);
  transform: scale(1.08);
}

.zbw-arrow[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .zbw-slide-content { padding: 30px 40px; }
}

@media (max-width: 768px) {
  .zbw-arrow { width: 38px; height: 38px; font-size: 18px; }
  .zbw-arrow svg { width: 18px; height: 18px; }
  .zbw-slide-content { padding: 20px 24px; }
}
