/* =========================================
   字體大小系統 (Typography System)
   基準設計稿：1920px
========================================= */
:root {
    /* 1920px 桌機版尺寸 (依你的需求設定) */
    --fs-section-title: 50px;
    /* 區塊大標 */
    --fs-card-title: 30px;
    /* 卡片主標題 */
    --fs-card-subtitle: 28px;
    /* 卡片副標題 */
    --fs-text-main: 25px;
    /* 主要內文 */
    --fs-text-faq: 25px;
    /* 次要內文 */

    --fs-teacher-name: 43px;
    /* 32pt */
    --fs-teacher-text: 22px;
    /* 16pt */
}

/* 筆電/平板橫向尺寸 (1200px 以下)  */
@media (max-width: 1200px) {
    :root {
        --fs-section-title: 36px;
        --fs-card-title: 26px;
        --fs-card-subtitle: 22px;
        --fs-text-main: 20px;
        --fs-text-faq: 18px;
        --fs-teacher-name: 36px;
        --fs-teacher-text: 19px;
    }
}

@media (max-width: 1024px) {
    :root {
        --fs-section-title: 30px;
        --fs-card-title: 22px;
        --fs-card-subtitle: 20px;
        --fs-text-main: 18px;
        --fs-text-faq: 16px;
        --fs-teacher-name: 33px;
        --fs-teacher-text: 18px;
    }
}

/* 平板直向/大手機尺寸 (768px 以下) */
@media (max-width: 768px) {
    :root {
        --fs-section-title: 32px;
        --fs-card-title: 26px;
        --fs-card-subtitle: 24px;
        --fs-text-main: 18px;
        --fs-text-faq: 16px;

        --fs-teacher-name: 30px;
        --fs-teacher-text: 17px;
    }
}

/* 小手機尺寸 (575px 以下) */
@media (max-width: 575px) {
    :root {
        --fs-section-title: 28px;
        --fs-card-title: 22px;
        --fs-card-subtitle: 20px;
        --fs-text-main: 16px;
        --fs-text-faq: 15px;

        --fs-teacher-name: 26px;
        --fs-teacher-text: 16px;
    }
}


/* =========================================
   文章分類與關鍵字篩選區塊加上搜尋框
========================================= */

/* --- 上下橫線的標籤搜尋區塊 --- */
.tag-search-bar {
    border-top: 1px solid #D95C25;
    /* 🌟 上方的橫線 */
    border-bottom: 1px solid #D95C25;
    /* 🌟 下方的橫線 */
    padding: 15px 0;
    /* 讓文字跟線條之間有呼吸空間 */
}

/* --- 標籤文字樣式 --- */
.tag-search-bar .tag-link {
    color: #D95C25;
    font-size: 15px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.tag-search-bar .tag-link:hover {
    color: var(--color-maincolor, #D95C25);
    /* 滑過變成橘色 */
}

/* --- 分類選單 --- */
.category-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0 0 10px 0;
    flex-wrap: wrap;
}

.category-item {
    position: relative;
    padding: 0 30px;
    margin-bottom: 10px;
}

/* 產生右側的垂直分隔線 | */
.category-item::after {
    content: '|';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 300;
}

.category-item:first-child::before {
    content: '|';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-weight: 300;
}

/* 分類連結文字樣式 */
.category-item a {
    text-decoration: none;
    color: #333333;
    font-size: 16px;
    font-weight: 200;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.category-item.active a,
.category-item a:hover {
    color: var(--color-maincolor, #D95C25);
}

/* --- 關鍵字區塊 --- */
.keyword-box {
    border-top: 1px solid rgba(217, 92, 37, 0.4);
    border-bottom: 1px solid rgba(217, 92, 37, 0.4);
    padding: 15px 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.keyword-title {
    color: #333333;
    font-weight: 200;
    font-size: 13px;
    margin-right: 15px;
    letter-spacing: 1px;
}

.keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
}

.keyword-link {
    color: rgba(217, 92, 37, 0.8);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.keyword-link:hover {
    color: var(--color-maincolor, #D95C25);
}


/* =========================================
   手機版 (RWD) 微調
========================================= */
@media (max-width: 768px) {

    /* 讓分類選單變成可左右滑動  */
    .category-menu {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .category-menu::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari and Opera */
    }

    .category-item {
        white-space: nowrap;
        padding: 0 15px;
    }

    .keyword-box {
        align-items: flex-start;
    }
}

/* --- 部落格搜尋框 --- */
.blog-search-group {
    min-width: 260px;
}

.blog-search-group .blog-search-input {
    border: 1px solid #e0e0e0;
    border-right: none;
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
    padding: 8px 16px;
    font-size: 15px;
    box-shadow: none;
    transition: all 0.3s ease;
}

.blog-search-group .blog-search-input:focus {
    border-color: var(--color-maincolor, #D95C25);
    box-shadow: inset 0 0 0 1px var(--color-maincolor, #D95C25);
    outline: none;
    z-index: 3;
}

.blog-search-group .blog-search-btn {
    background-color: var(--color-maincolor, #D95C25);
    color: white;
    border: 1px solid var(--color-maincolor, #D95C25);
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 8px 20px;
    font-size: 15px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    z-index: 2;
}

.blog-search-group .blog-search-btn:hover {
    background-color: #bf4e1d;
    border-color: #bf4e1d;
    color: white;
}

/* =========================================
   文章列表區塊樣式
========================================= */
.article-list-section {
    padding: 30px 0;
}

/* --- 共用文字樣式 --- */
.article-meta {
    font-size: calc(var(--fs-text-main) * 0.8) !important;
    color: #666666;
    letter-spacing: 0.5px;
}

.article-title-link {
    text-decoration: none;
    display: block;
}



/* --- 上方主打文章  --- */
.featured-article .featured-img-link {
    display: block;
    overflow: hidden;
}

.featured-article .featured-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.featured-article .featured-img-link:hover .featured-img {
    transform: scale(1.05);
    /* 滑過圖片微微放大 */
}


.featured-title {
    color: var(--color-maincolor, #D95C25);
    font-size: var(--fs-section-title) !important;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    transition: opacity 0.3s ease;
}


.article-title-link:hover .featured-title {
    opacity: 0.8;
}

.featured-desc p {
    color: #444444;
    font-size: var(--fs-text-main);
    line-height: 1.8;
    letter-spacing: 0.5px;
}

.featured-desc p {
    margin-bottom: 8px;

}

.read-more-link {
    color: #888888;
    font-size: var(--fs-text-main) !important;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.read-more-link:hover {
    color: var(--color-maincolor, #D95C25);
}

.article-tags a {
    color: var(--color-maincolor, #D95C25);
    font-size: 13px;
    text-decoration: none;
    margin-right: 8px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.article-tags a:hover {
    opacity: 1;
}

/* --- 分隔線 --- */
.article-divider {
    border: 0;
    border-top: 1px solid #e0e0e0;
    margin: 40px 0;
    opacity: 1;
}

/* --- 下方網格文章 (Grid Article) --- */
.grid-article .grid-img-link {
    display: block;
    overflow: hidden;
}

.grid-article .grid-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.grid-article .grid-img-link:hover .grid-img {
    transform: scale(1.05);
}

.grid-title {
    color: var(--color-maincolor, #D95C25);
    font-size: var(--fs-card-title) !important;
    font-weight: bold;
    line-height: 1.4;
    margin: 0;
    transition: opacity 0.3s ease;
    /* 限制標題最多2行，多的變 ... */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-title-link:hover .grid-title {
    opacity: 0.8;
}

.grid-desc {
    color: #444444;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    /* 限制內文最多三行，多的變 ... */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   手機版 (RWD) 微調
========================================= */
@media (max-width: 991px) {
    .featured-title {
        font-size: 24px;
        margin-top: 10px;
    }

    .article-divider {
        margin: 30px 0;
    }
}

@media (max-width: 768px) {
    .grid-article {
        margin-bottom: 20px;
    }

    .grid-img {
        aspect-ratio: 16 / 10;
    }
}

/* --- 內頁主內容樣式 --- */
.single-title {
    color: var(--color-maincolor, #D95C25);
    font-size: 36px;
    font-weight: bold;
    line-height: 1.4;
}

.border-bottom-orange {
    border-bottom: 2px solid var(--color-maincolor, #D95C25);
}

.article-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333333;
    letter-spacing: 0.5px;
}


.article-content img {
    max-width: 100%;
    height: auto;
}

/* --- 側邊欄樣式 --- */
.widget-title {
    color: var(--color-maincolor, #D95C25);
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.widget-divider {
    border-top: 2px solid #eeeeee;
    margin-bottom: 20px;
    opacity: 1;
}

.recent-link {
    color: #555555;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.recent-link:hover {
    color: var(--color-maincolor, #D95C25);
}

.tag-link {
    color: var(--color-maincolor, #D95C25);
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.tag-link:hover {
    opacity: 0.7;
}

/* --- 上下篇文章導覽 --- */
.nav-link-title {
    color: var(--color-maincolor, #D95C25);
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.nav-link-title:hover {
    opacity: 0.7;
}

/* =========================================
   教學特色、教學方針 Tab 內容區樣式
========================================= */

.content-section {
    scroll-margin-top: 120px;
}

.content-section:last-child {
    border-bottom: none;
}

/* --- 文字編輯器預設樣式 --- */
.editor-content-box {
    color: #444444;
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: 0.5px;
    max-width: 1000px;
    margin: 0 auto;
}

.editor-content-box p {
    margin-bottom: 15px;
}

.editor-content-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* =========================================
   師資介紹區塊
========================================= */
.teacher-category-row {

    align-items: flex-start !important;
}

.teacher-slider-col .custom-swiper-arrow {
    top: 90% !important;
    transform: translateY(-50%) !important;
}

@media (max-width: 768px) {
    .teacher-slider-col .custom-swiper-arrow {
        top: 80% !important;
    }
}

/* 左側直排標題區 */
.teacher-category-title-col {
    width: 120px;
    flex-shrink: 0;
    position: relative;
}

/* 直排圖片樣式 */
.vertical-title-img {
    max-width: 100%;
    height: auto;
    padding-right: 20px;

}

@media (max-width: 576px) {
    .mobile-category-title h3 {
        font-size: 24px !important;
    }
}

.teacher-slider-col {
    min-width: 0;
    position: relative;
}

.teacherSwiper {
    width: 100%;
    overflow: hidden;
}

/* 直排文字容器 */
.vertical-title-box {
    position: relative;
    width: 100%;
    min-height: 400px;
}



/* 教師卡片樣式 */
.teacher-info {
    max-width: 280px;
    margin: 0 auto;
    width: 100%;
    text-align: left;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    height: auto !important;
}

.teacher-img {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background-color: #f5f5f5;
    margin: 0 auto;
    display: block;
}

.t-subtitle {
    font-size: var(--fs-teacher-text) !important;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.t-name {
    font-size: var(--fs-teacher-name) !important;
    color: var(--color-maincolor, #D95C25);
    font-weight: bold;
    margin-bottom: 12px;
}

.t-desc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.t-desc-list li {
    font-size: var(--fs-teacher-text) !important;
    color: #666;
    line-height: 1.6;
    position: relative;
    padding-left: 12px;
    margin-bottom: 5px;
}

/* 客製化橘色小圓點 */
.t-desc-list li::before {
    content: "•";
    color: var(--color-maincolor, #D95C25);
    position: absolute;
    left: 0;
    font-size: 16px;
}

/* =========================================
   教學方針 Tab 內容區樣式
========================================= */
/* 外層容器 */
.policy-container {
    max-width: 900px;
    padding: 20px 0;
    margin-left: auto;
    margin-right: auto;
}

/* 每一列項目（補上 flex 基礎設定，使其在桌機版左右並排） */
.policy-item {
    display: flex;
    gap: 20px;
    /* 建議加上 gap，讓標籤與內容保持間距 */
    margin-bottom: 30px;
    /* 每一列之間的間距 */
}

/* 左側標籤 */
.policy-label {
    flex: 0 0 130px;
    text-align: left;
}

.policy-label h4 {
    color: var(--color-maincolor);
    font-weight: bold;
    font-size: 2.5rem;
    line-height: 1.4;
}

/* 右側內容 */
.policy-content {
    flex: 1;
}

.policy-content p {
    color: #333;
    font-size: 1.85rem;
    line-height: 1.7;
    text-align: justify;
}

/* 手機版自動切換為上下排列 */
@media (max-width: 576px) {
    .policy-item {
        flex-direction: column;
        gap: 10px;
        /* 手機版縮小上下間距 */
    }

    .policy-label {
        flex: 0 0 auto;
        text-align: left;
        margin-bottom: 10px;
    }

    .policy-label h4 {
        font-size: 2.2rem;
        /* 手機版標題稍微縮小，避免折行過於嚴重 */
    }

    .policy-content {
        padding-left: 0 !important;
        border-left: none;
    }

    .policy-content p {
        font-size: 1.9rem;
        /* 建議手機版字型微調小，更符合 RWD 體驗 */
    }
}

/* =========================================
   上課環境 Tab 內容區樣式
========================================= */

.classroom-link {
    display: block;
    cursor: zoom-in;
    overflow: hidden;
}

.classroom-img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #f5f5f5;
    transition: transform 0.3s ease;
}

.classroom-link:hover .classroom-img {
    transform: scale(1.05);
}

/* 手機版 */
@media (max-width: 768px) {
    .policy-item {
        flex-direction: column;
        align-items: flex-start !important;
    }

    .policy-label {
        width: 100%;
        text-align: left;
        justify-content: flex-start !important;
        margin-bottom: 15px;
    }

    .policy-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100%;
    }

    /* 手機版 */
    #classroom-next {
        display: none !important;
    }
}

.custom-arrow-btn {
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.custom-arrow-btn:hover {
    opacity: 0.7;
}

.custom-arrow-btn.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}