/* ==========================================
   BONDEDU 債券學堂 - 全域設計系統與變數 (日系蔚藍圓雅美學版)
   設計核心：主色調 #6196FF、日系圓體 Zen Maru Gothic 與 Outfit 英字
   ========================================== */
:root {
    /* 基礎背景色 */
    --bg-main: #f8fafc;          /* 極簡 Slate 灰白 (主背景) */
    --bg-surface: #ffffff;       /* 純白 (卡片/區塊底色) */
    --bg-surface-alt: #f0f5ff;   /* 極清爽淡蔚藍 (區塊交替/高亮背景) */

    /* 品牌配色系統 - 基於使用者偏好 #6196FF */
    --color-primary: #6196FF;    /* 蔚藍主色 (清爽智慧藍，象徵智慧與穩定) */
    --color-primary-dark: #2c68d4; /* 深蔚藍色 (用於高對比度文字與強調) */
    --color-primary-light: #e0ebff; /* 淺蔚藍色 (用於輕盈 hover 狀態與輕裝飾) */
    --color-secondary: #8faeff;  /* 柔美副色 (天空亮藍) */
    --color-accent: #ff9f43;     /* 溫暖強調色 (夕陽澄 - 蔚藍的經典互補色，溫暖吸睛) */

    /* 語意色彩 (符合 WCAG 對比標準) */
    --color-success: #10b981;    /* 翡翠綠 (用於平價發行/高評級/正確回饋) */
    --color-warning: #f59e0b;    /* 琥珀黃 (用於折價發行/中等風險/折溢價提示) */
    --color-danger: #ef4444;     /* 珊瑚紅 (用於高風險/違約警告/錯誤回饋) */

    /* 舒適文字配色 (符合 WCAG AA 級 4.5:1 以上對比度標準) */
    --text-main: #0f172a;        /* 深海藍灰 (主標題與段落文字 - 沉穩極易讀) */
    --text-muted: #475569;       /* 石板灰 (副標題、說明字與次要資訊) */

    /* 精緻細節與邊框 */
    --border-light: rgba(97, 150, 255, 0.12); /* 蔚藍微光極輕邊框 */
    --border-glow: rgba(97, 150, 255, 0.25);  /* 蔚藍柔光 */
    
    /* 字型系統 */
    --font-sans: 'Zen Maru Gothic', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* 動態過渡與陰影 */
    --transition-smooth: all 0.2s ease; /* 微動畫：全站平滑 0.2 秒過渡 */
    --shadow-premium: 0 10px 30px -10px rgba(97, 150, 255, 0.12); /* 融入蔚藍光的輕盈柔影 */
    --shadow-hover: 0 20px 40px -15px rgba(97, 150, 255, 0.2);   /* hover 時的漂浮投影 */
}

/* ==========================================
   基礎重設與全域設定
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.7; /* 間距優化，適合圓體字型 */
    letter-spacing: 0.02em; /* 稍微拉開字距，讓中文字型更圓潤易讀 */
    overflow-x: hidden;
}

/* 網頁滾動條美化 - 呼應蔚藍主色 */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: 5px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* 容器與版面 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
}

/* 區塊交替背景 - 採用清爽的淡蔚藍色 */
.alt-bg {
    background-color: var(--bg-surface-alt);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

/* 標題與漸層文字 - 精緻的蔚藍向天藍漸層 */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* ==========================================
   組件：按鈕、小標籤與輸入框
   ========================================== */
.badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--color-primary-light);
    border: 1px solid rgba(97, 150, 255, 0.25);
    color: var(--color-primary-dark);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px; /* 統一圓潤圓角 */
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition-smooth);
}

/* 主要按鈕 - 精緻蔚藍漸層 */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(97, 150, 255, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 150, 255, 0.4);
}

/* 次要按鈕 - 柔美邊框與灰色系 hover */
.btn-secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    color: var(--text-main);
    box-shadow: 0 2px 10px rgba(100, 120, 150, 0.03);
}

.btn-secondary:hover {
    background: var(--bg-surface-alt);
    border-color: rgba(97, 150, 255, 0.2);
    transform: translateY(-2px);
}

/* ==========================================
   導覽列 (Navbar) - 極致半透明磨砂玻璃質感
   ========================================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85); /* 半透明奶油白 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    height: 70px;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.logo-icon {
    color: var(--color-primary); /* logo 採用主色蔚藍 */
    font-size: 1.5rem;
}

.logo .accent {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-left: 4px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:hover {
    color: var(--color-primary-dark);
}

/* ==========================================
   英雄介紹區 (Hero Section)
   ========================================== */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    min-height: calc(90vh - 70px);
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.hero-content h1 {
    font-size: 3.2rem;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 600px;
    line-height: 1.8;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

/* 右側模擬債券卡片 - 高級微發光特效 */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.visual-card {
    background: rgba(255, 255, 255, 0.85); /* 輕薄透潤白色 */
    border: 1px solid rgba(97, 150, 255, 0.15);
    border-radius: 24px; /* 柔和圓角 */
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(20px);
    transition: var(--transition-smooth);
}

.visual-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.card-header {
    background: rgba(97, 150, 255, 0.03);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: var(--color-danger); }
.dot.yellow { background-color: var(--color-accent); }
.dot.green { background-color: var(--color-success); }

.card-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-left: 6px;
}

.card-body {
    padding: 24px;
}

.bond-preview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bond-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bond-tag {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

.bond-rating {
    color: var(--color-success);
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bond-price-box {
    text-align: center;
    padding: 20px 0;
    background: rgba(97, 150, 255, 0.02);
    border-radius: 16px;
    border: 1.5px dashed rgba(97, 150, 255, 0.2);
}

.bond-price-box .label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.bond-price-box .value {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-smooth);
}

.bond-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    text-align: center;
}

.bond-stats .stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bond-stats .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bond-stats .val {
    font-size: 0.95rem;
    font-weight: 700;
}

.status-tag {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 0.8rem !important;
}

/* ==========================================
   共用區塊標頭 (Section Header)
   ========================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    color: var(--color-primary-dark);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    margin: 0 auto 20px auto;
    border-radius: 4px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   區塊一：基礎概念 (Concept)
   ========================================== */
.concept-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
}

.concept-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px; /* 圓雅圓角 */
    padding: 40px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.concept-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.text-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 159, 67, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

.text-card h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-weight: 700;
}

.text-card p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.text-card p strong {
    color: var(--text-main);
}

/* 股票與債券對比表 */
.comparison-card h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
}

.table-responsive {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: separate; /* 優雅邊框分離 */
    border-spacing: 0;
    text-align: left;
}

.comparison-table th, 
.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    font-weight: 700;
    color: var(--text-main);
    background: var(--bg-surface-alt);
}

.comparison-table th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}
.comparison-table th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.comparison-table td {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.highlight-blue {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.highlight-green {
    color: var(--color-success);
    font-weight: 700;
}

/* ==========================================
   區塊二：四大核心要素 (Elements)
   ========================================== */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.element-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.element-card:hover {
    transform: translateY(-6px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-hover);
}

.element-num {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(97, 150, 255, 0.06);
    font-family: 'Outfit', sans-serif;
    transition: var(--transition-smooth);
}

.element-card:hover .element-num {
    color: rgba(97, 150, 255, 0.16);
    transform: scale(1.1);
}

.element-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.element-card:nth-child(2) .element-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}
.element-card:nth-child(2):hover {
    border-color: var(--color-success);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.1);
}

.element-card:nth-child(3) .element-icon {
    background: rgba(143, 174, 255, 0.15);
    color: var(--color-secondary);
}
.element-card:nth-child(3):hover {
    border-color: var(--color-secondary);
    box-shadow: 0 15px 30px rgba(143, 174, 255, 0.15);
}

.element-card:nth-child(4) .element-icon {
    background: rgba(255, 159, 67, 0.1);
    color: var(--color-accent);
}
.element-card:nth-child(4):hover {
    border-color: var(--color-accent);
    box-shadow: 0 15px 30px rgba(255, 159, 67, 0.12);
}

.element-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.element-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* 利率反向關係警示框 - 採用溫馨的互補金橙色 */
.alert-box {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.08) 0%, rgba(255, 159, 67, 0.02) 100%);
    border: 1px solid rgba(255, 159, 67, 0.3);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.alert-icon {
    font-size: 1.8rem;
    color: var(--color-accent);
}

.alert-content h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: var(--text-main);
    font-weight: 700;
}

.alert-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   區塊三：常見的債券種類 (Types)
   ========================================== */
.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.type-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 35px;
    position: relative;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
}

.type-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.type-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.type-badge.corp-badge {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-color: rgba(97, 150, 255, 0.2);
}

.type-badge.junk-badge {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.type-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
}

.card-gov .type-icon { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.card-corp .type-icon { background: var(--color-primary-light); color: var(--color-primary-dark); }
.card-junk .type-icon { background: rgba(239, 68, 68, 0.1); color: var(--color-danger); }

.card-gov:hover { border-color: var(--color-success); }
.card-corp:hover { border-color: var(--color-primary); }
.card-junk:hover { border-color: var(--color-danger); }

.type-card h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.issuer {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 16px;
}

.type-card .desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
    line-height: 1.7;
}

.features {
    list-style: none;
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.features li {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.features li i.fa-circle-check {
    color: var(--color-success);
}

.features li i.fa-circle-xmark {
    color: var(--color-danger);
}

/* ==========================================
   區塊：ETF專區 (ETF Section)
   ========================================== */
.etf-intro-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    margin-bottom: 50px;
}

.etf-intro-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.etf-intro-card:hover {
    border-color: var(--color-primary-light);
}

/* 對比卡片樣式 */
.vs-card h3 {
    font-size: 1.3rem;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 700;
}

.vs-comparison {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vs-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-bottom: 1px solid rgba(97, 150, 255, 0.06);
    padding-bottom: 16px;
}

.vs-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.vs-label {
    font-size: 0.9rem;
    color: var(--color-primary-dark);
    font-weight: 700;
}

.vs-details {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9rem;
}

.vs-direct, .vs-etf {
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge-direct {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-etf {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* 明星 ETF 排版 */
.etf-stars-title {
    margin-top: 60px;
    margin-bottom: 30px;
    text-align: center;
}

.etf-stars-title h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.etf-stars-title p {
    color: var(--text-muted);
}

.etf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.etf-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.etf-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 35px rgba(97, 150, 255, 0.15);
}

.etf-card:nth-child(2):hover {
    border-color: var(--color-accent);
    box-shadow: 0 15px 35px rgba(255, 159, 67, 0.15);
}

.etf-card:nth-child(3):hover {
    border-color: var(--color-secondary);
    box-shadow: 0 15px 35px rgba(143, 174, 255, 0.2);
}

.etf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.etf-ticker {
    font-size: 1.4rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.15);
    padding: 4px 14px;
    border-radius: 8px;
}

.etf-ticker.bg-gold {
    color: var(--color-accent);
    background: rgba(255, 159, 67, 0.15);
}

.etf-ticker.bg-blue {
    color: var(--color-primary-dark);
    background: var(--color-primary-light);
}

.etf-issuer-tag {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
}

.etf-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.etf-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
    flex-grow: 1;
}

.etf-meta {
    border-top: 1px solid var(--border-light);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.etf-meta .meta-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.etf-meta .lbl {
    color: var(--text-muted);
}

.etf-meta .val {
    font-weight: 700;
}

/* ==========================================
   區塊：CB 可轉債專區 (CB Convertible Bonds)
   ========================================== */
.cb-intro-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    margin-bottom: 50px;
}

.cb-concept-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.cb-concept-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-hover);
}

/* CB 轉換動畫概念盒 */
.cb-avatar-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.cb-icon-badge {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(97, 150, 255, 0.08);
}

.cb-icon-badge-stock {
    width: 65px;
    height: 65px;
    border-radius: 20px;
    background: rgba(255, 159, 67, 0.1);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.05);
}

.cb-arrows-effect {
    font-size: 1.4rem;
    color: var(--text-muted);
    animation: cbPulseArrows 2s infinite ease-in-out;
}

@keyframes cbPulseArrows {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; color: var(--color-accent); }
}

.cb-box-quote {
    background: var(--bg-main);
    border-radius: 16px;
    padding: 16px 20px;
    border: 1px dashed var(--border-light);
    margin: 20px 0;
}

.cb-box-quote p {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.7;
    text-align: center;
}

.cb-scenario-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.cb-scenario-list li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg-main);
    padding: 16px;
    border-radius: 14px;
    border: 1px solid rgba(97, 150, 255, 0.04);
}

.cb-scenario-list li span {
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-scenario-list li span.status-up { color: var(--color-accent); }
.cb-scenario-list li span.status-down { color: var(--color-primary-dark); }

.cb-scenario-list li p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CB 右側特點卡 */
.cb-features-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cb-features-panel h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.cb-feature-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-premium);
}

.cb-feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.cb-feature-item:hover:nth-child(2) { border-color: var(--color-success); }
.cb-feature-item:hover:nth-child(3) { border-color: var(--color-accent); }
.cb-feature-item:hover:nth-child(4) { border-color: var(--color-secondary); }

.f-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.bg-mint { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.bg-pink { background: rgba(255, 159, 67, 0.1); color: var(--color-accent); }
.bg-purple { background: var(--color-primary-light); color: var(--color-primary-dark); }

.f-content h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.f-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.cb-alert {
    margin-top: 40px;
}

.cb-warning-notes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cb-warning-notes li {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    position: relative;
    padding-left: 16px;
}

.cb-warning-notes li::before {
    content: '•';
    color: var(--color-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ==========================================
   區塊四：動態模擬計算機 (Simulator)
   ========================================== */
.simulator-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.sim-controls {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--shadow-premium);
}

.sim-controls h3, 
.sim-results h3 {
    font-size: 1.3rem;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.sim-controls h3 i {
    color: var(--color-primary-dark);
}

.sim-results h3 i {
    color: var(--color-accent);
}

.control-group {
    margin-bottom: 28px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.highlighted-group {
    background: var(--bg-surface-alt);
    border: 1px solid rgba(97, 150, 255, 0.2);
    padding: 20px;
    border-radius: 16px;
}

.group-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 0.95rem;
}

.group-label i {
    color: var(--text-muted);
    margin-right: 4px;
}

.val-display {
    color: var(--text-main);
    background: rgba(97, 150, 255, 0.08);
    padding: 4px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.highlight-text {
    background: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary-dark);
}

.help-text {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.text-warning {
    color: var(--color-accent) !important;
}

/* 漂亮的客製化圓滑滑動條 */
.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 10px;
    background: var(--color-primary-light);
    outline: none;
    transition: var(--transition-smooth);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-surface);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(97, 150, 255, 0.25);
    transition: var(--transition-smooth);
    border: 3px solid var(--color-primary);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    background: var(--color-primary);
}

.slider-market::-webkit-slider-thumb {
    border-color: var(--color-accent);
}
.slider-market::-webkit-slider-thumb:hover {
    background: var(--color-accent);
}

/* 計算結果面板 - 發光與卡片 */
.sim-results {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 35px;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
}

.result-price-card {
    background: rgba(97, 150, 255, 0.03);
    border: 1px solid rgba(97, 150, 255, 0.15);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* 用於發光效果的背景裝飾 */
.result-price-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(97, 150, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    transition: var(--transition-smooth);
}

.res-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 8px;
}

.res-price {
    font-size: 3.2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    margin-bottom: 12px;
    transition: var(--transition-smooth);
}

.res-status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.status-par {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-premium {
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border: 1px solid rgba(97, 150, 255, 0.25);
}

.status-discount {
    background: rgba(255, 159, 67, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(255, 159, 67, 0.25);
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(97, 150, 255, 0.06);
    padding: 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-val {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

/* 視覺化文字解釋 */
.visual-explanation {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: var(--transition-smooth);
}

.explanation-icon {
    font-size: 1.8rem;
    color: var(--color-accent);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(255, 159, 67, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.explanation-text strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 4px;
    color: var(--text-main);
}

.explanation-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================
   區塊五：知識小測驗 (Quiz)
   ========================================== */
.quiz-container {
    max-width: 680px;
    margin: 0 auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow-premium);
}

.quiz-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-primary-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.quiz-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transition: width 0.4s ease;
}

.quiz-steps {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.quiz-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.6;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.option-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 16px 20px;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-btn:hover {
    background: var(--bg-surface-alt);
    border-color: rgba(97, 150, 255, 0.3);
    transform: translateX(4px);
}

/* 選項答題狀態樣式 */
.option-btn.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.option-btn.correct {
    border-color: var(--color-success) !important;
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--text-main);
    font-weight: 700;
}

.option-btn.wrong {
    border-color: var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--text-main);
}

.quiz-feedback {
    background: var(--bg-surface-alt);
    border: 1px solid rgba(97, 150, 255, 0.15);
    border-radius: 18px;
    padding: 24px;
    margin-top: 30px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.feedback-icon {
    font-size: 1.8rem;
    color: var(--color-success);
}

.quiz-feedback.is-wrong .feedback-icon {
    color: var(--color-danger);
}

.feedback-content {
    flex-grow: 1;
}

.feedback-content h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    font-weight: 700;
}

.feedback-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.quiz-feedback .btn {
    align-self: center;
    margin-left: 10px;
    flex-shrink: 0;
}

/* 測驗結果頁面 */
.quiz-results {
    text-align: center;
    padding: 20px 0;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.results-icon {
    font-size: 3.5rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.score-display {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 20px 0;
}

.score-display span {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--color-accent);
    font-family: 'Outfit', sans-serif;
}

#score-comment {
    color: var(--text-muted);
    margin-bottom: 30px;
}

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

/* ==========================================
   區塊：教師簡介 (Teacher Profile Section)
   ========================================== */
.teacher-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 50px;
    align-items: center;
    margin-top: 40px;
}

.teacher-img-wrapper {
    display: flex;
    justify-content: center;
}

/* 拍立得風格的精緻相框 - 呼應蔚藍的精緻陰影 */
.teacher-polaroid {
    background: #ffffff;
    padding: 16px 16px 24px 16px;
    border-radius: 20px;
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--border-light);
    max-width: 320px;
    width: 100%;
    transition: var(--transition-smooth);
}

.teacher-polaroid:hover {
    transform: rotate(-2deg) translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.teacher-img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    border-radius: 12px;
    background-color: var(--bg-surface-alt);
}

.polaroid-label {
    text-align: center;
    margin-top: 16px;
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.polaroid-label .name {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-main);
}

.polaroid-label .title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* 教師文字區 */
.teacher-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.teacher-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.t-badge {
    background: var(--color-primary-light);
    border: 1px solid rgba(97, 150, 255, 0.25);
    color: var(--color-primary-dark);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.t-badge:nth-child(2) {
    background: rgba(255, 159, 67, 0.1);
    border-color: rgba(255, 159, 67, 0.2);
    color: var(--color-accent);
}

.t-badge:nth-child(3) {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: var(--color-success);
}

.teacher-greeting {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
}

.teacher-bio {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* 教師語錄框 - 左側使用主色蔚藍做修飾 */
.teacher-quote {
    background: var(--bg-surface);
    border-left: 4px solid var(--color-primary);
    padding: 20px 24px;
    border-radius: 0 16px 16px 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(97, 150, 255, 0.03);
}

.quote-icon {
    font-size: 1.5rem;
    color: rgba(97, 150, 255, 0.2);
    margin-bottom: 8px;
}

.teacher-quote p {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.7;
    color: var(--text-main);
}

/* ==========================================
   頁尾 (Footer) - 清爽舒心蔚藍底色
   ========================================== */
.footer {
    background-color: #ebf2ff; /* 溫和的淡色蔚藍底 */
    border-top: 1px solid var(--border-light);
    padding: 70px 0 30px 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 0.5fr;
    gap: 60px;
    margin-bottom: 50px;
}

.footer-brand .logo {
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 480px;
    line-height: 1.7;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--color-primary-dark);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(97, 150, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   RWD 手機自適應響應式調整
   確保 375px 以上之螢幕完美顯示，層級由大到小
   ========================================== */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
        min-height: auto;
        padding-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-desc {
        margin: 0 auto 30px auto;
    }
    
    .hero-btns {
        justify-content: center;
    }
    
    .concept-grid {
        grid-template-columns: 1fr;
    }
    
    .etf-intro-grid {
        grid-template-columns: 1fr;
    }
    
    .cb-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .simulator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .teacher-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .teacher-img-wrapper {
        order: -1; /* 手機版將相片置頂以獲得最佳視覺聚焦 */
    }
    
    .teacher-badge-row {
        justify-content: center;
    }
    
    .teacher-quote {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* 手機版隱藏導覽列以保持清爽 */
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .quiz-container {
        padding: 24px;
    }
    
    .quiz-feedback {
        flex-direction: column;
        align-items: stretch;
    }
    
    .quiz-feedback .btn {
        margin-left: 0;
        margin-top: 16px;
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
