@import url('https://fonts.googleapis.com/css2?family=Chiron+GoRound+TC:wght@200;300;400;500;600;700;800;900&display=swap');

/* ==========================================================================
   全域變數與重設 (Reset & Variables)
   ========================================================================== */
:root {
    --bg-color: #faf9f6; /* 米白色底 (Warm Alabaster/Cream) */
    --text-color: #1c1917; /* 石頭深炭色，維持高對比與質感 */
    --text-muted: #6b6661; /* 中性暖灰，用於副標題與描述 */
    --primary-color: #eab308; /* 經典金黃色 */
    --primary-glow: rgba(234, 179, 8, 0.3);
    --secondary-color: #f97316; /* 溫暖橘色，與黃色搭配出絕美漸層 */
    --accent-color: #dc2626; /* 珊瑚紅，用於重點標記與按鈕 */
    --card-bg: rgba(255, 255, 250, 0.75); /* 奶油白半透明，用於亮色玻璃擬物 */
    --card-border: rgba(234, 179, 8, 0.15); /* 微帶黃色的細邊框 */
    --font-sans: 'Outfit', 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

body {
    font-family: 'Chiron GoRound TC', 'Noto Sans TC', sans-serif;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   背景發光與漸層裝飾 (Warm Glowing Background Decoration)
   ========================================================================== */
.glow-bg {
    position: fixed;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 25%, rgba(254, 240, 138, 0.6) 0%, transparent 55%),
        radial-gradient(circle at 85% 75%, rgba(255, 237, 213, 0.6) 0%, transparent 55%);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   導覽列樣式 (Navigation Header)
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    background-color: rgba(250, 249, 246, 0.85); /* 配合米白底色的半透明 */
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    color: #ca8a04; /* 深金黃色，在亮色底上更清晰 */
    text-shadow: 0 0 8px rgba(234, 179, 8, 0.3);
}

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--secondary-color);
}

nav .nav-btn {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

nav .nav-btn:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================================================
   英雄區樣式 (Hero Section)
   ========================================================================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 5% 4rem;
}

.hero-content {
    max-width: 800px;
}

.badge {
    background: rgba(254, 240, 138, 0.8);
    border: 1px solid rgba(234, 179, 8, 0.5);
    color: #854d0e; /* 深黃褐色，符合亮色高對比 */
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.03); }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, #ca8a04 10%, #ea580c 50%, #dc2626 90%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* ==========================================================================
   通用按鈕樣式 (Buttons)
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: #fff;
    border: 1px solid rgba(202, 138, 4, 0.3);
    color: #854d0e;
}

.btn-secondary:hover {
    background: rgba(254, 240, 138, 0.2);
    border-color: rgba(202, 138, 4, 0.5);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ==========================================================================
   課程特色區樣式 (Features Section)
   ========================================================================== */
.features {
    padding: 6rem 5%;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 3.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0.8rem auto 0;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: #fff;
    border: 1px solid rgba(234, 179, 8, 0.12);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(234, 179, 8, 0.4);
    box-shadow: 0 10px 30px rgba(234, 179, 8, 0.12);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   講師介紹區樣式 (Instructor Section)
   ========================================================================== */
.instructor-section {
    padding: 6rem 5%;
}

.instructor-card {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(234, 179, 8, 0.15);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.instructor-avatar {
    font-size: 5rem;
    background: linear-gradient(135deg, rgba(254, 240, 138, 0.4), rgba(255, 237, 213, 0.6));
    border-radius: 50%;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.15);
    overflow: hidden; /* 防止照片超出圓形邊框 */
}

.instructor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保照片填滿並保持比例裁切 */
}

.instructor-info {
    flex-grow: 1;
}

.instructor-info h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.instructor-tag {
    background: rgba(234, 179, 8, 0.15);
    color: #854d0e;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1.2rem;
}

.instructor-bio {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.instructor-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* 手機版排版調整 */
@media (max-width: 768px) {
    .instructor-card {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2.5rem 1.5rem;
    }
}

/* ==========================================================================
   課程資訊區樣式 (Course Info Card)
   ========================================================================== */
.info-section {
    padding: 6rem 5%;
    background: linear-gradient(180deg, transparent, rgba(254, 240, 138, 0.15), transparent);
}

.info-container {
    display: flex;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

.info-card {
    background: #fff;
    border: 1px solid rgba(234, 179, 8, 0.2);
    padding: 3rem 2.5rem;
    border-radius: 24px;
    position: relative;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.info-card.highlight {
    border-color: rgba(234, 179, 8, 0.5);
    box-shadow: 0 15px 40px rgba(234, 179, 8, 0.12);
}

.card-tag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 1px;
}

.card-header h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
}

.card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 2rem;
}

.price-box {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.price-box .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-right: 0.3rem;
}

.price-box .price {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #1c1917, #ca8a04);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-box .period {
    color: var(--text-muted);
    margin-left: 0.5rem;
    font-size: 1rem;
}

.details-list {
    list-style: none;
    margin-bottom: 2.5rem;
}

.details-list li {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* ==========================================================================
   頁尾樣式 (Footer)
   ========================================================================== */
footer {
    text-align: center;
    padding: 3rem 5%;
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   彈出視窗樣式 (Modal / Popup Form)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(28, 25, 23, 0.45); /* 調整遮罩透明度配合亮色模式 */
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #fff;
    border: 1px solid rgba(234, 179, 8, 0.2);
    padding: 3rem 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 480px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: var(--text-color);
}

.modal h3 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.form-group input {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.15);
}

.success-message {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
    border-radius: 8px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ==========================================================================
   響應式設計 (Responsive Design)
   ========================================================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    nav {
        gap: 1rem;
    }
    
    nav a:not(.nav-btn) {
        display: none; /* 在手機版隱藏一般連結以保持簡潔，僅保留報名按鈕 */
    }

    .info-card {
        padding: 2.5rem 1.5rem;
    }
}
