:root {
    scroll-padding-top: 110px;
    scroll-behavior: smooth;
    word-break: break-all;
}

/* front-end text sizes */
.html-info.small {
    font-size: 0.9rem;
}

.html-info.small p {
    font-size: 0.9rem;
}

.html-info.middle {
    font-size: 1rem;
}

.html-info.middle p {
    font-size: 1rem;
}

.html-info.large {
    font-size: 1.2rem;
}

.html-info.large p {
    font-size: 1.2rem;
}

.html-info.xlarge {
    font-size: 1.3rem;
}

.html-info.xlarge p {
    font-size: 1.3rem;
}

.blog-row {
    display: block;
}

#index-blog .blog-row {
    display: flex;
}

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

@media (max-width: 600px) {
    .aside-content {
        margin: 0;
    }

    .blog-row .img-fluid {
        width: 100%;
    }

    .middle-title {
        margin-top: 1rem;
    }
}

/*訂閱制方案*/

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;
}

.video-container {
    padding-top: 0;
}

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

/*BLOG TAG區塊加上捲軸*/
.tag-box {
    height: 40vh;
    overflow: auto;
    scrollbar-color: #f1f1f1 #fcfcfc;
    scrollbar-width: thin;
}

/* 捲軸寬度及高度 */
.tag-box::-webkit-scrollbar {
    width: 4px;
    /*右側捲軸寬度*/
}

/* 軌道背景底色 */
.tag-box::-webkit-scrollbar-track {
    background: #fcfcfc;
}

/* 滑桿顏色 */
.tag-box::-webkit-scrollbar-thumb {
    background: #f1f1f1;
}

/* 滑桿滑鼠滑入時的顏色 */
.tag-box::-webkit-scrollbar-thumb:hover {
    background: #f1f1f1;
}

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;
}

/*會員紀錄手機版顯示優化*/
@media screen and (max-width: 768px) {
    .order-row div[data-heading]:before {
        color: #757575;
        content: attr(data-heading);
        display: block;
        line-height: 1;
        margin-bottom: .25rem;
        text-align: left;
        word-break: normal;
        font-size: 0.9rem;
    }

    .order-title {
        display: none;
    }

    .order-row {
        text-align: left;
        background: #f5f5f5;
        padding: 20px;
        border-radius: 8px;
        margin-bottom: 20px;
        line-height: 2;
        font-size: 1rem;

    }

    .order-row div {
        padding: 10px 0;
    }

    .order-row+.order-row {
        border-top: none;
    }
}

/*隱藏文章目錄數字*/
.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;
        line-height: 1.4;
    }
}

/* 購物車加減數量按鈕 不將連續點擊解釋為縮放手勢*/
.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;
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* 響應式調整 */
@media (max-width: 767.98px) {
    .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;
}

/* 自定義課程頁籤樣式 */
.nav-tabs-custom {
    border-bottom: none;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.nav-tabs-custom .nav-item {
    margin-bottom: 0;
}

.nav-tabs-custom .nav-link {
    border: none;
    color: #333;
    padding: 15px 20px;
    position: relative;
    font-weight: 500;
    transition: all 0.3s;
}

.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: 10px 24px 10px 24px;
}

.purchase-number {
    padding: 5px 24px;
    background-color: #eaeaea;
}


.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,
.purchase-number i {
    width: 24px;
}

/* 購買區塊固定樣式 */
.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;
}

/* 課程方案捲軸樣式 */
.sticky-purchase::-webkit-scrollbar {
    width: 4px;
}

.sticky-purchase::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 5px;
}

.sticky-purchase::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: #f1f1f1;
}

.sticky-purchase::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}


/* 小標籤 */
.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;
    }

    .cta-fix-bottom .cta-right {
        text-align: left;
    }

    .tab-menu.fixed {
        top: 67px;
    }
}

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

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

.comment-area .comment-header {
    display: block;
}

/*活動頁改版*/
.quantity-selector {
    display: flex;
    justify-content: center;
}

.quantity-selector .quantity {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 0%;
    flex: 0 0 50%;
    max-width: 50%;
    border: 0;
    text-align: center;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-selector button {
    width: 48px;
    height: 48px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-color);
}

.quantity-selector button:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.text-s {
    font-size: 0.9rem;
}

.quantity-selector input[type="number"] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

.quantity-selector input[type="number"]::-webkit-outer-spin-button,
.quantity-selector input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.quantity-selector input[type="number"]:focus {
    outline: 2px solid #fcfcfc;
    border-radius: 6px;
}

.event-state {
    letter-spacing: 2px;
    font-size: 0.9rem;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    line-height: 1.6;
}

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

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

.back-btn-course {
    border-right: 1px solid #ccc;
}

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

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

/* BEGIN 影片浮水印 */

.video-container {
    position: relative;
    /* display: inline-block; */
    overflow: hidden;
}

.watermark-moving {
    position: absolute;
    top: 0;
    left: 0;
    /* background-color: rgba(255, 255, 255, 0.1); */
    /* color: red; */
    /* font-size: 16px; */
    padding: 10px;
    /* border: 1px solid black; */
    z-index: 9999;
    transition: transform 0.5s ease;
}

/* END 影片浮水印 */

/* 課程詳情頁響應式佈局 - Udemy 風格 */
.course-detail-layout {
    display: flex;
    flex-wrap: wrap;
}

/* 大螢幕：側邊欄在左側 */
.course-sidebar-desktop {
    flex: 0 0 300px;
    max-width: 300px;
    display: block;
}

.course-main-content {
    flex: 1;
    min-width: 0;
}

/* 小螢幕時隱藏左側側邊欄，顯示底部章節 */
.course-chapters-mobile {
    display: none;
}

@media (max-width: 992px) {
    .course-sidebar-desktop {
        display: none;
    }

    .course-chapters-mobile {
        display: block;
        margin-top: 2rem;
        border-top: 1px solid #e0e0e0;
        padding-top: 1.5rem;
    }

    .course-main-content {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* 課程章節列表共用樣式 */
.course-sidebar-desktop .course-chapters-wrapper,
.course-chapters-mobile .course-chapters-wrapper {
    width: 100%;
}

.course-sidebar-desktop .course-aside-content,
.course-chapters-mobile .course-aside-content {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 0;
}

.course-sidebar-desktop .course-title-group,
.course-chapters-mobile .course-title-group {
    padding: 1rem 1.5rem;
    background: #f7f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.course-sidebar-desktop .course-title-group h2,
.course-chapters-mobile .course-title-group h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.course-sidebar-desktop .course-aside,
.course-chapters-mobile .course-aside {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-sidebar-desktop .course-aside > li,
.course-chapters-mobile .course-aside > li {
    border-bottom: 1px solid #e0e0e0;
}

.course-sidebar-desktop .course-aside > li:last-child,
.course-chapters-mobile .course-aside > li:last-child {
    border-bottom: none;
}

.course-sidebar-desktop .course-aside > li > a,
.course-chapters-mobile .course-aside > li > a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f7f9fa;
    transition: background 0.2s;
}

.course-sidebar-desktop .course-aside > li > a:hover,
.course-chapters-mobile .course-aside > li > a:hover {
    background: #e8e8e8;
}

.course-sidebar-desktop .course-aside .collapse,
.course-sidebar-desktop .course-aside .collapsing,
.course-chapters-mobile .course-aside .collapse,
.course-chapters-mobile .course-aside .collapsing {
    background: #fff;
}

.course-sidebar-desktop .course-aside .collapse a,
.course-sidebar-desktop .course-aside .collapsing a,
.course-chapters-mobile .course-aside .collapse a,
.course-chapters-mobile .course-aside .collapsing a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem 0.75rem 2.5rem;
    border-top: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.course-sidebar-desktop .course-aside .collapse a:hover,
.course-sidebar-desktop .course-aside .collapsing a:hover,
.course-chapters-mobile .course-aside .collapse a:hover,
.course-chapters-mobile .course-aside .collapsing a:hover {
    background: #f7f9fa;
}
/* END 課程詳情頁響應式佈局 */

/* 課程詳情頁按鈕響應式調整 */
.display-footer {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 768px) {
    .display-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .display-footer .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .course-content {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 480px) {
    .display-footer {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
        height: auto;
        min-height: 4.5rem;
    }

    .display-footer .btn {
        flex: 1 1 auto;
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
/* END 課程詳情頁按鈕響應式調整 */

/* ================================================
   模擬登入提示條 (Impersonate Bar)
   ================================================ */
#impersonate-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100000; /* 高於 admin-preview-bar 的 99999 */
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 20px;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

#impersonate-bar a {
    color: white;
    margin-left: 15px;
    background: rgba(0,0,0,0.3);
    padding: 5px 15px;
    border-radius: 3px;
    text-decoration: none;
}

#impersonate-bar a:hover {
    background: rgba(0,0,0,0.5);
    color: white;
    text-decoration: none;
}

/* 當 impersonate bar 存在時，調整頁面 */
body.has-impersonate-bar {
    padding-top: 45px !important;
}

body.has-impersonate-bar .pc-menu,
body.has-impersonate-bar .mobile-menu,
body.has-impersonate-bar .tholos-navbar {
    top: 45px !important;
}

/* 當 admin bar 也存在時，impersonate bar 需要額外空間 */
body.has-impersonate-bar.has-admin-bar {
    padding-top: 77px !important; /* 45px + 32px */
}

body.has-impersonate-bar.has-admin-bar #impersonate-bar {
    top: 32px; /* admin bar 高度 */
}

body.has-impersonate-bar.has-admin-bar .pc-menu,
body.has-impersonate-bar.has-admin-bar .mobile-menu,
body.has-impersonate-bar.has-admin-bar .tholos-navbar {
    top: 77px !important; /* 32px admin bar + 45px impersonate bar */
}
/* END 模擬登入提示條 */

/* 當只有 admin bar 存在時（無 impersonate bar） */
body.has-admin-bar .fixed-top,
body.has-admin-bar .pc-menu,
body.has-admin-bar .mobile-menu,
body.has-admin-bar .tholos-navbar {
    top: 32px !important;
}