/* Home page "Social Media" showcase (includes/home-social.php + assets/js/home-social.js) */
.khs {
  padding: clamp(56px, 7vw, 96px) 0 clamp(40px, 5vw, 72px);
}

.khs__stage {
  position: relative;
  height: clamp(520px, 52vw, 660px);
  margin-top: clamp(24px, 3vw, 40px);
  border-radius: 20px;
  overflow: hidden;
  background: #111;
  touch-action: pan-y;
  isolation: isolate;
}

.khs__slide {
  position: absolute;
  inset: 0;
  visibility: hidden;
  perspective: 1400px;
}

.khs__slide.is-active,
.khs__slide.is-moving {
  visibility: visible;
}

.khs__slide.is-active { z-index: 1; }
.khs__slide.is-moving { z-index: 2; }

.khs__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.khs__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.khs__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* poster card in the middle (centred with `translate` so JS can animate `transform` freely) */
.khs__card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(236px, 24vw, 310px);
  translate: -50% -54%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 12px 14px;
  background: #f6f1e7;
  color: #14321f;
  border-radius: 10px;
  text-decoration: none;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.55);
  backface-visibility: hidden;
}

.khs__card:hover,
.khs__card:focus-visible {
  color: #14321f;
}

.khs__card:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}

.khs__photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  overflow: hidden;
}

.khs__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.khs__name {
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.khs__rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.khs__rows b {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.khs__view {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #14321f;
  color: #f6f1e7;
  font-size: 12px;
  font-weight: 600;
}

.khs__view img {
  width: 10px;
  height: 10px;
  filter: invert(1);
}

/* dots with a filling timer + arrows */
.khs__nav {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.khs__dots {
  display: flex;
  gap: 8px;
}

.khs__dot {
  width: 34px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.khs__dot i {
  position: relative;
  display: block;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.khs__dot i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

.khs__dot.is-active i::after {
  animation: khs-fill var(--khs-hold, 3000ms) linear forwards;
}

.khs__stage.is-paused .khs__dot.is-active i::after {
  animation-play-state: paused;
}

@keyframes khs-fill {
  to { transform: scaleX(1); }
}

.khs__arrows {
  display: flex;
  gap: 8px;
}

.khs__arrow {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  cursor: pointer;
  transition: background 0.25s ease;
}

.khs__arrow:hover {
  background: rgba(0, 0, 0, 0.5);
}

.khs__arrow svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

@media (max-width: 767px) {
  .khs__stage {
    height: 560px;
    border-radius: 16px;
  }

  .khs__card {
    width: min(72%, 270px);
  }
}
