/* WE起桌遊吧｜官方首頁 v4
   重點：
   1. 第一屏改成一整張 Canva 風格主視覺圖
   2. 主視覺底部四個分類按鈕用透明熱區可點
   3. KTV 不顯示
   4. 手機版保持可讀與可點
   5. 首頁近期活動沿用共用活動卡結構，圖片區以 1040x1040 正方形 DM 為準
*/

:root {
  --we-yellow: #f6c421;
  --we-yellow-2: #ffd94d;
  --we-black: #15100a;
  --we-brown: #4a2a08;
  --we-cream: #fff8dc;
  --we-white: #fffdf4;
  --we-green: #18b84d;
  --we-shadow: 0 10px 0 rgba(21, 16, 10, 0.18);
  --we-border: 4px solid var(--we-black);
  --we-radius: 22px;
}

.official-home-page {
  background: linear-gradient(180deg, #ffd94d 0%, #f6c421 50%, #ffd95c 100%);
  color: var(--we-black);
}

.official-home-page .site-header {
  background: rgba(246, 196, 33, 0.98);
  border-bottom: 3px solid var(--we-black);
  backdrop-filter: none;
}

.official-home-page .nav {
  min-height: 74px;
}

.official-home-page .brand img {
  width: 56px;
  height: 56px;
  border: 2px solid var(--we-black);
  border-radius: 14px;
  background: var(--we-white);
}

.official-home-page .brand-title {
  color: var(--we-black);
  font-size: 1.14rem;
  font-weight: 950;
}

.official-home-page .brand-subtitle {
  color: #593407;
  font-size: .82rem;
  font-weight: 950;
}

.official-home-page .nav-links {
  background: #ffe888;
  border: 2px solid rgba(21, 16, 10, 0.25);
}

.official-home-page .nav-links a {
  color: #2c1b08;
  font-weight: 950;
}

.official-home-page .nav-links a:hover,
.official-home-page .nav-links a[aria-current="page"] {
  background: var(--we-black);
  color: var(--we-yellow);
}

.official-home {
  overflow: hidden;
}

.official-hero {
  padding: 22px 0 22px;
}

.official-hero-wrap,
.official-section {
  width: min(1120px, calc(100vw - 34px));
  margin: 0 auto;
}

/* accessible hidden title */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 整張首頁主視覺圖 */
.home-main-banner {
  position: relative;
  overflow: hidden;
  border: var(--we-border);
  border-radius: 28px;
  background: var(--we-yellow);
  box-shadow: 0 12px 0 rgba(21,16,10,.2);
}

.home-main-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* 分類按鈕透明熱區：對應主圖底部四顆按鈕 */
.banner-hotspot {
  position: absolute;
  z-index: 3;
  display: block;
  border-radius: 18px;
}

.banner-hotspot:hover,
.banner-hotspot:focus-visible {
  outline: 4px solid rgba(255, 255, 255, .9);
  outline-offset: -4px;
  background: rgba(255, 255, 255, .08);
}

/* 依 2048x768 主圖比例設置 */
.hotspot-beginner {
  left: 21.2%;
  top: 72.8%;
  width: 13.9%;
  height: 19.8%;
}

.hotspot-party {
  left: 36.9%;
  top: 72.8%;
  width: 13.9%;
  height: 19.8%;
}

.hotspot-strategy {
  left: 52.8%;
  top: 72.8%;
  width: 13.9%;
  height: 19.8%;
}

.hotspot-night {
  left: 68.7%;
  top: 72.8%;
  width: 13.9%;
  height: 19.8%;
}

.hero-info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.hero-info-row div {
  min-height: 88px;
  padding: 16px 18px;
  border: 3px solid var(--we-black);
  border-radius: 16px;
  background: rgba(255,253,244,.92);
  box-shadow: 0 6px 0 rgba(21,16,10,.16);
}

.hero-info-row strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.04rem;
}

.hero-info-row span {
  color: #49320e;
  font-weight: 850;
}

.official-section {
  padding: 48px 0;
}

.section-title-block {
  margin-bottom: 20px;
}

.small-label {
  width: fit-content;
  margin: 0 0 10px;
  padding: 7px 14px;
  border: 2px solid var(--we-black);
  border-radius: 999px;
  background: var(--we-black);
  color: var(--we-yellow);
  font-size: .86rem;
  font-weight: 950;
  letter-spacing: .04em;
}

.section-title-block h2 {
  margin: 0 0 8px;
  color: var(--we-black);
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.05;
}

.section-title-block p:not(.small-label) {
  max-width: 760px;
  margin: 0;
  color: #3a260a;
  font-size: 1.08rem;
  font-weight: 850;
}

/* 快速入口：整張圖片卡都可點 */
.big-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.image-action-card {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 230px;
  padding: 0;
  border: var(--we-border);
  border-radius: 24px;
  background: var(--we-white);
  box-shadow: var(--we-shadow);
}

.image-action-card img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.image-action-card:hover,
.image-action-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 0 rgba(21,16,10,.2);
}

/* 活動卡片 */
.section-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.we-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 12px 20px;
  border: 3px solid var(--we-black);
  border-radius: 13px;
  box-shadow: 0 5px 0 rgba(21,16,10,.25);
  font-weight: 950;
  line-height: 1;
  text-align: center;
}

.we-btn-dark {
  background: var(--we-black);
  color: var(--we-yellow);
}

.we-btn.small {
  min-height: 44px;
  padding: 10px 16px;
}

.official-event-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.official-home-page .event-dm-card,
.official-home-page .event-card {
  overflow: hidden;
  border: var(--we-border);
  border-radius: 20px;
  background: var(--we-cream);
  box-shadow: 0 10px 0 rgba(21,16,10,.18);
}

/* 首頁活動沿用共用卡片 HTML；DM 容器固定 1:1，圖片完整置中顯示。
   之前 height:auto 會讓 contain 圖片以自然比例縮在上方，這裡明確讓圖片填滿 1:1 容器再由 object-fit 計算。 */
.official-home-page .official-event-grid .event-poster {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 0;
  overflow: hidden;
  border-bottom: var(--we-border);
  background: var(--we-cream);
}

.official-home-page .official-event-grid .event-poster > img.event-thumb,
.official-home-page .official-event-grid .event-poster > .event-thumb {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center center;
  background: var(--we-cream);
}

.official-home-page .official-event-grid .event-poster > .event-label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  margin: 0;
}

.official-home-page .event-label {
  border: 3px solid var(--we-black);
  background: var(--we-yellow);
  color: var(--we-black);
}

.official-home-page .event-dm-card .card-body,
.official-home-page .event-card .card-body {
  padding: 18px;
}

.official-home-page .event-dm-card h3,
.official-home-page .event-card h3 {
  font-size: 1.45rem;
  line-height: 1.18;
}

.official-home-page .event-dm-date,
.official-home-page .event-dm-meta .event-meta-item,
.official-home-page .event-meta-item {
  border: 2px solid rgba(21,16,10,.18);
  border-radius: 12px;
  background: #fff0b8;
  color: var(--we-black);
  font-weight: 900;
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.why-grid article {
  padding: 22px;
  border: var(--we-border);
  border-radius: 22px;
  background: rgba(255,253,244,.92);
  box-shadow: 0 8px 0 rgba(21,16,10,.16);
}

.why-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.18rem;
  font-weight: 950;
}

.why-grid p {
  margin: 0;
  color: #4a2a08;
  font-weight: 760;
}

/* Mobile */
@media (max-width: 860px) {
  .official-hero {
    padding-top: 10px;
  }

  .hero-info-row,
  .big-action-grid,
  .official-event-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero-info-row div {
    min-height: auto;
  }

  .section-title-row {
    align-items: start;
    flex-direction: column;
  }

  .image-action-card,
  .image-action-card img {
    min-height: 170px;
  }
}

@media (max-width: 520px) {
  .official-hero-wrap,
  .official-section {
    width: min(100% - 20px, 1120px);
  }

  .home-main-banner {
    border-width: 3px;
    border-radius: 18px;
  }

  .hero-info-row {
    margin-top: 12px;
  }

  .official-section {
    padding: 34px 0;
  }

  .section-title-block h2 {
    font-size: 2.1rem;
  }

  .we-btn {
    width: 100%;
  }
}
