.khen-home-s4 {
  position: relative;
  overflow: hidden;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background-color: #FFF7EA;
  background-image: url("../images/BG3dieu.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  padding: 48px 0;
}

.khen-home-s4::before {
  content: none;
}

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

.khen-home-s4-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.khen-home-s4-title {
  margin: 0;
  color: #002f68;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
  font-size: 32px;
  line-height: 1.5;
  font-weight: 400;
  text-transform: capitalize;
}

.khen-home-s4-more {
  display: inline-flex;
  align-items: center;
  color: #002f68;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  text-decoration: none;
  border-bottom: 2px solid #ff7900;
  padding: 0 10px 5px;
}

.khen-home-s4-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(0, 47, 104, 0.4);
  margin-bottom: 24px;
}

.khen-home-s4-tabs-wrap {
  position: relative;
}

.khen-home-s4-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  text-transform: capitalize;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 36px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.khen-home-s4-tabs:empty {
  display: none;
  margin-bottom: 0;
}

.khen-home-s4-tabs::-webkit-scrollbar {
  display: none;
}

.khen-home-s4-tab {
  border: 0;
  background: transparent;
  color: #002f68;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
  font-size: 20px;
  line-height: 1.5;
  font-weight: 400;
  padding: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  cursor: pointer;
  text-transform: capitalize;
}

.khen-home-s4-tabs-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 34px;
  height: 34px;
  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: #ff7900;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.khen-home-s4-tabs-nav i {
  width: 18px;
  height: 18px;
}

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

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

.khen-home-s4-tabs-prev {
  left: 0;
}

.khen-home-s4-tabs-next {
  right: 0;
}

.khen-home-s4-tab.is-active {
  color: #ff7900;
}

.khen-home-s4-carousel-wrap {
  position: relative;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.khen-home-s4-carousel {
  position: relative;
  aspect-ratio: 2480 / 1754;
  overflow: hidden;
}

.khen-home-s4-carousel .stf__parent {
  width: 100% !important;
  margin: 0 auto;
}

.khen-home-s4-carousel .stf__wrapper {
  width: 100% !important;
}

.khen-home-s4-carousel .stf__block {
  box-shadow: 0 22px 44px rgba(2, 18, 42, 0.32);
  transition: transform 300ms ease;
  will-change: transform;
}

.khen-home-s4-carousel-wrap.is-single-cover .khen-home-s4-carousel .stf__block {
  transform: translateX(-25%);
}

.khen-home-s4-carousel-wrap.is-single-back-cover .khen-home-s4-carousel .stf__block {
  transform: translateX(25%);
}

.khen-home-s4-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  margin-top: -11px;
  border-top: 2px solid rgba(255, 255, 255, 0.9);
  border-right: 2px solid rgba(255, 255, 255, 0.9);
  opacity: 0;
  pointer-events: none;
}

.khen-home-s4-carousel-wrap.is-flip-hint-next::after {
  right: 46px;
  transform: rotate(45deg);
  animation: khenS4FlipHintPulse 1.2s ease-in-out infinite;
}

.khen-home-s4-carousel-wrap.is-flip-hint-prev::after {
  left: 46px;
  transform: rotate(-135deg);
  animation: khenS4FlipHintPulse 1.2s ease-in-out infinite;
}

@keyframes khenS4FlipHintPulse {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 0.95;
  }
}

.khen-home-s4-pageflip-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d274c;
}

.khen-home-s4-pageflip-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.khen-home-s4-pageflip-page.is-empty {
  background: #103e84;
}

.khen-home-s4-pageflip-empty {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("../images/Logo-khen.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: clamp(140px, 46%, 320px) auto;
}

.khen-home-s4-book {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  box-shadow: 0 28px 52px rgba(2, 18, 42, 0.35);
  background: #0a1f3f;
  overflow: hidden;
}

.khen-home-s4-spread {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  z-index: 1;
}

.khen-home-s4-spread.is-current {
  z-index: 2;
}

.khen-home-s4-spread.is-prev {
  z-index: 3;
  pointer-events: none;
}

.khen-home-s4-page {
  position: relative;
  border: 0;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  background: #0d274c;
  cursor: pointer;
  overflow: hidden;
}

.khen-home-s4-page + .khen-home-s4-page {
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.khen-home-s4-page::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  pointer-events: none;
  z-index: 1;
}

.khen-home-s4-page--left::before {
  right: 0;
  background: linear-gradient(90deg, rgba(12, 36, 67, 0) 0%, rgba(12, 36, 67, 0.3) 100%);
}

.khen-home-s4-page--right::before {
  left: 0;
  background: linear-gradient(90deg, rgba(12, 36, 67, 0.32) 0%, rgba(12, 36, 67, 0) 100%);
}

.khen-home-s4-page.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #103e84;
  cursor: default;
}

.khen-home-s4-page-empty-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  text-align: center;
  padding: 12px;
}

.khen-home-s4-page img {
  position: relative;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.khen-home-s4-spread.is-prev.is-forward .khen-home-s4-page--right {
  transform-origin: left center;
  animation: khenS4SpreadFlipOutForward 620ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

.khen-home-s4-spread.is-prev.is-backward .khen-home-s4-page--left {
  transform-origin: right center;
  animation: khenS4SpreadFlipOutBackward 620ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

.khen-home-s4-spread.is-current.is-animating.is-forward .khen-home-s4-page--left {
  animation: khenS4SpreadFlipInForward 620ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

.khen-home-s4-spread.is-current.is-animating.is-backward .khen-home-s4-page--right {
  animation: khenS4SpreadFlipInBackward 620ms cubic-bezier(0.2, 0.78, 0.18, 1) both;
}

@keyframes khenS4SpreadFlipOutForward {
  0% {
    transform: rotateY(0deg);
    filter: brightness(1);
  }
  100% {
    transform: rotateY(-108deg);
    filter: brightness(0.76);
  }
}

@keyframes khenS4SpreadFlipOutBackward {
  0% {
    transform: rotateY(0deg);
    filter: brightness(1);
  }
  100% {
    transform: rotateY(108deg);
    filter: brightness(0.76);
  }
}

@keyframes khenS4SpreadFlipInForward {
  0% {
    transform: translateX(-8px) scale(0.992);
    filter: brightness(0.92);
  }
  100% {
    transform: translateX(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes khenS4SpreadFlipInBackward {
  0% {
    transform: translateX(8px) scale(0.992);
    filter: brightness(0.92);
  }
  100% {
    transform: translateX(0) scale(1);
    filter: brightness(1);
  }
}

.khen-home-s4-card {
  position: relative;
  padding: 0;
  margin: 0;
}

.khen-home-s4-card::after {
  content: none;
}

.khen-home-s4-card img {
  border-radius: 0;
}

.khen-home-s4-card-title {
  display: none;
}

.khen-home-s4-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  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: #ff7900;
  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-s4-nav:disabled {
  opacity: 0.45;
  cursor: default;
}

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

.khen-home-s4-prev {
  left: -12px;
}

.khen-home-s4-next {
  right: -12px;
}

.khen-home-s4-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 48px;
}

.khen-home-s4-dot {
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 0;
  cursor: pointer;
}

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

.khen-home-s4-empty {
  margin: 0;
  color: #002f68;
  font-size: 16px;
}

.khen-home-s4-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.khen-home-s4-lightbox[hidden] {
  display: none;
}

.khen-home-s4-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 14, 27, 0.62);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.khen-home-s4-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  border-radius: 18px;
  background: rgba(237, 215, 178, 0.2);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(237, 215, 178, 0.42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  padding: 18px 18px 14px;
}

.khen-home-s4-lightbox-head {
  margin: 0 8px 14px;
}

.khen-home-s4-lightbox-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.khen-home-s4-nav i {
  width: 20px;
  height: 20px;
}

.khen-home-s4-open-lightbox {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 4;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: #ff77002e;
  color: #ff7900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.khen-home-s4-open-lightbox:hover {
  background: rgba(255, 255, 255, 0.74);
}

.khen-home-s4-open-lightbox i {
  width: 19px;
  height: 19px;
}

.khen-home-s4-lightbox-close i {
  width: 20px;
  height: 20px;
}

.khen-home-s4-lightbox-close:hover {
  background: rgba(255, 121, 0, 0.9);
}

.khen-home-s4-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 46px;
  height: 46px;
  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: #ff7900;
  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-s4-lightbox-nav i {
  width: 20px;
  height: 20px;
}

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

.khen-home-s4-lightbox-prev {
  left: 28px;
}

.khen-home-s4-lightbox-next {
  right: 28px;
}

.khen-home-s4-lightbox-image {
  display: block;
  width: 100%;
  max-height: 74vh;
  min-height: 340px;
  object-fit: contain;
  border-radius: 0;
  /* background: #102541; */
}

.khen-home-s4-lightbox-meta {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.khen-home-s4-lightbox-title {
  margin: 0;
  color: #ffffff;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 500;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
}

.khen-home-s4-lightbox-counter {
  display: none;
}

.khen-home-s4-lightbox-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.khen-home-s4-lightbox-tab {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 400;
  font-family: var(--khen-font-gesco, "Khen Gesco", "Khen BeVietnamPro", sans-serif);
  border-radius: 9999px;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.khen-home-s4-lightbox-tab.is-active {
  color: #0a2f60;
  background: #f2e7d2;
  border-color: #f2e7d2;
}

.khen-home-s4-lightbox-tab-label {
  display: inline-block;
  white-space: nowrap;
}

.khen-home-s4-lightbox-media {
  position: relative;
}

.khen-home-s4-lightbox-thumbs {
  position: absolute;
  top: 14px;
  right: 84px;
  bottom: 14px;
  width: 78px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background: rgba(3, 14, 27, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px;
  border-radius: 5px;
}

.khen-home-s4-lightbox-thumbs::-webkit-scrollbar {
  display: none;
}


.khen-home-s4-lightbox-thumb {
  border: 0;
  background: transparent;
  padding: 0;
  width: 100%;
  height: 96px;
  flex: 0 0 96px;
  margin-bottom: 4px;
  opacity: 0.72;
  cursor: pointer;
  transition: opacity 160ms ease, transform 160ms ease;
}

.khen-home-s4-lightbox-thumb:last-child {
  margin-bottom: 0;
}

.khen-home-s4-lightbox-thumb:hover {
  opacity: 0.9;
}

.khen-home-s4-lightbox-thumb.is-active {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 2px #ff7900;
}

.khen-home-s4-lightbox-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 0;
}

@media (max-width: 1024px) {
  .khen-home-s4-tabs {
    padding: 0 44px;
  }

  .khen-home-s4-tabs-nav {
    display: inline-flex;
  }

  .khen-home-s4-tab {
    font-size: 18px;
  }

  .khen-home-s4-nav {
    width: 38px;
    height: 38px;
  }

  .khen-home-s4-prev {
    left: 6px;
  }

  .khen-home-s4-next {
    right: 6px;
  }

  .khen-home-s4-lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .khen-home-s4-lightbox-prev {
    left: 16px;
  }

  .khen-home-s4-lightbox-next {
    right: 16px;
  }

  .khen-home-s4-lightbox-thumbs {
    position: static;
    width: 100%;
    margin-top: 10px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
    padding: 0;
  }

  .khen-home-s4-lightbox-thumb {
    width: 58px;
    height: 88px;
    flex: 0 0 58px;
    margin-bottom: 0;
    margin-right: 4px;
  }

  .khen-home-s4-lightbox-thumb:last-child {
    margin-right: 0;
  }
}

@media (max-width: 767px) {
  .khen-home-s4 {
    padding: 36px 0;
  }

  .khen-home-s4-head {
    margin-bottom: 24px;
  }

  .khen-home-s4-title {
    font-size: 28px;
  }

  .khen-home-s4-tab {
    font-size: 17px;
  }

  .khen-home-s4-carousel {
    aspect-ratio: 2480 / 1754;
  }

  .khen-home-s4-tabs {
    padding: 0 40px;
  }

  .khen-home-s4-open-lightbox {
    top: auto;
    right: auto;
    left: 50%;
    bottom: -45px;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    z-index: 5;
  }

  .khen-home-s4-open-lightbox i {
    width: 18px;
    height: 18px;
  }

  .khen-home-s4-dots {
    visibility: hidden;
  }

  .khen-home-s4-card-title {
    font-size: 15px;
  }

  .khen-home-s4-lightbox-dialog {
    width: 100%;
    padding: 12px 12px 10px;
    border-radius: 14px;
  }

  .khen-home-s4-lightbox-image {
    min-height: 240px;
    max-height: 65vh;
  }

  .khen-home-s4-lightbox-nav {
    width: 36px;
    height: 36px;
  }

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

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

  .khen-home-s4-lightbox-title {
    font-size: 18px;
  }

  .khen-home-s4-lightbox-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }

  .khen-home-s4-lightbox-tabs::-webkit-scrollbar {
    display: none;
  }

  .khen-home-s4-lightbox-thumbs {
    position: static;
    width: 100%;
    margin-top: 10px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: 0;
    padding: 0;
  }

  .khen-home-s4-lightbox-thumb {
    width: 58px;
    height: 88px;
    flex: 0 0 58px;
    margin-bottom: 0;
    margin-right: 4px;
  }

  .khen-home-s4-lightbox-thumb:last-child {
    margin-right: 0;
  }

  .khen-home-s4-lightbox-tab {
    font-size: 14px;
    padding: 8px 14px;
  }
}
