/* ── 頁面 Token（淺色主頁專用，供各 Section 使用）─── */
.hp-root {
  --hp-bg: #ffffff;
  --hp-surface: #f4f6f9;
  --hp-primary: #0c2340;
  --hp-accent: #1d8fe0;
  --hp-accent-dim: rgba(29, 143, 224, 0.08);
  --hp-accent-glow: rgba(29, 143, 224, 0.28);
  --hp-accent-2: #0c2340;
  --hp-accent-2-dim: rgba(12, 35, 64, 0.07);
  --hp-text: #0c2340;
  --hp-text-muted: #5a6b7e;
  --hp-border: #dce3ed;
  --hp-border-accent: rgba(29, 143, 224, 0.4);
  --hp-radius-lg: 12px;
  --hp-radius-md: 8px;
  --hp-radius-sm: 4px;
  --hp-ease: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hero 局部覆蓋：此區塊是暗色背景，文字需要淺色 */
.hp-hero {
  --hp-text: #ffffff;
  --hp-text-muted: rgba(255, 255, 255, 0.72);
  --hp-border: rgba(255, 255, 255, 0.2);
}

/* ── 全域覆蓋（僅限 hp-root）─────────────────────────── */
.hp-root,
.hp-root * {
  box-sizing: border-box;
}

.hp-root {
  text-align: left;
}

.hp-root p {
  color: inherit;
  margin: 0;
  line-height: 1.7;
  letter-spacing: normal;
}

.hp-root a:link,
.hp-root a:visited,
.hp-root a:hover,
.hp-root a:active {
  color: inherit;
  text-decoration: none;
  outline: none;
}

.hp-root {
  background: var(--hp-bg);
  color: var(--hp-text);
  font-family: var(--font-family);
  min-height: 100vh;
  padding-top: 80px;
  /* 留出 Fixed Header 80px 空間，避免頂部圖片被導覽列遮擋 */
}

/* ── 動畫 ──────────────────────────────────────────────── */
@keyframes hp-fade-up {
  from {
    opacity: 0;
    transform: translateY(32px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hp-tag-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hp-scroll-blink {

  0%,
  100% {
    opacity: 1;
    transform: scaleY(1);
  }

  50% {
    opacity: 0.35;
    transform: scaleY(0.5);
  }
}

/* ══════════════════════════════════════════════════════════
   Section 1 — Hero
══════════════════════════════════════════════════════════ */
.hp-hero {
  position: relative;
  width: 100%;
  height: 600px;
  max-height: 600px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0 10vw;
  background-color: #0c2340;
  color: #ffffff;
}

.hp-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hp-hero__bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* 依需求：不加遮罩與額外光球，直接純粹清晰展示原圖 */
.hp-hero__bg-overlay,
.hp-hero__orb {
  display: none !important;
}

/* 主內容 */
.hp-hero__content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  animation: hp-fade-up 0.8s ease-out both;
}

/* 主標題 — 宏偉大氣的旗艦標題 */
.hp-hero__title {
  font-size: clamp(2.75rem, 4vw, 4.25rem);
  font-weight: 900;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.9), 0 2px 6px rgba(0, 0, 0, 0.95);
  margin-bottom: 2.5rem;
}

/* 副標題 — 醒目清晰的 Slogan */
.hp-hero__subtitle {
  font-size: clamp(1.45rem, 1.9vw, 2rem);
  color: #ffffff;
  font-weight: 700;
  line-height: 1.8;
  margin-bottom: 0;
  max-width: 1050px;
  letter-spacing: 0.02em;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.9), 0 1px 4px rgba(0, 0, 0, 0.95);
}

/* CTA 按鈕 */
.hp-hero__cta {
  display: flex;
  gap: 1.125rem;
  flex-wrap: wrap;
}

.hp-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 2.25rem;
  border-radius: var(--hp-radius-md);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--hp-ease);
  cursor: pointer;
  white-space: nowrap;
}

.hp-btn--primary {
  background: var(--hp-accent);
  color: #ffffff !important;
  border: 2px solid var(--hp-accent);
  box-shadow: 0 4px 20px rgba(29, 143, 224, 0.38);
}

.hp-btn--primary:hover {
  background: #1678c2;
  border-color: #1678c2;
  box-shadow: 0 6px 28px rgba(29, 143, 224, 0.5);
  transform: translateY(-1px);
}

.hp-btn--ghost {
  background: transparent;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.38);
}

.hp-btn--ghost:hover {
  border-color: var(--hp-accent);
  color: var(--hp-accent) !important;
  background: rgba(29, 143, 224, 0.1);
}

/* 滾動提示 */
.hp-hero__scroll {
  position: absolute;
  bottom: 2.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.hp-hero__scroll-line {
  display: block;
  width: 2px;
  height: 36px;
  background: linear-gradient(to bottom, transparent, var(--hp-accent));
  border-radius: 2px;
  animation: hp-scroll-blink 2.2s ease-in-out infinite;
  transform-origin: top;
}



/* ══════════════════════════════════════════════════════════
   共用 Section 標頭與容器
══════════════════════════════════════════════════════════ */
.hp-section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hp-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--hp-border);
}

.hp-section__title-wrap {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.hp-section__title-bar {
  display: block;
  width: 4px;
  height: 26px;
  background-color: var(--hp-accent);
  border-radius: 2px;
}

.hp-section__title-bar--dark {
  background-color: var(--hp-primary);
}

.hp-section__title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--hp-primary);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.01em;
}

.hp-section__more {
  font-size: 0.9375rem;
  color: var(--hp-accent) !important;
  font-weight: 600;
  white-space: nowrap;
  transition: color var(--hp-ease), transform var(--hp-ease);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hp-section__more:hover {
  color: #1678c2 !important;
  transform: translateX(4px);
}

/* ══════════════════════════════════════════════════════════
   寬幅旗艦行式排版 (Master Row Stream)
══════════════════════════════════════════════════════════ */
.hp-stream-list {
  display: flex;
  flex-direction: column;
}

.hp-stream-row {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding: 1.625rem 1.5rem;
  border-bottom: 1px solid var(--hp-border);
  border-left: 3px solid transparent;
  transition: all var(--hp-ease);
  cursor: pointer;
  text-decoration: none;
  background-color: transparent;
}

.hp-stream-row:first-child {
  border-top: 1px solid var(--hp-border);
}

.hp-stream-row:hover {
  background-color: rgba(29, 143, 224, 0.04);
  border-left-color: var(--hp-accent);
  padding-left: 2rem;
  transform: translateX(4px);
}

.hp-stream-row__meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  min-width: 220px;
}

.hp-stream-row__date {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--hp-primary);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.hp-stream-row__date--event {
  color: var(--hp-primary);
}

.hp-stream-row__tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: var(--hp-radius-sm);
  background-color: var(--hp-accent-dim);
  color: var(--hp-accent);
  border: 1px solid var(--hp-border-accent);
  white-space: nowrap;
}

.hp-stream-row__tag--ir {
  background-color: var(--hp-accent-2-dim);
  color: var(--hp-primary);
  border-color: rgba(12, 35, 64, 0.2);
}

.hp-stream-row__title {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--hp-text);
  line-height: 1.5;
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--hp-ease);
}

.hp-stream-row:hover .hp-stream-row__title {
  color: var(--hp-accent);
  font-weight: 700;
}

.hp-stream-row__arrow {
  font-size: 1.25rem;
  color: var(--hp-text-muted);
  opacity: 0.4;
  transition: all var(--hp-ease);
  flex-shrink: 0;
}

.hp-stream-row:hover .hp-stream-row__arrow {
  color: var(--hp-accent);
  opacity: 1;
  transform: translateX(6px);
}

.hp-stream-row--empty {
  padding: 2.5rem 1.5rem;
  justify-content: flex-start;
  opacity: 0.7;
}

/* ══════════════════════════════════════════════════════════
   Section 2 — 新聞中心（居中標題 + 鴻海卡片風格）
══════════════════════════════════════════════════════════ */
.hp-news {
  padding: 5rem 0 5.5rem;
  background-color: #f4f6f9;
}

.hp-news__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hp-news__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 2.75rem;
}

.hp-news__main-title {
  font-size: clamp(1.875rem, 2.5vw, 2.25rem);
  font-weight: 800;
  color: var(--hp-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  padding-bottom: 0;
  display: inline-block;
  position: relative;
}

.hp-news__main-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--hp-accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

.hp-news__more-link {
  display: none;
}

.hp-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* 卡片：無邊框，融入深色背景 */
.hp-news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  transition: transform var(--hp-ease), opacity var(--hp-ease);
  background: transparent;
}

.hp-news-card:hover {
  transform: translateY(-6px);
  opacity: 0.9;
}

/* 圖片區域 */
.hp-news-card__img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--hp-radius-md);
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  background: #0f2745;
}

.hp-news-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.hp-news-card:hover .hp-news-card__img {
  transform: scale(1.04);
}

/* 卡片文字區 */
.hp-news-card__body {
  padding: 0.875rem 0.25rem 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hp-news-card__title {
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--hp-text);
  line-height: 1.55;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--hp-ease);
}

.hp-news-card:hover .hp-news-card__title {
  color: var(--hp-accent);
}

.hp-news-card__date {
  display: block;
  font-size: 1rem;
  color: var(--hp-text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.hp-news-card--empty {
  opacity: 0.6;
}

/* 新聞卡片底部居中更多連結 */
.hp-news__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.hp-news__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2.25rem;
  border-radius: 40px;
  border: 1.5px solid #3a3f47;
  background: transparent;
  color: #3a3f47 !important;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  transition: all var(--hp-ease);
}

.hp-news__more-btn:hover {
  background: #2c3038;
  border-color: #2c3038;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 143, 224, 0.25);
}

/* ══════════════════════════════════════════════════════════
   Section 3 — 投資人關係活動（居中標題 + 行式清單）
══════════════════════════════════════════════════════════ */
.hp-events {
  padding: 5rem 0 5.5rem;
  background-color: #ffffff;
}

.hp-events__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.hp-events__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 2.75rem;
}

.hp-events__main-title {
  font-size: clamp(1.875rem, 2.5vw, 2.25rem);
  font-weight: 800;
  color: var(--hp-primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  display: inline-block;
  position: relative;
}

.hp-events__main-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--hp-accent);
  margin: 0.6rem auto 0;
  border-radius: 2px;
}

/* 行式清單樣式 */
.hp-events .hp-stream-row {
  background-color: #ffffff;
  border-radius: var(--hp-radius-md);
  margin-bottom: 0.75rem;
  border: 1px solid var(--hp-border);
  box-shadow: 0 2px 8px rgba(12, 35, 64, 0.04);
  padding: 2rem 2rem;
}

.hp-events .hp-stream-row:first-child {
  border-top: 1px solid var(--hp-border);
}

.hp-events .hp-stream-row:last-child {
  margin-bottom: 0;
}

.hp-events .hp-stream-row:hover {
  background-color: rgba(29, 143, 224, 0.03);
  box-shadow: 0 6px 20px rgba(12, 35, 64, 0.09);
  padding-left: 2.5rem;
  transform: translateX(4px);
}

/* 事件列字體放大 */
.hp-events .hp-stream-row__date {
  font-size: 1.1875rem;
}

.hp-events .hp-stream-row__title {
  font-size: 1.3125rem;
  font-weight: 600;
}

/* 底部居中更多按鈕 */
.hp-events__more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 3rem;
}

.hp-events__more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2.25rem;
  border-radius: 40px;
  border: 1.5px solid #3a3f47;
  background: transparent;
  color: #3a3f47 !important;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  transition: all var(--hp-ease);
}

.hp-events__more-btn:hover {
  background: #2c3038;
  border-color: #2c3038;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(12, 35, 64, 0.18);
}

/* ══════════════════════════════════════════════════════════
   Section 4 — 快捷導航（扁平橫式卡片）
══════════════════════════════════════════════════════════ */
.hp-nav {
  padding: 4rem 0 5rem;
  background: #f4f6f9;
  border-top: 1px solid var(--hp-border);
}

.hp-nav__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

/* 扁平卡片：圓角、有間距 */
.hp-nav__card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--hp-radius-lg);
  text-decoration: none;
  box-shadow: 0 2px 12px rgba(12, 35, 64, 0.1);
  transition: box-shadow var(--hp-ease), transform var(--hp-ease);
}

.hp-nav__card:hover {
  box-shadow: 0 10px 32px rgba(12, 35, 64, 0.18);
  transform: translateY(-3px);
}

/* 圖片 */
.hp-nav__card-img {
  position: absolute;
  inset: 0;
}

.hp-nav__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.48) saturate(0.8);
  transition: filter 0.5s ease, transform 0.55s ease;
}

.hp-nav__card:hover .hp-nav__card-img img {
  filter: brightness(0.3) saturate(0.7);
  transform: scale(1.05);
}

/* 覆蓋遮罩 */
.hp-nav__card-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg,
      rgba(12, 35, 64, 0.32) 0%,
      rgba(12, 35, 64, 0.12) 100%);
  transition: background 0.4s ease;
}

.hp-nav__card:hover .hp-nav__card-content {
  background: linear-gradient(135deg,
      rgba(12, 35, 64, 0.58) 0%,
      rgba(12, 35, 64, 0.38) 100%);
}

/* 左側品牌藍線：hover 時從底往上生長 */
.hp-nav__card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 3px;
  height: 0;
  background: var(--hp-accent);
  z-index: 2;
  transition: height 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-nav__card:hover::after {
  height: 100%;
}



/* 標題 */
.hp-nav__card-label {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  margin: 0;
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.35s ease, letter-spacing 0.35s ease;
}

.hp-nav__card:hover .hp-nav__card-label {
  transform: translateY(-4px);
  letter-spacing: 0.06em;
}

/* ── 英文版 ─────────────────────────────────────────────── */
html[lang="en"] .hp-hero__title {
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 800;
}

html[lang="en"] .hp-hero__subtitle {
  font-size: clamp(1.1rem, 1.5vw, 1.5rem);
}

html[lang="en"] .hp-news__title {
  font-size: 1.125rem;
}

html[lang="en"] .hp-nav__card-label {
  font-size: 1.125rem;
}

/* ── RWD: 1200px ────────────────────────────────────────── */
@media (max-width: 1200px) {
  .hp-hero {
    height: 520px;
    max-height: 520px;
    padding: 0 6vw;
  }

  .hp-section__inner {
    padding: 0 1.5rem;
  }

  .hp-news-grid,
  .hp-events-grid {
    gap: 1.25rem;
  }

  .hp-nav__inner {
    gap: 0.875rem;
  }
}

/* ── RWD: 900px ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hp-hero {
    height: 440px;
    max-height: 440px;
    padding: 0 2rem;
    align-items: center;
  }

  .hp-hero__title {
    font-size: 2.25rem;
    margin-bottom: 1.25rem;
  }

  .hp-hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 0;
  }

  .hp-news,
  .hp-events {
    padding: 3.5rem 0;
  }

  .hp-news-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .hp-news__head-center {
    margin-bottom: 2.25rem;
  }

  .hp-stream-row {
    gap: 1.25rem;
    padding: 1.35rem 1rem;
  }

  .hp-stream-row__meta {
    min-width: 190px;
    gap: 0.875rem;
  }

  .hp-stream-row__date {
    font-size: 0.9375rem;
  }

  .hp-stream-row__title,
  .hp-events .hp-stream-row__title {
    font-size: 1.0625rem;
  }

  .hp-nav__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .hp-nav {
    padding: 3rem 0 3.5rem;
  }
}

/* ── RWD: 600px ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .hp-hero {
    height: 360px;
    max-height: 360px;
    padding: 0 1.25rem;
  }

  .hp-hero__title {
    font-size: 1.75rem;
    margin-bottom: 0.875rem;
  }

  .hp-hero__subtitle {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 0;
  }

  .hp-section__inner {
    padding: 0 1.25rem;
  }

  .hp-section__title {
    font-size: 1.35rem;
  }

  .hp-section__head {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .hp-news-card {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .hp-news-card__img-wrap {
    margin-bottom: 0.5rem;
  }

  .hp-news-card__body {
    padding: 0.25rem 0.25rem 0.5rem;
    gap: 0.15rem;
  }

  .hp-news-card__title {
    font-size: 1.125rem;
    margin-bottom: 0;
    flex: none;
  }

  .hp-news__more-wrap {
    margin-top: 2rem;
  }

  .hp-stream-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 1.125rem 0.75rem;
  }

  .hp-stream-row:hover {
    padding-left: 0.75rem;
    transform: none;
  }

  .hp-stream-row__meta {
    min-width: unset;
    gap: 0.75rem;
  }

  .hp-stream-row__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .hp-stream-row__arrow {
    display: none;
  }

  .hp-news,
  .hp-events {
    padding: 2.75rem 0;
  }

  .hp-nav__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .hp-nav__card-label {
    font-size: 1rem;
  }

  .hp-nav {
    padding: 2rem 0;
  }
}