@charset "utf-8";

/* 全站平滑捲動 */
html {
  scroll-behavior: smooth;
}

#header.header-transparent {
  background: #20417d;
}

/* 固定式導覽列貼齊視窗上緣
   bootsnav.css 的 .navbar-fixed 只設 position:fixed 未給 top，
   導致 top:auto 退回靜態流位置，頂部出現約 46px 間隙。此處補上 top/left 歸零。 */
nav.navbar.navbar-fixed {
  top: 0;
  left: 0;
}

.shareArea
{
	text-align: right;
	padding-top: 1px;
	height: 24px;
}


/* ================================================================
   設計系統 CSS Custom Properties
   ================================================================ */
:root {
  --color-primary:       #2B4590;
  --color-accent:        #C4933F;
  --color-support:       #3D9B96;
  --color-success:       #4CAF7D;
  --color-bg:            #FFFFFF;
  --color-bg-alt:        #F8F7F4;
  --color-text:          #1E1E2E;
  --color-text-muted:    #6B7280;
  --color-border:        #E5E2DC;
  --gradient-hero:       linear-gradient(135deg, #2B4590 0%, #1A2E6B 100%);
  --color-hero-sub:      #B8C8E8;
  --shadow-card:         0 4px 20px rgba(43, 69, 144, 0.08);
  --shadow-card-hover:   0 8px 30px rgba(43, 69, 144, 0.14);
  --radius-card:         12px;
  --transition-base:     0.2s ease-in-out;
  --font-body:           "Noto Sans TC", "微軟正黑體", "Microsoft JhengHei", sans-serif;
  --font-deco:           "Cormorant Garamond", Georgia, serif;
}


/* ================================================================
   Hero Section
   ================================================================ */
.hero {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: var(--color-bg);
  padding: 0 !important; /* 覆蓋 master.css section { padding: 120px } */
}


/* ---- hero-top ---- */
.hero-top {
  position: relative;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  background: var(--color-bg);
}


/* 背景圖紋文字層 */
.block-txt-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  font-size: 13px;
  line-height: 1.85;
  color: #eee;
  word-break: break-all;
  overflow: hidden;
  padding: 0;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0.5em;
  will-change: transform;
  animation: bgTextDrift 40s linear infinite alternate;
}


/* 彰化公證 — 大框線字 */
.block-txt-big {
  position: absolute;
  bottom: 0;
  left: 42%;
  transform: translateX(-50%) translateY(4%);
  z-index: 2;
  font-size: clamp(420px, 69vw, 342px);
  font-weight: 900;
  color: var(--color-bg);
  -webkit-text-stroke: 3px #9fa7c1;
  paint-order: stroke fill;
  letter-spacing: 0.0em;
  white-space: nowrap;
  line-height: 1;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  font-family: var(--font-body);
  animation: heroFadeIn 0.7s ease-out both;
}


/* 主視覺圖片層 — 鋪滿 hero-top,避免寬螢幕右側留白 */
.block-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.block-image picture,
.block-image img {
  display: block;
  width: 100%;
  object-position: center center;
}


/* 最新消息區塊 */
.block-news {
  position: absolute;
  right: 0px;
  bottom: 0px;
  z-index: 3;
  max-width: 420px;
  animation: heroSlideIn 0.5s ease-out 0.4s both;
}

.block-news .news-inner {
  background: rgba(255, 255, 255, 0.85);
  border-left: 3px solid var(--color-accent);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  box-shadow: var(--shadow-card);
}

.block-news .news-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-accent);
  text-transform: uppercase;
  font-family: var(--font-body);
  margin-bottom: 6px;
}

.block-news .news-text {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.65;
  margin: 0 0 8px;
  font-family: var(--font-body);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.block-news .news-text-link {
  display: block;
  text-decoration: none;
  transition: color var(--transition-base);
}

.block-news .news-text-link:hover .news-text {
  color: var(--color-primary);
}

.block-news .news-link {
  display: block;
  text-align: right;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: 0.04em;
  font-family: var(--font-body);
  transition: color var(--transition-base);
}

.block-news .news-link:hover {
  color: var(--color-accent);
}


/* ---- hero-bottom ---- */
.hero-bottom {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  background: var(--color-primary);
  padding: 14px 14px 28px;
  gap: 0;
  background: #0077b6;
}

/* 常用連結標題欄 */
.block-title {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 24px 0 0;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  gap: 7px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--font-body);
}

/* 精緻金短橫線 */
.block-title::before {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}

/* 英文副標 */
.block-title::after {
  content: 'QUICK LINKS';
  display: block;
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: rgba(255, 255, 255, 0.28);
  font-family: var(--font-body);
}

/* 按鈕 Grid */
.block-buttons {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding-left: 24px;
}

/* 快速連結按鈕 */
.btn-hero-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-left: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  color: #fff;
  text-align: left;
  min-height: 50px;
  transition:
    background var(--transition-base),
    border-color var(--transition-base);
}

.btn-hero-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--color-accent);
  color: #fff;
}

.btn-hero-link .btn-name {
  display: block;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
  font-family: var(--font-body);
  color: rgba(255, 255, 255, 0.92);
}

.btn-hero-link .btn-desc {
  display: block;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.3;
  font-family: var(--font-body);
}


/* ---- 動畫 ---- */
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes heroSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ---- 背景文字隨機亮點 ---- */
.block-txt-bg span {
  transition: color 1.2s ease;
}
.block-txt-bg span.lit {
  color: #ccc;
}


/* ---- 背景文字緩慢飄移 ---- */
@keyframes bgTextDrift {
  from { transform: translateY(0); }
  to   { transform: translateY(-50px); }
}

.social-top
{
	font-size: 20px;
}

/* ---- Hero-top 底部漸層過渡 ---- */
.hero-top::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 130px;
  background: linear-gradient(to bottom, transparent, rgba(248, 247, 244, 0.6));
  z-index: 1;
  pointer-events: none;
}


/* ---- 快速連結按鈕錯落入場 ---- */
.btn-hero-link {
  animation: heroFadeIn 0.4s ease-out both;
}
.btn-hero-link:nth-child(1) { animation-delay: 0.55s; }
.btn-hero-link:nth-child(2) { animation-delay: 0.70s; }
.btn-hero-link:nth-child(3) { animation-delay: 0.85s; }
.btn-hero-link:nth-child(4) { animation-delay: 1.00s; }


/* ---- 最新消息脈動指示點 ---- */
.news-badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C4933F;
  margin-right: 5px;
  vertical-align: middle;
  position: relative;
}
.news-badge-dot::after {
  content: '';
  position: absolute;
  top: -3px; left: -3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: rgba(196, 147, 63, 0.45);
  animation: badgePing 2.2s ease-out infinite;
}
@keyframes badgePing {
  0%   { transform: scale(0.8); opacity: 0.85; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(0.8); opacity: 0; }
}


/* ================================================================
   Scroll Reveal — 通用進場
   ================================================================ */
.reveal-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ================================================================
   Scroll Progress Bar
   ================================================================ */
.scroll-progress-bar {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 2px;
  background: linear-gradient(90deg, #C4933F 0%, #e8b96e 100%);
  z-index: 99999;
  transition: width 0.08s linear;
  pointer-events: none;
}


/* ---- 捲動導引（位於 hero-bottom 內，相對 hero-bottom 定位）---- */
.hero-scroll {
  position: absolute;
  bottom: 128px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  animation: heroSlideIn 0.5s ease-out 0.9s both;
}

.hero-scroll-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(43, 69, 144, 0.22);
  color: rgba(43, 69, 144, 0.45);
  transition: background var(--transition-base), color var(--transition-base);
}

.hero-scroll-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
}

.scroll-icon {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: scrollBounce 2s ease-in-out infinite 2s;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}


/* ================================================================
   Hero Section — RWD
   ================================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .block-txt-big {
    left: 40%;
  }

  .block-buttons {
    grid-template-columns: repeat(3, 1fr);
  }

  .block-title {
    flex: 0 0 28%;
  }
}

/* Mobile */
@media (max-width: 767px) {
  /* 手機版：hero-top 改用背景圖，隱藏 .block-image */
  .hero-top {
    background-image: url('../images/main-intro-image-mobile.webp');
    background-size: cover;
    background-position: center bottom;
    min-height: 52vw;   /* 約 200px on 390px 裝置 */
  }

  /* 品牌藍漸層 overlay — 移除（圖片本身色調已足夠） */
  /* .hero-top::before { ... } */

  /* block-news 確保在 overlay 之上 */
  .block-news {
    z-index: 4;
  }

  /* 隱藏原本的 <picture> img 結構 */
  .block-image {
    display: none;
  }

  .block-txt-big {
    left: 50%;
    font-size: clamp(64px, 18vw, 110px);
    -webkit-text-stroke: 2px var(--color-primary);
  }

  .block-news {
    right: 16px;
    bottom: 16px;
    max-width: 200px;
  }

  .block-news .news-inner {
    padding: 10px 12px;
  }

  .block-news .news-text {
    font-size: 12px;
  }

  /* Mobile：hero-bottom 改回垂直堆疊 */
  .hero-bottom {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 50px;
    gap: 10px;
  }

  .block-title {
    flex: none;
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    padding: 0 0 10px 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: left;
    align-self: auto;
    font-size: 16px;
	color: #fff;
  }

  .block-title::before {
    margin-bottom: 0;
    width: 18px;
    flex-shrink: 0;
  }

  .block-title::after {
    display: none; /* 手機版隱藏英文副標 */
  }

  .block-buttons {
    padding-left: 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .btn-hero-link {
    min-height: 46px;
    padding: 8px 10px;
  }

  .btn-hero-link .btn-name {
    font-size: 14px;
    text-align: center;
  }

  .btn-hero-link .btn-desc {
    font-size: 10px;
    text-align: left;
  }
}
