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

body {
    font-family: 'Segoe UI', 'PingFang HK', Roboto, 'Helvetica Neue', sans-serif;
    background: #faf9f6;
    color: #1e2a3a;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   頁首 Header
   ============================================ */
header {
    background: #0b2a45;
    color: #ffffff;
    padding: 20px 0 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

header h1 {
    font-size: 28px;
    letter-spacing: 1px;
}

header .subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 12px;
}

/* 導航列 */
nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

nav a:hover,
nav a.active {
    color: #ffffff;
    border-bottom-color: #facc15;
}

/* ============================================
   按鈕
   ============================================ */
.btn {
    display: inline-block;
    background: #facc15;
    color: #0b2a45;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 15px;
    transition: 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #fde047;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.4);
}

/* ============================================
   首頁 Hero 區域
   ============================================ */
.hero {
    background: linear-gradient(135deg, #eef2f7 0%, #d9e2ec 100%);
    padding: 70px 20px;
    text-align: center;
    border-bottom: 1px solid #d0d7e0;
}

.hero h2 {
    font-size: 42px;
    color: #0b2a45;
}

.hero p {
    font-size: 20px;
    color: #1e3a5f;
    margin: 15px 0;
}

/* ============================================
   首頁 卡片區
   ============================================ */
.features {
    padding: 50px 0;
}

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

.card {
    background: #ffffff;
    padding: 30px 25px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 5px solid #0b2a45;
    transition: 0.25s;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.card h3 {
    color: #0b2a45;
    margin-bottom: 10px;
}

/* ============================================
   內頁通用內容
   ============================================ */
.page-content {
    padding: 50px 0;
    background: #ffffff;
    min-height: 55vh;
}

.page-content h2 {
    font-size: 32px;
    color: #0b2a45;
    border-bottom: 4px solid #facc15;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.page-content h3 {
    margin: 25px 0 10px 0;
    color: #1e3a5f;
}

.page-content ul,
.page-content ol {
    margin: 15px 0 20px 20px;
}

.page-content li {
    margin-bottom: 8px;
}

.page-content a {
    color: #0b2a45;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.page-content a:hover {
    color: #facc15;
}

/* ============================================
   表格（政策頁面）
   ============================================ */
table {
    width: 100%;
    border-collapse: collapse;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

th,
td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    background: #0b2a45;
    color: white;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #f1f5f9;
}

/* ============================================
   Q&A 頁面專用樣式
   ============================================ */
.qa-page .qa-intro {
    font-size: 18px;
    color: #1e3a5f;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #f0f4fa;
    border-radius: 10px;
    border-left: 5px solid #facc15;
}

.qa-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
}

.qa-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e8edf4;
    transition: all 0.25s ease;
}

.qa-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

/* 問題行 */
.qa-item dt {
    display: flex;
    align-items: center;
    gap: 14px;
    font-weight: 700;
    font-size: 17px;
    color: #0b2a45;
    margin-bottom: 10px;
    cursor: default;
}

/* 圓形數字 */
.qa-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: #0b2a45;
    color: #ffffff;
    font-weight: 700;
    font-size: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: 0.2s;
}

.qa-item:hover .qa-number {
    background: #facc15;
    color: #0b2a45;
    transform: scale(1.05);
}

/* 問題文字 */
.qa-question {
    line-height: 1.4;
}

/* 答案 */
.qa-item dd {
    margin: 0 0 0 48px;
    padding: 0;
    color: #2d3f56;
    font-size: 15.5px;
    line-height: 1.7;
}

.qa-item dd strong {
    color: #0b2a45;
    background: #fef9e0;
    padding: 0 6px;
    border-radius: 4px;
}

.qa-item dd a {
    color: #0b2a45;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.qa-item dd a:hover {
    color: #facc15;
}

/* ============================================
   頁尾 Footer
   ============================================ */
footer {
    background: #0b2a45;
    color: #94a3b8;
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
    border-top: 1px solid #1e3a5f;
}

/* ============================================
   響應式設計（手機版）
   ============================================ */
@media (max-width: 600px) {
    /* 頁首 */
    header h1 {
        font-size: 22px;
    }

    nav {
        gap: 6px 16px;
    }

    nav a {
        font-size: 14px;
    }

    /* Hero */
    .hero {
        padding: 40px 15px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero p {
        font-size: 17px;
    }

    /* 卡片 */
    .features .container {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .card {
        padding: 20px;
    }

    /* 內頁 */
    .page-content {
        padding: 30px 0;
    }

    .page-content h2 {
        font-size: 24px;
    }

    /* 表格（手機水平捲動） */
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 14px;
    }

    th,
    td {
        padding: 10px 12px;
    }

    /* Q&A 手機版 */
    .qa-item {
        padding: 14px 16px;
    }

    .qa-item dt {
        font-size: 15px;
        gap: 10px;
    }

    .qa-number {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 13px;
    }

    .qa-item dd {
        margin-left: 38px;
        font-size: 14px;
    }

    .qa-page .qa-intro {
        font-size: 15px;
        padding: 12px 16px;
    }
}

/* ============================================
   平板裝置（601px - 1024px）
   ============================================ */
@media (min-width: 601px) and (max-width: 1024px) {
    .features .container {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h2 {
        font-size: 36px;
    }
}

/* ============================================
   印刷樣式（可選）
   ============================================ */
@media print {
    header,
    footer,
    .btn {
        display: none;
    }

    .page-content {
        min-height: auto;
        padding: 20px 0;
    }

    .qa-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
}