/* 全域設定與色彩變數 (Design Advisor) */
:root {
    /* 主色系：使用者指定的 #EEFABD (淺黃綠色) */
    --primary-color: #EEFABD;
    /* 為了在淺色主色上能看清文字，定義深色版主色（用於按鈕字體、邊框） */
    --primary-dark: #b5c765;
    /* 背景色與文字色 */
    --bg-light: #f9fafb;
    --text-main: #333333;
    --text-muted: #6b7280;
    /* 語意色彩 */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* 套用使用者偏好字型：Noto Sans TC */
    font-family: 'Noto Sans TC', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* 容器設定，讓內容置中且不會無限向兩側延伸 */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導覽列樣式 */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.logo {
    color: var(--primary-dark);
    /* 使用深色版的主色展現專業感 */
    font-size: 24px;
    font-weight: 700;
}

/* 橫幅區域樣式 */
.hero {
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--primary-color) 100%);
    /* 使用淺灰色漸層至主特色 #EEFABD，營造清爽的自然感 */
    color: var(--text-main);
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--text-muted);
}

/* 實際開課場次文字樣式 */
.session-info {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
    /* 依據底色調整標示字色，確保能清楚閱讀 */
    margin-bottom: 35px;
}

/* 課程資訊（售價與時數）標籤 */
.course-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.course-info span {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    /* 給資訊卡加上白色底色與陰影，在淺黃綠底色上更加突出 */
    padding: 10px 20px;
    border-radius: 30px;
    /* 圓角標籤 */
    font-size: 18px;
    font-weight: bold;
    color: var(--text-main);
}

/* 報名按鈕樣式 */
.cta-button {
    background-color: var(--primary-dark);
    /* 呼籲按鈕使用深色系顏色，保持按鈕可點擊感 */
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 20px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(181, 199, 101, 0.4);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* 滑鼠移到按鈕上的動畫效果 */
.cta-button:hover {
    background-color: #9cb545;
    /* 顏色變為更深的草綠色 */
    transform: translateY(-2px);
    /* 按鈕稍微往上浮起 */
}

/* 課程特色區塊樣式 */
.features {
    padding: 60px 0;
    text-align: center;
}

.features h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-main);
}

/* 使用 CSS Grid 排列三個特色卡片 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* 特色卡片樣式 */
.feature-item {
    background-color: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* 輕微的陰影讓卡片立體 */
    transition: transform 0.3s ease;
}

/* 滑鼠移到卡片上的浮起效果 */
.feature-item:hover {
    transform: translateY(-5px);
}

.feature-item h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.feature-item h3 i {
    margin-right: 8px;
    /* 圖示與文字的距離 */
}

.feature-item p {
    color: var(--text-muted);
}

/* 講師專欄區塊樣式 */
.latest-articles {
    background-color: #ffffff;
    /* 與上下區塊顏色交替，增加層次感 */
    padding: 60px 0;
    text-align: center;
}

.latest-articles h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    color: var(--text-main);
}

/* 文章列表容器 */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* 每篇文章間的距離 */
    max-width: 800px;
    margin: 0 auto;
}

/* 單篇文章卡片 */
.article-item {
    display: flex;
    align-items: center;
    text-align: left;
    background-color: var(--bg-light);
    /* 淺灰色底 */
    padding: 20px 25px;
    border-radius: 8px;
    text-decoration: none;
    /* 移除連結底線 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--primary-color);
    /* 左側主色重點線條 */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* 滑鼠移上去的浮動特效與顏色變化 */
.article-item:hover {
    transform: translateX(8px);
    /* 向右滑動一點點 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary-dark);
    /* 重點線加深 */
}

/* 文章日期標籤 */
.article-date {
    font-size: 14px;
    color: var(--text-muted);
    min-width: 100px;
    /* 固定寬度讓日期對齊 */
    margin-right: 20px;
    font-weight: 700;
}

/* 文章標題 */
.article-item h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.article-item h3 i {
    margin-right: 8px;
    color: var(--primary-dark);
    /* 圖示統一為品牌次要深色 */
}

.article-item:hover h3 {
    color: var(--primary-dark);
    /* 標題變為帶有主色調的深色 */
}

/* 講師介紹區塊樣式 */
.instructor {
    background-color: var(--primary-color);
    /* 這裡使用淺黃綠主色作為區塊背景，更加活潑明亮 */
    padding: 60px 0;
    text-align: center;
}

.instructor h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

/* 講師個人資料卡片 (改為雙欄排版) */
.instructor-profile {
    background-color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* 輕微的陰影讓卡片立體 */
    display: flex;
    /* 使用 flexbox 讓圖片與文字左右並排 */
    flex-direction: column;
    /* 強制改為上下排列，為了讓照片置中 */
    align-items: center;
    /* 水平置中對齊 */
    text-align: center;
    /* 文字也置中 */
    gap: 30px;
    /* 圖片與文字的距離 */
}

/* 當螢幕較小時，改為上下排列 */
@media (max-width: 600px) {
    .instructor-profile {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* 講師照片容器樣式 */
.instructor-image {
    flex-shrink: 0;
    /* 防止圖片被壓縮 */
    display: flex;
    /* 使用 flexbox 置中圖片 */
    justify-content: center;
}

/* 照片圖片設定為圓形 */
.instructor-image img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    /* 變成正圓形 */
    object-fit: cover;
    /* 確保圖片不變形地填滿 */
    object-position: 60% 40%;
    /* 將視角向左下微調，確保新照片的頭部與身體能進入圓圈中央 */
    border: 4px solid var(--primary-color);
    /* 加上主色邊框增加質感 */
    background-color: #f3f4f6;
    /* 為 placeholder 加上底色 */
}

/* 講師資訊區塊 */
.instructor-info {
    flex-grow: 1;
}

.instructor-info h3 {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: 5px;
}

/* 講師頭銜職稱 */
.instructor-info .title {
    font-size: 16px;
    color: var(--primary-dark);
    /* 指定為主色系深色 */
    font-weight: bold;
    margin-bottom: 20px;
}

.instructor-info .description {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.8;
}

/* 部落格連結按鈕樣式 */
.blog-link {
    display: inline-block;
    background-color: #fff;
    color: var(--primary-dark);
    text-decoration: none;
    /* 移除預設底線 */
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: bold;
    border: 2px solid var(--primary-dark);
    /* 深色黃綠色外框 */
    transition: all 0.3s ease;
}

/* 滑鼠移上去的特效：背景變深色、文字變白色 */
.blog-link:hover {
    background-color: var(--primary-dark);
    color: white;
}

/* 頁尾樣式 */
.footer {
    background-color: var(--text-main);
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}