:root {
  --brand: #1f4466;
  --brand-dark: #142f4a;
  --accent: #c4572f;
  --ink: #1f2933;
  --muted: #56636f;
  --line: #e1e7ee;
  --bg: #ffffff;
  --bg-alt: #f2f6fa;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(20, 47, 74, .09);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  -webkit-text-size-adjust: 100%;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }

/* 佔位圖 */
.ph {
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #dfe8e5, #dfe8e5 12px, #e9f0ee 12px, #e9f0ee 24px);
  color: #7a8a86; font-size: .9rem; letter-spacing: .05em;
  border-radius: var(--radius);
}

/* 按鈕 */
.btn {
  display: inline-block; cursor: pointer;
  padding: .7em 1.6em; border-radius: 999px; border: 2px solid var(--brand);
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
  transition: background .2s, color .2s, transform .2s;
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line); }
.topbar { background: var(--brand-dark); color: #d6e2ef; font-size: .85rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #fff; }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; background: #fff; }
.brand-text { display: flex; flex-direction: column; font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.brand-text small { font-weight: 400; font-size: .68rem; color: var(--muted); letter-spacing: .04em; }
.brand-light { color: #fff; }

.main-nav > ul { display: flex; align-items: center; gap: 4px; }
.main-nav a { display: block; padding: .6em .9em; color: var(--ink); font-weight: 500; border-radius: 8px; }
.main-nav a:hover { color: var(--brand); text-decoration: none; background: var(--bg-alt); }
.main-nav .nav-cta { background: var(--brand); color: #fff; }
.main-nav .nav-cta:hover { background: var(--brand-dark); color: #fff; }
.has-sub { position: relative; }
.sub {
  position: absolute; top: 100%; left: 0; min-width: 160px;
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 6px; opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { font-size: .95rem; white-space: nowrap; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero { position: relative; overflow: hidden; background: #123; }
.slides { position: relative; height: clamp(360px, 52vw, 520px); }
.slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  background: linear-gradient(120deg, var(--g1), var(--g2));
  color: #fff; transition: opacity .7s ease, visibility .7s;
}
.slide.is-active { opacity: 1; visibility: visible; }
.slide-logo {
  position: absolute; right: 8%; top: 50%; transform: translateY(-50%);
  height: 78%; max-height: 400px; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 50%; background: #fff; border: 6px solid rgba(255,255,255,.35);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.slide-inner { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; max-width: 1160px; }
.slide-inner > * { max-width: 560px; }
.slide h1 { font-size: clamp(1.7rem, 4.2vw, 2.9rem); }
.eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; margin-bottom: .4em; }
.slide .eyebrow { color: #ffd2bd; }
.slide .btn { background: #fff; color: var(--brand-dark); border-color: #fff; align-self: flex-start; }
.slide .btn:hover { background: #ffd2bd; border-color: #ffd2bd; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.85); color: var(--ink); font-size: 1.6rem; line-height: 1;
}
.hero-arrow:hover { background: #fff; }
.hero-arrow.prev { left: 12px; }
.hero-arrow.next { right: 12px; }
.dots { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.5); cursor: pointer; }
.dots button.is-active { background: #fff; transform: scale(1.3); }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); }
.section-title.center::after, .section-title:not(.center)::after {
  content: ""; display: block; width: 48px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: 10px;
}
.section-title.center::after { margin-left: auto; margin-right: auto; }
.eyebrow.center { text-align: center; }

.about-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 48px; align-items: center; }
.about-img { max-width: 420px; width: 100%; margin: 0 auto; }
.about-img img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow); border: 1px solid var(--line); }
.ticks { margin: 0 0 1.4em; }
.ticks li { position: relative; padding-left: 1.6em; margin-bottom: .3em; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--brand); font-weight: 700; }

.cards { display: grid; gap: 24px; margin-top: 36px; }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(20,50,44,.14); }
.service { padding: 28px 22px; text-align: center; }
.service .icon { font-size: 2.2rem; width: 68px; height: 68px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: var(--bg-alt); }
.service p { color: var(--muted); font-size: .95rem; }
.post .ph { border-radius: 0; aspect-ratio: 8 / 5; width: 100%; }
.post-body { padding: 20px; }
.post-body h3 { font-size: 1.1rem; }
.post-body p { color: var(--muted); font-size: .95rem; }
.meta { font-size: .82rem; color: var(--muted); margin-bottom: .5em; }
.tag { background: var(--bg-alt); color: var(--brand); padding: 2px 10px; border-radius: 999px; margin-right: 6px; font-weight: 600; }
.more { margin-top: 32px; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq-wrap details { background: #fff; border: 1px solid var(--line); border-radius: 10px; margin-top: 12px; }
.faq-wrap details:first-of-type { margin-top: 32px; }
.faq-wrap summary { cursor: pointer; padding: 16px 48px 16px 20px; font-weight: 600; position: relative; list-style: none; }
.faq-wrap summary::-webkit-details-marker { display: none; }
.faq-wrap summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); transition: transform .2s; }
.faq-wrap details[open] summary::after { content: "−"; }
.faq-wrap details p { padding: 0 20px 16px; margin: 0; color: var(--muted); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 36px; }
.contact-info li { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-info strong { min-width: 56px; color: var(--brand); }
.map { height: 200px; margin-top: 20px; }
.contact-form { display: grid; gap: 14px; background: var(--bg-alt); padding: 24px; border-radius: var(--radius); }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.contact-form input, .contact-form select, .contact-form textarea {
  font: inherit; padding: .65em .8em; border: 1px solid #cfd8d5; border-radius: 8px; background: #fff; width: 100%;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.contact-form .btn { justify-self: start; }
.form-msg { margin: 0; font-size: .92rem; color: var(--brand-dark); min-height: 1.4em; }
.form-msg.error { color: #b3261e; }

/* Footer */
.site-footer { background: #0f2236; color: #c9d6e3; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 2fr; gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .8em; }
.site-footer a { color: #c9d6e3; }
.site-footer li { margin-bottom: .35em; font-size: .95rem; }
.footer-about { margin-top: 12px; font-size: .95rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; font-size: .85rem; text-align: center; }
.footer-bottom p { margin: 0 0 .2em; }
.disclaimer { color: #93a7bb; }

/* 右側浮動社群按鈕 */
.float-social { position: fixed; right: 12px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 8px; }
.float-social a {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: .8rem; box-shadow: 0 4px 12px rgba(0,0,0,.2);
  transition: transform .2s;
}
.float-social a:hover { transform: scale(1.1); text-decoration: none; }
.fs-line { background: #06c755; }
.fs-fb { background: #1877f2; font-size: 1.2rem !important; }
.fs-yt { background: #e62117; }
.fs-ig { background: linear-gradient(45deg, #f9a825, #e1306c, #5851db); }
.fs-top { background: #5d6a6e; font-size: 1.1rem !important; }

/* Responsive */
@media (max-width: 960px) {
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  :root { --header-h: 64px; }
  .topbar-note { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0; background: #fff;
    border-top: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .main-nav.is-open { max-height: 80vh; overflow-y: auto; }
  .main-nav > ul { flex-direction: column; align-items: stretch; padding: 8px 16px 16px; gap: 0; }
  .main-nav a { padding: .8em .4em; }
  .sub { position: static; opacity: 1; visibility: visible; transform: none; border: 0; box-shadow: none; padding: 0 0 0 14px; display: none; }
  .has-sub.is-open > .sub { display: block; }
  .main-nav .nav-cta { text-align: center; margin-top: 8px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-img { max-width: 260px; }
  .slide-logo { display: none; }
  .hero-arrow { display: none; }
  .section { padding: 52px 0; }
  .float-social { top: auto; bottom: 16px; transform: none; flex-direction: row; right: 12px; left: 12px; justify-content: center; gap: 10px; }
  .float-social a { width: 40px; height: 40px; }
  body { padding-bottom: 64px; }
}
@media (max-width: 560px) {
  .cards-4, .cards-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
