/* ===== Shared Stylesheet for neihuwego.com.tw sub-pages ===== */
/* v2 — 清新質感升級：柔和陰影、通透留白、精緻封面圖系統 */
:root {
  --primary: #8b0e0e;
  --primary-dark: #5f0606;
  --primary-soft: #a23535;
  --accent: #d4a438;
  --accent-light: #f4d06f;
  --accent-deep: #b8862a;
  --ink: #272019;
  --ink-soft: #4c443b;
  --paper: #fffdf8;
  --paper-2: #f7f1e2;
  --paper-3: #faf6ec;
  --muted: #847b6f;
  --line: #ece4d3;
  --line-soft: #f3ecdd;
  --shadow-sm: 0 2px 12px rgba(58, 42, 28, 0.05);
  --shadow: 0 10px 34px rgba(58, 42, 28, 0.085);
  --shadow-lg: 0 26px 64px rgba(58, 42, 28, 0.13);
  --shadow-soft: 0 6px 22px rgba(58, 42, 28, 0.07);
  --radius: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink); background: var(--paper); line-height: 1.75;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: "Noto Serif TC", "Noto Sans TC", serif; line-height: 1.32; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.chip {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: rgba(212, 164, 56, 0.14); color: var(--accent-deep);
  font-size: 12px; font-weight: 700; letter-spacing: 3px;
}

/* NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 253, 248, 0.82);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s, background .3s; }
.nav.scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(58,42,28,0.05);
  background: rgba(255, 253, 248, 0.94); }
.nav-inner { max-width: 1180px; margin: 0 auto; padding: 13px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { width: 50px; height: 50px; object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(139, 14, 14, 0.2)); }
.brand-text .t1 { font-family: "Noto Serif TC", serif; font-weight: 900; font-size: 18px;
  color: var(--primary-dark); letter-spacing: 2px; }
.brand-text .t2 { font-size: 11px; color: var(--muted); letter-spacing: 3px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { font-size: 14px; font-weight: 500; color: var(--ink); transition: color .2s; }
.nav-links a:hover { color: var(--primary); }
.nav-cta { background: var(--primary); color: #fff !important; padding: 9px 20px;
  border-radius: 999px; font-weight: 700 !important; transition: transform .2s, box-shadow .2s; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(139, 14, 14, 0.26); color: #fff !important; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .25s; }

/* PAGE HERO */
.page-hero { padding: 150px 0 78px; position: relative; overflow: hidden;
  background:
    radial-gradient(720px 360px at 88% -5%, rgba(212,164,56,0.16), transparent 62%),
    radial-gradient(620px 380px at 6% 108%, rgba(139,14,14,0.05), transparent 60%),
    linear-gradient(180deg, #fffdf6 0%, var(--paper) 100%); }
.page-hero h1 { font-size: clamp(31px, 4.5vw, 51px); color: var(--primary-dark);
  margin: 16px 0 18px; letter-spacing: 2px; }
.page-hero h1 .hl { color: var(--primary); position: relative; display: inline-block; }
.page-hero h1 .hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 9px;
  background: linear-gradient(90deg, rgba(212,164,56,0.5), rgba(212,164,56,0)); z-index: -1; }
.page-hero p.lead { font-size: 17px; color: var(--ink-soft); max-width: 740px; margin-bottom: 24px; line-height: 1.9; }
.page-hero .crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; letter-spacing: 1px; }
.page-hero .crumb a { color: var(--primary); }

/* PAGE HERO — 含封面照片版本（只需在 <header> 加 class="page-hero has-cover" + style="--cover:url('...')"） */
.page-hero.has-cover {
  background:
    linear-gradient(176deg, rgba(38,12,12,0.52) 0%, rgba(38,12,12,0.86) 100%),
    var(--cover, linear-gradient(135deg, var(--primary), var(--primary-dark)));
  background-size: cover; background-position: center center; }
.page-hero.has-cover h1 { color: #fff; }
.page-hero.has-cover h1 .hl { color: var(--accent-light); }
.page-hero.has-cover h1 .hl::after { display: none; }
.page-hero.has-cover p.lead { color: rgba(255,255,255,0.93); }
.page-hero.has-cover .crumb { color: rgba(255,255,255,0.8); }
.page-hero.has-cover .crumb a { color: var(--accent-light); }
.page-hero.has-cover .chip { background: rgba(255,255,255,0.18); color: #fff; }

/* COVER IMAGE SYSTEM — 通用封面圖元件 */
/* 圓角相框圖（hero 側邊、文章插圖用） */
.cover-figure { position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line); background: var(--paper-2); }
.cover-figure img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-figure.ratio-43 { aspect-ratio: 4 / 3; }
.cover-figure.ratio-169 { aspect-ratio: 16 / 9; }
.cover-figure.ratio-11 { aspect-ratio: 1 / 1; }
.cover-figure .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px;
  background: linear-gradient(180deg, transparent, rgba(40,12,12,0.7));
  color: #fff; font-size: 13px; letter-spacing: 1px; }

/* 全幅封面圖橫帶（區塊間的視覺呼吸） */
.cover-band { position: relative; min-height: 280px; display: flex; align-items: center;
  justify-content: center; text-align: center; overflow: hidden;
  background-image:
    linear-gradient(rgba(40,12,12,0.42), rgba(40,12,12,0.42)),
    var(--cover, linear-gradient(135deg, var(--primary), var(--primary-dark)));
  background-size: cover; background-position: center; background-attachment: fixed; }
.cover-band .cover-band-text { color: #fff; padding: 40px 24px; max-width: 760px; }
.cover-band h2 { color: #fff; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: 3px; margin-bottom: 12px; }
.cover-band p { color: rgba(255,255,255,0.92); font-size: 16px; }

/* 圖片佔位框（尚未放真實照片時的優雅預設） */
.img-placeholder { position: relative; border-radius: var(--radius); overflow: hidden;
  background:
    radial-gradient(circle at 30% 28%, rgba(244,208,111,0.5), transparent 58%),
    linear-gradient(140deg, var(--paper-2) 0%, #fff 100%);
  border: 1px dashed var(--accent); display: grid; place-items: center;
  color: var(--accent-deep); font-size: 14px; letter-spacing: 1px; text-align: center; padding: 30px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 30px;
  border-radius: 999px; font-weight: 700; font-size: 15px; cursor: pointer; border: 0;
  transition: transform .2s, box-shadow .2s; }
.btn-primary { background: linear-gradient(135deg, var(--primary-soft), var(--primary-dark)); color: #fff;
  box-shadow: 0 12px 26px rgba(139, 14, 14, 0.26); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(139, 14, 14, 0.32); color: #fff; }
.btn-ghost { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--primary); }
.btn-ghost:hover { background: var(--primary); color: #fff; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b34c; color: #fff; }

/* SECTIONS */
section { padding: 88px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); color: var(--primary-dark);
  margin: 12px 0 14px; letter-spacing: 3px; }
.section-head p { color: var(--muted); max-width: 620px; margin: 0 auto; }
.section-alt { background: linear-gradient(180deg, var(--paper-3), var(--paper)); }

/* CARD GRID */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cards-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card-item { padding: 34px 30px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .28s ease, box-shadow .28s ease; }
.card-item:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card-item .ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139,14,14,0.07), rgba(212,164,56,0.16));
  color: var(--primary); font-size: 25px; margin-bottom: 20px; }
.card-item h3 { font-family: "Noto Serif TC", serif; font-size: 20px; color: var(--primary-dark);
  margin-bottom: 10px; letter-spacing: 2px; }
.card-item p { color: var(--muted); font-size: 15px; }
.card-item ul { margin-top: 12px; padding-left: 0; list-style: none; }
.card-item li { padding: 4px 0; font-size: 14px; color: var(--ink); display: flex; gap: 8px; }
.card-item li::before { content: "◆"; color: var(--accent); font-size: 10px; flex-shrink: 0; margin-top: 6px; }

/* CTA SECTION */
.cta-section { position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(139,14,14,0.96), rgba(95,6,6,0.96)),
              radial-gradient(circle at 20% 50%, var(--accent) 0%, transparent 60%);
  color: #fff; text-align: center; padding: 84px 0; }
.cta-section h2 { color: #fff; font-size: clamp(26px, 3.5vw, 38px); margin-bottom: 14px; letter-spacing: 3px; }
.cta-section p { color: rgba(255,255,255,0.9); max-width: 600px; margin: 0 auto 28px; font-size: 16px; }
.cta-section .btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-section .btn-line { background: #06c755; color: #fff; }
.cta-section .btn-line:hover { background: #05b34c; color: #fff; }

/* FOOTER */
footer { background: #1c0f0f; color: rgba(255,255,255,0.7); padding: 52px 0 26px; }
.foot-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px;
  padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.foot-top h4 { color: #fff; font-family: "Noto Serif TC", serif;
  margin-bottom: 14px; font-size: 15px; letter-spacing: 2px; }
.foot-top p, .foot-top a { font-size: 14px; color: rgba(255,255,255,0.65); display: block; padding: 4px 0; }
.foot-top a:hover { color: var(--accent-light); }
.foot-brand .logo { width: 50px; height: 50px; }
.foot-brand .brand-text .t1 { color: var(--accent-light); }
.foot-brand .brand-text .t2 { color: rgba(255,255,255,0.5); }
.foot-brand p { margin-top: 14px; line-height: 1.85; }
.foot-bot { display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; padding-top: 22px; font-size: 12px; color: rgba(255,255,255,0.45); }

/* FLOATING CTA */
.float-cta { position: fixed; right: 22px; bottom: 22px; z-index: 80;
  display: flex; flex-direction: column; gap: 10px; }
.float-btn { width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 22px; font-weight: 700;
  box-shadow: 0 12px 26px rgba(0,0,0,0.18); transition: transform .2s; }
.float-btn:hover { transform: scale(1.08); }
.float-btn.line { background: #06c755; }
.float-btn.tel { background: var(--primary); }

/* RESPONSIVE */
@media (max-width: 920px) {
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; padding: 14px 24px 20px;
    box-shadow: 0 10px 26px rgba(58,42,28,0.08); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: block; }
  .page-hero { padding-top: 116px; }
  section { padding: 64px 0; }
  .cover-band { background-attachment: scroll; }
}

/* 平板 (≤768px) */
@media (max-width: 768px) {
  .container { padding: 0 18px; }
  h1 { font-size: clamp(28px, 6vw, 40px); line-height: 1.25; }
  h2 { font-size: clamp(22px, 5vw, 32px); line-height: 1.3; }
  h3 { font-size: clamp(18px, 4.2vw, 22px); }
  section { padding: 48px 0; }
  .card, .info-card { padding: 20px; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .btn, .cta-btn, button { min-height: 44px; min-width: 44px; }
}

/* 小手機 (≤480px) */
@media (max-width: 480px) {
  body { font-size: 15px; }
  .container { padding: 0 14px; }
  h1 { font-size: clamp(24px, 7vw, 32px); }
  h2 { font-size: clamp(20px, 6vw, 26px); }
  section { padding: 36px 0; }
  .card, .info-card { padding: 16px; border-radius: 12px; }
  .float-btn { width: 50px; height: 50px; font-size: 19px; }
  .float-actions { right: 16px; bottom: 16px; gap: 8px; }
  .page-hero { padding-top: 96px; }
  .logo { width: 44px !important; height: 44px !important; }
  ul, ol { padding-left: 22px; }
  p { line-height: 1.7; }
}

/* 觸控優化 + 防止 iOS 自動縮放 */
@media (hover: none) and (pointer: coarse) {
  input, textarea, select { font-size: 16px; }
  a, button { -webkit-tap-highlight-color: rgba(139, 14, 14, 0.1); }
}

/* 減少動畫 - 尊重使用者偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
