/* =====================================================
   淨衛軍 Pest Control — 軍綠 × 海軍藍守護調性
   ===================================================== */
:root {
  /* Brand palette (從 logo 取色) */
  --army-900: #1F2A18;
  --army-800: #2F4023;
  --army-700: #3F5331;   /* 主色軍綠 */
  --army-500: #556B3D;
  --army-400: #7BA85E;   /* 亮綠（盾牌內 / 草地）*/
  --army-200: #C7DDB5;
  --army-100: #E8F0DC;
  --army-50:  #F4F8EC;

  --navy-900: #0E1A30;
  --navy-800: #1A2B4A;   /* 副色海軍藍 */
  --navy-700: #2B3F62;
  --navy-100: #DDE3EE;

  --alert-500: #E74C3C;
  --alert-400: #ff7a66;
  --line-green: #06c755;

  --grad-army:      linear-gradient(135deg, #3F5331 0%, #556B3D 55%, #7BA85E 100%);
  --grad-army-soft: linear-gradient(135deg, #7BA85E 0%, #C7DDB5 55%, #E8F0DC 100%);
  --grad-shield:    linear-gradient(135deg, #1A2B4A 0%, #2F4023 100%);

  --bg-base:  #FAF8F3;
  --bg-soft:  #F1EEE5;
  --gray-900: #1F2A18;
  --gray-700: #4F5B45;
  --gray-500: #8A917D;
  --gray-300: #C9CDBD;
  --gray-200: #E0E3D6;
  --gray-100: #F1EFE6;
  --white:    #ffffff;

  --shadow-sm: 0 2px 10px rgba(15, 30, 60, .08);
  --shadow-md: 0 10px 28px rgba(15, 30, 60, .12);
  --shadow-lg: 0 22px 60px rgba(15, 30, 60, .16);
  --shadow-army: 0 14px 34px rgba(63, 83, 49, .30);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --max: 1200px;
}

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

/* In-App Browser 字體穩定（依 IN-APP-BROWSER-FIXES.md §2） */
html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100vw;
}
body {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--gray-900);
  line-height: 1.7;
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
  position: relative;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ===== Top Bar ===== */
.topbar {
  background: var(--navy-900);
  color: var(--white);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; min-width: 0;
}
.topbar a { color: var(--white); }
.topbar-info { display: flex; gap: 18px; flex-wrap: wrap; min-width: 0; }
.topbar-info span { display: inline-flex; align-items: center; gap: 6px; }
.topbar-cta a {
  background: var(--army-400); color: var(--navy-900);
  padding: 4px 14px; border-radius: 999px; font-weight: 700;
  transition: filter .2s;
}
.topbar-cta a:hover { filter: brightness(1.08); }

/* ===== Header (sticky + blur) ===== */
.header {
  background: rgba(250, 248, 243, 0.92);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid var(--gray-200);
  padding-top: env(safe-area-inset-top, 0);
}
.header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; padding-bottom: 12px; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark { height: 56px; width: auto; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text .brand-zh {
  font-size: 20px; font-weight: 800; color: var(--army-900); letter-spacing: 2px;
}
.logo-text .brand-en {
  font-size: 11px; color: var(--army-500); letter-spacing: 3px;
}

/* Header 內：橫式 logo 已含「淨衛軍 PEST CONTROL」字、隱掉旁邊文字 stack */
.header .logo .logo-text { display: none; }
/* Footer 內：footer-brand 沒放 img logo、用文字 stack 顯示 */
.footer .logo-text { display: flex; }

/* 首頁 header logo 加大（其他內頁仍維持 56px） */
body.home .header .logo-mark { height: 68px; }

/* 桌機中等寬度（981-1280）nav 微縮、避免 11 個項目擠 2 行 */
@media (max-width: 1280px) and (min-width: 981px) {
  .nav > ul { gap: 0; }
  .nav > ul > li > a {
    padding: 9px 10px;
    font-size: 14px;
    letter-spacing: -.2px;
  }
  body.home .header .logo-mark { height: 60px; }
}

@media (max-width: 768px) {
  .logo-mark { height: 44px; }
  body.home .header .logo-mark { height: 56px; }
}

.nav { display: flex; align-items: center; }
.nav > ul { display: flex; align-items: center; gap: 4px; }
.nav > ul > li > a {
  display: inline-block; padding: 10px 14px;
  font-size: 15px; font-weight: 500; color: var(--gray-900);
  border-radius: var(--radius-sm);
  transition: background .2s, color .2s;
}
.nav > ul > li > a:hover { background: var(--army-100); color: var(--army-900); }
.nav .has-sub { position: relative; }
.nav .submenu {
  position: absolute; top: 100%; left: 0;
  min-width: 200px; background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  padding: 8px 0;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all .2s; z-index: 200;
}
.nav .has-sub:hover .submenu,
.nav .has-sub:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav .submenu li a {
  display: block; padding: 8px 16px;
  font-size: 14px; color: var(--gray-700);
  transition: background .15s;
}
.nav .submenu li a:hover { background: var(--army-50); color: var(--army-900); }

.nav-cta {
  background: var(--line-green) !important;
  color: var(--white) !important;
  font-weight: 700 !important;
}
.nav-cta:hover { filter: brightness(1.08); }

.menu-toggle {
  display: none; background: var(--white);
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  padding: 8px 12px; font-size: 20px; color: var(--army-900);
}

/* In-app browser fallback */
html.is-in-app .header {
  background: var(--white) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html.is-in-app .menu-toggle {
  background: var(--white);
  border: 1px solid rgba(31, 42, 24, .25);
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .header { background: var(--white); }
}

/* ===== Hero (全橫幅) ===== */
.hero {
  position: relative; min-height: clamp(640px, 43vw, 780px);
  display: flex; align-items: center; overflow: hidden;
  background: var(--navy-900);
  color: var(--white);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 44% 58% at 30% 48%, rgba(5, 14, 28, .36) 0%, rgba(5, 14, 28, .18) 48%, transparent 76%),
    linear-gradient(90deg, rgba(5, 14, 28, .58) 0%, rgba(5, 14, 28, .34) 38%, rgba(5, 14, 28, .08) 62%, transparent 82%);
}
.hero-bg {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-bg picture,
.hero-bg img {
  width: 100%;
  height: 100%;
  display: block;
}
.hero-bg img {
  object-fit: cover;
  object-position: center;
}
.hero-mobile-art {
  display: none;
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto;
  padding: 96px 24px; width: 100%;
}
.hero-inner > .hero-eyebrow,
.hero-inner > h1,
.hero-inner > .lead,
.hero-inner > .hero-cta {
  max-width: 660px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(123, 168, 94, .25);
  border: 1px solid rgba(123, 168, 94, .5);
  color: var(--army-100);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; letter-spacing: 2px; font-weight: 600;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800; line-height: 1.15; letter-spacing: 1px;
  margin-bottom: 20px;
  text-shadow: 0 3px 22px rgba(0,0,0,.50), 0 1px 2px rgba(0,0,0,.42);
}
.hero h1 em {
  font-style: normal; color: var(--army-200);
  background: linear-gradient(180deg, transparent 60%, rgba(123, 168, 94, .35) 60%);
  padding: 0 6px;
}
.hero h1 .row2 {
  display: block; font-size: 0.85em;
  color: var(--army-100); margin-top: 8px;
}
.hero .lead {
  font-size: clamp(15px, 1.6vw, 18px);
  max-width: 640px; margin-bottom: 32px;
  color: rgba(255, 255, 255, .94); line-height: 1.8;
  text-shadow: 0 2px 14px rgba(0,0,0,.42);
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero 右側吉祥物（盾牌噴藥版） */
.hero-mascot {
  position: absolute;
  right: 4%;
  bottom: -20px;
  width: clamp(280px, 32vw, 460px);
  height: auto;
  z-index: 1;
  filter: drop-shadow(0 18px 40px rgba(0,0,0,.45));
  pointer-events: none;
}
@media (max-width: 1024px) {
  .hero-mascot { width: clamp(220px, 30vw, 320px); right: 2%; opacity: .55; }
}
@media (max-width: 768px) {
  .hero-mascot { display: none; }
}

/* Stats band */
.hero-stats-band {
  background: var(--navy-900); color: var(--white);
  padding: 32px 0; border-bottom: 4px solid var(--army-400);
}
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; text-align: center;
}
.hero-stat .num {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; color: var(--army-400); line-height: 1;
}
.hero-stat .num small { font-size: .5em; color: var(--army-200); margin-left: 4px; }
.hero-stat .label {
  font-size: 13px; color: rgba(255,255,255,.7);
  margin-top: 8px; letter-spacing: 1px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 15px; border: 0;
  transition: transform .2s, box-shadow .2s, filter .2s;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--grad-army); color: var(--white); box-shadow: var(--shadow-army); }
.btn-line { background: var(--line-green); color: var(--white); }
.btn-outline {
  background: transparent; color: var(--white);
  border: 2px solid var(--white);
}
.btn-outline:hover { background: var(--white); color: var(--army-900); }
.btn-ghost { background: var(--gray-100); color: var(--gray-900); }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-gray { background: var(--bg-soft); }
.section-dark { background: var(--navy-900); color: var(--white); }
.section-dark .eyebrow { color: var(--army-400); }
.section-dark h2 { color: var(--white); }
.section-tight { padding: 40px 0; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head .eyebrow {
  display: inline-block; font-size: 13px; letter-spacing: 3px;
  color: var(--army-700); font-weight: 700; margin-bottom: 12px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 800; color: var(--army-900);
  line-height: 1.3; margin-bottom: 16px;
}
.section-head p { color: var(--gray-700); font-size: 16px; }

/* ===== Service cards ===== */
.services {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.service-card {
  background: var(--white); border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex; flex-direction: column; color: var(--gray-900);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-thumb {
  position: relative; height: 200px;
  background-image:
    linear-gradient(135deg, rgba(63,83,49,.10), rgba(26,43,74,.12)),
    var(--thumb-image, var(--grad-army));
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
}
.thumb-cockroach { --thumb-image: url("../images/home/service-cockroach.webp"); }
.thumb-rat { --thumb-image: url("../images/home/service-rat.webp"); }
.thumb-termite { --thumb-image: url("../images/home/service-termite.webp"); }
.thumb-flea { --thumb-image: url("../images/home/service-flea.webp"); }
.thumb-mosquito-fly { --thumb-image: url("../images/home/service-mosquito-fly.webp"); }
.thumb-disinfection { --thumb-image: url("../images/home/service-disinfection.webp"); }
.thumb-pricing { --thumb-image: url("../images/home/more-pricing.webp"); }
.thumb-business { --thumb-image: url("../images/home/more-business.webp"); }
.thumb-knowledge { --thumb-image: url("../images/home/more-knowledge.webp"); }
.thumb-meiyi-plants-pruning { --thumb-image: url("../images/mei-yi/service-plants-pruning.webp"); }
.thumb-meiyi-plants-fertilizing { --thumb-image: url("../images/mei-yi/service-plants-fertilizing.webp"); }
.thumb-meiyi-plants-pest-care { --thumb-image: url("../images/mei-yi/service-plants-pest-care.webp"); }
.thumb-meiyi-plants-irrigation { --thumb-image: url("../images/mei-yi/service-plants-irrigation.webp"); }
.thumb-meiyi-plants-seasonal { --thumb-image: url("../images/mei-yi/service-plants-seasonal.webp"); }
.thumb-meiyi-plants-tree-check { --thumb-image: url("../images/mei-yi/service-plants-tree-check.webp"); }
.thumb-meiyi-cleaning-office { --thumb-image: url("../images/mei-yi/service-cleaning-office.webp"); }
.thumb-meiyi-cleaning-lobby { --thumb-image: url("../images/mei-yi/service-cleaning-lobby.webp"); }
.thumb-meiyi-cleaning-postconstruction { --thumb-image: url("../images/mei-yi/service-cleaning-postconstruction.webp"); }
.thumb-meiyi-cleaning-home { --thumb-image: url("../images/mei-yi/service-cleaning-home.webp"); }
.thumb-meiyi-cleaning-kitchen { --thumb-image: url("../images/mei-yi/service-cleaning-kitchen.webp"); }
.thumb-meiyi-cleaning-moveout { --thumb-image: url("../images/mei-yi/service-cleaning-moveout.webp"); }
.service-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(5,14,28,.72); border: 1px solid rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.service-card h3 { padding: 20px 22px 8px; font-size: 20px; font-weight: 700; color: var(--army-900); }
.service-card p { padding: 0 22px 16px; color: var(--gray-700); font-size: 14.5px; flex: 1; }
.service-card .more { padding: 0 22px 22px; color: var(--army-700); font-weight: 700; font-size: 14px; }

/* ===== About ===== */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-img {
  position: relative; overflow: hidden;
  background-image:
    linear-gradient(135deg, rgba(15,26,48,.08), rgba(63,83,49,.10)),
    url("../images/home/about-team.webp");
  background-size: cover; background-position: center;
  height: 440px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.about-img::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 -60px 80px rgba(15,26,48,.10);
  pointer-events: none;
}
.about-content .eyebrow {
  font-size: 13px; letter-spacing: 3px;
  color: var(--army-700); font-weight: 700;
}
.about-content h2 {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 800; color: var(--army-900);
  margin: 12px 0 20px; line-height: 1.3;
}
.about-content p { color: var(--gray-700); margin-bottom: 16px; font-size: 15.5px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 24px 0 32px; }
.about-features li {
  padding-left: 28px; position: relative;
  font-size: 14.5px; color: var(--gray-900);
}
.about-features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px;
  background: var(--army-400); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ===== Why grid ===== */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why-card {
  background: var(--white); padding: 32px 24px;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  text-align: center; transition: transform .25s, box-shadow .25s;
  border-top: 4px solid var(--army-400);
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-icon { font-size: 44px; margin-bottom: 12px; }
.why-card h3 { font-size: 18px; font-weight: 700; color: var(--army-900); margin-bottom: 8px; }
.why-card p { color: var(--gray-700); font-size: 14px; line-height: 1.7; }

/* ===== Process ===== */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.process-step {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.process-step:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.process-thumb {
  position: relative;
  aspect-ratio: 4 / 3;  /* 桌機自然放大、不用寫死 height */
  background-image:
    linear-gradient(135deg, rgba(15,26,48,.08), rgba(63,83,49,.12)),
    var(--process-image, var(--grad-army));
  background-size: cover; background-position: center;
}
.process-consult { --process-image: url("../images/home/process-consult.webp"); }
.process-inspection { --process-image: url("../images/home/process-inspection.webp"); }
.process-quote { --process-image: url("../images/home/process-quote.webp"); }
.process-treatment { --process-image: url("../images/home/process-treatment.webp"); }
.process-handover { --process-image: url("../images/home/process-handover.webp"); }
.process-followup { --process-image: url("../images/home/process-followup.webp"); }
.process-num {
  position: absolute; top: 14px; left: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy-900); color: var(--army-400);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
  border: 2px solid var(--army-400);
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.process-step h4 { padding: 16px 18px 6px; font-size: 17px; font-weight: 700; color: var(--army-900); }
.process-step p { padding: 0 18px 20px; color: var(--gray-700); font-size: 14px; line-height: 1.7; }

/* ===== Testimonials ===== */
.rating-summary { display: inline-flex; align-items: center; gap: 16px; margin-top: 16px; }
.rating-summary .big { font-size: 44px; font-weight: 800; color: var(--army-700); line-height: 1; }
.rating-summary .stars { color: #f5b50a; font-size: 18px; }
.rating-summary .meta { font-size: 13px; color: var(--gray-500); }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonial-card {
  background: var(--white); padding: 24px;
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--army-400);
}
.testimonial-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.testimonial-rating .stars { color: #f5b50a; }
.testimonial-rating .rating-num { font-size: 13px; color: var(--gray-700); }
.testimonial-tag {
  font-size: 11px; background: var(--army-100); color: var(--army-800);
  padding: 2px 10px; border-radius: 999px; font-weight: 600;
}
.testimonial-quote { color: var(--gray-900); font-size: 14.5px; line-height: 1.8; margin-bottom: 16px; }
.testimonial-author {
  display: flex; align-items: center; gap: 12px;
  padding-top: 12px; border-top: 1px solid var(--gray-200);
}
.testimonial-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--army-700); color: var(--white);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.testimonial-name { font-weight: 700; font-size: 14px; color: var(--army-900); }
.testimonial-meta { font-size: 12px; color: var(--gray-500); }

/* ===== CTA banner ===== */
.cta-banner {
  background: var(--grad-shield); color: var(--white);
  padding: 40px 48px; border-radius: var(--radius-lg);
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ""; position: absolute; right: -50px; top: -50px;
  width: 200px; height: 200px;
  background: var(--army-400); opacity: .12; border-radius: 50%;
}
.cta-banner h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; margin-bottom: 6px; }
.cta-banner p { color: rgba(255,255,255,.85); font-size: 15px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== FAQ ===== */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: var(--white); border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  padding: 18px 22px; font-weight: 700; color: var(--army-900);
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 15.5px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "＋"; font-weight: 400;
  color: var(--army-400); font-size: 22px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer {
  padding: 0 22px 20px; color: var(--gray-700);
  font-size: 14.5px; line-height: 1.8;
}

/* ===== Contact ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 32px; }
.contact-info-card {
  background: var(--navy-900); color: var(--white);
  padding: 32px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.contact-info-card h3 { font-size: 20px; margin-bottom: 24px; color: var(--army-400); }
.contact-info-card .item { display: flex; gap: 14px; margin-bottom: 20px; }
.contact-info-card .icon { font-size: 22px; flex-shrink: 0; }
.contact-info-card .label {
  font-size: 12px; color: rgba(255,255,255,.6);
  margin-bottom: 2px; letter-spacing: 1px;
}
.contact-info-card .value {
  color: var(--white); font-size: 15px; font-weight: 500; word-break: break-word;
}
.contact-info-card a.value:hover { color: var(--army-400); }

.contact-form {
  background: var(--white); padding: 32px;
  border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.contact-form h3 { font-size: 20px; color: var(--army-900); margin-bottom: 4px; }
.contact-form .muted { color: var(--gray-500); font-size: 13px; margin-bottom: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }
.form-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--gray-900); margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px;
  background: var(--bg-base); color: var(--gray-900);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 0; border-color: var(--army-400);
  box-shadow: 0 0 0 3px rgba(123,168,94,.18);
  background: var(--white);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-submit { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.form-status { margin-top: 12px; font-size: 14px; color: var(--army-700); }

/* ===== Image gallery ===== */
.img-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 20px 0 40px;
}
.img-slot {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  color: var(--gray-900);
  transition: transform .2s, box-shadow .2s;
}
.img-slot:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.img-slot img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.img-slot figcaption {
  display: block;
  padding: 14px 16px 16px;
}
.img-slot figcaption strong {
  display: block;
  color: var(--army-900);
  font-size: 16px;
  line-height: 1.35;
  margin-bottom: 4px;
}
.img-slot figcaption span {
  display: block;
  color: var(--gray-700);
  font-size: 13px;
  line-height: 1.6;
}
.img-slot small {
  display: block;
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 6px;
  letter-spacing: .5px;
}
@media (max-width: 768px) {
  .img-gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .img-slot figcaption { padding: 12px; }
  .img-slot figcaption strong { font-size: 14px; }
  .img-slot figcaption span { font-size: 12px; }
}

/* ===== Certificate band (全站 footer 上方公示帶) ===== */
.cert-band {
  background: var(--bg-soft);
  padding: 56px 0;
  border-top: 1px solid var(--gray-200);
}
.cert-band-head {
  text-align: center;
  margin-bottom: 32px;
}
.cert-band-head .eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 3px;
  color: var(--army-700);
  font-weight: 700;
  margin-bottom: 8px;
}
.cert-band-head h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 800;
  color: var(--army-900);
  line-height: 1.4;
}
.cert-band-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}
.cert-band .cert-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  color: var(--gray-900);
  text-decoration: none;
}
.cert-band .cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--army-400);
}
.cert-band .cert-card img {
  width: 88px;
  height: auto;
  aspect-ratio: 1 / 1.414;
  object-fit: contain;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  flex-shrink: 0;
  padding: 4px;
}
.cert-band .cert-card .cert-info { min-width: 0; }
.cert-band .cert-card strong {
  display: block;
  font-size: 15px;
  color: var(--army-900);
  margin-bottom: 4px;
}
.cert-band .cert-card .num {
  font-size: 13.5px;
  color: var(--army-700);
  font-weight: 600;
  margin-bottom: 4px;
}
.cert-band .cert-card .meta {
  font-size: 12.5px;
  color: var(--gray-500);
  line-height: 1.6;
}
.cert-band .cert-card .meta .view {
  color: var(--army-700);
  font-weight: 600;
}
@media (max-width: 768px) {
  .cert-band { padding: 40px 0; }
  .cert-band-grid { grid-template-columns: 1fr; gap: 14px; }
  .cert-band .cert-card { padding: 14px; gap: 14px; }
  .cert-band .cert-card img { width: 72px; }
}

/* ===== Footer ===== */
.footer {
  background: var(--navy-900); color: rgba(255,255,255,.78);
  padding: 60px 0 0; border-top: 4px solid var(--army-400);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-brand .logo { margin-bottom: 16px; align-items: center; gap: 14px; }
.footer-brand .logo-text .brand-zh { color: var(--white); }
.footer-brand .logo-text .brand-en { color: var(--army-400); }
.footer-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  /* 白底圓盤（footer 深藍底會吃掉 logo 深綠、加底盤撐起來） */
  background: #ffffff;
  border-radius: 50%;
  padding: 6px;
  box-sizing: content-box;
  box-shadow: 0 4px 14px rgba(0,0,0,.35), inset 0 0 0 2px var(--army-400);
}

/* 文章內吉祥物（hero 之後、靠右、不擋字） */
.content-mascot {
  float: right;
  width: clamp(140px, 22vw, 220px);
  height: auto;
  margin: 0 0 16px 24px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.18));
  shape-outside: circle(50%);
}
.content-mascot.left { float: left; margin: 0 24px 16px 0; }
.content-mascot.center {
  float: none;
  display: block;
  margin: 24px auto;
  width: clamp(180px, 30vw, 280px);
}
@media (max-width: 768px) {
  .content-mascot {
    float: none;
    display: block;
    margin: 16px auto;
    width: clamp(140px, 50vw, 200px);
  }
}
.footer-brand p { font-size: 14px; line-height: 1.9; margin-bottom: 16px; }
.cert-badge {
  display: inline-block; padding: 6px 14px;
  background: rgba(123,168,94,.18);
  border: 1px solid rgba(123,168,94,.5);
  color: var(--army-200); border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
}
.footer h5 { color: var(--white); font-size: 15px; margin-bottom: 16px; letter-spacing: 1px; }
.footer ul li { margin-bottom: 8px; font-size: 13.5px; line-height: 1.7; }
.footer ul li a { color: rgba(255,255,255,.78); }
.footer ul li a:hover { color: var(--army-400); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 24px; text-align: center;
  font-size: 12.5px; color: rgba(255,255,255,.55);
}
.footer-bottom a { color: rgba(255,255,255,.78); }
.footer-bottom a:hover { color: var(--army-400); }

/* ===== Floating CTA ===== */
.floating {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.fab-wrap { position: relative; display: flex; align-items: center; justify-content: flex-end; }
.fab {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--white);
  box-shadow: var(--shadow-md); transition: transform .2s;
}
.fab:hover { transform: scale(1.08); }
.fab-line { background: var(--line-green); }
.fab-tel { background: var(--army-700); }
.fab-top { background: var(--navy-800); font-size: 18px; }
.fab-label {
  position: absolute; right: 60px;
  background: var(--navy-900); color: var(--white);
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.fab-wrap:hover .fab-label { opacity: 1; }

/* ===== Sub-page hero ===== */
.page-hero {
  background-image:
    linear-gradient(135deg, rgba(15,26,48,.86), rgba(47,64,35,.74)),
    var(--page-hero-image, var(--grad-shield));
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 80px 0 64px; text-align: center;
  position: relative; overflow: hidden;
}
.page-hero-knowledge {
  --page-hero-image: url("../images/home/more-knowledge.webp");
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 20px, rgba(255,255,255,.03) 20px 21px);
  pointer-events: none;
}
.page-hero .breadcrumb {
  font-size: 13px; color: rgba(255,255,255,.7);
  margin-bottom: 14px; letter-spacing: 1px; position: relative;
}
.page-hero .breadcrumb a { color: var(--army-200); }
.page-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; line-height: 1.3; position: relative;
}
.page-hero .lead {
  max-width: 720px; margin: 16px auto 0;
  color: rgba(255,255,255,.88);
  font-size: 15.5px; position: relative;
}

/* ===== Content blocks ===== */
.content-wrap { max-width: 820px; margin: 0 auto; }
.content-wrap h2 {
  font-size: 24px; font-weight: 800;
  color: var(--army-900); margin: 40px 0 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--army-200);
}
.content-wrap h3 {
  font-size: 18px; font-weight: 700;
  color: var(--army-800); margin: 24px 0 10px;
}
.content-wrap p {
  color: var(--gray-700); margin-bottom: 14px;
  line-height: 1.9; font-size: 15.5px;
}
.content-wrap ul,
.content-wrap ol { margin: 12px 0 18px 24px; color: var(--gray-700); }
.content-wrap ul li,
.content-wrap ol li { margin-bottom: 6px; line-height: 1.8; list-style: disc; }
.content-wrap ol li { list-style: decimal; }
.content-wrap blockquote {
  border-left: 4px solid var(--army-400);
  background: var(--army-50); padding: 16px 20px;
  margin: 20px 0; color: var(--army-900); border-radius: 4px;
}
.content-wrap .callout {
  background: var(--army-50); border: 1px solid var(--army-200);
  padding: 20px 24px; border-radius: var(--radius-md); margin: 24px 0;
}
.content-wrap .callout.warn {
  background: #fff4f1; border-color: var(--alert-400);
}
.info-table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0 24px;
  background: var(--white); border-radius: var(--radius-sm);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.info-table th,
.info-table td {
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--gray-200); font-size: 14.5px;
}
.info-table th { background: var(--army-100); color: var(--army-900); font-weight: 700; }

/* ===== Certificate showcase ===== */
.cert-showcase {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin: 24px 0 40px;
}
.cert-item {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  color: var(--gray-900);
  text-decoration: none;
}
.cert-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cert-thumb {
  aspect-ratio: 1 / 1.414;  /* 紙本證書 A4 比例 */
  overflow: hidden;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}
.cert-caption {
  padding: 14px 18px 18px;
  font-size: 14px;
  line-height: 1.7;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-900);
}
.cert-caption strong { color: var(--army-900); }
.cert-caption small { color: var(--gray-500); font-size: 12px; }

/* 漢堡 close 按鈕：桌機永遠隱藏、手機 nav.open 才顯示 */
.nav-close { display: none; }

/* 漢堡開啟時：header 必須讓出 stacking context 給 nav
   1. backdrop-filter 會讓 header 變成 fixed 子元素的 containing block
      → nav.open 的 position:fixed 不依 viewport 定位、面板會卡在 header 內
   2. position:sticky + z-index:100 也會建 stacking context
      → nav.open 的 z-index:1100 被困在 z=100 那層、body::after 遮罩 (z=1099)
        在 root 層級反而蓋在 nav 上、攔截所有點擊 */
body.nav-open .header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--white) !important;
  z-index: 1200 !important;
}

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .nav { display: none; }
  .nav.open {
    display: flex; position: fixed; top: 0; right: 0; bottom: 0;
    width: min(340px, 86vw); background: var(--white);
    z-index: 1201;
    padding: calc(76px + env(safe-area-inset-top, 0px)) 20px 28px;
    overflow-y: auto; box-shadow: var(--shadow-lg);
    flex-direction: column;
  }
  .nav.open > ul {
    flex-direction: column; align-items: stretch; gap: 4px; width: 100%;
  }
  .nav.open > ul > li > a { padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav.open .submenu {
    position: static; box-shadow: none; border: 0;
    padding: 4px 0 8px 14px;
    margin: 0 0 4px;
    opacity: 1; visibility: visible; transform: none;
    background: var(--army-50); border-radius: var(--radius-sm);
  }
  /* nav 內右上角 × close 按鈕（由 JS 動態插入）*/
  .nav-close {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top, 0px));
    right: 16px;
    width: 40px; height: 40px;
    background: var(--army-50);
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    font-size: 26px; line-height: 1;
    color: var(--army-900);
    cursor: pointer;
    align-items: center; justify-content: center;
    transition: background .15s, transform .2s;
    z-index: 2;
  }
  .nav-close { display: none; }
  .nav.open .nav-close { display: flex; }
  .nav-close:hover { background: var(--army-100); transform: rotate(90deg); }
  .menu-toggle { display: block; }
  body.nav-open { overflow: hidden; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0;
    background: rgba(15,26,48,.5); z-index: 1190;
  }
}

@media (max-width: 768px) {
  /* 手機字級固定 px、避 LINE webview 爆大 */
  .hero h1 { font-size: 30px !important; line-height: 1.2 !important; }
  .hero .lead { font-size: 15px !important; }
  .page-hero h1 { font-size: 26px !important; }
  .section-head h2 { font-size: 22px !important; line-height: 1.35 !important; }
  .about-content h2 { font-size: 22px !important; }
  .cta-banner h2 { font-size: 20px !important; }
  body { font-size: 15px !important; }

  .section { padding: 56px 0; }
  .container { padding: 0 16px; }

  .hero {
    min-height: 1020px;
    align-items: flex-start;
  }
  .hero::before {
    background:
      linear-gradient(180deg, rgba(5, 14, 28, .70) 0%, rgba(5, 14, 28, .48) 42%, rgba(5, 14, 28, .10) 68%, transparent 88%),
      radial-gradient(ellipse 88% 48% at 50% 23%, rgba(5, 14, 28, .38) 0%, rgba(5, 14, 28, .18) 52%, transparent 78%);
  }
  .hero-bg img {
    object-position: center bottom;
  }
  .hero-mobile-art {
    display: block;
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 44px;
    width: min(88vw, 360px);
    height: auto;
    transform: translateX(-50%);
    filter: drop-shadow(0 18px 28px rgba(0,0,0,.42));
    pointer-events: none;
  }
  .hero-inner {
    padding: 56px 16px 420px;
  }
  .hero-inner > .hero-eyebrow,
  .hero-inner > h1,
  .hero-inner > .lead,
  .hero-inner > .hero-cta {
    max-width: 360px;
  }
  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 340px;
    gap: 10px;
  }
  .hero-cta .btn {
    min-height: 52px;
    justify-content: center;
    padding-left: 12px;
    padding-right: 12px;
  }
  .hero-cta .btn-outline {
    grid-column: 1 / -1;
    background: rgba(5, 14, 28, .46);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
  }

  .topbar { font-size: 12px; }
  .topbar-info { gap: 12px; }
  .topbar .container { justify-content: center; }
  .topbar-cta { display: none; }

  .services,
  .testimonials { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .hero-stats-band {
    position: relative;
    z-index: 4;
    margin-top: -450px;
    margin-bottom: 370px;
    padding: 0 16px;
    background: transparent;
    border-bottom: 0;
  }
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 10px;
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
    box-shadow: 0 18px 50px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.22);
    backdrop-filter: blur(14px) saturate(145%);
    -webkit-backdrop-filter: blur(14px) saturate(145%);
  }
  .hero-stat {
    padding: 2px 4px;
    border-right: 1px solid rgba(255,255,255,.14);
  }
  .hero-stat:last-child {
    border-right: 0;
  }
  .hero-stat .num {
    font-size: 24px;
    color: #D8F0C9;
    text-shadow: 0 2px 12px rgba(0,0,0,.42);
  }
  .hero-stat .label {
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255,255,255,.78);
    letter-spacing: 0;
  }

  .about { grid-template-columns: 1fr; gap: 32px; }
  .about-img { height: 280px; }
  .about-features { grid-template-columns: 1fr; }

  .cta-banner { flex-direction: column; text-align: center; padding: 28px 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer { padding: 48px 0 0; }
}

@media (max-width: 480px) {
  .hero-cta .btn,
  .cta-actions .btn { width: 100%; justify-content: center; }
  .floating { bottom: 12px; right: 12px; }
  .fab { width: 48px; height: 48px; font-size: 20px; }
  /* 手機小螢幕：process 維持 2 個一排（不要變 1 個） */
  .process { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .process-step h4 { font-size: 15px !important; padding: 12px 14px 4px; }
  .process-step p { font-size: 13px !important; padding: 0 14px 14px; }
  .process-num { width: 32px; height: 32px; font-size: 14px; top: 10px; left: 10px; }
}

section { max-width: 100vw; overflow-x: clip; }
