﻿/* ==========================================================================
   1. 全站基礎與字體設定
   ========================================================================== */
body, main, .news_class {
    font-family: "Microsoft JhengHei", "微軟正黑體", Tahoma, sans-serif;
    background-color: #fffdf7;
    margin: 0;
    padding: 0;
}

a, a:hover {
    text-decoration: none;
}

/* ==========================================================================
   2. 搜尋框 placeholder 樣式
   ========================================================================== */
.st-default-search-input::-webkit-input-placeholder {
    font-size: 11px !important;
    color: #b7a89a !important;
    font-weight: normal !important;
}

.st-default-search-input::-moz-placeholder {
    font-size: 11px !important;
    color: #b7a89a !important;
    font-weight: normal !important;
    opacity: 1;
}

.st-default-search-input:-ms-input-placeholder {
    font-size: 11px !important;
    color: #b7a89a !important;
    font-weight: normal !important;
}

.st-default-search-input::-ms-input-placeholder {
    font-size: 11px !important;
    color: #b7a89a !important;
    font-weight: normal !important;
}

.st-default-search-input::placeholder {
    font-size: 11px !important;
    color: #b7a89a !important;
    font-weight: normal !important;
}

/* ==========================================================================
   3. 搜尋按鈕
   ========================================================================== */
#Web_Menu_Basic_but_Search, .searchbox .btn {
    font-size: 12px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    background-color: #f47b20 !important;
    border: none !important;
    padding: 0 15px !important;
    height: 34px;
    margin: 0 !important;
}

/* ==========================================================================
   4. 頂部會員導覽列 (link-list)
   ========================================================================== */
.link-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}

    .link-list li {
        border-right: 1px solid #d8c6b4 !important;
        padding: 0 12px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

        .link-list li:last-child {
            border-right: none !important;
        }

        .link-list li a {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            text-decoration: none;
            gap: 5px;
        }

        .link-list li .menu-icon-img {
            width: 22px !important;
            height: 22px !important;
            object-fit: contain !important;
            display: block;
            margin: 0 auto !important;
            flex-shrink: 0;
        }

        .link-list li span.name {
            font-size: 12px !important;
            font-weight: bold !important;
            color: #633926 !important;
            font-family: "Tahoma", "Microsoft JhengHei", sans-serif !important;
            line-height: 1.2;
            text-align: center;
            display: block;
        }

        .link-list li i {
            color: #f47b20 !important;
            font-size: 18px !important;
        }

/* ==========================================================================
   5. 導覽列 (nav-bar)
   ========================================================================== */
.nav-bar {
    background: #f47b20 !important;
    border: none !important;
    border-bottom: 1px solid #d8c6b4 !important;
}

    .nav-bar .site-nav > li > a {
        font-size: 13.5px !important;
        font-weight: bold !important;
        color: #ffffff !important;
        padding: 14px 15px !important;
    }

    .nav-bar .site-nav > li > span {
        background: transparent !important;
        color: #ffffff !important;
    }

/* ==========================================================================
   6. 區塊共用：標題列 & 查看全部連結
   ========================================================================== */
.section-bg-light {
    background-color: #fff9ed !important;
    padding: 40px 0;
}

.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #e8dbcc;
    padding-bottom: 10px;
}

.section-title {
    font-size: 21.5px;
    font-weight: bold;
    color: #3b3b3b;
    display: flex;
    align-items: center;
    margin: 0;
}

    .section-title img {
        height: 30px;
        margin-right: 10px;
    }

    .section-title .sub-title {
        font-size: 14px;
        font-weight: normal;
        color: #666;
        margin-left: 15px;
    }

.view-all-link,
.view-all {
    font-size: 13.5px !important;
    color: #3b3b3b !important;
    text-decoration: none;
    font-weight: bold;
}

    .view-all-link:hover,
    .view-all:hover {
        color: #f47b20 !important;
    }

/* ==========================================================================
   7. 理善推薦課程區塊
   ========================================================================== */
.recommend-section {
    background-color: #fff9ed !important;
    padding: 30px 20px;
    margin-bottom: 40px;
    border-radius: 8px;
}

/* ==========================================================================
   8. 課程網格 (3 欄 Grid)
   ========================================================================== */
.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch; /* 讓同排卡片等高 */
}

/* ==========================================================================
   9. 課程卡片 — 核心：底部價格對齊
   ========================================================================== */
.course-card {
    background-color: #ffffff;
    border: 1px solid #e8dbcc;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s;
    /* Flex：讓內部 a 標籤可以撐滿整張卡片高度 */
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .course-card:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        transform: translateY(-4px);
    }

    /* a 標籤撐滿卡片 */
    .course-card > a {
        display: flex !important;
        flex-direction: column;
        height: 100%;
        flex: 1;
        text-decoration: none;
        color: inherit;
    }

/* ==========================================================================
   10. 課程卡片圖片
   ========================================================================== */
.card-img-box img {
    width: 100%;
    aspect-ratio: 120 / 58;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   11. 課程卡片內文 (card-body)
   ========================================================================== */
.card-body {
    padding: 15px;
    color: #3b3b3b;
    text-align: left;
    /* Flex：讓描述文字撐開、價格推到底部 */
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* 課程名稱 */
.course-title {
    font-size: 15px;
    font-weight: bold;
    color: #3b3b3b;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

/* 課程說明 — flex:1 撐開，把下方內容推走 */
.course-desc {
    font-size: 9.5px !important;
    font-weight: bold !important;
    color: #3b3b3b !important;
    line-height: 1.5 !important;
    margin-bottom: 12px;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /*flex: 1;*/ /* 關鍵：撐開此區，讓時數/講師/價格都往底部靠 */
}

/* 課程時數 */
.course-hours {
    font-size: 11px;
    font-weight: bold;
    color: #3b3b3b;
    margin-bottom: 5px;
}

/* 講師資訊 */
.course-teacher {
    font-size: 13.5px;
    font-weight: bold;
    color: #3b3b3b;
    margin-bottom: 0; /* 由 price-box 的 margin-top 控制間距 */
}

/* ==========================================================================
   12. 價格區塊 — 固定在卡片底部
   ========================================================================== */
.course-price-box {
    margin-top: auto; /* 關鍵：把價格推到最底部 */
    padding-top: 10px;
    border-top: 1px dashed #e8dbcc;
}

.price-original {
    font-size: 13.5px;
    color: #7a7a7a;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.price-special {
    font-size: 15px;
    font-weight: bold;
    color: #ff3131;
}

/* ==========================================================================
   13. 現場班 / 直播班 / 錄播課 外框區塊
   ========================================================================== */
.course-section-wrapper {
    margin-bottom: 40px;
}

.section-card-box {
    background-color: #fff9ed;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 40px;
}

/* ==========================================================================
   14. 依學習方式選課區塊
   ========================================================================== */
.learning-mode-section {
    background-color: #fff9ed !important;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 40px;
}

.learning-mode-title {
    font-size: 21.5px !important;
    font-weight: bold !important;
    color: #3b3b3b !important;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

    .learning-mode-title .star-icon {
        font-size: 18px;
    }

.learning-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.learning-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.learning-icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.learning-icon-box2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

    .learning-icon-box img {
        height: 45px;
        width: auto;
    }

    .learning-icon-box2 img {
        height: 45px;
        width: auto;
    }

.learning-badge {
    font-size: 30px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    padding: 5px 25px;
    border-radius: 30px;
    line-height: 1.2;
}

.badge-blue {
    background-color: #49729a !important;
}

.badge-orange {
    background-color: #f47b20 !important;
}

.badge-yellow {
    background-color: #ffc928 !important;
}

.learning-desc {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #3b3b3b !important;
    margin-bottom: 5px;
}

.learning-link {
    font-size: 15px !important;
    font-weight: bold !important;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

    .learning-link:hover {
        opacity: 0.7;
    }

.link-blue {
    color: #49729a !important;
}

.link-orange {
    color: #f47b20 !important;
}

/* ==========================================================================
   15. 影音說課區塊
   ========================================================================== */
.video-section-wrapper {
    margin: 30px auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.video-block .block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.video-block .block-title {
    font-size: 21.5px;
    font-weight: bold;
    color: #3b3b3b;
}

.video-block .block-more {
    font-size: 13.5px;
    color: #3b3b3b;
    text-decoration: none;
}

.video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.video-card-item {
    width: calc(33.333% - 14px);
    box-sizing: border-box;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 56.25%;
    border: 2px solid #f47b20;
    border-radius: 6px;
    overflow: hidden;
    background-color: #000;
    box-sizing: border-box;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }

/* ==========================================================================
   16. 理善講師區塊
   ========================================================================== */
.teacher-block {
    width: 100%;
    margin-top: 30px;
    box-sizing: border-box;
}

    .teacher-block .block-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .teacher-block .block-title {
        font-size: 21.5px;
        font-weight: bold;
        color: #3b3b3b;
    }

        .teacher-block .block-title .star-icon {
            color: #ffc928;
            margin-right: 8px;
        }

    .teacher-block .block-more {
        font-size: 13.5px;
        color: #3b3b3b;
        text-decoration: none;
    }

.teacher-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
    padding-bottom: 2%;
}

.teacher-card-item {
    background-color: #ffffff;
    border: 1px solid #ebc9a8;
    border-radius: 8px;
    width: calc(25% - 11.25px);
    box-sizing: border-box;
    overflow: hidden;
    padding: 15px;
}

.teacher-card-link {
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.teacher-img-box {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    background-color: #f0f0f0;
}

    .teacher-img-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.teacher-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
    overflow: hidden;
}

    .teacher-info .teacher-name {
        font-size: 13.5px;
        font-weight: bold;
        color: #246e9e;
        margin-bottom: 2px;
    }

    .teacher-info .teacher-title {
        font-size: 11px;
        font-weight: bold;
        color: #667997;
        margin-bottom: 6px;
    }

    .teacher-info .teacher-desc {
        font-size: 9.5px;
        font-weight: bold;
        color: #999999;
        line-height: 1.4;
        margin-bottom: 6px;
        height: 32px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .teacher-info .teacher-more-btn {
        font-size: 9.5px;
        font-weight: bold;
        color: #999999;
        margin-top: auto;
    }

/* ==========================================================================
   17. RWD — 平板 (max-width: 1200px)
   ========================================================================== */
@media (max-width: 1200px) {
    .teacher-card-item {
        width: calc(50% - 7.5px);
    }
}

/* ==========================================================================
   18. RWD — 手機 (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {

    body, main, .news_class, .recommend-section, .section-bg-light {
        background-color: #fff9ed !important;
    }

    /* 區塊標題 */
    .section-title,
    .video-block .block-title,
    .teacher-block .block-title {
        font-size: 36px !important;
        color: #3b3b3b !important;
        font-weight: bold !important;
    }

    /* 隱藏「查看全部」連結 */
    .view-all-link,
    .view-all,
    .block-more,
    .sub-title {
        display: none !important;
    }

    /* 課程網格：單欄 */
    .course-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 100%;
    }

    /* 課程卡片 */
    .course-card {
        width: 100% !important;
        background-color: #ffffff !important;
        border: 1px solid #f6d39f !important;
        border-radius: 12px;
    }

    .card-img-box img {
        aspect-ratio: 1200 / 580 !important;
    }

    .card-body {
        padding: 20px !important;
    }

    .course-card .course-title {
        font-size: 21px !important;
        font-weight: bold !important;
        color: #3b3b3b !important;
        margin-bottom: 12px !important;
    }

    .course-card .course-desc,
    .course-card .course-desc * {
        font-size: 14px !important;
        font-weight: normal !important;
        color: #3b3b3b !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }

    .course-card .course-hours {
        font-size: 14px !important;
        font-weight: bold !important;
        color: #3b3b3b !important;
        margin-bottom: 8px !important;
    }

    .course-card .course-teacher {
        font-size: 21px !important;
        font-weight: bold !important;
        color: #3b3b3b !important;
        margin-bottom: 0 !important;
    }

    .course-card .price-original {
        font-size: 21px !important;
        color: #7a7a7a !important;
        text-decoration: line-through !important;
        margin-bottom: 5px !important;
    }

    .course-card .price-special {
        font-size: 27px !important;
        font-weight: bold !important;
        color: #ff3131 !important;
    }

    /* 影片：單欄 */
    .video-card-item {
        width: 100%;
    }


    /* 學習方式：單欄 */
    .learning-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* 講師網格：單欄排列 */
    .teacher-grid {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    /* 講師卡片：保留框線 #ebc9a8 */
    .teacher-card-item {
        width: 100% !important;
        border: 1px solid #ebc9a8 !important;
        border-radius: 8px;
        padding: 15px;
        box-sizing: border-box;
    }

    /* 卡片內部：圖片在左、文字在右（橫排） */
    .teacher-card-link {
        display: flex !important;
        flex-direction: row !important; /* 強制橫排 */
        align-items: center !important;
    }

    /* 大頭貼：放大 */
    .teacher-img-box {
        width: 120px !important;
        height: 120px !important;
        flex-shrink: 0 !important;
        margin-right: 20px !important;
        margin-bottom: 0 !important;
    }

    /* 右側文字區：靠左對齊 */
    .teacher-info {
        text-align: left !important;
        flex: 1;
        overflow: hidden;
    }

        /* 講師姓名：字級 36、粗體、顏色 #246e9e */
        .teacher-info .teacher-name {
            font-size: 16px !important;
            font-weight: bold !important;
            color: #246e9e !important;
            margin-bottom: 5px !important;
        }

        /* 講師 title/desc：字級 36、粗體、顏色 #667997 */
        .teacher-info .teacher-desc {
            font-size: 13px !important;
            font-weight: bold !important;
            color: #667997 !important;
            line-height: 1.5 !important;
            height: auto !important;
            display: -webkit-box !important;
            -webkit-line-clamp: 3 !important;
            -webkit-box-orient: vertical !important;
            overflow: hidden !important;
            margin-bottom: 0 !important;
        }

        /* 手機版隱藏「了解更多」 */
        .teacher-info .teacher-more-btn {
            display: none !important;
        }
}

/* ==========================================================================
   19. RWD — 手機小螢幕 (max-width: 576px)
   ========================================================================== */
@media (max-width: 576px) {

    .teacher-card-item {
        width: 100%;
    }

    .teacher-card-link {
        flex-direction: column;
        align-items: center;
    }

    .teacher-img-box {
        margin-right: 0;
        margin-bottom: 12px;
    }

    .teacher-info {
        text-align: center;
    }

        .teacher-info .teacher-desc {
            height: auto;
            -webkit-line-clamp: initial;
        }
}

/* ==========================================================================
   20. Footer Newsletter (手機版)
   ========================================================================== */
@media (max-width: 768px) {

    .newsletter-main-title {
        font-size: 42px !important;
        font-weight: bold !important;
        color: #3b3b3b !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .newsletter-form-row {
        flex-direction: row !important;
        max-width: 100% !important;
        gap: 0 !important;
    }

    .newsletter-custom-input {
        font-size: 18px !important;
        color: #246e9e !important;
        height: 54px !important;
        flex: 1 !important;
        border-radius: 4px 0 0 4px !important;
    }

        .newsletter-custom-input::placeholder {
            font-size: 18px !important;
            color: #246e9e !important;
        }

    .newsletter-custom-btn {
        font-size: 24px !important;
        font-weight: bold !important;
        color: #ffffff !important;
        background-color: #f47b20 !important;
        height: 54px !important;
        padding: 0 25px !important;
        border-radius: 0 4px 4px 0 !important;
        white-space: nowrap !important;
    }

    .social-icons-container {
        gap: 20px !important;
        justify-content: center !important;
    }

    .social-icon-btn {
        width: 56px !important;
        height: 56px !important;
        font-size: 28px !important;
        background-color: #ffffff !important;
        color: #f47b20 !important;
        border-radius: 50% !important;
    }
}
