/* ============================================================
   WT Image Slider – Public Styles  v1.0.2
   ============================================================ */

/* ── Section Wrapper ─────────────────────────────────────── */
.wis-slider-section {
  position: relative;
  background-color: var(--wis-bg-color, #142143);
  padding-top: var(--wis-pt, 40px);
  padding-bottom: var(--wis-pb, 40px);
  width: 100%;
  box-sizing: border-box;
}

/* ── Clip wrapper: block horizontal scroll, allow pill overlay ── */
.wis-swiper-clip {
  overflow-x: clip; /* chặn slide tràn ngang */
  overflow-y: visible; /* cho sh-pill lộ ra */
  width: 100%;
}

/* ── Swiper container ─────────────────────────────────────── */
.wis-swiper {
  overflow: visible; /* slide kề nhìn thấy */
}

/* ── Slide ────────────────────────────────────────────────── */
.wis-slide {
  display: flex;
  /* height do wis-card quyết định */
}

/* ── Card – khung chung cho mỗi slide ────────────────────── */
.wis-card {
  width: 100%;
  height: var(--wis-height, 350px);
  border-radius: var(--wis-radius, 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-sizing: border-box;
}

/* Quote card: không cố định height – để nội dung tự quyết định */
.wis-card.wis-card-quote {
  height: auto;
  min-height: var(--wis-height, 350px);
  overflow: visible;
}

/* ── Card Image ───────────────────────────────────────────── */
.wis-card-image {
  display: block;
}

.wis-card-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: var(--wis-fit, cover);
  object-position: center;
  /* Không đặt border-radius ở đây – card đã overflow:hidden */
}

/* ── Card Quote ───────────────────────────────────────────── */
.wis-card-quote {
  background: transparent;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-height: 100%;
}

.wis-quote-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  width: 100%;
}

/* ── Header (ẩn – layout mới không dùng header riêng) ─── */
.wis-quote-header {
  display: none;
}

.wis-quote-icon {
  fill: #e6ab12;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  opacity: 0.95;
  align-self: center;
}

.wis-quote-title {
  display: none; /* tiêu đề không hiển thị trong layout mới */
}

.wis-quote-body {
  font-size: 20px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.6;
  color: #e6ab12;
  flex: 1;
  margin: 0;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ── Fallback sh-pill nếu swipe-hint.css không load ──────── */
.sh-pill {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(30, 30, 30, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  padding: 10px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
  user-select: none;
}

.sh-visible .sh-pill {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sh-hidden .sh-pill {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sh-prev,
.sh-next {
  background: transparent;
  border: none;
  outline: none;
  padding: 2px;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.88);
  flex-shrink: 0;
}

.sh-icon {
  display: flex;
  align-items: center;
  pointer-events: none;
}

/* Ẩn pill trên desktop */
@media (min-width: 1024px) {
  .wis-slider-section .sh-pill {
    display: none !important;
  }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .wis-card-quote {
    padding: 0px 20px;
    min-height: var(--wis-height, 200px);
  }
  .wis-quote-inner {
    gap: 14px;
    align-items: flex-start;
  }
  .wis-quote-icon {
    width: 28px;
    height: 28px;
    margin-top: 2px;
  }
  .wis-quote-body {
    font-size: 15px;
    line-height: 1.65;
  }
}

@media (max-width: 480px) {
  .wis-card-quote {
    padding: 0px 16px;
  }
  .wis-quote-inner {
    gap: 10px;
  }
  .wis-quote-icon {
    width: 24px;
    height: 24px;
  }
  .wis-quote-body {
    font-size: 14px;
    line-height: 1.7;
  }
}

/* ── Smooth / Marquee mode ────────────────────────────────── */
/*
 * Khi dùng RAF marquee, Swiper không còn quản lý transform.
 * Cần đảm bảo wrapper là flex container không wrap,
 * và clip container chặn overflow.
 */
.wis-smooth-mode .wis-swiper-clip {
  overflow: hidden; /* clip cứng – không dùng clip vì cần ẩn hoàn toàn */
}

.wis-smooth-mode .wis-swiper {
  overflow: visible;
}

.wis-smooth-mode .swiper-wrapper {
  display: flex;
  flex-wrap: nowrap;
  /* transition đã bị tắt bởi JS (style.transition = 'none') */
  will-change: transform;
}

.wis-smooth-mode .swiper-slide {
  flex-shrink: 0;
}
