@layer theme-custom {
/* 呂緋國文：隱藏所有前台課程購買／學員人數 */
body.b_course_list .course-block-footer li:has(.fa-user),
body.b_course_intro .course-info-list li:has(.fa-user) {
  display: none !important;
}

/* 手機版課程銷售頁：固定價格＋立即購買列 */
@media (max-width: 767.98px) {
  body.b_course_intro {
    padding-bottom: 82px;
  }

  body.b_course_intro a[data-url*="/cart/quick-checkout/course/"][data-sellable="yes"] {
    position: fixed !important;
    left: 12px;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 1045;
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    margin: 0 !important;
    padding: 12px 20px !important;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 16px !important;
    background: linear-gradient(135deg, #7f2940 0%, #a94854 55%, #c5745d 100%) !important;
    color: #fff !important;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.25;
    text-align: center;
    box-shadow: 0 10px 30px rgba(88, 31, 48, .32);
  }

  body.b_course_intro a[aria-label*="LINE"],
  body.b_course_intro a[title*="LINE"],
  body.b_course_intro a[href*="line.me"][style*="position: fixed"] {
    bottom: 82px !important;
  }
}

/* event-7 registration-flow image fix */
body.b_event_detail #event-apply-procedure{scroll-margin-top:120px;clear:both;position:relative;z-index:1}
body.b_event_detail #event-apply-procedure .html-info h4 span{display:flex;flex-direction:column;align-items:stretch;gap:18px;font-size:18px!important;line-height:1.5}
body.b_event_detail #event-apply-procedure img[src*="f426ebd9-396a-467d-a1b4-ab5a4087f333.png"]{float:none!important;display:block!important;width:100%!important;height:auto!important;max-width:800px!important;margin:0 auto 8px!important;position:static!important}
body.b_event_detail #event-apply-procedure .html-info h4,
body.b_event_detail #event-apply-procedure .html-info p,
body.b_event_detail #event-apply-procedure .html-info ul{clear:both;position:relative;z-index:2}
body.b_event_detail #event-apply-procedure .html-info{overflow:visible;display:block}

/* event-7 readability refinement */
body.b_event_detail .lf-event{word-break:normal;overflow-wrap:break-word}
body.b_event_detail .lf-event .lf-panel{min-width:0}
body.b_event_detail .lf-event .lf-syllabus-grid{grid-template-columns:1fr}
body.b_event_detail .lf-event .lf-lesson{grid-template-columns:52px minmax(0,1fr)}
body.b_event_detail #event-apply-procedure img[src*="f426ebd9-396a-467d-a1b4-ab5a4087f333.png"]{max-width:680px!important;border-radius:16px;box-shadow:0 8px 24px rgba(80,45,52,.08)}
body.b_event_detail .purchase-block .purchase-content{word-break:normal;overflow-wrap:break-word}
body.b_event_detail .purchase-block .purchase-content p{line-height:1.65;margin-bottom:10px}
body.b_event_detail .purchase-block h4{line-height:1.45}


/* ===== 呂緋國文全站品牌視覺統一 2026-10-22 ===== */

/* 核心品牌色：酒紅、深酒紅、奶油白 */
#pjax-container {
  background-color: #fffdf9;
  color: #1a1818;
}

nav.navbar {
  background-color: rgba(255, 253, 249, .97);
}

footer {
  background-color: #9c3b43 !important;
}

/* 標題統一為明體系，內文沿用清楚易讀的 Noto Sans TC */
#pjax-container h1,
#pjax-container h2,
#pjax-container h3,
#pjax-container h4,
section.index-editor h1,
section.index-editor h2,
section.index-editor h3,
section.index-editor h4 {
  font-family: "Noto Serif TC", "Songti TC", serif !important;
  color: #742d3e;
}

#pjax-container .page-title h1,
#pjax-container .page-title h2 {
  color: #4f3340;
}

/* 卡片、資訊框與表單保持白底，從奶油白頁面中清楚分層 */
#pjax-container .card,
#pjax-container .course-block,
#pjax-container .event-block,
#pjax-container .product-block,
#pjax-container .purchase-block,
#pjax-container .lf-panel {
  background-color: #fff;
  border-color: #ede3e2;
  border-radius: 16px;
}

#pjax-container .form-control,
#pjax-container input,
#pjax-container select,
#pjax-container textarea {
  border-color: #ded3d1;
  border-radius: 10px;
}

#pjax-container .form-control:focus,
#pjax-container input:focus,
#pjax-container select:focus,
#pjax-container textarea:focus {
  border-color: #9c3b43;
  box-shadow: 0 0 0 3px rgba(156, 59, 67, .12);
}

/* 主要與次要操作按鈕 */
#pjax-container .btn.btn-full,
#pjax-container .btn-primary,
#pjax-container .btn-success,
#pjax-container button[type="submit"],
#pjax-container input[type="submit"] {
  background: #9c3b43 !important;
  border-color: #9c3b43 !important;
  border-radius: 14px !important;
  color: #fff !important;
}

#pjax-container .btn.btn-full:hover,
#pjax-container .btn-primary:hover,
#pjax-container .btn-success:hover,
#pjax-container button[type="submit"]:hover,
#pjax-container input[type="submit"]:hover {
  background: #742d3e !important;
  border-color: #742d3e !important;
}

#pjax-container .btn.btn-border,
#pjax-container .btn-outline-primary {
  background: #fff !important;
  border-color: #9c3b43 !important;
  border-radius: 14px !important;
  color: #9c3b43 !important;
}

/* Podcast 播放器改用品牌酒紅色 */
body.b_podcast_list .mejs__playpause-button > button,
body.b_podcast_detail .mejs__playpause-button > button,
section.index-editor .mejs__playpause-button > button {
  background-color: #9c3b43 !important;
}

/* 手機版固定購買鈕改為單色品牌酒紅 */
@media (max-width: 767.98px) {
  body.b_course_intro a[data-url*="/cart/quick-checkout/course/"][data-sellable="yes"] {
    background: #9c3b43 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px rgba(116, 45, 62, .26);
  }
}

/* 全站品牌視覺補強：覆蓋元件內建色彩 */
#pjax-container h1,
#pjax-container h2,
#pjax-container h3,
#pjax-container h4,
section.index-editor h1,
section.index-editor h2,
section.index-editor h3,
section.index-editor h4 {
  color: #742d3e !important;
}

body.m_home .mejs__playpause-button > button {
  background-color: #9c3b43 !important;
}

body.b_cart_quick_checkout #pjax-container .form-control,
body.b_contact_detail #pjax-container .form-control {
  border-color: #ded3d1 !important;
  border-radius: 10px !important;
}

/* 全站標題：粗體宋體 */
#pjax-container h1,
#pjax-container h2,
#pjax-container h3,
#pjax-container h4,
section.index-editor h1,
section.index-editor h2,
section.index-editor h3,
section.index-editor h4 {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif !important;
  font-weight: 700 !important;
}

/* 全站標題頁與導覽分頁配色統一 */

/* 所有頁面頂部標題 */
#pjax-container .page-title,
#pjax-container .page-title h1,
#pjax-container .page-title h2,
#pjax-container .page-title span,
#pjax-container .page-title strong,
#pjax-container .module-title,
#pjax-container .module-title h1,
#pjax-container .module-title h2,
#pjax-container .module-title span,
#pjax-container .module-title strong {
  color: #742d3e !important;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif !important;
  font-weight: 700 !important;
}

/* 桌機主選單：明顯黑色，滑過與目前項目為酒紅 */
nav.navbar .naviMain > .container > ul > li > a,
nav.navbar .naviMain > .container > ul > li > a > span {
  color: #1a1818 !important;
}

nav.navbar .naviMain > .container > ul > li > a:hover,
nav.navbar .naviMain > .container > ul > li > a:hover > span,
nav.navbar .naviMain > .container > ul > li.active > a,
nav.navbar .naviMain > .container > ul > li.active > a > span {
  color: #9c3b43 !important;
}

nav.navbar .dropdown-menu .dropdown-item {
  color: #1a1818 !important;
}

nav.navbar .dropdown-menu .dropdown-item:hover,
nav.navbar .dropdown-menu .dropdown-item:focus,
nav.navbar .dropdown-menu .dropdown-item.active {
  color: #9c3b43 !important;
}

/* 課程、活動、文章等分類籤 */
#pjax-container .catbar-chip {
  background: #f5efed !important;
  border-color: #ded3d1 !important;
  color: #1a1818 !important;
}

#pjax-container .catbar-chip:hover,
#pjax-container .catbar-chip:focus {
  background: #fff !important;
  border-color: #9c3b43 !important;
  color: #9c3b43 !important;
}

#pjax-container .catbar-chip.is-active {
  background: #9c3b43 !important;
  border-color: #9c3b43 !important;
  color: #fff !important;
}

/* 一般頁籤 */
#pjax-container .nav-tabs .nav-link,
#pjax-container .nav-pills .nav-link {
  color: #1a1818 !important;
}

#pjax-container .nav-tabs .nav-link:hover,
#pjax-container .nav-tabs .nav-link.active,
#pjax-container .nav-pills .nav-link:hover {
  color: #9c3b43 !important;
}

#pjax-container .nav-pills .nav-link.active {
  background-color: #9c3b43 !important;
  color: #fff !important;
}

/* 頁碼 */
#pjax-container .pagination .page-link {
  color: #1a1818 !important;
}

#pjax-container .pagination .page-link:hover {
  background-color: #f5efed !important;
  border-color: #9c3b43 !important;
  color: #9c3b43 !important;
}

#pjax-container .pagination .page-item.active .page-link {
  background-color: #9c3b43 !important;
  border-color: #9c3b43 !important;
  color: #fff !important;
}

/* 麵包屑及內容頁上方導覽 */
#pjax-container .breadcrumb a,
#pjax-container .courseNavs a,
#pjax-container .course-navs a {
  color: #1a1818 !important;
}

#pjax-container .breadcrumb a:hover,
#pjax-container .courseNavs a:hover,
#pjax-container .course-navs a:hover,
#pjax-container .courseNavs a.active,
#pjax-container .course-navs a.active {
  color: #9c3b43 !important;
}

/* 首頁快速選課：桌機四張同列 */
@media (min-width: 1100px) {
  #fei-course-finder .fcf-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  #fei-course-finder .fcf-card {
    width: auto !important;
    min-width: 0;
  }

  #fei-course-finder .fcf-cover-link,
  #fei-course-finder .fcf-cover {
    width: 100% !important;
  }

  #fei-course-finder .fcf-body {
    width: auto !important;
    min-width: 0;
    padding: 14px 15px 16px !important;
  }

  #fei-course-finder .fcf-name {
    width: auto !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
  }

  #fei-course-finder .fcf-meta {
    width: auto !important;
    font-size: 13px !important;
    line-height: 1.6 !important;
  }

  #fei-course-finder .fcf-price {
    font-size: 16px !important;
  }

  #fei-course-finder .fcf-link {
    padding: 8px 12px !important;
    font-size: 13px !important;
    white-space: nowrap;
  }
}

@media (min-width: 768px) and (max-width: 1099.98px) {
  #fei-course-finder .fcf-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  #fei-course-finder .fcf-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* 首頁呂緋國文亮點：合併後的響應式單列 */
.fei-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-left: -15px;
  margin-right: -15px;
}

.fei-feature-row > .col-md-6 {
  width: 100% !important;
  max-width: none !important;
  margin-bottom: 0 !important;
  padding: 0;
}

.fei-feature-row img[src*="/feature-"] {
  display: block;
  width: 100% !important;
  height: auto !important;
}

@media (min-width: 768px) and (max-width: 1099.98px) {
  .fei-feature-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 767.98px) {
  .fei-feature-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-left: 0;
    margin-right: 0;
  }
}

/* 首頁大型圖片精簡：縮短頁面長度、保留完整內容 2026-10-22 */
@media (min-width: 768px) {
  /* 課堂筆記兩張直式圖 */
  body.m_home section.index-editor img[src*="%E8%AC%9B%E7%BE%A9-2-2.png"],
  body.m_home section.index-editor img[src*="%E7%AD%86%E8%A8%98-3.png"],
  body.m_home section.index-editor img[src*="講義-2-2.png"],
  body.m_home section.index-editor img[src*="筆記-3.png"] {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: 760px !important;
    max-height: 760px !important;
    object-fit: contain;
    margin: 0 auto !important;
  }

  /* 筆記影片試看圖 */
  body.m_home section.index-editor img[src*="%E5%BD%B1%E7%89%87%E8%A9%A6%E7%9C%8B.png"],
  body.m_home section.index-editor img[src*="影片試看.png"] {
    display: block;
    width: min(100%, 820px) !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* 會員區大型裝飾圖 */
  body.m_home section.index-editor img[src*="%E7%B7%8Bblank.png"],
  body.m_home section.index-editor img[src*="緋blank.png"] {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: 850px !important;
    max-height: 850px !important;
    object-fit: contain;
    margin: 0 auto !important;
  }
}

@media (max-width: 767.98px) {
  body.m_home section.index-editor img[src*="%E8%AC%9B%E7%BE%A9-2-2.png"],
  body.m_home section.index-editor img[src*="%E7%AD%86%E8%A8%98-3.png"],
  body.m_home section.index-editor img[src*="講義-2-2.png"],
  body.m_home section.index-editor img[src*="筆記-3.png"] {
    height: auto !important;
    max-height: 680px !important;
    object-fit: contain;
  }

  body.m_home section.index-editor img[src*="%E5%BD%B1%E7%89%87%E8%A9%A6%E7%9C%8B.png"],
  body.m_home section.index-editor img[src*="影片試看.png"],
  body.m_home section.index-editor img[src*="%E7%B7%8Bblank.png"],
  body.m_home section.index-editor img[src*="緋blank.png"] {
    display: block;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
  }
}

/* 首頁「線上課程特色」：奶油白卡片化與文字層級強化 2026-10-22 */
body.m_home section.index-editor:has(.ion-android-desktop):has(.ion-android-compass):has(.ion-android-calendar) {
  background: #fffdf9 !important;
  padding: 54px 0 48px !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .html-info,
body.m_home section.index-editor:has(.ion-android-desktop) .container {
  background: transparent !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child > .col-md-12 {
  background: transparent !important;
  margin: 0 0 34px !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child .spacer {
  display: none !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child h1 {
  margin: 0 0 14px !important;
  color: #742d3e !important;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif !important;
  font-size: 30px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  line-height: 1.4 !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child h1 + p {
  width: 54px !important;
  margin: 0 auto !important;
  border-color: #b44c55 !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) {
  display: flex;
  gap: 18px;
  margin: 0 !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) > .col-md-4 {
  flex: 1 1 0;
  width: auto !important;
  max-width: none !important;
  min-height: 220px;
  margin: 0 !important;
  padding: 30px 22px 26px !important;
  background: #fff !important;
  border: 1px solid #eadedd;
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(116, 45, 62, .08);
  text-align: center;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) > .col-md-4 > .spacer {
  display: none !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) > .col-md-4 > div:not(.spacer) {
  width: 58px !important;
  height: 58px !important;
  line-height: 58px !important;
  margin: 0 auto 20px !important;
  background: #f8eceb !important;
  border: 1px solid #ead1d1 !important;
  border-radius: 50% !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) i.icon {
  color: #9c3b43 !important;
  font-size: 25px !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) h3 {
  margin: 0 0 10px !important;
  color: #742d3e !important;
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif !important;
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  line-height: 1.5 !important;
}

body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) p {
  margin: 0 !important;
  color: #544b4d !important;
  font-size: 16px !important;
  line-height: 1.75 !important;
}

/* 移除原本突兀的紅色波浪底圖 */
body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:last-child {
  display: none !important;
}

@media (max-width: 767.98px) {
  body.m_home section.index-editor:has(.ion-android-desktop) {
    padding: 42px 0 34px !important;
  }

  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child {
    margin: 0 !important;
  }

  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:first-child h1 {
    font-size: 26px !important;
  }

  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) > .col-md-4 {
    min-height: 0;
    padding: 24px 20px !important;
  }
}

/* 課程特色桌機三卡同列修正 */
@media (min-width: 768px) {
  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 18px !important;
  }

  body.m_home section.index-editor:has(.ion-android-desktop) .container > .row:nth-child(2) > .col-md-4 {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
  }
}

/* 首頁移除大型「成為呂緋國文會員」裝飾區塊 2026-10-22 */
body.m_home section.index-editor:has(img[src*="%E7%B7%8Bblank.png"]),
body.m_home section.index-editor:has(img[src*="緋blank.png"]) {
  display: none !important;
}
}
