.gmaster-home-s4 {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  background-color: #000000;
  background-image: none;
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  padding: 48px 0;
}

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

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

.gmaster-home-s4 .gmaster-menu-maintenance-fallback {
  position: relative;
  width: 100%;
  min-height: clamp(280px, 38vw, 480px);
  overflow: hidden;
  border-radius: 8px;
  background-color: #1c1c1c;
  background-image: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}

.gmaster-home-s4 .gmaster-menu-maintenance-fallback .gmaster-footer-gallery-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  box-sizing: border-box;
  background: transparent;
  text-align: center;
}

.gmaster-home-s4 .gmaster-menu-maintenance-fallback .gmaster-footer-gallery-fallback-logo {
  width: min(240px, 54%);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.18));
}

.gmaster-home-s4 .gmaster-menu-maintenance-fallback .gmaster-footer-gallery-fallback-label {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-secondary, "helvetic", sans-serif);
  font-size: clamp(22px, 2.3vw, 32px);
  line-height: 1.35;
  font-weight: 400;
}

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

.gmaster-home-s4-title {
  margin: 0;
  color: #ffffff;
  font-family: var(--font-secondary, "helvetic", sans-serif);
  font-size: 32px;
  line-height: 1.5;
  font-weight: 400;
  text-transform: capitalize;
}

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

.gmaster-home-s4-divider {
  display: block;
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin-bottom: 24px;
}

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

.gmaster-home-s4-tabs {
  display: flex;
  align-items: center;
  /* Long Wang: the tabs spread over the whole width of the section; below 1025px they scroll from the left. */
  justify-content: space-between;
  flex-wrap: nowrap;
  text-transform: uppercase;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  margin-bottom: 36px;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

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

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

.gmaster-home-s4-tab {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-family: var(--font-secondary, "helvetic", 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: uppercase;
  padding: 4px 12px;
}

.gmaster-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: #e30000;
  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;
}

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

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

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

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

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

.gmaster-home-s4-tab.is-active {
  color: #e30000;
}

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

.gmaster-home-s4-carousel {
  position: relative;
  aspect-ratio: 2 / var(--gmaster-menu-page-ratio, 1.4145);
  overflow: hidden;
}

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

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

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

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

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

.gmaster-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;
}

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

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

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

.gmaster-home-s4-pageflip-page {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #141414;
}

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

.gmaster-home-s4-pageflip-page.is-empty {
  background: #2a2a2a;
}

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

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

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

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

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

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

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

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

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

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

.gmaster-home-s4-page.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2a2a2a;
  cursor: default;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.gmaster-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: #e30000;
  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;
}

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

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

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

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

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

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

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

.gmaster-home-s4-empty {
  margin: 0;
  color: #1c1c1c;
  font-size: 16px;
}

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

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

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

.gmaster-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;
}

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

.gmaster-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;
}

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

.gmaster-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: #c000002e;
  color: #e30000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

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

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

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

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

.gmaster-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: #e30000;
  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;
}

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

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

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

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

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

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

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

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

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

.gmaster-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(--font-secondary, "helvetic", 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;
}

.gmaster-home-s4-lightbox-tab.is-active {
  color: #1c1c1c;
  background: #ffffff;
  border-color: #ffffff;
}

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

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

.gmaster-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;
}

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


.gmaster-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;
}

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

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

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

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

@media (max-width: 1024px) {
  .gmaster-home-s4-tabs {
    justify-content: flex-start;
    padding: 0 44px;
  }

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

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

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

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

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

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

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

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

  .gmaster-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;
  }

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

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

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

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

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

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

  .gmaster-home-s4-carousel {
    aspect-ratio: 2 / var(--gmaster-menu-page-ratio, 1.4145);
  }

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

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

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

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

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

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

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

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

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

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

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

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

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

  .gmaster-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;
  }

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

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

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