/* ============================================================
   QB Image Slider — Stylesheet v1.0.0
   Elegant, animated, center-focus image carousel
   ============================================================ */

/* ── Google Font import (Playfair Display + DM Sans) ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Base Reset ─────────────────────────────────────── */
.qb-image-slider-wrap *,
.qb-image-slider-wrap *::before,
.qb-image-slider-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Wrapper ─────────────────────────────────────────── */
.qb-image-slider-wrap {
  position: relative;
  background: var(--qb-section-bg, #0a0a0f);
  padding-top: var(--qb-padding-top, 60px);
  padding-bottom: var(--qb-padding-bottom, 60px);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* Subtle radial glow behind the active slide */
.qb-image-slider-wrap::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  height: 70%;
  background: radial-gradient(ellipse at center,
    rgba(255,255,255,0.06) 0%,
    transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Stage ───────────────────────────────────────────── */
.qb-slider-stage {
  position: relative;
  width: 100%;
  overflow: hidden;
  z-index: 1;
}

/* ── Track (horizontal flex belt) ───────────────────── */
.qb-slider-track {
  display: flex;
  align-items: center;
  transition: transform var(--qb-transition-speed, 600ms) cubic-bezier(0.36, 0.07, 0.19, 0.97);
  will-change: transform;
}

/* ── Individual Slide ────────────────────────────────── */
.qb-slide {
  flex: 0 0 auto;
  position: relative;
  transition:
    transform   var(--qb-transition-speed, 600ms) cubic-bezier(0.36, 0.07, 0.19, 0.97),
    opacity     var(--qb-transition-speed, 600ms) ease,
    filter      var(--qb-transition-speed, 600ms) ease,
    z-index     0ms 0ms;
  transform: scale(var(--qb-inactive-scale, 0.75));
  opacity: var(--qb-inactive-opacity, 0.55);
  filter: saturate(0.5);
  z-index: 1;
  cursor: pointer;
}

.qb-slide.is-active {
  transform: scale(1) !important;
  opacity: 1 !important;
  filter: saturate(1) !important;
  z-index: 10;
  cursor: default;
}

/* ── Slide Inner ─────────────────────────────────────── */
.qb-slide-inner {
  position: relative;
  border-radius: var(--qb-border-radius, 16px);
  overflow: hidden;
  background: #1a1a22;
}

/* Box shadow — applied via JS toggle class */
.qb-has-shadow .qb-slide.is-active .qb-slide-inner {
  box-shadow:
    0 30px 80px rgba(0,0,0,0.6),
    0 10px 30px rgba(0,0,0,0.4),
    0  2px  8px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.qb-has-shadow .qb-slide:not(.is-active) .qb-slide-inner {
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

/* ── Image Wrap & Aspect Ratio ───────────────────────── */
.qb-slide-image-wrap {
  position: relative;
  width: 100%;
  padding-top: var(--qb-aspect-ratio, 56.25%);
  overflow: hidden;
}

.qb-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--qb-image-fit, cover);
  display: block;
  transition: transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* ── Hover Zoom ──────────────────────────────────────── */
.qb-has-hover-zoom .qb-slide.is-active .qb-slide-inner:hover .qb-slide-img {
  transform: scale(1.06);
}

/* ── Slide Overlay (inactive dim) ────────────────────── */
.qb-slide-overlay {
  position: absolute;
  inset: 0;
  background: var(--qb-overlay-color, rgba(0,0,0,0.4));
  transition: opacity var(--qb-transition-speed, 600ms) ease;
  pointer-events: none;
  z-index: 2;
}

.qb-slide.is-active .qb-slide-overlay {
  opacity: 0;
}

/* ── Link ────────────────────────────────────────────── */
.qb-slide-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* ── Caption (Below) ─────────────────────────────────── */
.qb-caption-below {
  padding: 18px 20px 20px;
  text-align: var(--qb-caption-align, center);
  background: transparent;
  transition: opacity var(--qb-transition-speed, 600ms) ease,
              transform var(--qb-transition-speed, 600ms) ease;
}

/* Caption only on active */
.qb-caption-active-only .qb-slide:not(.is-active) .qb-caption-below {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.qb-caption-active-only .qb-slide.is-active .qb-caption-below {
  opacity: 1;
  transform: translateY(0);
}

/* ── Caption (Overlay) ───────────────────────────────── */
.qb-caption-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 40px 24px 22px;
  background: linear-gradient(to top, var(--qb-caption-bg, rgba(0,0,0,0.55)) 0%, transparent 100%);
  text-align: var(--qb-caption-align, center);
  transition: opacity var(--qb-transition-speed, 600ms) ease,
              transform var(--qb-transition-speed, 600ms) ease;
}

.qb-caption-active-only .qb-slide:not(.is-active) .qb-caption-overlay {
  opacity: 0;
  transform: translateY(8px);
}

.qb-caption-active-only .qb-slide.is-active .qb-caption-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* ── Title & Subtitle ────────────────────────────────── */
.qb-slide-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--qb-title-size, 20px);
  font-weight: 600;
  color: var(--qb-title-color, #ffffff);
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-bottom: 4px;
}

.qb-slide-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--qb-subtitle-size, 14px);
  font-weight: 300;
  color: var(--qb-subtitle-color, rgba(255,255,255,0.75));
  line-height: 1.5;
  letter-spacing: 0.03em;
}

/* ── Arrows ──────────────────────────────────────────── */
.qb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: var(--qb-arrow-bg, rgba(0,0,0,0.5));
  color: var(--qb-arrow-color, #ffffff);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 250ms ease;
  outline: none;
  line-height: 0;
}

.qb-arrow svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.qb-arrow-prev { left: 16px; }
.qb-arrow-next { right: 16px; }

/* Circle style */
.qb-arrow-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.qb-arrow-circle:hover {
  transform: translateY(-50%) scale(1.1);
  background: rgba(255,255,255,0.18);
}

/* Square style */
.qb-arrow-square {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.qb-arrow-square:hover {
  transform: translateY(-50%) scale(1.08);
}

/* Minimal style */
.qb-arrow-minimal {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: transparent !important;
}
.qb-arrow-minimal:hover {
  transform: translateY(-50%) scale(1.2);
}
.qb-arrow-minimal svg {
  width: 26px;
  height: 26px;
}

/* Outlined style */
.qb-arrow-outlined {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: transparent !important;
  border: 2px solid var(--qb-arrow-color, #ffffff);
}
.qb-arrow-outlined:hover {
  background: var(--qb-arrow-color, #ffffff) !important;
  color: #000;
  transform: translateY(-50%) scale(1.05);
}

/* Arrow active press */
.qb-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

/* ── Dots ────────────────────────────────────────────── */
.qb-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  position: relative;
  z-index: 10;
}

/* Circles style */
.qb-dots-circles .qb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--qb-dot-inactive, rgba(255,255,255,0.4));
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 300ms ease;
  outline: none;
}
.qb-dots-circles .qb-dot.is-active {
  width: 28px;
  border-radius: 4px;
  background: var(--qb-dot-active, #ffffff);
}
.qb-dots-circles .qb-dot:hover:not(.is-active) {
  background: rgba(255,255,255,0.6);
  transform: scale(1.2);
}

/* Lines style */
.qb-dots-lines .qb-dot {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--qb-dot-inactive, rgba(255,255,255,0.4));
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 300ms ease;
  outline: none;
}
.qb-dots-lines .qb-dot.is-active {
  width: 48px;
  background: var(--qb-dot-active, #ffffff);
}

/* Numbers style */
.qb-dots-numbers .qb-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--qb-dot-inactive, rgba(255,255,255,0.15));
  color: var(--qb-dot-inactive, rgba(255,255,255,0.5));
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  transition: all 300ms ease;
  outline: none;
}
.qb-dots-numbers .qb-dot.is-active {
  background: var(--qb-dot-active, #ffffff);
  color: #111;
  border-color: transparent;
  font-weight: 700;
}

/* ── Empty State ─────────────────────────────────────── */
.qb-slider-placeholder {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255,255,255,0.4);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  border: 1px dashed rgba(255,255,255,0.15);
  border-radius: 12px;
  margin: 0 20px;
}

/* ════════════════════════════════════════════════════════
   LAYOUT VARIATIONS
   ════════════════════════════════════════════════════════ */

/* ── Layout: Coverflow (default) ─────────────────────── */
.qb-layout-coverflow .qb-slide:not(.is-active) {
  /* side slides tilt via JS with rotateY */
}

/* ── Layout: Perspective Depth ───────────────────────── */
.qb-layout-perspective .qb-slider-stage {
  perspective: 1200px;
}
.qb-layout-perspective .qb-slide:not(.is-active) {
  /* JS applies rotateY for depth */
}

/* ── Layout: Flat Fade ───────────────────────────────── */
.qb-layout-flatfade .qb-slide {
  transform: scale(var(--qb-inactive-scale, 0.85));
  filter: none !important;
}
.qb-layout-flatfade .qb-slide.is-active {
  transform: scale(1) !important;
}

/* ── Layout: Cards Stack ─────────────────────────────── */
.qb-layout-cards .qb-slider-stage {
  perspective: 1000px;
}
.qb-layout-cards .qb-slide:not(.is-active) {
  /* JS applies translateZ and rotation for stack depth */
}

/* ════════════════════════════════════════════════════════
   ENTRANCE ANIMATION (on page load / scroll into view)
   ════════════════════════════════════════════════════════ */
.qb-image-slider-wrap {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.qb-image-slider-wrap.qb-is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .qb-arrow-prev { left: 8px; }
  .qb-arrow-next { right: 8px; }
}

@media (max-width: 768px) {
  .qb-arrow {
    display: none;
  }
  .qb-dots {
    margin-top: 20px;
  }
}

/* ════════════════════════════════════════════════════════
   DRAG CURSOR STATES
   ════════════════════════════════════════════════════════ */
.qb-slider-stage.is-dragging {
  cursor: grabbing !important;
}
.qb-slider-stage {
  cursor: grab;
}
.qb-slide.is-active .qb-slider-stage {
  cursor: default;
}

/* ════════════════════════════════════════════════════════
   PROGRESS BAR (autoplay indicator)
   ════════════════════════════════════════════════════════ */
.qb-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.8),
    rgba(255,255,255,0.4)
  );
  z-index: 20;
  transition: width linear;
  border-radius: 0 2px 2px 0;
}

/* ════════════════════════════════════════════════════════
   ACTIVE SLIDE SHINE EFFECT
   ════════════════════════════════════════════════════════ */
.qb-slide.is-active .qb-slide-inner::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.08) 50%,
    transparent 100%
  );
  transform: skewX(-15deg);
  animation: qb-shine 3.5s ease 0.8s 1 forwards;
  pointer-events: none;
  z-index: 6;
}

@keyframes qb-shine {
  0%   { left: -75%; opacity: 1; }
  100% { left: 125%;  opacity: 0; }
}

/* Disable shine on inactive slides */
.qb-slide:not(.is-active) .qb-slide-inner::after {
  display: none;
}

/* ════════════════════════════════════════════════════════
   WP BAKERY BACKEND EDITOR COMPAT
   ════════════════════════════════════════════════════════ */
.vc_element .qb-image-slider-wrap {
  opacity: 1 !important;
  transform: none !important;
}