.ksw-slider {
  --ksw-accent: #d9a84e;
  --ksw-text: #f2f0ea;
  width: 100%;
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  box-sizing: border-box;
}

/* Guard against theme/global styles bleeding in. Universal selector keeps
   specificity equal (not higher) to our own classes below, so component
   rules like .ksw-eyebrow / .ksw-title correctly win by source order. */
.ksw-slider *,
.ksw-slider *::before,
.ksw-slider *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.ksw-shell { background: #0d1b2a; position: relative; }

.ksw-slides { position: relative; height: 800px; }

.ksw-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease;
}
.ksw-slide.ksw-active { opacity: 1; visibility: visible; z-index: 2; }

/* --- Gradient background (default) --- */
.ksw-slide-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% 100%, var(--ksw-glow, rgba(216,144,71,0.35)) 0%, transparent 60%),
    linear-gradient(180deg, #0a1420 0%, #16283b 55%, #223a52 100%);
}

/* --- Image background --- */
.ksw-slide-picture { position: absolute; inset: 0; display: block; }
.ksw-slide-img, .ksw-mobile-fallback-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ksw-mobile-fallback-img { display: none; }

/* --- Video background (self-hosted / media library) --- */
.ksw-video-wrap { position: absolute; inset: 0; overflow: hidden; }
.ksw-slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- YouTube background (fluid "cover" technique) --- */
.ksw-yt-wrap { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.ksw-yt-wrap iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78vh;
  height: 56.25vw;
  min-height: 100%;
  min-width: 100%;
  transform: translate(-50%, -50%);
}

/* Legibility scrim over photo/video backgrounds */
.ksw-slide-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,10,16,0.2) 0%, rgba(5,10,16,0.45) 55%, rgba(5,10,16,0.65) 100%);
}

/* Hide video / show fallback image on mobile when configured */
@media (max-width: 767px) {
  .ksw-hide-video-mobile .ksw-video-wrap,
  .ksw-hide-video-mobile .ksw-yt-wrap { display: none; }
  .ksw-hide-video-mobile .ksw-mobile-fallback-img { display: block; }
}

.ksw-slide-art {
  position: absolute;
  bottom: 8%;
  right: 8%;
  width: clamp(150px, 28vw, 460px);
  height: clamp(150px, 28vw, 460px);
  opacity: 0.55;
  color: var(--ksw-text);
}
.ksw-slide-art svg { width: 100%; height: 100%; }
.ksw-align-center .ksw-slide-art { right: auto; left: 50%; transform: translateX(-50%); }

.ksw-overlay {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 6vw, 72px) clamp(24px, 8vw, 96px);
}

.ksw-content { max-width: min(560px, 92%); color: var(--ksw-text); }

.ksw-top-icon {
  display: inline-block;
  width: clamp(36px, 5vw, 56px);
  height: clamp(36px, 5vw, 56px);
  margin-bottom: 14px;
  color: var(--ksw-accent);
  text-align: inherit;
}
.ksw-top-icon svg { width: 100%; height: 100%; }

.ksw-eyebrow { font-size: clamp(12px, 1.6vw, 16px); color: #9fb0c0; margin: 0 0 12px; font-weight: 500; }

.ksw-title {
  font-size: clamp(28px, 6vw, 68px);
  font-weight: 300;
  letter-spacing: 0.03em;
  line-height: 1.1;
  margin: 0 0 10px;
}

.ksw-subtitle { font-size: clamp(15px, 2.2vw, 24px); font-weight: 600; margin: 0 0 14px; }

.ksw-description {
  font-size: clamp(13px, 1.7vw, 16px);
  font-weight: 400;
  line-height: 1.9;
  color: #cfd8e0;
  margin: 0 0 26px;
}

.ksw-btn-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.ksw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 24px;
  font-family: inherit;
  font-size: 14px;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
}
.ksw-btn:hover,
.ksw-btn:focus,
.ksw-btn:active,
.ksw-btn:visited {
  text-decoration: none !important;
}

.ksw-btn-one {
  background: var(--ksw-accent);
  color: #1a1310;
  border-color: var(--ksw-accent);
}
.ksw-btn-one:hover { filter: brightness(1.08); }
.ksw-chevron { font-size: 16px; }

.ksw-btn-two {
  background: transparent;
  color: var(--ksw-text);
  border-color: rgba(242,240,234,0.5);
}
.ksw-btn-two:hover { border-color: var(--ksw-text); background: rgba(242,240,234,0.08); }
.ksw-btn-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  order: 2;
}
.ksw-btn-icon svg { width: 100%; height: 100%; }
.ksw-btn-two span:not(.ksw-btn-icon) { order: 1; }

.ksw-align-right .ksw-btn-row { justify-content: flex-start; }
.ksw-align-center .ksw-btn-row { justify-content: center; }

.ksw-align-right .ksw-overlay { align-items: flex-start; text-align: right; }
.ksw-align-center .ksw-overlay { align-items: center; text-align: center; }

.ksw-pos-top .ksw-overlay { justify-content: flex-start; padding-top: clamp(48px, 8vw, 96px); }
.ksw-pos-middle .ksw-overlay { justify-content: center; }
.ksw-pos-bottom .ksw-overlay { justify-content: flex-end; padding-bottom: clamp(48px, 8vw, 96px); }

.ksw-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: transparent;
  border: none;
  color: rgba(242,240,234,0.55);
  font-size: clamp(24px, 3vw, 36px);
  cursor: pointer;
  padding: 10px;
  line-height: 1;
}
.ksw-nav:hover { color: var(--ksw-text); }
.ksw-nav-next { left: 14px; }
.ksw-nav-prev { right: 14px; }

.ksw-knob-area {
  position: absolute;
  bottom: 24px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ksw-knob-center { left: 50%; transform: translateX(-50%); }
.ksw-knob-left { left: 24px; }
.ksw-knob-right { right: 24px; }

.ksw-knob-row { display: flex; align-items: center; gap: 14px; }

.ksw-slide-list { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.ksw-slide-list button {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 2px 2px 4px;
  font-family: inherit;
  font-size: 13px;
  color: #7c8a98;
  text-align: center;
  cursor: pointer;
  max-width: 22vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ksw-slide-list button.ksw-active {
  color: var(--ksw-text);
  font-weight: 600;
  border-bottom-color: var(--ksw-accent);
}

.ksw-ticks { display: flex; flex-direction: column; justify-content: space-between; height: 80px; padding: 2px 0; }

.ksw-tick {
  font-size: 10px;
  font-family: 'Courier New', monospace;
  color: #445260;
  line-height: 1;
}
.ksw-tick.ksw-active { color: var(--ksw-accent); font-weight: 700; }

.ksw-knob-housing {
  position: relative;
  width: 50px;
  height: 88px;
  border-radius: 25px;
  background: linear-gradient(160deg, #454b54 0%, #23272d 55%, #121518 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 6px 12px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
}

.ksw-knob-housing::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 12%;
  right: 12%;
  height: 26%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.22), transparent);
  pointer-events: none;
}

.ksw-knob-marker {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 0;
  height: 0;
  transform: translateY(-50%);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid var(--ksw-accent);
  z-index: 1;
}

.ksw-knob-wrap { position: relative; width: 26px; height: 68px; touch-action: none; outline: none; z-index: 1; }

.ksw-knob-outer {
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: linear-gradient(90deg, #050607 0%, #262b31 30%, #363c43 50%, #262b31 70%, #050607 100%);
  box-shadow: inset 2px 0 3px rgba(0,0,0,0.7), inset -2px 0 3px rgba(0,0,0,0.7), inset 0 2px 4px rgba(0,0,0,0.6), inset 0 -2px 4px rgba(0,0,0,0.6);
  cursor: grab;
  overflow: hidden;
}
.ksw-knob-outer:active { cursor: grabbing; }

.ksw-knob-face {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0.5) 0 2px, transparent 2px 5px, rgba(255,255,255,0.12) 5px 7px, transparent 7px 15px);
  background-size: 100% 30px;
}

.ksw-knob-caption { font-size: 11px; color: #556472; text-align: center; max-width: 160px; line-height: 1.5; }

.ksw-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 767px) {
  .ksw-nav { padding: 6px; }
  .ksw-nav-next { left: 8px; }
  .ksw-nav-prev { right: 8px; }

  .ksw-knob-row { gap: 8px; }
  .ksw-knob-housing { width: 42px; height: 74px; border-radius: 21px; }
  .ksw-knob-wrap { width: 22px; height: 56px; }
  .ksw-ticks { height: 56px; }
  .ksw-slide-list button { font-size: 11px; max-width: 26vw; }
  .ksw-knob-caption { display: none; }
}
