/* --- 1. 全局變數與重置 (Design System) --- */
:root {
    /* 根據 image_650bc9.jpg 提取的色票 */
    --bg-cream: #F6F6ED;
    /* 導覽列與背景米色 */
    --bg-sand: #EAE6DF;
    /* 沙畫背景色調 */
    --text-gold: #988455;
    /* 主標題金棕色 */
    --text-dark: #5A5A5A;
    /* 內文深灰 */
    --text-light: #888888;
    /* 輔助文字灰 */
    --btn-brown: #9E8A68;
    /* 按鈕與重點色 */
    --accent-green-start: #8EB69B;
    /* 導師頭像框漸層起點 */
    --accent-green-end: #4A7C59;
    /* 導師頭像框漸層終點 */

    /* 根據 image_68a37d.png 新增 Hover 相關色票 */
    --hover-card-bg: #F4F0E8;
    /* 卡片 Hover 米色背景 */
    --hover-text-teal: #557C81;
    /* 卡片 Hover 標題墨綠色 */

    --white: #ffffff;
    --radius-lg: 24px;
    /* 大圓角 */
    --radius-btn: 50px;
    /* 按鈕圓角 */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.03);
    --shadow-hover: 0 15px 30px rgba(140, 120, 83, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Helvetica, Arial, "PingFang TC", "Microsoft JhengHei", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #FDFBF8;
    /* 整體極淺的暖白底 */
    overflow-x: hidden;
    font-size: 18px;
}

img {
    max-width: 100%;
    display: block;
    object-fit: cover;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 60px 0;
}

/* 通用標題樣式 */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.2rem;
    color: #103745;
    font-weight: 400;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.section-header p {
    color: #103745;
    font-size: 1.125rem;
}

/* --- 3. Navbar --- */
.navbar {
    background-color:#f6f6eded;
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    /* max-width: 1200px; */
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo 設計 */
.logo {
    display: flex;
    align-items: center;
    width: 80px;
    height: 80px;
    background: url(./img/logo.svg) no-repeat center center;
}

.nav-menu {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    color: #263F4D;
    font-size: 1.125rem;
    font-weight: 500;
    position: relative;
}

.nav-menu a:hover {
    color: var(--text-gold);
}

/* 手機選單按鈕 */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-gold);
}

/* --- 4. Hero Section --- */
.hero {
    position: relative;
    height: 76vh;
    min-height: 490px;
    background: #f6f2eb url(./img/topad.png) no-repeat bottom -350px right -100px;
    background-size: 110%;
    display: flex;
    align-items: center;
    /* 備用背景 */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero .container {
    margin: 0;
    padding: 0 100px;
    width: 100%;
}

.hero-content {
    z-index: 10;
    padding-left: 0%;
    position: relative;

}

.hero h1 {
    font-size: 2.6rem;
    color: var(--text-gold);
    line-height: 1.6;
    margin-bottom: 24px;
    font-weight: 400;
    letter-spacing: 1px;
}

.hero-sub {
    font-size: 1.125rem;
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 40px;
}

.btn-hero {
    display: inline-block;
    background-color: var(--btn-brown);
    color: var(--white);
    padding: 12px 36px;
    border-radius: var(--radius-btn);
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(158, 138, 104, 0.3);
    cursor: pointer;
}

.btn-hero:hover {
    background-color: #8C7855;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(158, 138, 104, 0.4);
}

/* 社群圖標定位在 Hero 右上角 */
.hero-social {
    position: absolute;
    top: 30px;
    right: 40px;
    z-index: 10;
    /* 確保在 overlay 之上 */
    display: flex;
    gap: 20px;
}

.hero-social .fb {
    background: url(./img/icon-fb.svg) no-repeat center;
    height: 30px;
    width: 30px;
    display: inline-block;
}

.hero-social .ig {
    background: url(./img/icon-ig.svg) no-repeat center;
    height: 30px;
    width: 30px;
    display: inline-block;
}

.hero-social .threads {
    background: url(./img/icon-td.svg) no-repeat center;
    height: 30px;
    width: 30px;
    display: inline-block;
}

.hero-social a {
    color: #ffffff;
    /* 根據背景圖建議使用白色或品牌金 */
    font-size: 1.4rem;
    transition: all 0.3s ease;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
    /* 增加陰影避免被背景吃掉 */
}

.hero-social a:hover {
    color: #E6D5B8;
    /* 懸停時變色 */
    transform: translateY(-3px);
}


/* --- 5. Instructor Section --- */
.instructor-section {
    background: #FFFFFF url(./img/bg.png) no-repeat center;
    background-size: cover;
}

.instructor-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
}

.avatar-frame {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    padding: 8px;
    background: linear-gradient(135deg, var(--accent-green-start), var(--accent-green-end));
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(74, 124, 89, 0.15);
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* border: 4px solid var(--white); */
    background: url(./img/bg.png) no-repeat center;
}

.instructor-title {
    font-size: 2rem;
    color: #4F6D7A;
    /* 深藍綠色標題 */
    font-weight: 400;
    text-align: center;
}

.instructor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.instructor-col h4 {
    font-size: 1.2rem;
    color: #2E525C;
    margin-bottom: 20px;
    font-weight: 400;
    /* border-left: 4px solid var(--text-gold);
    padding-left: 15px; */

}

.instructor-col p {
    margin-bottom: 16px;
    color: #2E525C;
    text-align: justify;
    font-size: 1.125rem;
}

.highlight {
    font-weight: bold;
    color: #2E525C;
}

/* --- 6. Course Section --- */
.course-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.course-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: flex;
    overflow: hidden;
    height: 370px;
    position: relative;
}

.card-img {
    width: 68%;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease;
}

.card-content {
    width: 32%;
    position: relative;
    background: var(--white);
}

/* Hover 兩段式狀態 */
.state {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s ease;
    background: var(--white);
}

/* 預設狀態 (Default) */
.state-default {
    opacity: 1;
    transform: translateY(0);
    z-index: 1;
}

/* Hover 狀態 (Details) */
.state-hover {
    opacity: 0;
    transform: translateY(20px);
    z-index: 2;
    pointer-events: none;
    /* 預設不可點 */
}

/* Hover Trigger */
.course-card:hover .state-default {
    opacity: 0;
    transform: translateY(-20px);
}

.course-card:hover .state-hover {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.course-card:hover .card-img img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.5rem;
    color: var(--text-gold);
    margin-bottom: 24px;
    font-weight: 400;
}

.card-text p {
    margin-bottom: 12px;
    color: #777;
    font-size: 1.125rem;
}

.syllabus-list li {
    margin-bottom: 10px;
    color: #6B6A6A;
    /* padding-left: 12px;
    border-left: 2px solid #eee; */
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-sm {
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 1.125rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary {
    background: var(--btn-brown);
    color: #fff;
    border: 1px solid var(--btn-brown);
}

.btn-primary:hover {
    background: #8C7855;
}

.btn-outline {
    background: transparent;
    border: 1px solid #ccc;
    color: #666;
}

.btn-outline:hover {
    border-color: var(--btn-brown);
    color: var(--btn-brown);
}

/* Zig-Zag: 偶數反轉 */
.course-card:nth-child(even) {
    flex-direction: row-reverse;
}

/* --- 7. Testimonials (Carousel) --- */
.testimonials-section {
    background: #FAF9F5 url(./img/bg.png) no-repeat center;
    background-size: cover;
}

.carousel-view {
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
}

.review-card {
    /* 桌機計算：(100% - 2個gap) / 3 */
    flex: 0 0 calc((100% - 60px) / 3);
    background: var(--white);
    padding: 40px 30px 20px 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    height: auto;

    /* Hover 特效過渡 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid transparent;
}

/* Hover 狀態：變更背景色、陰影 */
.review-card:hover {
    background-color: var(--hover-card-bg);
    /* #F4F0E8 */
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(140, 120, 83, 0.1);
}

.review-card::before {
    content: "“";
    font-size: 4rem;
    color: var(--text-gold);
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
    line-height: 1;
    transition: opacity 0.3s;
}

/* [Hover] 引號不消失，保持透明度 */
.review-card:hover::before {
    opacity: 0.2;
}

.tag {
    color: #4A7C88;
    padding: 4px 0;
    font-size: 1.2rem;
    border-radius: 20px;
    display: inline-block;
    margin: 10px 0 15px;
    transition: all 0.3s ease;
}

/* Hover 時改變標籤樣式：變為墨綠色標題字 */
.review-card:hover .tag {
    color: var(--hover-text-teal);
    /* #557C81 */
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: 0.3s;
}

.nav-dot.active {
    background: #4A7C88;
    transform: scale(1.2);
    width: 25px;
    border-radius: 30px;
}

/* --- 8. FAQ --- */
.faq-container {
    max-width: 860px;
    margin: 0 auto;
}

details {
    background: var(--white);
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

summary {
    padding: 20px;
    cursor: pointer;
    list-style: none;
    position: relative;
    color: #4A7C88;
    font-size: 1.125rem;
}

summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    color: #4A7C88;
    font-size: 1.125rem;
}

details[open] summary::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-ans {
    padding: 0 20px 20px;
    color: #445464;
    font-size: 1.125rem;
    border-top: 1px solid #f9f9f9;
    padding-top: 15px;
}

/* Footer */
footer {
    background: #4A7C88;
    color: #fff;
    padding: 20px 0;
    font-size: 0.9rem;
    letter-spacing: 1px;
    
    /* 讓 Footer 變成一個大的置中容器 */
    display: flex;
    justify-content: center; /* 水平置中 */
    align-items: center;     /* 垂直置中 */
    min-height: 80px;        /* 確保有足夠高度感 */
}

.footer-container {
    display: flex;
    flex-direction: row;     /* 強制同一行 */
    align-items: center;     /* 關鍵：讓容器內所有元件垂直中心對齊 */
    justify-content: center;
    gap: 15px;               /* 文字與信箱組件的間距 */
}

.mailto {
    display: flex;           /* 讓圖標與文字也用 flex 對齊 */
    align-items: center;
    gap: 8px;
}

.mailto a {
    color: #f3c866;
    text-decoration: none;
    display: inline-block;
    line-height: 1;          /* 消除行高導致的偏移 */
}

.email {
    background: url(./img/icon-email.svg) no-repeat center;
    background-size: contain;
    height: 30px;            /* 依照示意圖稍微放大圖標 */
    width: 30px;
    display: inline-block;
}

/* 移除可能干擾的預設樣式 */
.footer-text {
    display: inline-block;
    line-height: 1;
}


/* --- RWD 手機版適配 --- */
@media (max-width: 900px) {

    /* 1. 漢堡選單 */
    .hamburger {
        display: block;
        cursor: pointer;
        font-size: 2.6rem;
        color: var(--text-gold);
        z-index: 1001;
    }

    /* 2. 選單本體 */
    .nav-menu {
        display: none;
        /* 預設隱藏 */
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--bg-cream);
        flex-direction: column;
        padding: 0 0;
        align-items: center;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        gap: 0;
    }

    /* 3. [強制顯示修正] 當有 active class 時 */
    .nav-menu.active {
        display: flex !important;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        margin: 2px 0;
        border-bottom: 1px solid #eee;
    }

    .nav-menu a {
        display: block;
        padding: 20px 10px;
        width: 100%;
    }

    /* 其他 RWD 修正 */
    .hero {
        background-position: 45% 190%;
        height: auto;
        padding: 40px 0;
        background-size: 140%;
        background-color: #f8f3ec;
        flex-direction: column;
    }

    .hero-content {
        padding-left: 0;
        text-align: left;
        margin: 0 auto;
    }

    .hero .container {
        padding:30px 30px 0 30px;
    }

    .hero h1 {
        font-size: 1.6rem;

    }

    .hero-social {
        top: 20px;
        right: 20px;
        gap: 15px;
    }

    .hero-social a {
        font-size: 1.2rem;
    }



    .instructor-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .course-card,
    .course-card:nth-child(even) {
        flex-direction: column;
        height: auto;
    }

    .card-img {
        width: 100%;
        height: 250px;
    }

    .card-content {
        width: 100%;
        min-height: 400px;
    }

    .state {
        padding: 30px;
    }

    .review-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* FAQ 圖示位置修正 */
    summary {
        padding-right: 40px;
    }

    summary::after {
        top: 20px;
        /* 固定在右上角 */
        transform: none;
    }

    details[open] summary::after {
        transform: rotate(180deg);
    }
}
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column; /* 手機版空間不足時再改為垂直 */
        gap: 10px;
    }
}
