.khen-home-s2 {
  position: relative;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
  padding: 44px 0;
  min-height: 550px;
}

.khen-home-s2-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.khen-home-s2-heading {
  margin: 0 auto 48px;
  max-width: 584px;
  text-align: center;
  color: #ffffff;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
  font-size: 32px;
  line-height: 42px;
  font-weight: 400;
  white-space: normal;
}

.khen-home-s2-carousel-wrap {
  position: relative;
  z-index: 2;
}

.khen-home-s2-carousel {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 24px;
  border-radius: 12px;
}

.khen-home-s2-carousel::-webkit-scrollbar {
  display: none;
}

.khen-home-s2-card {
  position: relative;
  scroll-snap-align: start;
  flex: 0 0 100%;
  max-width: 100%;
  min-width: 0;
  color: #ffffff;
}

.khen-home-s2-image-wrap {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 12px;
}

.khen-home-s2-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.22) 48%,
    rgba(0, 0, 0, 0.72) 78%,
    #000000 100%
  );
  pointer-events: none;
  z-index: 1;
}

.khen-home-s2-image {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.khen-home-s2-content {
  position: relative;
  z-index: 2;
  margin-top: -50px;
  padding: 0 16px 12px;
}

.khen-home-s2-title {
  margin: 0 0 36px;
  color: #ffffff;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
  font-size: 24px;
  line-height: 1.3;
  font-weight: 400;
}

.khen-home-s2-desc {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
}

.khen-home-s2-nav {
  position: absolute;
  top: 42%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.khen-home-s2-nav:hover {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.khen-home-s2-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

.khen-home-s2-prev {
  left: -10px;
}

.khen-home-s2-next {
  right: -10px;
}

.khen-home-s2-frame {
  position: absolute;
  right: -150px;
  bottom: -92px;
  width: min(55vw, 560px);
  max-width: 560px;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

.khen-home-s2-pattern {
  position: absolute;
  left: -150px;
  top: -170px;
  width: min(320px, 560px);
  max-width: 560px;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

.khen-home-s2-dots {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.khen-home-s2-dot {
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.khen-home-s2-dot:hover {
  transform: scale(1.08);
}

.khen-home-s2-dot-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.khen-home-s2-dot.is-active {
  transform: scale(1.04);
}

.khen-home-s2-more-wrap {
  margin: 18px auto 0;
  text-align: center;
  position: relative;
        z-index: 2;
}

.khen-home-s2-more-wrap .khen-home-s4-more {
  color: #ffffff;
}

@media (min-width: 768px) and (max-width: 1024px) {
  .khen-home-s2-card {
    flex-basis: calc((100% - 8px) / 2);
    max-width: calc((100% - 8px) / 2);
  }

  .khen-home-s2-frame {
    right: -120px;
    bottom: -80px;
    width: min(66vw, 420px);
  }

  .khen-home-s2-pattern {
    left: -120px;
    top: -80px;
    width: min(66vw, 420px);
  }
}

@media (max-width: 767px) {
  .khen-home-s2 {
    padding-top: 48px;
    min-height: 470px;
  }

  .khen-home-s2-inner {
    padding: 0 16px 32px;
  }

  .khen-home-s2-heading {
    margin-bottom: 32px;
    font-size: 24px;
    line-height: 1.4;
    
  }

  .khen-home-s2-content {
    margin-top: -52px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .khen-home-s2-card {
    flex-basis: 100%;
    max-width: 100%;
  }

  .khen-home-s2-title {
    margin-bottom: 36px;
    font-size: 22px;
  }

  .khen-home-s2-desc {
    font-size: 15px;
  }

  .khen-home-s2-nav {
    width: 36px;
    height: 36px;
    font-size: 13px;
    top: 42%;
    transform: translateY(-50%);
  }

  .khen-home-s2-prev {
    left: 8px;
  }

  .khen-home-s2-next {
    right: 8px;
  }

  .khen-home-s2-dots {
    gap: 10px;
  }

  .khen-home-s2-dot-icon {
    width: 14px;
    height: 14px;
  }

  .khen-home-s2-pattern {
    left: -50px;
    top: -140px;
    width: min(60vw, 320px);
  }

  .khen-home-s2-frame {
    right: -60px;
    bottom: -122px;
    width: min(80vw, 320px);
  }

  .khen-home-s2-more-wrap {
    margin-top: 16px;
  }
}
