/* ==========================================================================
   2026 第24屆遠見高峰會 置頂 hero 版位（倒數計時版）
   檔期：2026-10-02 10:00 ~ 2026-10-13 23:59
   結構：LOGO（左）＋ 中間每 3 秒在「倒數計時」與「主視覺 hero-main.png」間切換，
   倒數目標 2026-10-14 00:00（見 js/script.js）。
   本檔由廠商 style.css 移植，數值照原稿，差異如下：
   - 原稿的全域規則（* reset、html/body 尺寸、body 字型）會套到全站，
     改為只作用在 .forum1002 底下。
   - class 由通用的 .hero / .countdown / .time-item 等改為 .forum1002 前綴，
     避免與站上或 public/event/ 底下其他活動的選擇器互相覆蓋。
   - 移除沒有對應 markup 的 .hero-action / .hero-button 規則；手機版原本為按鈕
     預留的第三欄（125px / 110px）一併拿掉，中間區塊是絕對定位，畫面不受影響。
   - 根元素改為 <a>（整塊可點），補 display:block、text-decoration:none 與
     圖載入前的底色。
   圖片放在 S3 gvmimgs 的 event/2026_forum1002/images/，經 imgs.gvm.com.tw 讀取
   （Cache-Control: max-age=2592000）。同路徑重傳不會清 CDN 快取，換圖請改用新檔名。
   ========================================================================== */

.forum1002,
.forum1002 * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.forum1002 {
  display: block;
  width: 100%;
  height: 100px;
  text-decoration: none;
  font-family: "Noto Sans TC", "Microsoft JhengHei", Arial, sans-serif;

  background-color: #0057d2; /* 圖載入前的底色，避免白閃 */
  background-image: url("https://imgs.gvm.com.tw/event/2026_forum1002/images/hero-bg-desktop.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;

  overflow: hidden;
}

.forum1002:hover {
  text-decoration: none;
}

/* 平板 */
@media (max-width: 1024px) {
  .forum1002 {
    background-image: url("https://imgs.gvm.com.tw/event/2026_forum1002/images/hero-bg-tablet.jpg");
  }
}

/* 手機 */
@media (max-width: 700px) {
  .forum1002 {
    background-image: url("https://imgs.gvm.com.tw/event/2026_forum1002/images/hero-bg-mobile.jpg");
  }
}

/* ---------- 內框：左右保留安全間距 ---------- */
.forum1002-inner {
  width: 100%;
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding-left: 40px;
  padding-right: 40px;
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 20px;
  position: relative;
}

/* ---------- LOGO ---------- */
.forum1002-logo {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.forum1002-logo img {
  display: block;
  max-width: 100%;
  max-height: 65px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- 中間區域 ---------- */
.forum1002-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  overflow: hidden;
}

/* ---------- 倒數 ---------- */
.forum1002-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 1;
  transition: opacity 0.8s ease, transform 0.8s ease;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  z-index: 2;
}

/* 每一組 天／時／分／秒 */
.forum1002-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 65px;
  gap: 4px;
}

/* 數字 */
.forum1002-num {
  font-family: "Bahnschrift", "DIN 2014", "DIN", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  font-size: 47px;
  line-height: 0.95;
  font-weight: 400;
  letter-spacing: 0px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff8c7 0%, #f7d76b 35%, #dcae38 70%, #fff0a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #f3c85b;
}

/* DAYS／HOURS／MINUTES／SECONDS */
.forum1002-unit {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 1;
  background: linear-gradient(180deg, #fff8c7, #e1b847);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #e1b847;
}

/* ---------- 主視覺：預設隱藏 ---------- */
.forum1002-main {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.98);
  transition: opacity 0.8s ease, transform 0.8s ease;
  z-index: 1;
  pointer-events: none;
}

.forum1002-main img {
  display: block;
  max-width: 100%;
  max-height: 90px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ---------- 每 3 秒切換（由 js 切 .is-switched） ---------- */
.forum1002.is-switched .forum1002-countdown {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
}

.forum1002.is-switched .forum1002-main {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- 平板 ---------- */
@media (max-width: 1000px) {
  .forum1002-inner {
    padding-left: 25px;
    padding-right: 25px;
    grid-template-columns: 170px 1fr;
    gap: 12px;
  }

  .forum1002-logo img {
    max-height: 55px;
  }

  .forum1002-countdown {
    gap: 12px;
  }

  .forum1002-num {
    font-size: 28px;
  }

  .forum1002-unit {
    font-size: 12px;
  }
}

/* ---------- 手機 ---------- */
@media (max-width: 700px) {
  .forum1002-main {
    width: calc(100% - 130px);
    max-width: calc(100% - 130px);
    left: 57%;
  }

  .forum1002-main img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 75px;
    object-fit: contain;
  }

  .forum1002-inner {
    padding-left: 15px;
    padding-right: 15px;
    grid-template-columns: 90px 1fr;
    gap: 8px;
  }

  .forum1002-logo img {
    max-width: 85px;
    max-height: 45px;
  }

  .forum1002-countdown {
    gap: 10px;
  }

  .forum1002-time {
    min-width: 45px;
    gap: 3px;
  }

  .forum1002-num {
    font-size: 30px;
    letter-spacing: 0px;
  }

  .forum1002-unit {
    font-size: 10px;
    letter-spacing: 0px;
  }
}

/* ---------- 小手機 ---------- */
@media (max-width: 420px) {
  .forum1002-inner {
    padding-left: 10px;
    padding-right: 10px;
    grid-template-columns: 75px 1fr;
    gap: 5px;
  }

  .forum1002-logo img {
    max-width: 72px;
    max-height: 40px;
  }

  .forum1002-countdown {
    gap: 4px;
  }

  .forum1002-num {
    font-size: 26px;
  }

  .forum1002-unit {
    font-size: 8px;
  }
}
