/* 網站設計（CMS 網站設定 design.*）。由 CmsThemeCss 產生。 */
body.cms-site{--site-accent:#009688;--corp-deep:color-mix(in srgb,#009688 62%,#000)}
@media(prefers-color-scheme:dark){body.cms-site{--site-accent:color-mix(in srgb,#009688 55%,#fff);--corp-deep:color-mix(in srgb,#009688 40%,#000)}}
/* 自訂 CSS（CMS 網站設定 design.custom-css） */
/* 碩遠學苑：版型貼近原站 academy.showu.com.tw（只改樣式，不改內容）。主色 #009688、米色底 #fffbf0、橘紅 #e76f51。 */

/* 頁首：導覽文字用主色粗體，品牌文字灰色，不標示目前頁面的底線 */
body.cms-site .site-logo { height: 50px; width: auto; }
body.cms-site .site-brand { color: #666; font-weight: 700; }
body.cms-site .site-nav a { color: var(--site-accent) !important; font-weight: 700; font-size: 1.1rem; }
body.cms-site .site-nav a[aria-current] { box-shadow: none; border-bottom-color: transparent; background: none; }
body.cms-site .site-nav a[aria-current]::after { display: none; }

/* 首頁：輪播在內容寬度內，其下「關於我們」與「最新消息」左右並排 */
body.cms-site .cms-content:has(> #banner) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2rem 2.5rem; align-items: start; }
body.cms-site .cms-content > section#banner,
body.cms-site .cms-content > section#teachers,
body.cms-site .cms-content > section#courses { grid-column: 1 / -1; }
body.cms-site main.site-main .cms-content > section#about.cms-block,
body.cms-site main.site-main .cms-content > section#news.cms-block,
body.cms-site main.site-main .cms-content > section#teachers.cms-block,
body.cms-site main.site-main .cms-content > section#courses.cms-block { width: auto; margin-left: 0; padding: 0; background: transparent; border-radius: 0; }
body.cms-site main.site-main .cms-content > section#about > .cms-block-inner,
body.cms-site main.site-main .cms-content > section#news > .cms-block-inner,
body.cms-site main.site-main .cms-content > section#teachers > .cms-block-inner,
body.cms-site main.site-main .cms-content > section#courses > .cms-block-inner { width: auto; max-width: none; }

/* 輪播 */
body.cms-site main.site-main .cms-content > section#banner.cms-block { width: auto; margin-left: 0; padding: 0; border-radius: 1rem; overflow: hidden; background: #eee; }
body.cms-site #banner .cms-carousel-slide { min-height: 0; aspect-ratio: 1320 / 500; }

/* 區塊標題：左側粗線 */
body.cms-site .cms-content:has(> #banner) #news .cms-block-header { margin: 0 0 1.25rem; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header { display: contents; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header > i,
body.cms-site .cms-content:has(> #banner) #news .cms-block-header > i { display: none; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header h2,
body.cms-site .cms-content:has(> #banner) #news .cms-block-header h2 { margin: 0; padding-left: .65rem; border-left: 5px solid var(--site-accent); color: #666; font-size: 1.75rem; font-weight: 700; line-height: 1.3; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header h2::after,
body.cms-site .cms-content:has(> #banner) #news .cms-block-header h2::after { display: none; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header h2 { margin-bottom: 1.25rem; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-subtitle { grid-area: 3 / 1; width: 150px; margin: .5rem 0 1.25rem 1.25rem; text-align: center; font-size: .875rem; color: #6c757d; }

/* 關於我們：照片在左、條列資料在右的白色小卡 */
body.cms-site .cms-content:has(> #banner) #about > .cms-block-inner { display: grid; grid-template-columns: calc(150px + 1.25rem) minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 0 1rem; align-items: start; }
body.cms-site .cms-content:has(> #banner) #about > .cms-block-inner::before { content: ""; grid-area: 2 / 1 / 4 / -1; align-self: stretch; background: #fff; border: 1px solid #eee; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
body.cms-site .cms-content:has(> #banner) #about .cms-image-text-body { display: contents; }
body.cms-site .cms-content:has(> #banner) #about .cms-block-header h2 { grid-area: 1 / 1 / 2 / -1; }
body.cms-site .cms-content:has(> #banner) #about .cms-richtext { grid-area: 2 / 2 / 4 / 3; padding: 1.25rem 1.25rem 1.25rem 0; font-size: .875rem; color: #6c757d; }
body.cms-site .cms-content:has(> #banner) #about .cms-richtext ul { list-style: none; margin: 0; padding: 0; }
body.cms-site .cms-content:has(> #banner) #about .cms-richtext li { margin-bottom: .5rem; }
body.cms-site .cms-content:has(> #banner) #about .cms-richtext li::marker { content: ""; }
body.cms-site .cms-content:has(> #banner) #about .cms-image-text-media { grid-area: 2 / 1; margin: 1.25rem 0 1.25rem 1.25rem; width: 150px; }
body.cms-site .cms-content:has(> #banner) #about .cms-image-text-media img { width: 100%; height: auto; aspect-ratio: auto; border: 1px solid #dee2e6; border-radius: 6px; box-shadow: none; }

/* 最新消息：日期（橘紅粗體）加標題的清單 */
body.cms-site .cms-content:has(> #banner) #news .cms-latest-posts { display: block; margin: 0; padding: 0; list-style: none; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post { margin: 0; padding: .5rem 0; border: 0; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post > a { display: flex; align-items: center; gap: 0; padding: 0; background: none; box-shadow: none; border-radius: 0; transform: none; color: #212529; text-decoration: none; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-date { display: block; height: auto; flex: none; width: 6.25rem; min-width: 6.25rem; margin: 0 .95rem 0 0; font-size: 0; line-height: 1.5; padding: 0; background: none; color: #e76f51; font-weight: 700; font-size: 1rem; border-radius: 0; box-shadow: none; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-date::before { content: attr(datetime); font-size: 1rem; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-date > * { display: none; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-body { display: block; min-width: 0; margin: 0; padding: 0; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-title { font-weight: 400; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-excerpt,
body.cms-site .cms-content:has(> #banner) #news .cms-latest-post-cover { display: none; }
body.cms-site .cms-content:has(> #banner) #news .cms-latest-posts-more { margin: .75rem 0 0; font-size: .9rem; }

/* 師資：圓形頭像、姓名加「老師」（區塊標題只留給螢幕報讀） */
body.cms-site .cms-content:has(> #banner) #teachers .cms-block-header,
body.cms-site .cms-content:has(> #banner) #courses .cms-block-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; margin: 0; text-align: center; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card { flex: 0 0 calc((100% - 4.5rem) / 4); min-width: 0; align-items: center; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card-img { width: 75%; margin: 0 auto 1rem; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 8px rgba(0,0,0,.1); transition: transform .3s; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card:hover .cms-card-img { transform: scale(1.1); }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card h3 { margin: 0; font-size: 1.25rem; font-weight: 700; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card h3::after { content: "老師"; display: block; margin-top: .25rem; font-size: .875rem; font-weight: 400; color: #6c757d; }
body.cms-site .cms-content:has(> #banner) #teachers .cms-card > p,
body.cms-site .cms-content:has(> #banner) #teachers .cms-card-more,
body.cms-site .cms-content:has(> #banner) #teachers .cms-teacher-skills { display: none; }

/* 課程：米色圓角底板、無邊框圓角卡片 */
body.cms-site .cms-content:has(> #banner) #courses > .cms-block-inner { padding: 2.5rem 1.25rem; border-radius: 30px; background: #fffbf0; }
body.cms-site .cms-content:has(> #banner) #courses .cms-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; margin: 0; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card { padding: 0 1.25rem 1.25rem; border: 0; border-radius: 15px; overflow: hidden; background: #fff; transform: none; transition: box-shadow .3s; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card:hover { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,.1); }
body.cms-site .cms-content:has(> #banner) #courses .cms-card-img { width: calc(100% + 2.5rem); height: auto; aspect-ratio: 225 / 144; object-fit: cover; margin: 0 -1.25rem 1rem; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 700; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card p { flex: 0 1 auto; margin: 0 0 .75rem; font-size: .875rem; line-height: 1.6; color: #6c757d; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card p strong { font-weight: 400; }
body.cms-site .cms-content:has(> #banner) #courses .cms-card-more { display: none; }

/* 頁尾：主色底、上緣弧形 */
body.cms-site .site-footer { margin-top: 3rem; padding: 2.5rem 0 1.5rem; background: var(--site-accent); color: #fff; border-top-left-radius: 50% 20px; border-top-right-radius: 50% 20px; }
body.cms-site .site-footer a, body.cms-site .site-footer strong, body.cms-site .site-footer address, body.cms-site .site-footer .site-footer-text, body.cms-site .site-footer .site-copyright { color: #fff; }

@media (max-width: 991px) {
  body.cms-site .cms-content:has(> #banner) { grid-template-columns: minmax(0, 1fr); }
  body.cms-site .cms-content:has(> #banner) #courses .cms-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  body.cms-site .cms-content:has(> #banner) #teachers .cms-card { flex-basis: calc((100% - 1.5rem) / 2); }
  body.cms-site .cms-content:has(> #banner) #courses .cms-cards { grid-template-columns: minmax(0, 1fr); }
  body.cms-site .cms-content:has(> #banner) #about > .cms-block-inner { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  body.cms-site .cms-content:has(> #banner) #about > .cms-block-inner::before { grid-area: 2 / 1 / 5 / -1; align-self: stretch; }
  body.cms-site .cms-content:has(> #banner) #about .cms-block-subtitle { grid-area: 3 / 1; width: auto; margin: .5rem 1.25rem 0; }
  body.cms-site .cms-content:has(> #banner) #about .cms-image-text-media { grid-area: 2 / 1; margin: 1.25rem auto 0; }
  body.cms-site .cms-content:has(> #banner) #about .cms-richtext { grid-area: 4 / 1; padding: 1rem 1.25rem 1.25rem; }
}

/* 文章頁：淺灰底、白色圓角文章卡與右側目錄（結構由網站設定「文章目錄」產生） */
body.cms-site:has(.site-post-layout) { background: #f8f9fa; }
body.cms-site .site-post.has-toc { border: 0; box-shadow: 0 4px 6px rgba(0,0,0,.02); }
body.cms-site .site-post.has-toc .site-post-excerpt { display: none; }
body.cms-site .site-post-title { color: #333; }
body.cms-site .site-toc-card { border: 0; box-shadow: 0 4px 6px rgba(0,0,0,.05); }
body.cms-site .site-toc-title { font-size: .95rem; border-bottom-color: #eee; }
body.cms-site .site-toc-card li a { font-size: .95rem; color: #555; }

/* 師資團隊、課程介紹列表頁：淺灰底、白底麵包屑、置中標題、圓角卡片（頁面標題只留給螢幕報讀） */
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) { background: #f8f9fa; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) main.site-main { padding-top: 0; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) .site-page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) .site-breadcrumb { margin: 0 0 2rem; padding: .9rem 0; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); font-size: .95rem; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) .site-breadcrumb a { color: var(--site-accent); }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) main.site-main .cms-content > section:is(#intro, #list).cms-block { width: auto; margin-left: 0; padding: 0; background: transparent; border-radius: 0; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) main.site-main .cms-content > section:is(#intro, #list) > .cms-block-inner { width: auto; max-width: none; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro { text-align: center; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-block-header > i { display: none; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-block-header h2 { margin: 0 0 .75rem; font-size: 2rem; font-weight: 700; color: #333; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-block-header h2::after { display: none; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-richtext { max-width: 760px; margin: 0 auto; color: #6c757d; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-richtext p { margin: 0; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) .cms-content { gap: 2rem; }

/* 師資：米色頂部、置中圓形頭像、「查看完整介紹」外框按鈕 */
body.cms-site #list.cms-block-teacher-list .cms-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 0; }
body.cms-site #list.cms-block-teacher-list .cms-card { padding: 0 1.5rem 1.5rem; border: 0; border-radius: 15px; background: linear-gradient(#fffbf0 0 170px, #fff 170px); box-shadow: 0 4px 12px rgba(0,0,0,.05); text-align: center; transform: none; }
body.cms-site #list.cms-block-teacher-list .cms-card:hover { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,.1); }
body.cms-site #list.cms-block-teacher-list .cms-card-img { width: 140px; height: 140px; margin: 1.75rem auto 1.5rem; object-fit: cover; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,.12); }
body.cms-site #list.cms-block-teacher-list .cms-card h3 { margin: 0 0 .35rem; font-size: 1.35rem; font-weight: 700; }
body.cms-site #list.cms-block-teacher-list .cms-card p { margin: 0 0 .75rem; font-size: .9rem; line-height: 1.7; color: #6c757d; text-align: left; flex: 1 1 auto; }
body.cms-site #list.cms-block-teacher-list .cms-card p:first-of-type { flex: 0 0 auto; text-align: center; }
body.cms-site #list.cms-block-teacher-list .cms-card p strong { font-weight: 400; }
/* 專長標籤：淺綠膠囊（與原站 skill-badge 一致） */
body.cms-site .cms-teacher-skills { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 0 0 1rem; padding: 0; list-style: none; }
body.cms-site .cms-teacher-skills li { margin: 0; padding: 5px 12px; border-radius: 20px; background: #e0f2f1; color: var(--site-accent); font-size: .8rem; line-height: 1.5; }
body.cms-site #list.cms-block-teacher-list .cms-card-more { align-self: center; margin-top: .5rem; padding: .4rem 1.8rem; border: 1px solid var(--site-accent); border-radius: 999px; font-size: 0; color: var(--site-accent); }
body.cms-site #list.cms-block-teacher-list .cms-card-more::before { content: "查看完整介紹"; font-size: .9rem; }
body.cms-site #list.cms-block-teacher-list .cms-card-more i { display: none; }

/* 課程：無邊框圓角卡片，整張卡片的連結樣式與首頁一致 */
body.cms-site #list.cms-block-course-list .cms-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; margin: 0; }
body.cms-site #list.cms-block-course-list .cms-card { padding: 0 1.25rem 1.25rem; border: 0; border-radius: 15px; overflow: hidden; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.05); transform: none; transition: box-shadow .3s; }
body.cms-site #list.cms-block-course-list .cms-card:hover { transform: none; box-shadow: 0 10px 20px rgba(0,0,0,.1); }
body.cms-site #list.cms-block-course-list .cms-card-img { width: calc(100% + 2.5rem); margin: 0 -1.25rem 1rem; }
body.cms-site #list.cms-block-course-list .cms-card h3 { margin: 0 0 .5rem; font-size: 1.15rem; font-weight: 700; }
body.cms-site #list.cms-block-course-list .cms-card p { margin: 0 0 .75rem; font-size: .875rem; line-height: 1.6; color: #6c757d; }
body.cms-site #list.cms-block-course-list .cms-card p strong { font-weight: 400; }
body.cms-site #list.cms-block-course-list .cms-card-more { display: none; }

@media (max-width: 991px) {
  body.cms-site #list.cms-block-teacher-list .cms-cards, body.cms-site #list.cms-block-course-list .cms-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  body.cms-site #list.cms-block-teacher-list .cms-cards, body.cms-site #list.cms-block-course-list .cms-cards { grid-template-columns: minmax(0, 1fr); }
}
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-block-header { max-width: none; margin: 0 0 .5rem; }
body.cms-site:is(:has(#list.cms-block-teacher-list), :has(#list.cms-block-course-list)) #intro .cms-block-header h2 { max-width: none; }

/* 師資詳細頁：左側個人卡、右側圓角卡片（關於、專長與學歷並排、工作經歷時間軸、近期課程） */
body.cms-site:has(#profile.cms-block-image-text) { background: #f8f9fa; }
body.cms-site:has(#profile.cms-block-image-text) main.site-main { padding-top: 0; }
body.cms-site:has(#profile.cms-block-image-text) .site-page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.cms-site:has(#profile.cms-block-image-text) .site-breadcrumb { margin: 0 0 2rem; padding: .9rem 0; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); font-size: .95rem; }
body.cms-site:has(#profile.cms-block-image-text) .site-breadcrumb a { color: var(--site-accent); }
body.cms-site .cms-content:has(> #profile) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
body.cms-site .cms-content:has(> #profile) > section.cms-block { grid-column: 2 / 4; }
body.cms-site .cms-content:has(> #profile) > section#profile { grid-column: 1; grid-row: 1 / span 5; align-self: start; position: sticky; top: 6rem; }
body.cms-site .cms-content:has(> #profile) > section#expertise { grid-column: 2; }
body.cms-site .cms-content:has(> #profile) > section#education { grid-column: 3; }

body.cms-site main.site-main .cms-content:has(> #profile) > section.cms-block { width: auto; margin-left: 0; padding: 0; background: transparent; border-radius: 0; }
body.cms-site main.site-main .cms-content:has(> #profile) > section.cms-block > .cms-block-inner { width: auto; max-width: none; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) > .cms-block-inner { height: 100%; padding: 1.9rem; border-radius: 15px; background: #fff; box-shadow: 0 4px 6px rgba(0,0,0,.02); box-sizing: border-box; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) .cms-block-header { margin: 0 0 1.25rem; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) .cms-block-header > i { display: none; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) .cms-block-header h2 { margin: 0; max-width: none; padding-left: .95rem; border-left: 5px solid var(--site-accent); font-size: 1.25rem; font-weight: 700; color: #444; line-height: 1.3; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) .cms-block-header h2::after { display: none; }
body.cms-site .cms-content:has(> #profile) > section:not(#profile) .cms-richtext { color: #6c757d; font-size: .95rem; max-width: none; }

/* 個人卡 */
body.cms-site #profile > .cms-block-inner { display: flex; flex-direction: column; overflow: hidden; border-radius: 15px; background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,.05); text-align: center; }
body.cms-site #profile .cms-image-text-media { order: -1; margin: 0; padding: 1.9rem 1.9rem 1.5rem; background: #fffbf0; box-shadow: none; }
body.cms-site #profile .cms-image-text-media img { display: block; width: 180px; height: 180px; margin: 0 auto; object-fit: cover; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,.1); aspect-ratio: 1; }
body.cms-site #profile .cms-image-text-body { padding: 1.5rem 1.5rem 1.75rem; }
body.cms-site #profile .cms-block-header { margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid #eee; }
body.cms-site #profile .cms-block-header h2 { margin: 0; font-size: 1.75rem; font-weight: 700; color: #333; }
body.cms-site #profile .cms-block-header h2::after { display: none; }
body.cms-site #profile .cms-block-subtitle { margin: .35rem 0 0; font-size: .95rem; color: #6c757d; }
body.cms-site #profile .cms-richtext { text-align: left; font-size: .9rem; color: #555; }
body.cms-site #profile .cms-richtext > p:first-child { display: none; }
body.cms-site #profile .cms-richtext ul { list-style: none; margin: 0; padding: 0; }
body.cms-site #profile .cms-richtext li::before { content: "\f32f"; font-family: "bootstrap-icons"; margin-right: .6rem; color: var(--site-accent); }
body.cms-site #profile .cms-richtext li { margin-bottom: .5rem; }
body.cms-site #profile .cms-richtext li.is-company::before { content: "\f1cc"; }
body.cms-site #profile .cms-richtext li.is-location::before { content: "\f3e8"; }
body.cms-site #profile .cms-richtext .teacher-social { display: flex; justify-content: center; gap: .5rem; margin: 1.25rem 0 0; }
body.cms-site #profile .cms-richtext .teacher-social a { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: #f1f3f5; color: #6c757d; font-size: 0; text-decoration: none; }
body.cms-site #profile .cms-richtext .teacher-social a:hover { background: var(--site-accent); color: #fff; }
body.cms-site #profile .cms-richtext .teacher-social a::before { font-family: "bootstrap-icons"; font-size: 1rem; }
body.cms-site #profile .cms-richtext .teacher-social a.is-facebook::before { content: "\f344"; }
body.cms-site #profile .cms-richtext .teacher-social a.is-linkedin::before { content: "\f472"; }
body.cms-site #profile .cms-richtext .teacher-social a.is-github::before { content: "\f3ed"; }
body.cms-site #profile .cms-richtext .teacher-social a.is-youtube::before { content: "\f62b"; }
body.cms-site #profile .cms-richtext .teacher-book { margin: 1rem 0 0; }
body.cms-site #profile .cms-richtext .teacher-book a { display: block; padding: .5rem 1rem; border: 1px solid var(--site-accent); border-radius: 6px; text-align: center; color: var(--site-accent); text-decoration: none; }
body.cms-site #profile .cms-richtext .teacher-book a:hover { background: var(--site-accent); color: #fff; }

/* 專長：標籤 */
body.cms-site #expertise .cms-richtext ul { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; margin: 0; padding: 0; }
body.cms-site #expertise .cms-richtext li { margin: 0; padding: .4rem .95rem; border-radius: 20px; background: rgba(0,150,136,.1); color: var(--site-accent); font-size: .9rem; }
body.cms-site #expertise .cms-richtext li::marker { content: ""; }

/* 學歷 */
body.cms-site #education .cms-richtext ul { list-style: none; margin: 0; padding: 0; }
body.cms-site #education .cms-richtext li { margin: 0 0 1rem; }
body.cms-site #education .cms-richtext p { margin: 0; }
body.cms-site #education .cms-richtext p:first-child { font-weight: 700; color: #333; }
body.cms-site #education .cms-richtext p + p { font-size: .85rem; }

/* 工作經歷：時間軸 */
body.cms-site #experience .cms-richtext ul { list-style: none; margin: 0; padding: 0; }
body.cms-site #experience .cms-richtext li { position: relative; margin: 0 0 1.25rem; padding-left: 1.9rem; border-left: 2px solid #e9ecef; line-height: 1.7; }
body.cms-site #experience .cms-richtext li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--site-accent); }
body.cms-site #experience .cms-richtext li strong { display: block; font-size: .9rem; color: var(--site-accent); }

/* 近期開設課程：小卡與外框按鈕 */
body.cms-site #courses .cms-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0; }
body.cms-site .cms-content:has(> #profile) #courses .cms-card { padding: 1rem; border: 1px solid #eee; border-radius: 10px; background: #fff; box-shadow: none; transform: none; }
body.cms-site .cms-content:has(> #profile) #courses .cms-card:hover { transform: none; border-color: var(--site-accent); }
body.cms-site .cms-content:has(> #profile) #courses .cms-card h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; }
body.cms-site .cms-content:has(> #profile) #courses .cms-card p { margin: 0 0 .6rem; font-size: .85rem; color: #6c757d; }
body.cms-site .cms-content:has(> #profile) #courses .cms-card-more { display: inline-block; align-self: flex-start; padding: .2rem .8rem; border: 1px solid var(--site-accent); border-radius: 4px; font-size: 0; color: var(--site-accent); }
body.cms-site .cms-content:has(> #profile) #courses .cms-card-more::before { content: "查看詳情"; font-size: .8rem; }
body.cms-site .cms-content:has(> #profile) #courses .cms-card-more i { display: none; }

@media (max-width: 900px) {
  body.cms-site .cms-content:has(> #profile) { grid-template-columns: minmax(0, 1fr); }
  body.cms-site .cms-content:has(> #profile) > section.cms-block,
  body.cms-site .cms-content:has(> #profile) > section#profile,
  body.cms-site .cms-content:has(> #profile) > section#expertise,
  body.cms-site .cms-content:has(> #profile) > section#education { grid-column: 1; grid-row: auto; position: static; }
  body.cms-site #courses .cms-cards { grid-template-columns: minmax(0, 1fr); }
}

body.cms-site #profile > .cms-block-inner { width: auto; }
body.cms-site #profile .cms-image-text-media, body.cms-site #profile .cms-image-text-body { width: 100%; max-width: none; box-sizing: border-box; flex: none; }
body.cms-site .cms-content:has(> #profile) #courses .cms-block-header { position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal; }

/* 課程詳細頁：淺灰底、白色圓角卡片、課名加橫幅圖、兩欄詳情、綠底表頭課程表、黃色注意事項框 */
body.cms-site:has(.course-layout) { background: #f8f9fa; }
body.cms-site:has(.course-layout) main.site-main { padding-top: 0; }
body.cms-site:has(.course-layout) .site-page-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.cms-site:has(.course-layout) .site-breadcrumb { margin: 0 0 2rem; padding: .9rem 0; background: #fff; box-shadow: 0 0 0 100vmax #fff; clip-path: inset(0 -100vmax); font-size: .95rem; }
body.cms-site:has(.course-layout) .site-breadcrumb a { color: var(--site-accent); }
body.cms-site .course-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; }
body.cms-site .course-main .cms-content { gap: 1.5rem; }
body.cms-site main.site-main .course-main .cms-content > :is(#summary, #intro, #details, #teacher, #syllabus, #notice).cms-block { padding: 0; background: transparent; border-radius: 0; }
body.cms-site main.site-main .course-main .cms-content > :is(#summary, #intro, #details, #teacher, #syllabus, #notice) > .cms-block-inner { width: auto; max-width: none; }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) > .cms-block-inner { padding: 1.9rem; border-radius: 15px; background: #fff; box-shadow: 0 4px 6px rgba(0,0,0,.02); }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) .cms-block-header { margin: 0 0 1.25rem; padding-bottom: .6rem; border-bottom: 2px solid #e9ecef; }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) .cms-block-header > i { display: none; }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) .cms-block-header h2 { margin: 0; max-width: none; font-size: 1.4rem; font-weight: 700; color: var(--site-accent); }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) .cms-block-header h2::after { display: none; }
body.cms-site .course-main .cms-content > :is(#intro, #details, #teacher, #syllabus, #notice) .cms-richtext { max-width: none; padding: 0; color: #6c757d; }

/* 課名與橫幅圖 */
body.cms-site #summary > .cms-block-inner { display: flex; flex-direction: column; gap: 1rem; }
body.cms-site #summary .cms-image-text-body { display: block; }
body.cms-site #summary .cms-block-header { margin: 0 0 .5rem; }
body.cms-site #summary .cms-block-header h2 { max-width: none; margin: 0; font-size: 2.1rem; font-weight: 700; line-height: 1.3; color: #333; }
body.cms-site #summary .cms-block-header h2::after { display: none; }
body.cms-site #summary .cms-block-subtitle { margin: .5rem 0 0; font-size: .95rem; color: #6c757d; }
body.cms-site #summary .cms-richtext { color: #6c757d; }
body.cms-site #summary .cms-image-text-media { margin: 0; width: 100%; max-width: none; box-shadow: none; }
body.cms-site #summary .cms-image-text-media img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,.1); }

/* 課程詳情：兩欄 */
body.cms-site #details .cms-richtext ul { columns: 2; column-gap: 2rem; list-style: none; margin: 0; padding: 0; }
body.cms-site #details .cms-richtext li { break-inside: avoid; margin: 0 0 .75rem; padding-left: 1.6rem; position: relative; }
body.cms-site #details .cms-richtext li::marker { content: ""; }
body.cms-site #details .cms-richtext li::before { content: "\f26a"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: .1rem; color: var(--site-accent); }

/* 師資：一位一列，左頭像右文字 */
body.cms-site #teacher .cms-cards { grid-template-columns: minmax(0, 1fr); gap: 1rem; margin: 0; }
body.cms-site #teacher .cms-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 0 1.25rem; align-items: start; padding: 1rem; border: 1px solid #eee; border-radius: 10px; background: #fff; box-shadow: none; transform: none; }
body.cms-site #teacher .cms-card:hover { transform: none; border-color: var(--site-accent); }
body.cms-site #teacher .cms-card-img { grid-row: 1 / span 3; width: 90px; height: 90px; margin: 0; object-fit: cover; border-radius: 50%; }
body.cms-site #teacher .cms-card h3 { margin: 0 0 .3rem; font-size: 1.1rem; font-weight: 700; }
body.cms-site #teacher .cms-card p { margin: 0; font-size: .875rem; line-height: 1.7; color: #6c757d; }
body.cms-site #teacher .cms-card-more { display: none; }

/* 課程內容：綠底表頭、偶數列淡綠底 */
body.cms-site #syllabus .cms-richtext { overflow-x: auto; }
body.cms-site #syllabus table { width: 100%; border-collapse: collapse; }
body.cms-site #syllabus thead th { padding: 15px; background: var(--site-accent); color: #fff; border: 0; text-align: center; }
body.cms-site #syllabus td { padding: 15px; border: 0; border-bottom: 1px solid #eef1f1; vertical-align: middle; }
body.cms-site #syllabus tbody tr:nth-child(even) { background: #f8fdfc; }
body.cms-site #syllabus tbody tr:hover { background: #eef8f6; }

/* 注意事項：黃色提示框 */
body.cms-site #notice .cms-richtext { padding: 1rem 1.25rem; border-radius: 6px; background: rgba(255,193,7,.2); color: #333; font-size: .9rem; }

/* 報名面板：主色邊框、橘紅色方案名稱與學費 */
body.cms-site .enroll-panel { border: 2px solid var(--site-accent); border-radius: 15px; box-shadow: 0 10px 30px rgba(0,150,136,.1); padding: 1.6rem; }
body.cms-site .enroll-panel h2 { font-size: 1.6rem; font-weight: 700; color: #e76f51; }
body.cms-site .enroll-price { color: #e76f51; }

@media (max-width: 900px) {
  body.cms-site .course-layout { grid-template-columns: minmax(0, 1fr); }
  body.cms-site #details .cms-richtext ul { columns: 1; }
}

/* 頁尾：左側圓形標誌（wwwroot/assets/img/academy-footer-logo.png），右側站名、電話、傳真與地址 */
body.cms-site .site-footer .site-footer-about { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: center; gap: 0 1.5rem; }
body.cms-site .site-footer .site-footer-about::before { content: ""; grid-column: 1; grid-row: 1 / span 3; justify-self: center; width: 150px; height: 150px; border-radius: 50%; border: 3px solid #fff; background: #fff url(/assets/img/academy-footer-logo.png) center / cover no-repeat; }
body.cms-site .site-footer .site-footer-about > * { grid-column: 2; }
body.cms-site .site-footer .site-footer-about > strong { font-size: 1.75rem; font-weight: 700; margin-bottom: .5rem; }
body.cms-site .site-footer .site-footer-about address { display: grid; gap: .25rem; font-style: normal; }
@media (max-width: 767px) {
  body.cms-site .site-footer .site-footer-about { grid-template-columns: minmax(0, 1fr); text-align: center; }
  body.cms-site .site-footer .site-footer-about::before { grid-row: auto; margin-bottom: 1rem; }
  body.cms-site .site-footer .site-footer-about > * { grid-column: 1; }
}
body.cms-site .site-footer .site-footer-inner { display: block; }
body.cms-site .site-footer .site-footer-about { max-width: none; width: 100%; }
body.cms-site:has(.course-layout) main.site-main > .site-container > .site-page-title { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* 內容寬度：與原站一致（版心 1296px，視窗較窄時兩側各留 12px） */
body.cms-site .site-container { width: min(1296px, 100% - 24px); }
body.cms-site main.site-main .cms-content > .cms-block > .cms-block-inner { width: min(1296px, 100% - 24px); }

/* 關於我們（品牌故事）頁：滿版橫幅圖、左右交錯圖文、淺黃底品牌核心、創辦人語錄 */
body.cms-site main.site-main:has(#story-1) .site-breadcrumb { display: none; }
body.cms-site main.site-main:has(#story-1) > .site-container { width: 100%; max-width: none; padding: 0; }
body.cms-site main.site-main:has(#story-1) .cms-content > section { margin: 0; }

/* 橫幅 */
body.cms-site .cms-content:has(> #story-1) #hero { display: flex; align-items: center; justify-content: center; min-height: 400px; margin: 0 0 60px; padding: 0; border-radius: 0; background: url(/assets/img/academy-story-banner.jpg) center / cover; text-align: center; }
body.cms-site .cms-content:has(> #story-1) #hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 50, 40, .6); }
body.cms-site .cms-content:has(> #story-1) #hero > .cms-block-inner { position: relative; z-index: 1; max-width: none; width: auto; text-align: center; color: #fff; }
body.cms-site .cms-content:has(> #story-1) #hero .cms-hero-title { margin: 0 0 1rem; font-size: 3.5rem; font-weight: 700; letter-spacing: 2px; line-height: 1.2; }
body.cms-site .cms-content:has(> #story-1) #hero .cms-hero-lead { margin: 0; font-family: "Playfair Display", Georgia, "Noto Sans TC", serif; font-size: 1.2rem; font-style: italic; opacity: .9; }
body.cms-site .cms-content:has(> #story-1) #hero .cms-hero-lead::after { content: "Logic becomes a habit."; display: block; margin-top: 1rem; font-size: .875rem; }
body.cms-site .cms-content:has(> #story-1) #hero .cms-hero-actions { display: none; }

/* 左右交錯圖文 */
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) { padding: 40px 0; background: transparent; }
body.cms-site .cms-content:has(> #story-1) #story-2 { margin-top: 3rem; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) > .cms-block-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; align-items: center; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-image-text-body { position: relative; padding: 20px 40px; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-block-header { margin: 0; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-block-subtitle { position: absolute; top: -10px; left: 30px; margin: 0; font-family: "Playfair Display", Georgia, serif; font-size: 2.5rem; font-style: italic; font-weight: 700; line-height: 1.4; color: rgba(0, 0, 0, .05); pointer-events: none; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-block-header h2 { position: relative; display: inline-block; margin: 0 0 1.5rem; color: var(--site-accent); font-size: 1.8rem; font-weight: 700; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-block-header h2::after { content: ""; position: absolute; left: 0; bottom: -10px; width: 50px; height: 3px; background: #ffd700; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-richtext { position: relative; color: #6c757d; line-height: 2; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-richtext p { margin: 0 0 1.5rem; }
body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-image-text-media img { width: 100%; height: 400px; object-fit: cover; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, .1); }

/* 品牌核心：淺黃底、置中標題、白色圓角卡 */
body.cms-site .cms-content:has(> #story-1) #values { margin-top: 60px; padding: 80px 0; background: #fffbf0; }
body.cms-site .cms-content:has(> #story-1) #values .cms-block-header { margin: 0 0 3rem; text-align: center; }
body.cms-site .cms-content:has(> #story-1) #values .cms-block-header > i { display: none; }
body.cms-site .cms-content:has(> #story-1) #values .cms-block-header h2 { margin: 0 0 1rem; color: #212529; font-size: 2rem; font-weight: 700; }
body.cms-site .cms-content:has(> #story-1) #values .cms-block-header h2::after { display: none; }
body.cms-site .cms-content:has(> #story-1) #values .cms-block-subtitle { margin: 0; font-family: SFMono-Regular, Menlo, Consolas, monospace; color: #6c757d; }
body.cms-site .cms-content:has(> #story-1) #values .cms-cards { gap: 1.5rem; margin: 0; }
body.cms-site .cms-content:has(> #story-1) #values .cms-card { padding: 40px 20px; text-align: center; border: 0; border-radius: 15px; background: #fff; box-shadow: 0 5px 15px rgba(0, 0, 0, .05); transition: transform .3s; }
body.cms-site .cms-content:has(> #story-1) #values .cms-card:hover { transform: translateY(-10px); }
body.cms-site .cms-content:has(> #story-1) #values .cms-card > i { display: block; width: auto; height: auto; margin-bottom: 20px; border-radius: 0; background: none; font-size: 3rem; line-height: 1.2; color: var(--site-accent); }
body.cms-site .cms-content:has(> #story-1) #values .cms-card h3 { margin: 0 0 1rem; font-size: 1.5rem; font-weight: 700; color: #212529; }
body.cms-site .cms-content:has(> #story-1) #values .cms-card p { color: #6c757d; font-size: .875rem; line-height: 1.5; }

/* 創辦人語錄 */
body.cms-site .cms-content:has(> #story-1) #founder { padding: 80px 0; background: #fff; text-align: center; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-block-header { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonials { display: block; margin: 0; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial { max-width: 800px; margin: 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial blockquote::before { height: 3.5rem; margin-bottom: 20px; font-size: 6rem; line-height: .9; color: #e0e0e0; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial blockquote p { margin: 0 0 30px; font-size: 1.5rem; font-style: italic; line-height: 1.8; color: #555; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial figcaption { align-items: center; margin: 0; padding: 0; border: 0; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial figcaption::before { content: ""; width: 80px; height: 80px; margin-bottom: 10px; border: 3px solid var(--site-accent); border-radius: 50%; background: url(/assets/img/academy-founder.png) center top / cover; }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial figcaption strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.2rem; color: var(--site-accent); }
body.cms-site .cms-content:has(> #story-1) #founder .cms-testimonial figcaption span { font-size: .875rem; font-style: italic; color: #6c757d; }

@media (max-width: 991.98px) {
  body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) > .cms-block-inner { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-image-text-media { order: -1; padding: 0 12px; }
  body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-image-text-body { padding: 20px 12px; }
  body.cms-site .cms-content:has(> #story-1) :is(#story-1, #story-2) .cms-block-subtitle { left: 2px; }
  body.cms-site .cms-content:has(> #story-1) #hero { min-height: 280px; }
  body.cms-site .cms-content:has(> #story-1) #hero .cms-hero-title { font-size: 2.5rem; }
}
