/* ==========================================================================
   協基堂兒童及少年教育中心 — Design System
   主色：深青（信任、專業）／輔色：暖黃（溫度、兒童）
   設計基準 T2（Gary 2026-10-02 拍板）：中性淺底 + 金色主 CTA + 白色 CTA band + 深藍圓 logo
   ========================================================================== */

:root{
  --ink:#16202c;
  --ink-2:#2b3644;
  --body:#48535f;
  --muted:#66717d;
  --brand:#264570;
  --brand-dark:#1b3557;
  --brand-tint:#e5effb;
  --accent:#eaa63a;
  --accent-tint:#fdf3e3;
  --bg:#ffffff;
  --header:rgba(255,255,255,.92);
  --card:#ffffff;
  --line:#e6e2da;
  --line-2:#efece6;
  --radius:14px;
  --radius-lg:22px;
  --shadow-sm:0 1px 2px rgba(22,32,44,.06),0 1px 3px rgba(22,32,44,.05);
  --shadow:0 4px 16px rgba(22,32,44,.07),0 1px 3px rgba(22,32,44,.05);
  --shadow-lg:0 18px 40px -12px rgba(22,32,44,.18);
  --maxw:1240px;
  --sans:"Inter","Noto Sans TC","PingFang HK","Microsoft JhengHei","Hiragino Sans TC",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%; scroll-behavior:smooth}
body{
  margin:0; background:var(--bg); color:var(--body);
  font-family:var(--sans); font-size:17px; line-height:1.75;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}
img{max-width:100%; display:block}
a{color:var(--brand); text-decoration:none}
a:hover{color:var(--brand-dark)}
h1,h2,h3,h4{color:var(--ink); line-height:1.28; margin:0 0 .5em; letter-spacing:-.01em; font-weight:700}
h1{font-size:clamp(1.9rem,4.4vw,3rem)}
h2{font-size:clamp(1.4rem,2.7vw,2rem)}
h3{font-size:1.16rem}
p{margin:0 0 1em}
ul,ol{margin:0 0 1em; padding-left:1.25em}
li{margin:.35em 0}
strong{color:var(--ink-2)}

.wrap{max-width:var(--maxw); margin:0 auto; padding:0 28px}
.wrap-narrow{max-width:860px; margin:0 auto; padding:0 28px}
.section{padding:74px 0}
.section--tint{background:#eaf3fd}
.section--warm{background:var(--accent-tint)}
.section--ink{background:var(--ink); color:#ccd2da}
.section--ink h2,.section--ink h3{color:#fff}
.center{text-align:center}
.eyebrow{
  display:inline-block; font-size:.79rem; font-weight:700; letter-spacing:.14em;
  text-transform:uppercase; color:var(--brand); background:var(--brand-tint);
  padding:.4em .95em; border-radius:999px; margin-bottom:16px;
}
.lead{font-size:1.15rem; color:var(--ink-2)}
.small{font-size:.9rem; color:var(--muted)}

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:60; background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px); border-bottom:1px solid var(--line);
}
.header-inner{display:flex; align-items:center; gap:18px; min-height:72px}
.brand{display:flex; align-items:center; gap:12px; flex:1 1 auto; min-width:0}
.brand img{width:44px; height:44px; flex:none}
.brand-txt{display:flex; flex-direction:column; min-width:0}
.brand-name{font-weight:700; color:var(--ink); font-size:1.02rem; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.brand-sub{font-size:.72rem; color:var(--muted); letter-spacing:.06em}
@media (max-width:389px){.brand-sub{white-space:normal; word-break:keep-all}}

.nav{display:flex; align-items:center; gap:4px}
.nav a{
  color:var(--ink-2); font-size:.94rem; font-weight:500; padding:.5em .72em;
  border-radius:9px; white-space:nowrap;
}
.nav a:hover{background:var(--brand-tint); color:var(--brand-dark)}
.nav a.is-active{color:var(--brand); background:var(--brand-tint); font-weight:600}
.nav-toggle{display:none; background:none; border:1px solid var(--line); border-radius:10px; padding:9px 11px; cursor:pointer}
.nav-toggle span{display:block; width:20px; height:2px; background:var(--ink); margin:4px 0; border-radius:2px}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5em;
  font-family:var(--sans); font-size:.97rem; font-weight:600; line-height:1;
  padding:14px 22px; border-radius:11px; border:1px solid transparent;
  cursor:pointer; transition:transform .12s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active{transform:translateY(1px)}
.btn-primary{background:var(--accent); color:#3a2606; box-shadow:var(--shadow-sm)}
.btn-primary:hover{background:#dd9a2c; color:#3a2606; box-shadow:var(--shadow)}
.btn-accent{background:var(--accent); color:#3a2606}
.btn-accent:hover{background:#dd9a2c; color:#3a2606}
.btn-ghost{background:#fff; color:var(--ink); border-color:var(--line); box-shadow:var(--shadow-sm)}
.btn-ghost:hover{border-color:var(--brand); color:var(--brand-dark)}
.btn-lg{padding:16px 28px; font-size:1.03rem}
.btn-row{display:flex; flex-wrap:wrap; gap:12px}

/* ---------- Hero ---------- */
.hero{padding:64px 0 70px; background:linear-gradient(180deg,#ffffff 0%,#e5effb 100%); overflow:hidden}
.hero-grid{display:grid; grid-template-columns:1.06fr .94fr; gap:56px; align-items:center}
.hero h1{margin-bottom:18px}
.hero .lead{margin-bottom:26px}
.hero-note{margin-top:22px; display:flex; flex-wrap:wrap; gap:10px 22px; font-size:.92rem; color:#5b6673}
.hero-note span{display:flex; align-items:center; gap:7px}
.dot{width:7px; height:7px; border-radius:50%; background:var(--accent); flex:none}
.hero-art{position:relative}
.hero-art img{width:100%; border-radius:var(--radius-lg); box-shadow:var(--shadow-lg)}

/* ---------- Trust bar ---------- */
.trust{background:#fff; border-top:1px solid var(--line-2); border-bottom:1px solid var(--line-2); padding:24px 0}
.trust-inner{display:flex; flex-wrap:wrap; gap:14px 46px; justify-content:center; align-items:center}
.trust-item{display:flex; align-items:center; gap:9px; font-size:.92rem; color:var(--ink-2); font-weight:500}
.trust-item svg{flex:none}

/* ---------- Cards & grids ---------- */
.grid{display:grid; gap:22px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius);
  padding:26px; box-shadow:var(--shadow-sm); transition:box-shadow .18s ease, transform .18s ease, border-color .18s ease;
  border-top:6px solid var(--brand);
}
/* 彩色上框（方案 A）：格內卡片輪換 4 色 */
.grid > .card:nth-child(4n+2){border-top-color:var(--accent)}
.grid > .card:nth-child(4n+3){border-top-color:#c2603f}
.grid > .card:nth-child(4n+4){border-top-color:#2f7fa8}
.person{border-top:6px solid var(--brand)}
.grid > .person:nth-child(4n+2){border-top-color:var(--accent)}
.grid > .person:nth-child(4n+3){border-top-color:#c2603f}
.grid > .person:nth-child(4n+4){border-top-color:#2f7fa8}
.card--link:hover{box-shadow:var(--shadow); transform:translateY(-2px); border-color:#d5d0c6}
.card h3{margin-bottom:.4em}
.card p:last-child{margin-bottom:0}
.card-icon{
  width:46px; height:46px; border-radius:12px; background:var(--brand-tint);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.card-icon svg{width:24px; height:24px}
.card--accent .card-icon{background:var(--accent-tint)}
/* 卡片色系統：icon 底色跟同一格嘅上框色（唔再統一淺藍） */
.grid > .card:not(.card--accent):nth-child(4n+2) .card-icon{background:var(--accent-tint)}
.grid > .card:not(.card--accent):nth-child(4n+3) .card-icon{background:#f9e7e1}
.grid > .card:not(.card--accent):nth-child(4n+4) .card-icon{background:#e2eff9}
.card-tag{
  display:inline-block; font-size:.75rem; font-weight:600; color:var(--brand-dark);
  background:var(--brand-tint); border-radius:6px; padding:.24em .6em; margin-bottom:12px;
}
.price-note{font-size:.88rem; color:var(--muted); font-weight:600; margin-top:14px}

/* ---------- Section headers ---------- */
.sec-head{max-width:700px; margin:0 auto 44px; text-align:center}
.sec-head p{color:var(--muted); margin-bottom:0}
.sec-head--left{margin-left:0; text-align:left}

/* ---------- Checklist / lists ---------- */
.checks{list-style:none; padding:0; margin:0}
.checks li{display:flex; gap:11px; align-items:flex-start; margin:.6em 0}
.checks svg{flex:none; margin-top:5px}

/* ---------- Steps ---------- */
.steps{counter-reset:step; display:grid; gap:18px}
.step{display:flex; gap:18px; align-items:flex-start; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:22px 24px}
.step-num{
  counter-increment:step; flex:none; width:38px; height:38px; border-radius:50%;
  background:var(--brand); color:#fff; font-weight:700; display:flex; align-items:center; justify-content:center;
}
.step-num::before{content:counter(step)}
.step h3{margin-bottom:.25em; font-size:1.05rem}
.step p{margin:0; font-size:.96rem}

/* ---------- Team ---------- */
.person{background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; text-align:center; box-shadow:var(--shadow-sm)}
.person-img{aspect-ratio:1/1; background:var(--brand-tint); display:block}
.person-body{padding:20px 18px 24px}
.person h3{font-size:1.03rem; margin-bottom:.2em}
.person .role{font-size:.86rem; color:var(--brand-dark); font-weight:600; margin-bottom:.5em}
.person p{font-size:.9rem; color:var(--muted); margin:0}
.todo{
  display:inline-block; font-size:.72rem; color:#8a6d1f; background:var(--accent-tint);
  border:1px dashed #e0c07a; border-radius:6px; padding:.2em .55em; margin-top:10px;
}

/* ---------- Gallery ---------- */
.gallery{display:grid; grid-template-columns:repeat(3,1fr); gap:16px}
.gallery figure{margin:0; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); background:#fff}
.gallery figcaption{padding:12px 14px; font-size:.87rem; color:var(--muted); border-top:1px solid var(--line-2)}

/* ---------- FAQ ---------- */
.faq{max-width:820px; margin:0 auto}
.faq details{
  background:#fff; border:1px solid var(--line); border-radius:var(--radius);
  margin-bottom:12px; overflow:hidden;
}
.faq summary{
  cursor:pointer; padding:20px 24px; font-weight:600; color:var(--ink);
  font-size:1.02rem; list-style:none; position:relative; padding-right:56px;
}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{
  content:"＋"; position:absolute; right:24px; top:50%; transform:translateY(-50%);
  color:var(--brand); font-weight:700; font-size:1.15rem;
}
.faq details[open] summary::after{content:"－"}
.faq details[open] summary{border-bottom:1px solid var(--line-2)}
.faq .faq-body{padding:20px 24px; font-size:.98rem}
.faq .faq-body p:last-child{margin-bottom:0}

/* ---------- Callout ---------- */
.callout{
  border-left:4px solid var(--brand); background:var(--brand-tint);
  border-radius:0 var(--radius) var(--radius) 0; padding:20px 24px; margin:26px 0;
}
.callout--warm{border-left-color:var(--accent); background:var(--accent-tint)}
.callout p:last-child{margin-bottom:0}
.callout strong{color:var(--ink)}

/* ---------- CTA band ---------- */
.cta-band{
  background:#ffffff; color:var(--body); border-radius:var(--radius-lg);
  border:1px solid var(--line); box-shadow:var(--shadow);
  padding:46px 42px; display:flex; gap:30px; align-items:center; justify-content:space-between; flex-wrap:wrap;
}
.cta-band h2{color:var(--ink); margin-bottom:.3em}
.cta-band p{margin:0; color:var(--muted)}

/* ---------- Forms ---------- */
.form-grid{display:grid; gap:16px; grid-template-columns:1fr 1fr}
.field{display:flex; flex-direction:column; gap:6px}
.field--full{grid-column:1/-1}
label{font-size:.9rem; font-weight:600; color:var(--ink-2)}
input,select,textarea{
  font-family:var(--sans); font-size:1rem; color:var(--ink);
  padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:#fff;
}
input:focus,select:focus,textarea:focus{outline:2px solid var(--brand); outline-offset:1px; border-color:var(--brand)}
textarea{min-height:132px; resize:vertical}

/* ---------- Footer ---------- */
.site-footer{background:var(--ink); color:#c3c8d0; padding:60px 0 30px; margin-top:80px}
.footer-grid{display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:34px}
.site-footer h4{color:#fff; font-size:.94rem; letter-spacing:.03em; margin-bottom:14px}
.site-footer a{color:#ccd2da; font-size:.93rem}
.site-footer a:hover{color:#fff}
.site-footer ul{list-style:none; padding:0; margin:0}
.site-footer li{margin:.5em 0}
.footer-brand{display:flex; align-items:center; gap:12px; margin-bottom:14px}
.footer-brand img{width:40px; height:40px}
.footer-brand strong{color:#fff; font-size:1rem}
.footer-note{font-size:.87rem; color:#bfc4cb; line-height:1.75}
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.1); margin-top:40px; padding-top:22px;
  display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; font-size:.85rem; color:#b2b7bf;
}

/* ---------- Breadcrumb / page hero ---------- */
.page-hero{background:var(--brand-tint); padding:52px 0 46px; border-bottom:1px solid var(--line-2)}
.page-hero h1{margin-bottom:12px}
.page-hero p{max-width:680px; margin:0; color:var(--ink-2)}
.crumb{font-size:.85rem; color:var(--muted); margin-bottom:12px}

/* ---------- Utility ---------- */
.mt0{margin-top:0} .mb0{margin-bottom:0} .mt2{margin-top:26px} .mt3{margin-top:44px}
.mb2{margin-bottom:26px} .mb3{margin-bottom:44px}
.divider{height:1px; background:var(--line-2); margin:40px 0; border:0}

/* ---------- Responsive ---------- */
@media (max-width:980px){
  .hero-grid{grid-template-columns:1fr; gap:36px}
  .hero-art{order:-1}
  .grid-4{grid-template-columns:repeat(2,1fr)}
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media (max-width:820px){
  .nav-toggle{display:block}
  .nav{
    position:absolute; left:0; right:0; top:100%; background:#fff; border-bottom:1px solid var(--line);
    flex-direction:column; align-items:stretch; padding:10px 18px 18px; gap:2px;
    box-shadow:var(--shadow); display:none;
  }
  .nav.is-open{display:flex}
  .nav a{padding:.75em .6em}
  .header-cta{display:none}
  .grid-3,.grid-2{grid-template-columns:1fr}
  .gallery{grid-template-columns:repeat(2,1fr)}
  .form-grid{grid-template-columns:1fr}
  .section{padding:56px 0}
  .cta-band{padding:34px 26px}
}
@media (max-width:560px){
  body{font-size:16px}
  .grid-4{grid-template-columns:1fr}
  .gallery{grid-template-columns:1fr}
  .footer-grid{grid-template-columns:1fr}
}
@media print{
  .site-header,.site-footer,.cta-band{display:none}
}


/* ---------- Wide screen (desktop full screen) ---------- */
@media (min-width:1400px){
  :root{ --maxw:1370px; }
  body{ font-size:18px; }
  .wrap{ padding:0 40px; }
  .wrap-narrow{ padding:0 40px; }
  .section{ padding:88px 0; }
  .hero{ padding:78px 0 86px; }
  .hero-grid{ gap:76px; grid-template-columns:1.04fr .96fr; }
  .brand-name{ font-size:1.08rem; }
  .nav a{ font-size:.97rem; }
  .grid{ gap:26px; }
  .card{ padding:30px; }
  .footer-grid{ gap:48px; }
  .cta-band{ padding:54px 54px; }
  .steps{ max-width:1180px; margin-left:auto; margin-right:auto; }
}

@media (min-width:1700px){
  .steps{ max-width:1320px; }
}

@media (min-width:1700px){
  :root{ --maxw:1600px; }
  body{ font-size:18.5px; }
  .wrap{ padding:0 56px; }
  .section{ padding:100px 0; }
  .hero{ padding:92px 0 100px; }
  .hero-grid{ gap:96px; }
  .gallery{ gap:20px; }
}

@media (min-width:2000px){
  :root{ --maxw:1780px; }
  body{ font-size:19px; }
  .wrap{ padding:0 64px; }
  .hero-grid{ gap:112px; }
  .grid{ gap:30px; }
  .sec-head{ max-width:760px; }
}

@media (max-width:1399px){
  .hero-grid{ grid-template-columns:1.08fr .92fr; gap:52px; }
}


/* ---------- Skip link / a11y ---------- */
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:200; background:var(--brand); color:#fff;
  padding:12px 18px; border-radius:0 0 10px 0; font-weight:600;
}
.skip-link:focus{left:0; color:#fff}
:focus-visible{outline:3px solid var(--brand); outline-offset:2px}

/* ---------- Self-check tool ---------- */
.check-group{margin-top:38px}
.check-group h2{font-size:1.25rem}
.check-item{border-bottom:1px solid var(--line-2); padding:16px 0}
.check-item:last-child{border-bottom:0}
.check-q{margin:0 0 10px; color:var(--ink-2); font-weight:500}
.check-opts{display:flex; flex-wrap:wrap; gap:8px}
.check-opt{
  display:inline-flex; align-items:center; gap:7px; cursor:pointer;
  border:1px solid var(--line); background:#fff; border-radius:999px;
  padding:8px 15px; font-size:.92rem; color:var(--ink-2); font-weight:500;
  transition:border-color .15s ease, background .15s ease;
}
.check-opt:hover{border-color:var(--brand)}
.check-opt input{accent-color:var(--brand); margin:0}
.check-opt:has(input:checked){border-color:var(--brand); background:var(--brand-tint); color:var(--brand-dark)}
.check-err{color:#b3261e; font-weight:600; margin-top:14px; min-height:22px}
.check-result{margin-top:48px; border-top:2px solid var(--line); padding-top:34px}
.check-card{border:1px solid var(--line); border-radius:var(--radius); background:#fff; padding:22px 24px; margin:16px 0}
.check-card h3{font-size:1.08rem; margin-bottom:12px}
.check-card--low{border-left:4px solid #3f8f6b}
.check-card--mid{border-left:4px solid var(--accent)}
.check-card--high{border-left:4px solid #c2603f}
.check-bar{height:9px; background:var(--line-2); border-radius:999px; overflow:hidden; margin-bottom:8px}
.check-bar span{display:block; height:100%; background:var(--brand); border-radius:999px}
.check-card--mid .check-bar span{background:var(--accent)}
.check-card--high .check-bar span{background:#c2603f}

/* ---------- Tables (服務時間／經費用途) ---------- */
.table-wrap{overflow-x:auto}
table.data{width:100%; border-collapse:collapse; background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden}
table.data th,table.data td{padding:14px 16px; text-align:left; border-bottom:1px solid var(--line-2); font-size:.96rem}
table.data th{background:var(--brand-tint); color:var(--ink); font-weight:700; font-size:.92rem}
table.data tr:last-child td{border-bottom:0}

/* ---------- Article meta ---------- */
.byline{display:flex; align-items:center; gap:10px; font-size:.88rem; color:var(--muted); margin-bottom:18px}
.byline .avatar{width:34px; height:34px; border-radius:50%; background:var(--brand-tint); flex:none}
.toc{background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:18px 22px; margin:0 0 26px}
.toc p{margin:0 0 8px; font-weight:700; color:var(--ink); font-size:.95rem}
.toc ul{margin:0; padding-left:1.2em}
.toc a{font-size:.94rem}

/* 頁頂插畫（服務頁）＋ 段落插圖 */
.page-hero--art .wrap{display:grid;grid-template-columns:1.35fr .65fr;gap:34px;align-items:center}
.page-hero--art .crumb,.page-hero--art h1,.page-hero--art p{grid-column:1}
.page-hero--art .page-hero-img{grid-column:2;grid-row:1/span 4;width:100%;max-width:380px;height:auto;justify-self:end;display:block}
.section-fig{display:block;max-width:520px;width:100%;height:auto;margin:0 auto 28px}
@media (max-width:880px){
  .page-hero--art .wrap{grid-template-columns:1fr}
  .page-hero--art .page-hero-img{grid-column:1;grid-row:auto;max-width:260px;justify-self:start;margin-top:16px}
}

/* 錨點跳轉（sticky header 高度） */
section[id],div[id]{scroll-margin-top:96px}

/* ---------- 進場動效（fade-up，JS 加；冇 JS 就完全不動）---------- */
.reveal{
  opacity:0; transform:translateY(14px);
  transition:opacity .5s cubic-bezier(.22,.61,.36,1), transform .5s cubic-bezier(.22,.61,.36,1);
}
.reveal.is-in{opacity:1; transform:none}
@media (prefers-reduced-motion: reduce){
  .reveal{opacity:1; transform:none; transition:none}
}
