/*影片播放器*/
.video-js .vjs-play-progress:before {
    top: 0;
}

/*訂閱制方案*/

input[type=checkbox]#plan-switch {
    height: 0;
    width: 0;
    visibility: hidden;
}

label.plan-switch {
    cursor: pointer;
    width: 100px;
    height: 40px;
    display: block;
    border-radius: 50px;
    position: relative;
    margin: 20px auto;
}

label.plan-switch {
    background: #d69f35;
}

label.plan-switch::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 30px;
    height: 30px;
    border-radius: 40px;
    transition: 0.3s;
}

label.plan-switch::after {
    background: #fff;
}

.switch-txt {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 40px;
    font-size: 0.9rem;
    padding: 0 5px;
}

.switch-txt::before,
.switch-txt::after {
    display: block;
    font-weight: bold;
    box-sizing: border-box;
    opacity: 0;
}

.switch-txt::before,
.switch-txt::after {
    color: #fff;
}

.switch-txt::before {
    content: attr(choosemoon);
}

.switch-txt::after {
    content: attr(chooseyear);
}

input#plan-switch:checked+label {
    background: #666;
}

input#plan-switch:checked+label .switch-txt::before {
    opacity: 1;
}

input#plan-switch:checked+label .switch-txt::after {
    opacity: 0;
}

input#plan-switch+label .switch-txt::after {
    opacity: 1;
}

label.plan-switch:active::after {
    width: 50px;
}

input#plan-switch:checked+label::after {
    left: calc(100% - 5px);
    transform: translateX(-100%);
}

.plan-features {
    align-items: stretch;
    justify-content: space-between;
}

.plan-features ul {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.plan-features h6 {
    display: none;
}

.plan-features .best-plan h6 {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    position: absolute;
    left: 10px;
    top: -18px;
}

.plan-features .best-plan h6 {
    background: #d69f35;
    color: #fff;
}

.card-header.best-plan {
    background: #666;
    color: #fff;
}

.plan-features .card {
    padding-right: 0;
    padding-left: 0;
    max-width: 32%;
}

.plan-features li i {
    font-size: 0.8rem;
    color: #B93F23;
}

.plan-description {
    max-width: 800px;
    padding: 0px 10px;
    display: inline-block;
}

.plan-features .text-muted {
    font-size: 0.9rem;
    display: inline-block;
    margin-left: 5px;
}

.plan-features h3 {
    font-weight: bold;
    font-size: 2.4rem;
    margin-bottom: 0;
}

.plan-price-info {
    text-align: center;
    font-size: 0.9rem;
}

.plan-price-info {
    color: #999;
}

.plan-price-info b {
    text-decoration: line-through;
    margin-right: 5px;
}

.number-font {
    font-family: "Heiti TC", "Open Sans", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@media all and (max-width: 700px) {

    .plan-features .card {
        max-width: 90%;
    }

    .plan-features {
        justify-content: center;
    }

}

/*訂閱專屬css*/
.members-only {
    border-radius: 10px;
    padding: 30px 20px 15px;
    margin: 30px 0 20px;
    text-align: center;
    position: relative;
}

.members-only {
    background-color: #f0f0ef;
    border: 1px solid #dfdfdf;
    color: #333;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.members-only::before {
    content: "訂閱專屬";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 4px 12px 4px 32px;
    font-size: 0.9em;
    border-radius: 20px;
    white-space: nowrap;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='16' height='16'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 10px center;
    background-size: 16px;
    z-index: 1;
}

@media screen and (max-width: 480px) {
    .members-only {
        padding-top: 25px;
    }

    .members-only::before {
        top: -10px;
        font-size: 0.8em;
        padding: 3px 10px 3px 28px;
        background-size: 14px;
        background-position: 8px center;
    }
}

/*video 預覽圖*/
.intro_video_img {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-top: 1rem;
    background: #000;
}

.intro_video_img img {
    height: auto;
    width: 100%;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    margin: auto;
}

/*帳號註冊說明*/
.login-info {
    border-bottom: 1px solid #f2f2f2;
    line-height: 1.8;
}

/*BLOG TAG區塊加上捲軸（捲軸樣式用全站預設 common/base/_scrollbar.scss）*/
.tag-box {
    height: 40vh;
    overflow: auto;
}

/* 側欄標籤（部落格、課程、商品等列表）統一灰底白字。
   跟六套佈景 theme/_components.scss 的 aside .tag-group > .article-tag 同權重、本檔較晚載入，所以佈景自己的標籤顏色不會生效；
   刻意維持：D 佈景的設定是白字配淺灰底（約 1.3:1），讓佈景顏色生效會看不清楚（2026-10-04 確認）。
   部落格的標籤外面多包一層 .tag-box，不是 aside .tag-group 的子元素，間距也只有下面這條套得到 */
aside .tag-group .article-tag {
    background-color: #afafaf;
    color: #fff;
}

aside .tag-group .article-tag {
    margin-top: 10px;
    font-size: 0.8rem;
    display: inline-block;
    margin-left: 5px;
    padding: 2px 5px;
}

/*隱藏文章目錄數字*/
.article-category.no-number ol>li::before {
    content: " ";
    counter-increment: none;
}

/*404優化*/
section.style404 {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 500px;
}

.style404 .title {
    font-size: 8rem;
    letter-spacing: 10px;
    line-height: 1.2;
    font-weight: bold;
    padding: 0;
}

.style404 .title {
    color: #999;
}

.style404 .title span {
    display: block;
    margin: 10px auto;
    font-size: 2rem;
    position: relative;
    left: 10px;
    letter-spacing: 20px;
}

@media (max-width: 768px) {
    section.style404 {
        padding-top: 2rem;
        height: 60vh;
        min-height: 400px;
    }
}

/*social Proof CSS*/
.socialproof {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    background: white;
    padding: 10px 16px;
    padding-right: 40px;
    border-radius: 100px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 360px;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.socialproof.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.socialproof.hide {
    transform: translateX(-100%);
    opacity: 0;
    visibility: hidden;
}

.socialproof-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 16px;
}

.socialproof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.socialproof-text {
    flex: 1;
    font-family: "Noto Sans", sans-serif;
    min-width: 0;
}

.socialproof-message {
    display: block;
    color: #1F2937;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 2px;
}

.socialproof-message strong {
    font-weight: 600;
}

.socialproof-time {
    display: block;
    color: #666;
    font-size: 0.8rem;
}

.socialproof-close-button {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: color 0.3s ease;
}

.socialproof-close-button:hover {
    color: #4B5563;
}

@media screen and (max-width:400px) {
    .socialproof {
        max-width: 300px;
        left: 10px;
    }

    .socialproof-avatar {
        width: 36px;
        height: 36px;
        margin-right: 10px;
    }

    .socialproof-message {
        font-size: 0.8rem;
    }
}

/* 購物車加減數量按鈕 不將連續點擊解釋為縮放手勢*/
.counter-group button {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/*常用收件人功能*/
#recipientModal .modal-header {
    border-bottom: 0px;
}

#recipientModal .modal-footer {
    border-top: 0px;
}

#saveRecipientBtn {
    top: 4px;
}

/* 收件人容器 */
.recipient-container {
    position: relative;
    max-height: 500px;
    overflow-y: auto;
}

/* 收件人卡片樣式 */
.recipient-item.card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    transition: background 0.2s;
}

.recipient-item.card:hover {
    background: #f9f9f9;
}

/* 收件人選擇區塊 */
.recipient-select {
    width: 25px;
    display: flex;
    align-items: center;
    margin-right: 12px;
    height: 24px;
}

.recipient-radio {
    transform: scale(1.25);
    cursor: pointer;
    position: relative;
    top: 3px;
}

/* 收件人資訊區塊 */
.recipient-info {
    padding-right: 15px;
}

.recipient-name {
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
    display: block;
}

/* 收件人操作區塊 */
.recipient-actions .btn-link {
    font-weight: 500;
    text-decoration: none;
}

.recipient-actions .btn-link:focus {
    box-shadow: none;
}

/* 設為預設按鈕樣式 */
.set-default-btn {
    font-weight: 500;
    font-size: 0.95rem;
    color: #666;
    border-radius: 20px;
    border: 1px solid #666;
    padding: 2px 10px;
    background-color: #fff;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

.set-default-btn.default-state {
    background-color: #666;
    color: #fff;
}

.set-default-btn.default-state i {
    color: #fff;
}

.set-default-btn:hover {
    background-color: #666;
    color: #fff;
}

/* 新增收件人表單 */
#addRecipientForm {
    animation: recipientFadeIn 0.3s;
    background-color: #f9f9f9;
}

/* 名稱不能用 fadeIn：會蓋掉 animate.css（主題 main.css）的同名動畫，全站 .fadeIn 都多一段往上滑 */
@keyframes recipientFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 響應式調整 */
@media (max-width: 767.98px) {
    /* 全站彈窗（不只收件人）：common/modal/_course.scss 讓 ≥576px 的 .modal-dialog 最寬 700px，
       576–767px 的手機橫放／小平板會左右貼齊螢幕邊；這裡改成留邊、置中 */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: 95%;
    }

    .recipient-info {
        padding-left: 32px;
        padding-right: 0;
        margin-bottom: 10px;
    }

    .recipient-actions {
        padding-left: 32px;
        width: 100%;
    }

    .recipient-select {
        position: absolute;
    }

    .set-default-btn {
        display: inline-block;
        margin-bottom: 0;
        margin-right: 8px;
    }

    .recipient-item .card-body {
        padding: 12px;
    }

    .recipient-actions .d-flex {
        flex-wrap: wrap;
    }
}

/*新課程頁面暫存樣式*/
/* 內容區域樣式 */
.section-container {
    padding: 50px 0;
}

/* 課程縮圖樣式 */
.course-thumbnail {
    width: 120px;
    height: 80px;
    position: relative;
    flex-shrink: 0;
}

/* 課程選單樣式 - 使用 sticky 定位 */
.tab-menu {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 90;
}

/* 自定義課程頁籤樣式 — 一律單列，塞不下就左右捲動（未來加 tab 也不換行） */
.nav-tabs-custom {
    border-bottom: none;
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    /* iOS 慣性捲動；隱藏捲軸用 HTML 上的 .scroll-hidden（common/base/_scrollbar.scss） */
}

.nav-tabs-custom .nav-item {
    margin-bottom: 0;
    flex: 0 0 auto;
    /* 不被壓縮、不折行 */
}

.nav-tabs-custom .nav-link {
    border: none;
    color: #333;
    padding: 15px 20px;
    position: relative;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap !important;
    /* 擋掉主題可能的斷字，強制不換行 */
}

/* 手機頁籤縮小左右間距，四個頁籤盡量一排塞得下，塞不下才橫向捲動 */
@media (max-width: 767.98px) {
    .nav-tabs-custom .nav-link {
        padding: 12px 10px;
        font-size: 15px;
    }
}

.nav-tabs-custom .nav-link:hover {
    color: var(--primary-color);
}

.nav-tabs-custom .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
}

.nav-tabs-custom .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
}

.purchase-block {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    background: #fff;
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.purchase-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.purchase-img-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.purchase-img-top {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.5s;
}

.purchase-block:hover .purchase-img-top {
    transform: scale(1.05);
}

.purchase-block .price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.purchase-content {
    padding: 24px 24px 16px 24px;
}


.course-item a {
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 8px;
    color: #333;
}

.course-info {
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    height: 55px;
    padding: 0 5px;
}

.course-info span {
    font-size: 0.9rem;
}

.course-info-list {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.8;
}

.course-info-list i {
    width: 24px;
}

.course-info-list li {
    margin-bottom: 5px;
}

/* 購買區塊固定樣式 */
.sticky-purchase-wrapper {
    position: relative;
}

.sticky-purchase {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    position: sticky;
    top: 70px;
    /* 頁籤選單高度 + 間距 */
    z-index: 99;
    padding-right: 8px;
    padding-left: 8px;
    /* 捲軸樣式用全站預設 common/base/_scrollbar.scss */
}


/* 小標籤 */
.badge-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    font-weight: 500;
    padding: 0.5em 1em;
    font-size: 0.85rem;
}

.badge-outline-primary:hover {
    color: #fff;
    background: var(--primary-color);
}

.course-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.course-instructor {
    display: flex;
    align-items: center;
}

.instructor-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 響應式 */
@media (max-width: 991.98px) {
    .sticky-purchase {
        position: static;
        max-height: none;
        overflow-y: visible;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 30px 0;
    }

    .purchase-block {
        margin: 15px 0;
    }
}

/*活動頁改版*/
.event-state {
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.fa-location-dot {
    position: relative;
    left: 1px;
}

/* BEGIN 影片浮水印 */

.watermark-moving {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px;
    z-index: 9999;
    transition: transform 0.5s ease;
}

/* 帶浮水印播放器的自訂全螢幕鈕(桌機/Android/iPad;iPhone 用 Bunny 原生全螢幕) */
.wm-fs-btn {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 10000;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 16px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.wm-fs-btn:hover {
    opacity: 1;
}

/* 容器進全螢幕時:iframe 填滿、浮水印疊在上面持續飄移。
   三種寫法分開寫：瀏覽器只要不認得選擇器清單裡的一個（Firefox 不認得 :-webkit-full-screen），整條規則都會被丟掉 */
#video-container:fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-container:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-container.is-fullscreen {
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#video-container:fullscreen>div[style*="padding-top"] {
    width: 100%;
}

#video-container:-webkit-full-screen>div[style*="padding-top"] {
    width: 100%;
}

#video-container.is-fullscreen>div[style*="padding-top"] {
    width: 100%;
}

/* END 影片浮水印 */

/* ==========================================================
   CLS (Cumulative Layout Shift) Fix
   ========================================================== */

/* ----------------------------------------------------------
   1. Image Containers - aspect-ratio + object-fit
   ---------------------------------------------------------- */

/* Mini product (collection / cart) */
.mini-productImg {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.mini-productImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ----------------------------------------------------------
   2. Slick Carousel - reserve space before init
   ---------------------------------------------------------- */
.col4-slider,
.col3-slider,
.col2-slider,
.index-slider,
.pakage-slider-container {
    min-height: 200px;
}

@media (max-width: 768px) {

    .col4-slider,
    .col3-slider,
    .col2-slider,
    .index-slider,
    .pakage-slider-container {
        min-height: 150px;
    }
}

/* ----------------------------------------------------------
   3. Search Results
   ---------------------------------------------------------- */
.search-results {
    padding: 30px 0 60px;
}

.search-summary {
    color: #666;
    margin-bottom: 24px;
}

.search-empty {
    padding: 40px 0;
    text-align: center;
    color: #999;
}

.search-item {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.search-item-image {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    overflow: hidden;
    border-radius: 4px;
}

.search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-item-content {
    flex: 1;
    min-width: 0;
}

.search-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.search-item-title {
    font-size: 18px;
    margin: 0;
    color: #333;
}

.search-item:hover .search-item-title {
    color: var(--header-link-hover-color);
}

.search-item-desc {
    font-size: 14px;
    color: #777;
    margin: 0;
    line-height: 1.6;
}

.search-type-badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
    color: #fff;
    flex-shrink: 0;
}

.search-type-article {
    background-color: #3b82f6;
}

.search-type-event {
    background-color: #22c55e;
}

.search-type-course {
    background-color: #f59e0b;
}

.search-type-product {
    background-color: #ec4899;
}

@media (max-width: 576px) {
    .search-item-image {
        width: 80px;
        height: 60px;
    }

    .search-item-title {
        font-size: 16px;
    }
}

/* ----------------------------------------------------------
   4. Weebly 匯入內容相容（wsite-*）
   匯入器搬 HTML 不搬 Weebly CSS，這裡補基本樣式與手機摺欄；
   非 Weebly 匯入站不會出現這些 class，零影響。
   ---------------------------------------------------------- */
.wsite-multicol-table-wrap {
    overflow: hidden;
}

.wsite-multicol-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.wsite-multicol-col {
    vertical-align: top;
}

.wsite-multicol-col img,
.wsite-image img {
    max-width: 100%;
    height: auto;
}

.wsite-image {
    padding: 10px 0;
    text-align: center;
}

.wsite-image-border-none img {
    border: 0;
}

.wsite-button {
    display: inline-block;
    padding: 10px 26px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #333;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1.4;
    transition: opacity .2s;
}

.wsite-button:hover {
    opacity: .8;
}

.wsite-button-small {
    padding: 6px 16px;
    font-size: 14px;
}

.wsite-spacer {
    width: 100%;
    overflow: hidden;
}

.wsite-youtube-container iframe {
    display: block;
    margin: 0 auto;
}

/* Weebly 輪播轉換後的相簿：橫向滑動 + scroll-snap，免 JS */
.weebly-slideshow {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin: 10px 0;
}

.weebly-slideshow img {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    object-fit: contain;
    scroll-snap-align: center;
}

@media (max-width: 767px) {
    .wsite-multicol-table-wrap {
        margin: 0 !important;
    }

    .wsite-multicol-table,
    .wsite-multicol-tbody,
    .wsite-multicol-tr,
    .wsite-multicol-col {
        display: block;
        width: 100% !important;
    }

    .wsite-multicol-col {
        padding: 0 0 15px !important;
    }

    .wsite-youtube-container iframe {
        min-height: 0 !important;
    }
}

/* ===== Bootstrap primary → 全站主色 =====
 * Bootstrap 4 編譯出的 .btn-primary / .badge-primary / .bg-primary / .text-primary
 * 都是硬編碼 #007bff（出廠預設藍），沒接到主題主色。此處全域覆蓋，讓所有
 * 「primary」語意元件改吃 --primary-color（A–F 主題皆有定義）。
 * 只動 primary；info / secondary / 連結等語意色不受影響，需要藍色仍可用 .btn-info。
 * hover/active 用 color-mix 加深（全站主題已在用 color-mix）。 */
:root {
    /* 讓任何以 var(--primary) 取用的元件（含討論區）也吃主色 */
    --primary: var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.show>.btn-primary.dropdown-toggle {
    background-color: color-mix(in srgb, var(--primary-color), #000 12%);
    border-color: color-mix(in srgb, var(--primary-color), #000 15%);
}

.btn-primary.disabled,
.btn-primary:disabled {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.badge-primary {
    background-color: var(--primary-color);
}

a.badge-primary:hover,
a.badge-primary:focus {
    background-color: color-mix(in srgb, var(--primary-color), #000 15%);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn {
    padding: 8px 10px;
}

.input-group-append .btn {
    padding: 0.375rem 0.75rem;
}

.article-img {
    text-align: center;
    margin-bottom: 10px;
}

.badge {
    font-size: 0.75rem;
    font-weight: 500;
}

/* 課程卡片角標：後台課程「卡片角標」欄位（course_list.label_text）有值時，
   壓在卡片圖片左上角。只針對課程卡片限定範圍，避免影響其他 .img-box 版型。 */
.course-block .img-box {
    position: relative;
}

.course-block .img-box .box-tag {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: inline-block;
    padding: 0 6px;
    background: linear-gradient(45deg, #ea4b1c, #f09819);
    border-radius: 6px 0 6px 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.6;
}
/* ------------------------------------------------------------------
   側邊欄位置與隱藏（外觀樣式設定 → 側邊欄位置／隱藏側邊欄的頁面）

   主題 main.css（12 套）早就有 .left-style/.right-style 的外框樣式，但它的
   order 規則認的是 .aside-menu/.aside-inner，現行 view 用的是 #tab-side/#tab-home
   → order 永遠不生效。這裡補上等效規則，不動主題樣板（main.css 會被
   generate_main_css_template() 重產）。

   ≤992px 側欄本來就隱藏（分類改走上方膠囊列），所以位置規則只在桌面生效。
   側欄靠右時 aside 的框線與左右內距在 common/components/_sidebar.scss（.aside-content.right-style aside）。
   設計紀錄：docs/sidebar_visibility_and_position_plan.md
   ------------------------------------------------------------------ */
@media (min-width: 993px) {
    .aside-content.right-style > #tab-side {
        order: 1;
    }

    .aside-content.right-style > #tab-home {
        order: 0;
    }
}

/* 側欄隱藏：內容區撐滿整列（用 col 的模組本來就會自動撐滿，這裡保險） */
.aside-content.no-aside > #tab-home {
    flex: 0 0 100%;
    max-width: 100%;
}

/* 文章語音播放器（後台「文章轉語音」產生；front/blog/detail.php）。
   顏色一律用 currentColor / 透明度，讓 12 個佈景各自的字色與底色自然套上，不寫死色碼。 */
.article-audio-player {
    margin: 0 0 1.5rem;
    padding: .9rem 1rem;
    border: 1px solid rgba(128, 128, 128, .3);
    border-radius: .5rem;
    background: rgba(128, 128, 128, .07);
}
.article-audio-player__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .5rem;
    font-size: .95rem;
}
.article-audio-player__title {
    font-weight: 600;
}
.article-audio-player__duration {
    opacity: .6;
    font-size: .85rem;
}
.article-audio-player__speed {
    margin-left: auto;
    display: flex;
    gap: .25rem;
}
.article-audio-player__speed button {
    border: 1px solid rgba(128, 128, 128, .5);
    background: transparent;
    color: inherit;
    border-radius: .25rem;
    padding: .1rem .5rem;
    font-size: .8rem;
    line-height: 1.4;
    cursor: pointer;
    opacity: .75;
}
.article-audio-player__speed button.active {
    opacity: 1;
    font-weight: 700;
    border-color: currentColor;
    box-shadow: inset 0 0 0 1px currentColor;
}
.article-audio-player audio {
    display: block;
    width: 100%;
    height: 36px;
}

/* 內容區（區塊編輯器）的文字連結跟網站連結色同步。
   編輯器樣式 content-front.min.css 把 .html-info 裡的連結寫死成青綠 #009e91，後台設的「連結顏色」在內容區無效。
   只管沒有 class 的文字連結：按鈕（.btn-full、.btn-border、.is-btn…）都帶 class，維持原本的按鈕顏色；
   權重同編輯器那條（:where 不加權），客戶自訂CSS 仍可蓋過。滑過時佈景的 a:hover 本來就會套網站的滑過色（2026-10-01） */
.html-info :where(a:not([class])) {
    color: var(--link-color);
}

/* ===== 內容頁版面（外觀樣式設定、自訂聯絡我們區塊）=====
   body 的 layout-* class 由 get_content_layout_body_classes()（theme_helper.php）依勾選加上，沒勾就沒有 class、這段不生效。
   範圍：首頁的編輯區塊（section.index-editor）、空白頁、聯絡我們、關於我們／服務項目內頁；部落格、課程、商品等不會帶這些 class。
   設計見 docs/content_page_layout_plan.md（2026-10-02） */

/* 不加佈景間距：佈景對所有 section、所有 .row 加上下 padding，.html-info 加下方 margin；區塊編輯器每一列都是 .row，每列疊一次。
   首頁只動編輯區塊（:not(.m_home) 避開首頁其他區塊）；空白頁裡的區塊也是 .index-editor */
body.layout-no-spacing section.index-editor,
body.layout-no-spacing:not(.m_home) #pjax-container section {
    padding-top: 0;
    padding-bottom: 0;
}
body.layout-no-spacing section.index-editor .html-info,
body.layout-no-spacing:not(.m_home) #pjax-container .html-info {
    margin-bottom: 0;
}
body.layout-no-spacing section.index-editor .html-info .row,
body.layout-no-spacing:not(.m_home) #pjax-container .html-info .row,
body.layout-no-spacing.b_contact_detail #pjax-container main .row {
    padding-top: 0;
    padding-bottom: 0;
}

/* 圖片不加上下間距：區塊編輯器的 .html-info .container img{margin:1.4rem 0 1rem}，只拿掉上下、保留左右置中 */
body.layout-no-image-margin section.index-editor .html-info .container img,
body.layout-no-image-margin:not(.m_home) #pjax-container .html-info .container img {
    margin-top: 0;
    margin-bottom: 0;
}

/* 聯絡我們滿版：說明內容撐滿，表單維持在中間、原本的寬度（外框 960／1140／1320 的 7/12） */
body.layout-full-width.b_contact_detail #pjax-container main > .container {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}
body.layout-full-width.b_contact_detail #pjax-container main > .container > .row {
    margin-left: 0;
    margin-right: 0;
}
body.layout-full-width.b_contact_detail #pjax-container main > .container > .row > .col-md-12 {
    padding-left: 0;
    padding-right: 0;
}
@media (min-width: 992px) {
    body.layout-full-width.b_contact_detail #pjax-container main > .container > .row > .col-lg-7 { max-width: 560px; }
}
@media (min-width: 1200px) {
    body.layout-full-width.b_contact_detail #pjax-container main > .container > .row > .col-lg-7 { max-width: 665px; }
}
@media (min-width: 1400px) {
    body.layout-full-width.b_contact_detail #pjax-container main > .container > .row > .col-lg-7 { max-width: 770px; }
}
