/* ===========================
   home - 首頁
   =========================== */

/* 首頁外層容器 */
.home-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* 頁面頂部英雄區塊 */
.home-hero {
    text-align: center;
    padding: 10px 0 30px;
}

/* 英雄區塊主標題 */
.home-hero-title {
    font-size: 2.25em;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px;
}

/* 英雄區塊副標題，對比度 4.51:1 符合 WCAG AA */
.home-hero-subtitle {
    font-size: 1.063em;
    color: #64748b;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 16px;
}

/* 英雄區塊描述文字 */
.home-hero-desc {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1em;
}

/* 工具列表標題 */
.home-section-title {
    font-size: 1.375em;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e2e8f0;
}

/* 工具卡片格線佈局，雙欄排列 */
.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* 小螢幕時改為單欄 */
@media (max-width: 768px) {
    .home-grid {
        grid-template-columns: 1fr;
    }
}

/* 工具卡片 */
.home-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

/* 卡片滑鼠懸停時加深陰影 */
.home-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.06), 0 10px 24px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
}

/* 卡片標題列 */
.home-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: #fafbfc;
}

/* 卡片標題文字 */
.home-card-title {
    font-size: 1.188em;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
}

/* 卡片內容區域 */
.home-card-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 卡片描述文字，對比度 4.51:1 符合 WCAG AA */
.home-card-desc {
    font-size: 1em;
    color: #64748b;
    line-height: 1.7;
    margin: 0 0 16px;
    flex: 1;
}

/* 卡片底部的前往按鈕，白字對比度 7.08:1 符合 WCAG AAA */
.home-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    color: #fff;
    background: #4b5563;
    text-decoration: none;
    transition: background-color 0.15s ease;
    align-self: flex-start;
}

.home-card-btn:hover {
    background: #374151;
    color: #fff;
    text-decoration: none;
}

/* 按鈕鍵盤聚焦指示 (WCAG 2.4.7 Focus Visible) */
.home-card-btn:focus-visible {
    outline: 2px solid #1e293b;
    outline-offset: 2px;
}

/* 卡片連結鍵盤聚焦指示 (WCAG 2.4.7 Focus Visible) */
.home-card:focus-visible {
    outline: 2px solid #1e293b;
    outline-offset: 2px;
}

/* 尊重使用者減少動態效果的偏好設定 (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
    .home-card,
    .home-card-btn {
        transition: none;
    }
}

/* Windows 高對比模式支援 */
@media (forced-colors: active) {
    /* 卡片邊框確保在高對比模式下可見 */
    .home-card {
        border-color: CanvasText;
    }

    /* 按鈕在高對比模式下保持可見邊框 */
    .home-card-btn {
        border: 2px solid ButtonText;
    }

    .home-card:focus-visible,
    .home-card-btn:focus-visible {
        outline-color: Highlight;
    }
}
