/* =========================================================
   鴻安除蟲消毒｜主樣式
   Modern, professional, SEO-friendly, responsive
   ========================================================= */

:root {
  --primary: #0f5132;
  --primary-dark: #0a3a23;
  --primary-light: #1a7a4d;
  --primary-soft: #e7f5ee;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fef3c7;
  --danger: #b91c1c;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-soft-2: #eef2f6;
  --bg-dark: #0c2a1c;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 4px 14px rgba(15, 23, 42, .08);
  --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, .25);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --container: 1200px;
  --header-h: 76px;
  --transition: .2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-dark); }
button { font: inherit; cursor: pointer; }
ul, ol { padding-left: 1.4em; }

h1, h2, h3, h4 { line-height: 1.3; color: var(--text); margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

/* ---------- Layout ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section-sm { padding: 56px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--bg-dark); color: #f3f4f6; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #cbd5e1; }

.section-title { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-title .eyebrow {
  display: inline-block;
  font-size: .85rem;
  letter-spacing: .25em;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  margin-bottom: 16px;
}
.section-title p { color: var(--text-muted); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  border: 1px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  background: var(--accent);
  color: #1f1300;
  box-shadow: 0 8px 22px -8px rgba(245, 158, 11, .55);
}
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); color: #1f1300; }
.btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
}
.btn-outline:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-ghost {
  background: var(--bg);
  color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b84c; color: #fff; transform: translateY(-2px); }
.btn-tel { background: var(--primary); color: #fff; }
.btn-tel:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); }

/* ---------- Top Bar ---------- */
.top-bar {
  background: var(--primary-dark);
  color: #d1fae5;
  font-size: .85rem;
  padding: 8px 0;
}
@media (max-width: 960px) {
  .top-bar { display: none; }
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.top-bar a { color: #fff; }
.top-bar .top-bar-info { display: flex; gap: 18px; flex-wrap: wrap; }
.top-bar .top-bar-info span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--primary-dark);
  font-size: 1.15rem;
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid; place-items: center;
  color: #fff; font-weight: 800;
  box-shadow: var(--shadow);
}
.brand-name { line-height: 1.1; }
.brand-name small { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 500; letter-spacing: .15em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  color: var(--text);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 500;
  font-size: .98rem;
}
.nav a:hover, .nav a.active { color: var(--primary); background: var(--primary-soft); }

.nav-item { position: relative; }
.nav-item .submenu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: #fff;
  min-width: 240px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  display: none;
}
.nav-item:hover .submenu, .nav-item:focus-within .submenu { display: block; }
.submenu a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--text);
  font-size: .95rem;
}
.submenu a:hover { background: var(--primary-soft); color: var(--primary); }
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}

/* ---------- Mobile Drawer ---------- */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 200;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(360px, 88vw);
  background: #fff;
  padding: 24px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
}
.mobile-drawer-panel .close-btn {
  align-self: flex-end;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 44px; height: 44px;
}
.mobile-drawer-panel a {
  padding: 12px 14px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 500;
  border: 1px solid transparent;
}
.mobile-drawer-panel a:hover { background: var(--primary-soft); color: var(--primary); }
.mobile-drawer-panel .group-title {
  font-size: .8rem; letter-spacing: .2em; color: var(--text-muted);
  margin-top: 12px; padding: 0 14px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 90% -10%, rgba(26, 122, 77, .25), transparent 60%),
    radial-gradient(800px 400px at 0% 110%, rgba(245, 158, 11, .15), transparent 60%),
    linear-gradient(180deg, #0c2a1c 0%, #0f5132 100%);
  color: #fff;
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.06) 0 1px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.05) 0 1px, transparent 2px);
  background-size: 40px 40px;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 48px;
  padding: 96px 0 110px;
  position: relative;
  z-index: 1;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 4.4vw, 3.2rem); }
.hero h1 .highlight { color: var(--accent); }
.hero p.lead { font-size: 1.1rem; color: #d1fae5; max-width: 560px; }
.hero .badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 28px; }
.hero .badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  color: #ecfdf5;
  font-size: .85rem;
  backdrop-filter: blur(4px);
}
.hero .badge svg { width: 16px; height: 16px; color: var(--accent); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Hero side card */
.hero-card {
  background: rgba(255, 255, 255, .98);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,.6);
}
.hero-card h3 { color: var(--primary-dark); margin-bottom: 4px; }
.hero-card .sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 18px; }
.hero-card form { display: grid; gap: 12px; }
.hero-card label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
.hero-card input, .hero-card select, .hero-card textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font: inherit;
  background: #fff;
  transition: border var(--transition), box-shadow var(--transition);
}
.hero-card input:focus, .hero-card select:focus, .hero-card textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 81, 50, .12);
}
.hero-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-card .submit-btn {
  width: 100%;
  background: var(--accent);
  color: #1f1300;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: background var(--transition), transform var(--transition);
}
.hero-card .submit-btn:hover { background: var(--accent-dark); transform: translateY(-2px); }
.hero-card .form-note { font-size: .8rem; color: var(--text-muted); text-align: center; }

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: -56px;
  position: relative;
  z-index: 5;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.stat { text-align: center; }
.stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.stat .label { color: var(--text-muted); font-size: .92rem; margin-top: 6px; }
.stat + .stat { border-left: 1px solid var(--border); }

/* ---------- Service Cards ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: transform var(--transition), box-shadow var(--transition), border var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 0;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .3s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.service-card:hover::before { width: 100%; }
.service-card .icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin-bottom: 18px;
}
.service-card .icon svg { width: 28px; height: 28px; }
.service-card h3 { color: var(--primary-dark); margin-bottom: 8px; }
.service-card p { color: var(--text-muted); font-size: .94rem; margin-bottom: 14px; }
.service-card .more {
  font-size: .9rem;
  color: var(--primary);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.service-card .more::after {
  content: "→";
  transition: transform var(--transition);
}
.service-card:hover .more::after { transform: translateX(4px); }

/* ---------- Feature Blocks ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}
.feature {
  text-align: center;
  padding: 12px;
}
.feature .icon-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid; place-items: center;
  margin: 0 auto 16px;
}
.feature .icon-circle svg { width: 36px; height: 36px; }
.feature h3 { font-size: 1.15rem; margin-bottom: 6px; color: var(--primary-dark); }
.feature p { color: var(--text-muted); font-size: .94rem; }

/* ---------- Process / Steps ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.step {
  position: relative;
  padding: 28px 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
}
.step .step-num {
  display: inline-block;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}
.step h3 { margin-bottom: 6px; color: var(--primary-dark); font-size: 1.1rem; }
.step p { color: var(--text-muted); font-size: .94rem; margin: 0; }

/* ---------- Pest Cards ---------- */
.pest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.pest-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pest-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pest-illustration {
  height: 140px;
  background: linear-gradient(135deg, var(--primary-soft), #f0fdf4);
  display: grid; place-items: center;
  color: var(--primary-dark);
  position: relative;
}
.pest-illustration svg { width: 80px; height: 80px; }
.pest-card .body { padding: 20px; }
.pest-card h3 { margin-bottom: 6px; font-size: 1.1rem; color: var(--primary-dark); }
.pest-card p { color: var(--text-muted); font-size: .9rem; margin-bottom: 12px; }
.pest-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pest-tags span {
  font-size: .75rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 3px 10px;
  border-radius: 999px;
}

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.testimonial::before {
  content: """;
  position: absolute;
  top: -8px; left: 22px;
  font-family: Georgia, serif;
  font-size: 4rem;
  color: var(--primary-soft);
  line-height: 1;
}
.testimonial .stars { color: var(--accent); margin-bottom: 8px; letter-spacing: 2px; }
.testimonial blockquote { margin: 0 0 16px; color: var(--text); font-size: .98rem; }
.testimonial .who { display: flex; align-items: center; gap: 12px; }
.testimonial .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
}
.testimonial .who-info strong { display: block; font-size: .95rem; }
.testimonial .who-info small { color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq {
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 20px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--primary-dark);
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.faq-q::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  padding: 0 22px;
  transition: max-height .3s ease, padding .3s ease;
  color: var(--text-muted);
}
.faq-item.open .faq-a { max-height: 800px; padding: 0 22px 20px; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background:
    radial-gradient(900px 360px at 100% 50%, rgba(245, 158, 11, .25), transparent 60%),
    linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  align-items: center;
  gap: 32px;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: #d1fae5; margin: 0; }
.cta-banner .actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Page Hero (sub-pages) ---------- */
.page-hero {
  background:
    radial-gradient(800px 300px at 80% 0%, rgba(26, 122, 77, .25), transparent 60%),
    linear-gradient(180deg, #0c2a1c 0%, #0f5132 100%);
  color: #fff;
  padding: 64px 0 56px;
}
.page-hero h1 { color: #fff; margin-bottom: 10px; }
.page-hero p { color: #d1fae5; max-width: 720px; margin: 0; }
.breadcrumb {
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: .88rem;
  color: #a7f3d0;
  margin-bottom: 18px;
}
.breadcrumb a { color: #d1fae5; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,.6); }

/* ---------- Article / Long-form Content ---------- */
.article {
  max-width: 840px;
  margin: 0 auto;
}
.article > * + * { margin-top: 1em; }
.article h2 {
  margin-top: 1.6em;
  font-size: 1.6rem;
  color: var(--primary-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-soft);
}
.article h3 { margin-top: 1.4em; font-size: 1.2rem; color: var(--primary-dark); }
.article ul, .article ol { padding-left: 1.5em; }
.article ul li, .article ol li { margin-bottom: 6px; }
.article .info-box {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 18px 22px;
  margin: 24px 0;
}
.article .info-box strong { color: var(--primary-dark); }
.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: .95rem;
}
.article table th, .article table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.article table th { background: var(--primary-soft); color: var(--primary-dark); font-weight: 600; }
.article table tr:nth-child(even) td { background: var(--bg-soft); }

/* Side-by-side layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.sidebar {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.sidebar h4 { color: var(--primary-dark); margin-bottom: 14px; font-size: 1rem; letter-spacing: .04em; }
.sidebar .toc { list-style: none; padding: 0; margin: 0 0 22px; }
.sidebar .toc li { margin-bottom: 6px; }
.sidebar .toc a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: .92rem;
}
.sidebar .toc a:hover { background: #fff; color: var(--primary); }
.sidebar .quick-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  padding: 18px;
  border-radius: 10px;
  text-align: center;
}
.sidebar .quick-cta strong { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.sidebar .quick-cta a { display: inline-block; margin-top: 10px; padding: 10px 18px; background: var(--accent); color: #1f1300; border-radius: 999px; font-weight: 600; }

/* ---------- Cases ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.case {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.case:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.case-cover {
  height: 180px;
  background: linear-gradient(135deg, #134e34, #1a7a4d);
  position: relative;
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.case-cover .tag {
  position: absolute; top: 16px; left: 16px;
  background: var(--accent); color: #1f1300;
  padding: 4px 12px; border-radius: 999px;
  font-size: .8rem; font-weight: 600;
}
.case-cover h3 { color: #fff; font-size: 1.15rem; margin: 0; }
.case-body { padding: 22px; }
.case-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: .85rem; margin-bottom: 10px; }
.case-meta span { display: inline-flex; align-items: center; gap: 4px; }
.case-body p { color: var(--text-muted); font-size: .94rem; margin-bottom: 14px; }
.case-result {
  background: var(--primary-soft);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: .9rem;
  color: var(--primary-dark);
}
.case-result strong { display: block; margin-bottom: 2px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.contact-info {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-info h3 { color: var(--primary-dark); margin-bottom: 18px; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .ico {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  display: grid; place-items: center;
}
.contact-list .ico svg { width: 20px; height: 20px; }
.contact-list .label { color: var(--text-muted); font-size: .82rem; }
.contact-list strong { display: block; color: var(--text); font-size: 1.02rem; }

.contact-form { display: grid; gap: 16px; }
.contact-form label { font-weight: 500; color: var(--text); font-size: .92rem; display: block; margin-bottom: 6px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  font: inherit;
  background: #fff;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 81, 50, .12);
}
.contact-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form button {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #1f1300;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
}
.contact-form button:hover { background: var(--accent-dark); }
.map-frame {
  width: 100%; height: 320px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #f0fdf4);
  display: grid; place-items: center;
  color: var(--primary-dark);
  margin-top: 20px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-dark);
  color: #cbd5e1;
  padding: 64px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { font-size: 1.1rem; color: #fff; font-weight: 700; margin-bottom: 8px; }
.footer-grid p { color: #94a3b8; font-size: .92rem; }
.footer-grid h4 { color: #fff; font-size: .95rem; letter-spacing: .1em; margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul a { color: #94a3b8; font-size: .92rem; }
.footer-grid ul a:hover { color: #fff; }
.footer-contact li { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; color: #94a3b8; font-size: .9rem; }
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
  font-size: .85rem; color: #64748b;
}
.footer-bottom a { color: #94a3b8; }
.footer-bottom a:hover { color: #fff; }
.footer-bottom .legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Floating CTA ---------- */
.float-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 80;
}
.float-actions a {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.float-actions a:hover { transform: scale(1.06); color: #fff; }
.float-actions .fa-tel { background: var(--primary); }
.float-actions .fa-line { background: #06c755; }
.float-actions svg { width: 24px; height: 24px; }

/* ---------- News / Blog ---------- */
.news-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.news-meta .cat {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 3px 12px;
  border-radius: 999px;
  font-weight: 600;
}
.news-featured {
  background: linear-gradient(135deg, #0c2a1c 0%, #134e34 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}
.news-featured .cat-pill {
  display: inline-block;
  background: var(--accent);
  color: #1f1300;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.news-featured h2 { color: #fff; font-size: 1.7rem; margin-bottom: 10px; }
.news-featured p { color: #cbd5e1; }
.news-featured .visual {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  border-radius: var(--radius);
  aspect-ratio: 16/10;
  display: grid; place-items: center;
  font-size: 6rem;
}
.news-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 48px;
}
.news-pagination a, .news-pagination span {
  display: grid; place-items: center;
  min-width: 40px; height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .92rem;
}
.news-pagination a:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.news-pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

.article-header {
  max-width: 840px;
  margin: 0 auto 32px;
}
.article-header .cat-pill {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-header h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 14px; }
.article-header .lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}
.article-author {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.article-author .avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: grid; place-items: center;
  color: #fff; font-weight: 700;
}
.article-author .info strong { display: block; font-size: .98rem; }
.article-author .info small { color: var(--text-muted); font-size: .85rem; }

.share-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.share-buttons a {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition);
}
.share-buttons a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.share-buttons svg { width: 16px; height: 16px; }

@media (max-width: 960px) {
  .news-featured { grid-template-columns: 1fr; padding: 32px 24px; }
  .news-featured .visual { aspect-ratio: 16/9; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 80px 24px;
}
.notfound h1 { font-size: clamp(3rem, 12vw, 7rem); color: var(--primary); margin: 0; }
.notfound p { color: var(--text-muted); font-size: 1.1rem; }

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.text-muted { color: var(--text-muted); }
.divider { height: 1px; background: var(--border); border: 0; margin: 32px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0 80px; }
  .stats { grid-template-columns: repeat(2, 1fr); margin-top: -40px; padding: 24px; }
  .stat + .stat { border-left: none; }
  .stat:nth-child(3) { border-top: 1px solid var(--border); padding-top: 16px; }
  .stat:nth-child(4) { border-top: 1px solid var(--border); padding-top: 16px; }
  .cta-banner { grid-template-columns: 1fr; padding: 40px 28px; text-align: center; }
  .cta-banner .actions { justify-content: center; }
  .two-col { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { display: none; }
  .nav-toggle { display: grid; place-items: center; }
}
@media (max-width: 560px) {
  .section { padding: 56px 0; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-top: 1px solid var(--border); padding-top: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-card { padding: 22px; }
  .hero-card .form-row { grid-template-columns: 1fr; }
  .top-bar-inner { justify-content: center; text-align: center; }
  .contact-form .form-row { grid-template-columns: 1fr; }
}

/* ---------- 手機版邊距防護｜避免文字/元件貼齊螢幕邊緣 ---------- */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg, video, iframe { max-width: 100%; height: auto; }

@media (max-width: 960px) {
  /* 容器左右留白維持 24px，並對溢出元件做安全防護 */
  .container { padding-left: 24px; padding-right: 24px; }

  /* Hero 上下與左右增加緩衝 */
  .hero-inner { padding: 56px 4px 80px; }
  .hero h1 { word-break: break-word; }
  .hero p.lead { word-break: break-word; }

  /* Page hero 的 h1/p 在窄螢幕避免太擠 */
  .page-hero { padding: 56px 0 48px; }
  .page-hero h1 { word-break: break-word; line-height: 1.35; }
  .page-hero p { word-break: break-word; }

  /* 區塊標題避免左右頂邊 */
  .section-title { padding: 0 4px; }

  /* CTA banner 保留更舒適的內距 */
  .cta-banner { padding: 36px 24px; border-radius: 16px; }
  .cta-banner h2 { word-break: break-word; }

  /* 卡片網格 gap 變小、卡片內距微調 */
  .service-grid { gap: 18px; }
  .service-card { padding: 22px 20px; }
  .case-grid { gap: 18px; }
  .pest-grid { gap: 16px; }

  /* 案例 / 新聞 / 害蟲 卡片標題避免溢出 */
  .case-cover h3,
  .pest-card h3,
  .service-card h3 { word-break: break-word; }

  /* 文章區塊長文/連結自動換行 */
  .article { word-wrap: break-word; word-break: break-word; }
  .article h2, .article h3, .article p, .article li { overflow-wrap: anywhere; }

  /* 文章內表格在窄螢幕可橫向滑動 */
  .article table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
  }
  .article table th, .article table td { white-space: normal; min-width: 110px; }

  /* FAQ 按鈕長題目換行 */
  .faq-q { word-break: break-word; }

  /* 麵包屑換行 */
  .breadcrumb { word-break: break-word; }

  /* 浮動 CTA 從邊緣再退一點，且按鈕略小 */
  .float-actions { right: 12px; bottom: 12px; gap: 8px; }
  .float-actions a { width: 50px; height: 50px; }
  .float-actions svg { width: 22px; height: 22px; }

  /* News featured 內距加大 */
  .news-featured { padding: 28px 20px; border-radius: 16px; }
  .news-featured h2 { word-break: break-word; }

  /* Hero card / 聯絡表單在窄螢幕的內距 */
  .contact-info { padding: 24px 20px; }

  /* Footer 內容遠離邊緣 */
  .footer-bottom { gap: 12px; flex-direction: column; align-items: flex-start; }

  /* 資訊框 */
  .info-box { padding: 14px 16px; }

  /* 兩欄文章在手機改為單欄並增加上下間距 */
  .two-col { gap: 28px; }
}

@media (max-width: 480px) {
  /* 最窄手機螢幕：仍保持 20px 邊距，避免文字頂到螢幕 */
  .container { padding-left: 20px; padding-right: 20px; }

  /* Hero / Page hero 字級下調，避免單行擠破 */
  .hero h1 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .page-hero h1 { font-size: clamp(1.5rem, 6vw, 2rem); }

  /* CTA banner 內距 */
  .cta-banner { padding: 28px 20px; }
  .cta-banner h2 { font-size: 1.3rem; }

  /* 服務 / 案例卡片字級 */
  .service-card h3 { font-size: 1.05rem; }
  .case-cover h3 { font-size: 1rem; }

  /* 表格字級下調 */
  .article table { font-size: .9rem; }

  /* 浮動 CTA 再縮 */
  .float-actions a { width: 46px; height: 46px; }
}
