/*
 * qt66 舊站鏡像頁精修(Owner 2026-11-07「Qt66 版面也優化」)
 * 只加不改:由 LegacyPage.jsx 排在 qt66-legacy.css 後面載入,舊檔一字未動;拿掉引用即回原樣。
 * 黑金識別、素材、文案、網址照舊,只調比例、間距、層級、按鈕。
 * 間距尺度:8 / 12 / 16 / 24 / 32 / 48(本站自己一套)
 */
.qtl {
  --qr-gold: #f3c623;
  --qr-ink: #fff;
  --qr-text: #d6d0c4;
  --qr-dim: #a39c8f;
  --qr-card: #151412;
  --qr-line: rgba(243, 198, 35, 0.2);
  --qr-r: 16px;
}

/* ── 按鈕:全站同一種(金框、44px 高、滑過填金) ── */
.qtl .custom-btn,
.qtl .portfolio-wrap .text .desc .custom-btn,
.qtl .portfolio-wrap-2 .text .desc .custom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid var(--qr-gold);
  border-radius: 6px;
  color: var(--qr-gold);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.qtl .custom-btn:hover,
.qtl .custom-btn:focus-visible,
.qtl .portfolio-wrap .text .desc .custom-btn:hover,
.qtl .portfolio-wrap-2 .text .desc .custom-btn:hover {
  background: var(--qr-gold);
  color: #17140d;
  text-decoration: none;
}

/* ── 首頁七個遊戲區塊:卡片化、圖片固定比例(舊站 js-fullheight 把每塊撐成整個視窗高) ── */
.qtl .portfolio-wrap {
  margin-top: 32px;
}
.qtl .portfolio-wrap > .row {
  overflow: hidden;
  background: var(--qr-card);
  border: 1px solid var(--qr-line);
  border-radius: var(--qr-r);
}
.qtl .portfolio-wrap .img.js-fullheight {
  height: auto !important;
  max-height: none;
  aspect-ratio: 5 / 4;
  align-self: stretch;
  background-size: cover;
  background-position: center top;
}
.qtl .portfolio-wrap > .row > .col-md-6:not(.img) {
  align-self: stretch;
  display: flex;
  align-items: center;
}
.qtl .portfolio-wrap .text {
  width: 100%;
  padding: 32px 48px !important;
  background: transparent;
}
.qtl .portfolio-wrap .text .px-4 {
  padding: 0 !important;
}
.qtl .portfolio-wrap .text .subheading {
  margin-bottom: 8px;
  color: var(--qr-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
}
.qtl .portfolio-wrap .text h2 {
  margin-bottom: 24px !important;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.3;
}
.qtl .portfolio-wrap .text .desc p {
  margin-bottom: 24px;
  color: var(--qr-text);
  font-size: 16px;
  line-height: 1.85;
}
.qtl .portfolio-wrap .text .desc .absolute:after {
  top: 6px;
  height: 32px;
}

/* 平板:兩欄維持左右交錯,圖改正方 */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .qtl .portfolio-wrap {
    margin-top: 24px;
  }
  .qtl .portfolio-wrap .img.js-fullheight {
    aspect-ratio: 1 / 1;
  }
  .qtl .portfolio-wrap .text {
    padding: 24px 32px !important;
  }
  .qtl .portfolio-wrap .text h2 {
    margin-bottom: 16px !important;
    font-size: 26px;
  }
  .qtl .portfolio-wrap .text .desc p {
    margin-bottom: 16px;
    line-height: 1.75;
  }
  /* 半欄寬放長說明會比正方圖高 → 平板改用舊站給手機的短說明(兩段都在原始碼裡，只切換顯示) */
  .qtl .portfolio-wrap .text .desc .absolute.d-md-block {
    display: none !important;
  }
  .qtl .portfolio-wrap .text .desc .absolute.d-md-none {
    display: block !important;
  }
}

/* 手機:不硬切左右兩半 → 圖在上、字在下,整塊吃滿 */
@media (max-width: 767.98px) {
  .qtl .portfolio-wrap {
    margin-top: 16px;
  }
  .qtl .portfolio-wrap > .row > [class*='col-'] {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .qtl .portfolio-wrap .img.js-fullheight {
    order: -1 !important;
    aspect-ratio: 4 / 3;
  }
  .qtl .portfolio-wrap .text {
    padding: 20px 20px 24px !important;
  }
  .qtl .portfolio-wrap .text h2 {
    margin-bottom: 12px !important;
    font-size: 24px;
  }
  .qtl .portfolio-wrap .text .desc p {
    margin-bottom: 16px;
    line-height: 1.75;
  }
  /* 右對齊那幾塊在手機一律靠左,金色短線也回左邊 */
  .qtl .portfolio-wrap .text .desc.text-md-right .absolute {
    padding-left: 20px;
    padding-right: 0;
  }
  .qtl .portfolio-wrap .text .desc.text-md-right .absolute:after {
    left: 0;
    right: auto;
  }
  .qtl .portfolio-wrap .text .desc .custom-btn {
    width: 100%;
  }
}

/* ── 優惠活動列表:卡片化、標題層級、手機也看得到「詳細訊息」 ── */
.qtl .portfolio-wrap-2 {
  margin-top: 24px;
}
.qtl .portfolio-wrap-2 .text {
  overflow: hidden;
  width: 100%;
  background: var(--qr-card);
  border: 1px solid var(--qr-line);
  border-radius: var(--qr-r);
}
.qtl .portfolio-wrap-2 .text > a > img {
  display: block;
  width: 100%;
}
.qtl .portfolio-wrap-2 .text .desc {
  padding: 16px 24px 20px;
}
.qtl .portfolio-wrap-2 .text .subheading {
  color: var(--qr-gold);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
}
.qtl .portfolio-wrap-2 .text h2 {
  margin: 4px 0 0 !important;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}
.qtl .portfolio-wrap-2 .text .desc .link {
  right: 24px;
  bottom: 50%;
  transform: translateY(50%);
}
@media (max-width: 991.98px) {
  .qtl .portfolio-wrap-2 .text .desc .link {
    position: static;
    display: block;
    margin-top: 16px;
    transform: none;
  }
  .qtl .portfolio-wrap-2 .text .desc .custom-btn {
    width: 100%;
  }
}
@media (max-width: 767.98px) {
  .qtl .portfolio-wrap-2 {
    margin-top: 16px;
  }
  .qtl .portfolio-wrap-2 .text .desc {
    padding: 14px 16px 16px;
  }
  .qtl .portfolio-wrap-2 .text h2 {
    font-size: 20px;
  }
}

/* ── 遊戲頁(老虎機 / 桌面 / 即時…)上方橫幅:說明框收窄、按鈕不再拉滿 ── */
.qtl .gamebanner .top {
  width: auto;
  max-width: 560px;
  padding: 24px 28px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.6);
}
.qtl .gamebanner .top h2 {
  margin-bottom: 8px;
  font-size: 40px;
  font-weight: 700;
}
.qtl .gamebanner .top p {
  margin-bottom: 16px;
  color: var(--qr-text);
  line-height: 1.75;
}
.qtl .gamebanner .btn-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 44px;
  padding: 0 32px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
@media (max-width: 550px) {
  .qtl .gamebanner .top {
    padding: 0;
    background: transparent;
  }
  .qtl .gamebanner .top h2 {
    font-size: 28px;
  }
}

/* ── 遊戲清單(老虎機 645 款):限寬置中、電腦 6 欄 / 平板 4 欄 / 手機 3 欄(原本手機 2 欄整頁快 6 萬 px) ── */
.qtl .row:has(> [class*='col-'] > .slotgames) {
  align-items: stretch !important;
  max-width: 1320px;
  margin: 16px auto 0;
  padding: 0 12px;
}
.qtl [class*='col-']:has(> .slotgames) {
  padding: 6px !important;
}
@media (min-width: 1200px) {
  .qtl .col-xl-3:has(> .slotgames) {
    flex: 0 0 16.6667%;
    max-width: 16.6667%;
  }
}
@media (max-width: 767.98px) {
  .qtl .row:has(> [class*='col-'] > .slotgames) {
    padding: 0 6px;
  }
  .qtl .col-6:has(> .slotgames) {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 4px !important;
  }
}
.qtl .slotgames {
  height: 100%;
  padding: 8px;
  background: var(--qr-card);
  border: 1px solid var(--qr-line);
  border-radius: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.qtl .slotgames img {
  border-radius: 8px;
}
.qtl .slotgames:hover {
  border-color: var(--qr-gold);
  transform: translateY(-2px);
}
.qtl h4.gamename {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--qr-ink);
  font-size: 16px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
@media (max-width: 767.98px) {
  .qtl .slotgames {
    padding: 6px;
    border-radius: 10px;
  }
  .qtl h4.gamename {
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qtl .custom-btn,
  .qtl .slotgames {
    transition: none;
  }
  .qtl .slotgames:hover {
    transform: none;
  }
}
