/* CSS 變數定義 - 畫面與 PDF 共用 */
:root {
    /* 背景與卡片顏色 - 亮米色主題 */
    --bg-color: #faf6ed;
    --card-bg: #ffffff;
    --card-bg-alt: #fffbf3;
    
    /* 文字顏色 */
    --text-primary: #2a2620;
    --text-secondary: #6b5f4a;
    --text-light: #8a7f6a;
    
    /* 邊框顏色 */
    --border-color: #e8dfce;
    --border-hover: #d4c9b8;
    
    /* 主色系 - #7DA78C 綠色延伸 */
    --primary-color: #7DA78C;
    --primary-light: #a3c9b0;
    --primary-dark: #5a8467;
    
    /* 語意色彩 */
    --success-color: #3d7a5f;
    --error-color: #c85a3a;
    --warning-color: #d4a017;
    
    /* 次要按鈕灰色 */
    --secondary-color: #9ca3af;
    
    /* 圓角 */
    --radius-card: 12px;
    --radius-button: 8px;
    
    /* 間距 */
    --spacing-section: 1.5rem;
    --spacing-element: 1rem;
}

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* 頁首 */
.header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.header-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    border: 4px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.header-content h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 主要內容區 */
.main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 課程卡片 */
.course-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(42, 38, 32, 0.08);
    overflow: hidden;
}

.course-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 2rem;
    text-align: center;
}

.price-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
}

.duration {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-button);
}

.course-content {
    padding: 2rem;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-color);
}

/* 模組區塊 */
.module {
    background-color: var(--card-bg-alt);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.module-header .icon {
    width: 28px;
    height: 28px;
    color: var(--primary-color);
}

.module-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.module-list {
    list-style: none;
    padding-left: 2.2rem;
}

.module-list li {
    position: relative;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: 1rem;
}

.module-list li::before {
    content: "•";
    position: absolute;
    left: -1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

/* 課程特色 */
.features {
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background-color: var(--card-bg-alt);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.feature-item span {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* CTA 區塊 */
.cta-section {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-button);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(125, 167, 140, 0.3);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(125, 167, 140, 0.4);
}

.button-icon {
    width: 20px;
    height: 20px;
}

.cta-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* 表單卡片 */
.form-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(42, 38, 32, 0.08);
    overflow: hidden;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--card-bg-alt);
    border-bottom: 1px solid var(--border-color);
}

.form-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
}

.close-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: var(--radius-button);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-button:hover {
    background-color: var(--border-color);
}

.close-button svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
}

.registration-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-button);
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--card-bg-alt);
    color: var(--text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(125, 167, 140, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-button {
    width: 100%;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--radius-button);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(125, 167, 140, 0.3);
}

.submit-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(125, 167, 140, 0.4);
}

/* 成功訊息 */
.success-message {
    background-color: var(--card-bg);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(42, 38, 32, 0.08);
    padding: 3rem 2rem;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    color: var(--success-color);
    margin-bottom: 1rem;
}

.success-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
}

.success-message p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.back-button {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-button);
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background-color: var(--primary-dark);
}

/* 頁尾 */
.footer {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 2px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.9rem;
}

/* 工具類 */
.hidden {
    display: none !important;
}

/* 響應式設計 */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem 1rem;
    }
    
    .header-content h1 {
        font-size: 1.6rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .course-header {
        padding: 1.5rem;
    }
    
    .price {
        font-size: 2rem;
    }
    
    .course-content {
        padding: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .registration-form {
        padding: 1.5rem;
    }
}
