/* =========================================================
   MAIN TOUR — FANCODE-STYLE PROMOTION SECTION
   Cards layered over the lower banner area.
   Scoped styles: other sections remain independent.
   ========================================================= */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://allrounderlive.com/font.woff2")
    format("woff2");
}

#main-tour {
  --mt-bg: #08090d;
  --mt-gap: 16px;
  --mt-card: calc((100% - 48px) / 4);

  color: #f5f5f7;
  background: var(--mt-bg);
  font-family: var(--font, "Outfit", system-ui, sans-serif);
  margin: 24px 0;
  isolation: isolate;
}

#main-tour * {
  box-sizing: border-box;
}

#main-tour [hidden] {
  display: none !important;
}

/* Background image is set from main-tour.json. */

#main-tour .mt-banner {
  position: relative;
  aspect-ratio: 16 / 7;
  min-height: 390px;
  background-color: var(--mt-bg);
  background-position: top right;
  background-size: 82% 100%;
  background-repeat: no-repeat;
}

/* FanCode-style side and bottom gradients. */

#main-tour .mt-shade,
#main-tour .mt-bottom-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#main-tour .mt-shade {
  background: linear-gradient(
    261deg,
    #00000000 27.69%,
    #00000066 38.51%,
    #000000b8 52.93%,
    var(--mt-bg) 67.35%,
    var(--mt-bg) 85.38%,
    #121721 99.8%
  );
}

#main-tour .mt-bottom-shade {
  top: auto;
  height: 50%;
  background: linear-gradient(
    180deg,
    #00000000,
    var(--mt-bg) 71%
  );
}

/* Content and cards sit above the background layers. */

#main-tour .mt-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: inherit;
  aspect-ratio: 16 / 7;
  padding: 32px 0 0;
}

#main-tour .mt-heading {
  padding: 0 4%;
  margin: 0 0 24px;
  max-width: 65%;
}

#main-tour .mt-subtitle {
  margin: 0 0 10px;
  color: #ffffffb3;
  font-size: clamp(12px, 1.2vw, 18px);
  font-weight: 500;
}

#main-tour h2 {
  margin: 0;
  max-width: 680px;
  font-family: var(--font, "Outfit", system-ui, sans-serif);
  font-size: clamp(24px, 3.4vw, 52px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.8px;
  text-wrap: balance;
}

/* Horizontal carousel. */

#main-tour .mt-rail-wrap {
  position: relative;
  min-width: 0;
}

#main-tour .mt-track {
  display: flex;
  gap: var(--mt-gap);
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 4%;
  padding: 3px 0 8px;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

#main-tour .mt-track::-webkit-scrollbar {
  display: none;
}

/* Cards. */

#main-tour .mt-card {
  flex: 0 0 var(--mt-card);
  min-width: 0;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  color: inherit;
  text-align: left;
  text-decoration: none;
  font: inherit;
  scroll-snap-align: start;
  cursor: pointer;
}

#main-tour .mt-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #151b26;
  border-radius: 4px;
}

#main-tour .mt-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#main-tour .mt-thumb::after {
  content: "";
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(
    transparent,
    #000000bb
  );
  pointer-events: none;
}

/* Badge at bottom-left; duration at bottom-right. */

#main-tour .mt-labels {
  position: absolute;
  z-index: 1;
  inset: auto 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

#main-tour .mt-badge {
  padding: 3px 5px;
  background: #f1f0ec;
  color: #202630;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: .2px;
}

#main-tour .mt-duration {
  margin-left: auto;
  white-space: nowrap;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-shadow: 0 1px 4px #000;
}

#main-tour .mt-caption {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
  margin-top: 8px;
  color: #e2e3e8;
  font-size: clamp(12px, 1.05vw, 16px);
  font-weight: 500;
  line-height: 1.35;
}

#main-tour .mt-card:hover .mt-caption {
  color: #fff;
}

/* Independent carousel arrows. */

#main-tour .mt-arrow {
  position: absolute;
  top: var(--mt-arrow-top, 60px);
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 8px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #08090d99;
  color: #fff;
  cursor: pointer;
  filter: drop-shadow(0 1px 5px #000c);
}

#main-tour .mt-prev {
  left: 1%;
}

#main-tour .mt-next {
  right: 1%;
}

#main-tour .mt-arrow svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

#main-tour .mt-arrow:disabled {
  opacity: 0;
  pointer-events: none;
}

#main-tour .mt-card:focus-visible,
#main-tour button:focus-visible {
  outline: 2px solid #ff6412;
  outline-offset: -2px;
}

/* Skeleton loading. */

#main-tour .mt-skeleton .mt-thumb,
#main-tour .mt-skeleton-line {
  background: linear-gradient(
    100deg,
    #151b26 25%,
    #293140 50%,
    #151b26 75%
  );
  background-size: 200% 100%;
  animation: mt-shimmer 1.6s linear infinite;
}

#main-tour .mt-skeleton-line {
  height: 10px;
  width: 90%;
  margin-top: 10px;
}

#main-tour .mt-skeleton-line:last-child {
  width: 65%;
}

@keyframes mt-shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Empty, retry and unavailable states. */

#main-tour .mt-empty {
  padding: 28px 0;
  color: #aab0bc;
  font-size: 14px;
  min-height: 150px;
}

#main-tour .mt-retry {
  font: inherit;
  margin-left: 10px;
  padding: 6px 12px;
  border: 1px solid #ffffff40;
  border-radius: 4px;
  background: #ffffff15;
  color: #fff;
  cursor: pointer;
}

#main-tour .mt-no-poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #9299a8;
}

#main-tour .mt-message {
  margin: 10px 4%;
  font-size: 13px;
  color: #cbd0da;
}

/* Large desktop: five cards per frame. */

@media (min-width: 1600px) {
  #main-tour {
    --mt-card: calc((100% - 64px) / 5);
  }
}

/* Tablet and small desktop: three cards per frame. */

@media (min-width: 768px) and (max-width: 1279px) {
  #main-tour {
    --mt-gap: 12px;
    --mt-card: calc((100% - 24px) / 3);
  }

  #main-tour .mt-banner,
  #main-tour .mt-content {
    aspect-ratio: 16 / 9;
  }

  #main-tour .mt-banner {
    background-size: contain;
  }
}

/* Mobile: one complete card with a next-card preview. */

@media (max-width: 767px) {
  #main-tour {
    --mt-gap: 6px;
    --mt-card: 66%;
    margin: 20px 0;
  }

  #main-tour .mt-banner,
  #main-tour .mt-content {
    aspect-ratio: 360 / 312;
    min-height: 312px;
  }

  #main-tour .mt-banner {
    background-size: contain;
  }

  #main-tour .mt-content {
    padding-top: 95px;
  }

  #main-tour .mt-shade {
    background: linear-gradient(
      250deg,
      #00000000 0%,
      #00000066 54%,
      #000000e0 100%
    );
  }

  #main-tour .mt-bottom-shade {
    height: 70%;
    background: linear-gradient(
      180deg,
      #00000000 0%,
      var(--mt-bg) 44%,
      var(--mt-bg) 100%
    );
  }

  #main-tour .mt-heading {
    max-width: 75%;
    margin-bottom: 12px;
  }

  #main-tour h2 {
    font-size: clamp(22px, 6.5vw, 36px);
    max-width: 300px;
  }

  #main-tour .mt-subtitle {
    font-size: 12px;
    margin-bottom: 7px;
  }

  #main-tour .mt-caption {
    font-size: 12px;
  }

  #main-tour .mt-badge {
    font-size: 9px;
  }

  #main-tour .mt-duration {
    font-size: 10px;
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  #main-tour .mt-arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #main-tour .mt-skeleton .mt-thumb,
  #main-tour .mt-skeleton-line {
    animation: none;
  }
}
