/* 關鍵字先生：WordPress（Blocksy 佈景）風格的外框＋專欄文章版面。影片區塊的樣式在 course.css（.yt） */
:root {
  --c1: #F74D67;          /* 品牌粉紅紅：連結、強調 */
  --c2: #FB7258;          /* 珊瑚橘：漸層、點綴 */
  --btn: #E0344F;         /* 白字按鈕的底色（比品牌色深一點，字比較清楚） */
  --text: #6e6d76;
  --head: #0e0c1b;
  --line: #DFDFE2;
  --soft: #F4F4F5;
  --tint: #FFF4F5;        /* 淡粉底色 */
  --container: 1290px;
  --gutter: 75px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: #fff; color: var(--text); font: 400 18px/1.75 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c1); text-decoration: none; transition: color .15s; }
h1, h2, h3, h4 { color: var(--head); font-weight: 700; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; }
svg { width: 1em; height: 1em; display: block; }
[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 16px; z-index: 100; }
.skip-link:focus { left: 8px; }
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(820px + var(--gutter) * 2); }
.t-center { text-align: center; }

/* 按鈕 */
.wbtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 16px 26px; border: 0; border-radius: 10px;
  background: var(--btn); color: #fff; font-size: 16px; line-height: 1; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.wbtn:hover { background: var(--head); color: #fff; }
.wbtn-sm { padding: 10px 16px; border-radius: 6px; font-size: 14px; }
.wbtn-ghost { background: #fff; color: var(--head); box-shadow: inset 0 0 0 1.5px var(--line); }
.wbtn-ghost:hover { background: #fff; color: var(--btn); box-shadow: inset 0 0 0 1.5px var(--btn); }
.wbtn-block { display: flex; width: 100%; }
.eyebrow { display: inline-block; padding: 10px 14px; border-radius: 4px; background: rgba(247,77,103,.12); color: var(--btn); font-size: 14px; font-weight: 700; line-height: 1; margin-bottom: 18px; }

/* ── 頁首 ── */
.site-header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-stuck { border-bottom-color: transparent; box-shadow: 0 10px 20px rgba(14,12,27,.07); }
.header-row { display: flex; align-items: center; height: 68px; }
.site-logo img { width: 160px; height: auto; }
.main-nav { display: flex; margin-left: auto; height: 100%; }
.main-nav > a, .nav-drop > a { display: flex; align-items: center; gap: 4px; height: 100%; padding: 0 22px; color: var(--text); font-size: 16px; font-weight: 500; }
.main-nav a:hover, .main-nav a.current { color: var(--c1); }
.nav-drop { position: relative; height: 100%; }
.nav-drop > a svg { width: 14px; height: 14px; }
.drop-menu { position: absolute; left: 10px; top: 100%; min-width: 190px; padding: 10px 0; background: #fff; border-radius: 8px; box-shadow: 0 12px 40px rgba(14,12,27,.12);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s, transform .15s, visibility .15s; }
.nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { opacity: 1; visibility: visible; transform: none; }
.drop-menu a { display: block; padding: 8px 20px; color: var(--text); font-size: 15px; font-weight: 500; line-height: 1.5; }
.drop-menu a:hover { color: var(--c1); background: var(--tint); }
.header-tools { display: flex; align-items: center; gap: 6px; margin-left: 24px; }
.h-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--text); cursor: pointer; }
.h-icon svg { width: 17px; height: 17px; }
.h-icon:hover { color: var(--c1); background: var(--soft); }
.h-login { display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--head); font-size: 15px; font-weight: 500; }
.h-login svg { width: 18px; height: 18px; }
.h-login:hover { color: var(--c1); }
.h-avatar span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--head); color: #fff; font-size: 14px; font-weight: 600; }
.header-tools .wbtn-sm { margin-left: 8px; }
.m-only { display: none !important; }
.menu-toggle { display: none; border: 0; background: none; padding: 6px; color: var(--head); cursor: pointer; }
.menu-toggle svg { width: 24px; height: 24px; }
.search-panel { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
.search-panel-form { display: flex; align-items: center; gap: 10px; padding-top: 20px; padding-bottom: 20px; }
.search-panel input { flex: 1; height: 50px; border: 1px solid var(--line); border-radius: 8px; padding: 0 16px; font-size: 16px; }
.mobile-menu { position: fixed; inset: 0; z-index: 50; background: rgba(14,12,27,.55); }
.mobile-menu-inner { position: absolute; right: 0; top: 0; bottom: 0; width: min(85vw, 340px); background: #fff; padding: 60px 26px 30px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.mobile-close { position: absolute; top: 14px; right: 14px; }
.mobile-search input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; font-size: 16px; margin-bottom: 12px; }
.mobile-link { color: var(--head); font-size: 17px; font-weight: 500; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mobile-link.sub { padding-left: 16px; font-size: 15px; color: var(--text); }
.mobile-menu-inner .wbtn { margin-top: 18px; }

/* ── 首頁 hero ── */
.hero { background: radial-gradient(circle at 85% 20%, rgba(251,114,88,.18), transparent 45%), linear-gradient(180deg, #fff 0%, var(--tint) 100%); padding: 80px 0 90px; }
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 60px; }
.hero-text { flex: 1 1 620px; max-width: 640px; }
.hero h1 { font-size: 46px; line-height: 1.32; font-weight: 900; letter-spacing: -.5px; margin-bottom: 22px; }
.hero-text > p { color: var(--text); font-size: 17px; line-height: 1.85; max-width: 580px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 28px; list-style: none; margin: 30px 0 0; padding: 0; font-size: 15px; }
.hero-facts b { color: var(--head); font-size: 22px; font-weight: 800; margin-right: 2px; }
.hero-art { position: relative; flex: 0 1 470px; }
.serp { background: #fff; border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px rgba(14,12,27,.12); font-size: 13px; line-height: 1.6; }
.serp-q { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 22px; color: var(--head); font-size: 15px; }
.serp-q svg { width: 16px; height: 16px; color: var(--text); }
.serp-ai { margin: 16px 0; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #f3f0ff, #fff4f5); }
.serp-ai b { color: #6d4bd8; font-size: 13px; }
.serp-ai p { color: var(--head); margin: 4px 0 6px; }
.cite { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #fff; color: var(--btn); font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.serp-r { padding: 10px 2px; border-top: 1px solid var(--soft); }
.serp-r small { color: #188038; }
.serp-r b { display: block; color: #1a0dab; font-size: 16px; font-weight: 500; }
.serp-r p { color: var(--text); }
.serp-r.dim { opacity: .35; }
.serp-r.dim b, .serp-r.dim p { height: 12px; margin: 6px 0; border-radius: 6px; background: var(--soft); }
.rank { position: absolute; right: -14px; top: 64px; width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-size: 22px; font-weight: 900; box-shadow: 0 14px 30px rgba(247,77,103,.35); transform: rotate(8deg); }

/* ── 首頁：課程影片 ── */
.courses { padding: 70px 0 100px; }
.home-posts { padding: 70px 0 100px; }
.home-posts .center { text-align: center; margin-top: 40px; }
.section-head { text-align: center; margin-bottom: 30px; }
.section-head h2 { font-size: 30px; line-height: 1.4; }
.section-head p { margin-top: 8px; font-size: 16px; }
.courses .yt .fbar { top: 68px; }

/* ── 頁尾 ── */
.site-footer { background: #0e0c1b; color: #a9a8b0; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1.3fr 1fr; gap: 40px; padding-top: 70px; padding-bottom: 60px; }
.footer-cols > div { display: flex; flex-direction: column; }
.footer-brand img { width: 150px; filter: brightness(0) invert(1); opacity: .95; margin-bottom: 18px; }
.footer-brand p { font-size: 14px; line-height: 1.8; }
.footer-cols h4 { color: #fff; font-size: 16px; line-height: 24px; margin-bottom: 14px; }
.footer-cols a, .footer-cols span { color: #a9a8b0; font-size: 15px; line-height: 1.6; padding: 4px 0; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; font-size: 14px; }
.footer-bottom-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-bottom nav { display: flex; gap: 20px; }
.footer-bottom a { color: #a9a8b0; }
.footer-bottom a:hover { color: #fff; }

/* ── 有側欄的頁面（文章、列表） ── */
.with-sidebar { display: grid; grid-template-columns: minmax(0, 890px) 348px; justify-content: space-between; gap: 52px; padding-top: 60px; padding-bottom: 60px; }
.list-head { margin-bottom: 40px; text-align: center; }
.list-head h1 { font-size: 42px; line-height: 1.5; }
.list-sub { margin-top: 14px; color: var(--c2); }
.list-head .breadcrumbs { justify-content: center; }
.list-empty { padding: 30px 0; }
.pcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.pcard { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(14,12,27,.08); display: flex; flex-direction: column; }
.pcard-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.pcard:hover .pcard-img img { transform: scale(1.04); }
.pcard-body { padding: 24px; }
.pcard-title { font-size: 18px; line-height: 1.45; font-weight: 700; }
.pcard-title a { color: var(--head); }
.pcard-title a:hover { color: var(--c1); }
.pcard-date { display: block; margin-top: 14px; font-size: 12px; font-weight: 600; line-height: 17px; }
.with-sidebar .pcard-grid { grid-template-columns: repeat(2, 1fr); }

.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 20px; font-size: 12px; font-weight: 600; line-height: 21px; color: var(--text); }
.breadcrumbs a { color: var(--c1); }
.breadcrumbs a:hover { color: var(--head); }
.bc-sep svg { width: 9px; height: 9px; opacity: .6; }

/* 文章 */
.post-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 40px; }
.post-title { font-size: 32px; line-height: 1.5; }
.entry { margin-top: 40px; }
.toc { display: inline-block; max-width: 100%; margin: 0 0 27px; padding: 10px 20px 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.toc-head { display: flex; align-items: center; gap: 10px; }
.toc-title { margin: 0 !important; color: var(--head); font-size: 19px; line-height: 31px; font-weight: 700; }
.toc-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 32px; margin-left: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); cursor: pointer; font-size: 18px; }
@media (min-width: 690px) { .toc-head { min-width: 330px; } }
.entry .toc-list ul { list-style: none; margin: 4px 0 0; padding: 0; line-height: 28px; }
.entry .toc-list li { margin: 0; }
.entry .toc-list a { color: var(--head); font-size: 15px; text-decoration: none; }
.entry .toc-list a:hover { color: var(--c1); }
.toc.closed .toc-list { display: none; }
.post-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 50px; padding: 26px; border-radius: 12px; background: var(--soft); }
.post-author img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.post-author b { color: var(--head); font-size: 17px; }
.post-author p { font-size: 15px; line-height: 1.75; margin-top: 4px; }
.post-cta { display: flex; align-items: center; gap: 20px; margin-top: 20px; padding: 24px 26px; border-radius: 12px; background: linear-gradient(135deg, var(--tint), #fff); border: 1px solid rgba(247,77,103,.25); }
.post-cta > div { flex: 1; }
.post-cta b { color: var(--head); font-size: 17px; }
.post-cta p { font-size: 15px; margin-top: 2px; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.post-nav a { display: flex; flex-direction: column; gap: 4px; color: var(--head); font-weight: 600; font-size: 15px; line-height: 1.5; }
.post-nav a small { color: var(--text); font-weight: 500; font-size: 13px; }
.post-nav a:hover span { color: var(--c1); }
.post-nav .next { text-align: right; }

.related { padding: 50px 0 70px; background: var(--soft); }
.related h3 { font-size: 20px; line-height: 30px; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.related-card { display: flex; flex-direction: column; gap: 14px; color: var(--head); font-size: 15px; font-weight: 600; line-height: 1.5; }
.related-card img, .related-blank { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #fff; }
.related-card:hover { color: var(--c1); }

/* 側欄 */
.sidebar { display: flex; flex-direction: column; align-self: start; }
.widget { margin-bottom: 36px; }
.widget:last-child { margin-bottom: 0; }
.widget-title { font-size: 19px; line-height: 30px; margin-bottom: 12px; }
.side-search { position: relative; display: flex; }
.side-search input { width: 100%; height: 50px; padding: 0 50px 0 15px; border: 1px solid var(--line); border-radius: 8px; color: var(--head); font-size: 16px; }
.side-search button { position: absolute; right: 0; top: 0; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--text); cursor: pointer; }
.author-box { text-align: center; padding: 30px 22px 26px; border: 1px solid var(--line); border-radius: 12px; }
.author-box img { width: 88px; height: 88px; border-radius: 50%; margin: 0 auto; }
.author-box h3 { font-size: 19px; line-height: 30px; margin: 16px 0 8px; }
.author-box p { font-size: 15px; line-height: 1.8; }
.course-cta { padding: 24px; border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; }
.course-cta h3 { color: #fff; font-size: 18px; line-height: 1.5; }
.course-cta p { font-size: 14px; line-height: 1.7; margin: 8px 0 16px; opacity: .95; }
.course-cta .wbtn { background: #fff; color: var(--btn); }
.course-cta .wbtn:hover { background: var(--head); color: #fff; }
.cat-list, .cat-list ul, .plain-list { list-style: none; margin: 0; padding: 0; font-size: 16px; line-height: 1.9; }
.cat-list ul { padding-left: 20px; }
.sidebar .widget a { color: var(--text); }
.sidebar .widget a:hover { color: var(--c1); }
.sidebar .course-cta a.wbtn { color: var(--btn); }
.sidebar .course-cta a.wbtn:hover { color: #fff; }

/* ── 單純頁面：關於我們、搜尋、找不到 ── */
.page-hero { padding: 80px 0 60px; text-align: center; background: linear-gradient(180deg, #fff 0%, var(--tint) 100%); }
.page-hero h1 { font-size: 40px; line-height: 1.4; margin-bottom: 18px; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 17px; }
.about { padding-top: 50px; padding-bottom: 90px; }
.about h2 { font-size: 26px; margin: 44px 0 14px; }
.about p { margin-bottom: 18px; }
.about-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.about-stats div { padding: 22px; border-radius: 12px; background: var(--soft); text-align: center; }
.about-stats b { display: block; color: var(--c1); font-size: 30px; font-weight: 900; line-height: 1.3; }
.about-stats span { font-size: 14px; }
.about-list, .about-ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.about-list li { display: flex; flex-direction: column; padding: 14px 18px; border: 1px solid var(--line); border-radius: 10px; }
.about-list b { color: var(--head); }
.about-list span { font-size: 15px; }
.about-ticks li { position: relative; padding-left: 30px; }
.about-ticks li::before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--c1); font-weight: 900; }
.about-cta { display: flex; align-items: center; gap: 20px; margin-top: 50px; padding: 28px; border-radius: 14px; background: var(--tint); }
.about-cta > div { flex: 1; }
.about-cta b { color: var(--head); font-size: 18px; }
.about-cta p { margin: 4px 0 0; font-size: 15px; }
.search-page { padding-top: 50px; padding-bottom: 90px; }
.search-page h1 { font-size: 32px; margin-bottom: 20px; }
.side-search.big { max-width: 640px; margin-bottom: 30px; }
.search-h { font-size: 20px; margin: 30px 0 18px; }
.search-h small { color: var(--text); font-size: 14px; font-weight: 500; margin-left: 6px; }
.simple-page { padding-top: 100px; padding-bottom: 120px; text-align: center; }
.simple-page h1 { font-size: 32px; margin-bottom: 14px; }
.simple-page .side-search { max-width: 420px; margin: 30px auto; }

/* ── 平板與手機 ── */
@media (max-width: 1180px) {
  .main-nav > a, .nav-drop > a { padding: 0 14px; }
}
@media (max-width: 999px) {
  :root { --gutter: 30px; }
  .main-nav, .header-tools { display: none; }
  .menu-toggle { display: block; }
  .header-row { justify-content: space-between; }
  .m-only { display: inline-flex !important; }
  .hero { padding: 50px 0 60px; }
  .hero-row { flex-direction: column; align-items: stretch; gap: 40px; }
  .hero-text { flex: none; max-width: none; }
  .hero-art { flex: none; width: 100%; max-width: 470px; margin: 0 auto; }
  .with-sidebar { grid-template-columns: minmax(0, 1fr); gap: 50px; }
  .pcard-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 689px) {
  :root { --gutter: 18px; }
  .site-logo img { width: 140px; }
  .hero { padding: 36px 0 44px; }
  .hero h1 { font-size: 30px; }
  .hero-text > p { font-size: 16px; }
  .hero-cta .wbtn { flex: 1; }
  .rank { right: 4px; top: -18px; width: 52px; height: 52px; font-size: 18px; }
  .courses { padding: 50px 0 70px; }
  .section-head h2 { font-size: 24px; }
  .courses .yt .fbar { top: 68px; }
  .pcard-grid, .with-sidebar .pcard-grid { grid-template-columns: 1fr; }
  .list-head h1 { font-size: 30px; }
  .post-cover { margin-bottom: 26px; border-radius: 8px; }
  .post-title { font-size: 24px; }
  .toc { display: block; }
  .entry { margin-top: 30px; }
  .post-cta, .about-cta { flex-direction: column; align-items: stretch; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav .next { text-align: left; }
  .page-hero h1 { font-size: 28px; }
  .about-stats { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; gap: 30px; padding-top: 50px; padding-bottom: 40px; }
}

/* 影片區塊的一般頁面（方案、登入、帳號、系列、影片）：跟頁尾留點距離 */
.container > .yt.app { padding-bottom: 70px; }

/* 關於我們：老師介紹 */
.about-me { display: flex; align-items: center; gap: 36px; margin-bottom: 40px; }
.about-me img { width: 260px; flex: none; border-radius: 16px; box-shadow: 0 20px 50px rgba(14,12,27,.15); }
.about-me h2 { margin: 0 0 10px !important; }
.about-me .eyebrow { margin-bottom: 12px; }
.author-box img, .post-author img { object-fit: cover; }
@media (max-width: 689px) {
  .about-me { flex-direction: column; align-items: flex-start; gap: 22px; }
  .about-me img { width: 100%; max-width: 320px; }
}

/* 首頁「顯示更多影片」 */
.yt .more-wrap { display: flex; justify-content: center; margin-top: 36px; }
.yt .more-wrap .btn { min-width: 240px; }
