/* ==================================================
   八達通實業有限公司  —  網站共用樣式
   參考框架：ESS-style 全寬版面 (100%)
   ================================================== */

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

body {
  font-family: 'Microsoft JhengHei', '微軟正黑體', 'PingFang TC', Arial, sans-serif;
  font-size: 16px;
  color: #333;
  background: #fff;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* ── 內容置中容器 ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 48px;
}

/* ==================================================
   HEADER — 白底 sticky
   ================================================== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 72px;
  gap: 8px;
}

/* LOGO */
.logo-block {
  flex: 1;
  text-decoration: none;
  cursor: pointer;
}

.logo-zh {
  font-size: 26px;
  font-weight: bold;
  color: #003087;
  letter-spacing: 1px;
  line-height: 1.2;
}

.logo-en {
  font-size: 10px;
  color: #999;
  letter-spacing: 1px;
}

/* 主導覽 */
.main-nav { display: flex; gap: 2px; align-items: center; }

.main-nav a {
  color: #444;
  font-size: 20px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 4px;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #003087;
  background: #eef4ff;
}

/* CTA 聯絡按鈕（右側） */
.btn-cta {
  background: #003087;
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  margin-left: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
}

.btn-cta:hover { background: #001f5c !important; }

/* ==================================================
   漢堡選單 — 深色條（白底 Header）
   ================================================== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 200;
  order: 3;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: #003087;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.is-open span:nth-child(1) { transform: translateY(8.5px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8.5px) rotate(-45deg); }

/* ==================================================
   HERO BANNER — 全寬
   ================================================== */
.hero {
  width: 100%;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.hero-home    { background: linear-gradient(135deg,#3a8fd4 0%,#1e5799 55%,#124076 100%); }
.hero-about   { background: linear-gradient(135deg,#4fa3d4 0%,#1a6baa 55%,#0f4a80 100%); }
.hero-services{ background: linear-gradient(135deg,#3598d4 0%,#1a5f99 55%,#0f4070 100%); }
.hero-print   { background: linear-gradient(135deg,#4fa3d4 0%,#1a6baa 55%,#0f4a80 100%); }
.hero-upload  { background: linear-gradient(135deg,#5baad4 0%,#1e6baa 55%,#0f4080 100%); }
.hero-contact { background: linear-gradient(135deg,#3d9dce 0%,#1a5f99 55%,#0f3f70 100%); }

/* 右側裝飾圓 */
.hero::before {
  content: '';
  position: absolute;
  right: 5%; top: -80px;
  width: 380px; height: 380px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  right: 14%; bottom: -100px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-tag {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #cce8ff;
  font-size: 11px;
  letter-spacing: 3px;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-title {
  font-size: 42px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-sub {
  font-size: 16px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 1px;
}

/* ==================================================
   首頁輪播 HERO SLIDER
   ================================================== */
.hero-slider {
  position: relative;
  width: 100%;
  height: 520px;
  overflow: hidden;
  background: #0d2a50;
}

/* 每一張 Slide */
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 0.85s ease;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* GPU 加速，防止過渡期模糊 */
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* 進場：在下層淡入 */
.slide.active  { opacity: 1; z-index: 1; }
/* 離場：在上層淡出，完全消失後才移除 */
.slide.leaving { opacity: 0; z-index: 2; }

.slide-1 { background-image: url('/images/hero1.jpg'); }
.slide-2 { background-image: url('/images/hero2.jpg'); }
.slide-3 { background-image: url('/images/hero3.jpg'); }

/* 深色半透明遮罩（確保文字可讀） */
.slide-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.38);
}

.slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* 左右箭頭 */
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.4);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.slider-prev { left: 24px; }
.slider-next { right: 24px; }
.slider-prev:hover,
.slider-next:hover { background: rgba(255,255,255,0.35); }

/* 圓點導航 */
.slider-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ==================================================
   SECTION 背景
   ================================================== */
.sec-white { background: #fff; padding: 64px 0; }
.sec-gray  { background: #f4f7fb; padding: 64px 0; }
.sec-blue  { background: #eef5ff; padding: 64px 0; }
.sec-why {
  background: #0d1f6e url('/images/world_mapBg.jpg') center center / cover no-repeat;
  padding: 72px 0 88px;
}


.sec-why .sec-en    { color: rgba(255,255,255,0.45); }
.sec-why .sec-divider { background: rgba(255,255,255,0.18); margin: 10px auto 48px; }

/* ==================================================
   共用標題 / 文字
   ================================================== */
.sec-title {
  font-size: 22px;
  font-weight: bold;
  color: #003087;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.sec-title .sec-en {
  font-size: 12px;
  color: #90b0d8;
  font-weight: normal;
  letter-spacing: 2px;
}

.sec-divider {
  width: 48px;
  height: 3px;
  background: #003087;
  margin: 10px 0 28px;
  border-radius: 2px;
}

.sub-title {
  font-size: 16px;
  font-weight: bold;
  color: #003087;
  margin: 28px 0 12px;
  padding-left: 12px;
  border-left: 4px solid #5aace8;
}

.body-text {
  font-size: 16px;
  line-height: 2;
  color: #555;
  margin-bottom: 18px;
}

/* ==================================================
   CARDS / GRID
   ================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.card {
  background: #fff;
  border: 1px solid #dde8f5;
  border-top: 4px solid #003087;
  border-radius: 6px;
  padding: 28px 22px;
  transition: box-shadow 0.25s, transform 0.25s;
}

.card:hover {
  box-shadow: 0 8px 28px rgba(0,48,135,0.12);
  transform: translateY(-3px);
}

.card-icon { font-size: 32px; margin-bottom: 12px; }
.card-title { font-size: 17px; font-weight: bold; color: #003087; margin-bottom: 8px; }
.card-desc  { font-size: 16px; color: #6a8aaa; line-height: 1.75; }

/* ==================================================
   HOME — 我們的優勢（天藍疊影卡）
   ================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-right: 14px;
}

.why-card {
  position: relative;
  background:  rgba(255,255,255,0.72);
  border-radius: 26px;
  padding: 42px 36px 52px;
  color: #fff;
  z-index: 1;
}

.why-card::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 14px;
  right: -14px;
  bottom: -14px;
  background:#3aaee8;
  border-radius: 26px;
  z-index: -1;
}

.why-title {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 32px;
}

.why-desc {
  font-size: 15px;
  line-height: 1.95;
  color: rgba(255,255,255,0.93);
}

/* ==================================================
   TABLE
   ================================================== */
.table-wrap { overflow-x: auto; margin-bottom: 24px; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}

.data-table th {
  background: #003087;
  color: #fff;
  padding: 11px 14px;
  text-align: center;
  font-weight: bold;
  border: 1px solid #003087;
}

.data-table th.th-sub {
  background: #3a7fd4;
  font-size: 14px;
  font-weight: normal;
}

.data-table td {
  border: 1px solid #c8dff0;
  padding: 10px 14px;
  text-align: center;
}

.data-table tr:nth-child(even) td { background: #f0f6ff; }

.data-table td.td-label {
  text-align: center;
  background: #daeef8;
  font-weight: bold;
  color: #003087;
}

.data-table td.td-note {
  text-align: left;
  font-size: 14px;
  color: #5a7a8a;
  line-height: 1.6;
}

/* ==================================================
   HOME — 版塊
   ================================================== */
.home-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.service-link-list { display: flex; flex-direction: column; gap: 12px; }

.service-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  background: #f4f7fb;
  border: 1px solid #d0e2f5;
  border-radius: 6px;
  color: #003087;
  transition: background 0.2s, box-shadow 0.2s;
}

.service-link:hover {
  background: #dceeff;
  box-shadow: 0 3px 12px rgba(0,48,135,0.1);
}

.s-num {
  width: 34px; height: 34px;
  background: #003087;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.s-name {
  font-weight: bold;
  font-size: 18px;
  display: block;
}

.s-sub {
  font-size: 15px;
  color: #6a9ec0;
  margin-top: 8px;
  display: block;
}
/* 快速聯絡 */
.quick-contact {
  background: #003087;
  color: #fff;
  padding: 28px 24px;
  border-radius: 6px;
  text-align: center;
  margin-top: 24px;
}

.qc-label  { font-size: 17px; color: #a8d4f8; margin-bottom: 10px; letter-spacing: 1px; }
.qc-tel    { font-size: 30px; font-weight: bold; letter-spacing: 1px; margin-bottom: 6px; }
.qc-mobile { font-size: 17px; color: #c8e4f8; }

/* ==================================================
   ABOUT — 優點卡
   ================================================== */
.adv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 8px;
}

.adv-card {
  background: #fff;
  border: 1px solid #dde8f5;
  border-radius: 6px;
  padding: 28px 22px;
  text-align: center;
}

.adv-icon  { font-size: 40px; margin-bottom: 14px; }
.adv-title { font-size: 16px; font-weight: bold; color: #003087; margin-bottom: 8px; }
.adv-text  { font-size: 13px; color: #6a8aaa; line-height: 1.75; }

/* ==================================================
   PAYMENT
   ================================================== */
.pay-box {
  max-width: 640px;
  background: #fff;
  border: 1px solid #c0daf5;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,48,135,0.06);
}

.pay-row {
  display: flex;
  border-bottom: 1px solid #e8f2fc;
  padding: 15px 22px;
}

.pay-row:last-child { border-bottom: none; }

.pay-label {
  width: 150px;
  color: #003087;
  font-weight: bold;
  flex-shrink: 0;
}

.pay-value { color: #333; }

/* ==================================================
   UPLOAD / CONTACT 表單
   ================================================== */
.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  font-size: 16px;
  color: #003087;
  font-weight: bold;
  margin-bottom: 6px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row select,
.form-row textarea {
  width: 100%;
  border: 1px solid #c4d8ee;
  border-radius: 4px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fafcff;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #003087;
  box-shadow: 0 0 0 3px rgba(0,48,135,0.08);
}

.form-row textarea { height: 100px; resize: vertical; }

.upload-drop {
  border: 2px dashed #6aace8;
  border-radius: 6px;
  padding: 30px;
  text-align: center;
  background: #f0f7ff;
  color: #6aace8;
  font-size: 13px;
}

.upload-drop input[type="file"] { margin-top: 14px; }

.btn-submit {
  background: #003087;
  color: #fff;
  border: none;
  padding: 12px 36px;
  font-size: 15px;
  font-family: inherit;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-submit:hover { background: #001f5c; }

/* CONTACT */
.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.contact-info-box {
  background: #f4f7fb;
  border: 1px solid #c8def5;
  border-radius: 6px;
  padding: 22px;
  font-size: 16px;
  line-height: 2.2;
  color: #444;
  margin-bottom: 18px;
  overflow-wrap: break-word;
  word-break: break-all;
}

.contact-info-box h3 {
  font-size: 15px;
  color: #003087;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #c8def5;
}

.map-placeholder {
  width: 100%;
  height: 210px;
  border: 1px solid #c8def5;
  border-radius: 6px;
  overflow: hidden;
  background: #e0eaf5;
}

.map-placeholder iframe { width: 100%; height: 100%; border: 0; }

/* ==================================================
   FOOTER — 深底 3欄
   ================================================== */
.site-footer {
  background: #0d1f40;
  padding: 0 0 24px;
  color: #8ab0d0;
  font-size: 13px;
}

.footer-toggle-bar {
  text-align: center;
  padding: 14px 0 0;
}

.footer-toggle {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  color: #8ab0d0;
  font-size: 13px;
  padding: 7px 22px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  letter-spacing: 0.5px;
  font-family: inherit;
}

.footer-toggle:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

.footer-body {
  overflow: hidden;
  max-height: 600px;
  opacity: 1;
  transition: max-height 0.45s ease, opacity 0.35s ease;
}

.footer-body.collapsed {
  max-height: 0;
  opacity: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 48px;
  padding-top: 44px;
  margin-bottom: 40px;
}

.footer-col .fc-title {
  font-size: 14px;
  font-weight: bold;
  color: #d0e8ff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col .fc-logo-zh {
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.footer-col .fc-logo-en {
  font-size: 10px;
  color: #6a90b0;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.footer-col p { line-height: 2; color: #8ab0d0; font-size: 15px; }

.footer-col ul { list-style: none; }

.footer-col ul li { border-bottom: 1px solid rgba(255,255,255,0.06); }

.footer-col ul li a {
  display: block;
  color: #8ab0d0;
  padding: 8px 0;
  font-size: 14px;
  transition: color 0.2s, padding-left 0.2s;
}

.footer-col ul li a:hover { color: #fff; padding-left: 6px; }

.footer-info-item {
  display: flex;
  gap: 10px;
  padding: 6px 0;
  line-height: 1.5;
  color: #8ab0d0;
}

.footer-info-item .fi-label {
  color: #6090b0;
  font-size: 12px;
  white-space: nowrap;
  min-width: 42px;
}

.footer-info-item .fi-val {
  color: #a8c8e0;
  overflow-wrap: break-word;
  word-break: break-all;
  min-width: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
  color: #5a7a9a;
}

/* ==================================================
   RWD
   ================================================== */
@media (max-width: 1024px) {
  .container { padding: 0 28px; }
  .home-intro-grid { gap: 36px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-inner .footer-col:first-child { grid-column: 1 / -1; }
}

@media (max-width: 932px) {
  /* Container */
  .container { padding: 0 20px; }

  /* Header */
  .site-header { position: sticky; }
  .header-inner { flex-wrap: wrap; height: auto; padding: 14px 0; }
  .logo-block { order: 1; flex: 1; margin-left: 6px;}
  .hamburger { display: flex; order: 2; }
  .btn-cta { display: none; }

  /* 手機導覽 — 下拉白底 */
  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    order: 4;
    background: #fff;
    border-top: 2px solid #003087;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    gap: 0;
    margin: 0 -20px;
    width: calc(100% + 40px);
  }

  .main-nav.open { display: flex; }

  .main-nav a {
    padding: 14px 24px;
    border-bottom: 1px solid #eee;
    border-radius: 0;
    font-size: 17px;
    color: #333;
    max-width: 100%;
    width: 100%;
    display: block;
    text-align: center;
  }

  .main-nav a:hover,
  .main-nav a.active { background: #eef4ff; color: #003087; }

  /* Hero */
  .hero { padding: 50px 0; }
  .hero-title { font-size: 28px; }
  .hero-sub   { font-size: 14px; }
  .hero-slider { height: 360px; }
  .slider-prev, .slider-next { width: 38px; height: 38px; font-size: 16px; }

  /* Sections */
  .sec-white, .sec-gray, .sec-blue { padding: 44px 0; }

  /* Grids */
  .home-intro-grid  { grid-template-columns: 1fr; gap: 32px; }
  .adv-grid         { grid-template-columns: 1fr; }
  .why-grid         { grid-template-columns: repeat(2, 1fr); }
  .contact-cols     { grid-template-columns: 1fr; gap: 24px; }
  .footer-inner     { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 769px) {
  .footer-body { max-height: 660px; }
}
