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

.khs__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: clamp(24px, 3vw, 40px);
}

.khs__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  color: #fff;
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.khs__card:hover,
.khs__card:focus-visible {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-4px);
}

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

.khs__top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.khs__avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px #151515, 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.khs__who {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.khs__who strong {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.khs__who span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.khs__go {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.3s ease;
}

.khs__go img {
  width: 14px;
  height: 14px;
}

.khs__card:hover .khs__go {
  transform: rotate(45deg);
}

.khs__posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  border-radius: 10px;
  overflow: hidden;
}

.khs__posts img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.khs__card:hover .khs__posts img {
  transform: scale(1.05);
}

.khs__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.khs__foot span:last-child {
  color: #fff;
  white-space: nowrap;
}

/* tablet and phone: swipe through the cards instead of stacking them */
@media (max-width: 991px) {
  .khs__track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-right: -15px;
    padding-right: 15px;
  }

  .khs__track::-webkit-scrollbar {
    display: none;
  }

  .khs__card {
    flex: 0 0 min(82%, 360px);
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .khs__card,
  .khs__go,
  .khs__posts img {
    transition: none;
  }
}
