﻿/* ===================================
   Site_common.master 現代海洋藍共用樣式表
   Bootstrap 5 + 無障礙 AA 等級 + 三段字級切換
   =================================== */

/* === 全域變數與字級系統 === */
:root {
    --base-font-size: 16px;
    --title-font-size: 1.15rem;
    --content-font-size: 1rem;
    --hint-font-size: 0.875rem;

    /* 海洋主題調色盤 */
    --ocean-navy: #0e3d74;
    --ocean-blue: #1d4ed8;
    --ocean-cyan: #0284c7;
    --sky-light: #f0f6fc;
    --border-light: #dbe4ee;
    --text-main: #1e293b;
    --text-muted: #64748b;
}

body.font-size-sm {
    --base-font-size: 14px;
    --title-font-size: 1.05rem;
    --content-font-size: 0.92rem;
    --hint-font-size: 0.82rem;
}
body.font-size-md {
    --base-font-size: 16px;
    --title-font-size: 1.15rem;
    --content-font-size: 1rem;
    --hint-font-size: 0.875rem;
}
body.font-size-lg {
    --base-font-size: 18px;
    --title-font-size: 1.3rem;
    --content-font-size: 1.15rem;
    --hint-font-size: 0.95rem;
}

* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    font-size: var(--base-font-size);
    height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    font-size: var(--content-font-size);
    line-height: 1.6;
    color: var(--text-main);
    background: linear-gradient(180deg, #f0f5fa 0%, #e3edf7 100%);
    background-attachment: fixed;
    -webkit-text-size-adjust: 100%;
}

/* === 無障礙：跳到主要內容 === */
.skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    background: var(--ocean-navy);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 8px 8px;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #f59e0b;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === 全站統一寬度容器 (880px 最適居中寬度) === */
.site-width-container {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* === 頂部工具列 (字級切換) === */
.font-size-switcher {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.font-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 2px 10px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-btn.active, .font-btn:hover {
    background-color: var(--ocean-blue);
    color: #ffffff;
}

/* === 頁首 Banner (海洋深藍漸層) === */
.site-header {
    margin-bottom: 1.5rem;
    width: 100%;
}

.banner-text-container {
    background: linear-gradient(135deg, #0e3d74 0%, #1a569b 60%, #1e6bb8 100%);
    border-radius: 14px;
    box-shadow: 0 8px 24px -4px rgba(14, 61, 116, 0.25);
    padding: 1.85rem 1.5rem;
    text-align: center;
}

.site-title {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.35;
}

.site-subtitle {
    display: block;
    color: #dbeafe;
    font-size: 1.25rem;
    margin-top: 0.45rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* === 主要內容區 === */
.site-main {
    flex: 1;
    width: 100%;
}

/* === 滿版深海藍 Footer === */
.site-footer {
    background-color: #0a192f;
    color: #94a3b8;
    padding: 1.75rem 0;
    margin-top: 3rem;
    width: 100%;
}

.site-footer strong {
    color: #f1f5f9;
}

.footer-link {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
}

.footer-link:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

/* === 焦點指示器 === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid #f59e0b;
    outline-offset: 2px;
}

/* === 響應式微調 === */
@media (max-width: 767.98px) {
    .site-width-container {
        padding: 0 12px;
    }
    .banner-text-container {
        padding: 1.35rem 1rem;
    }
    .site-title {
        font-size: 1.45rem;
    }
    .site-subtitle {
        font-size: 1.15rem;
    }
}

@media (max-width: 575.98px) {
    .site-width-container {
        padding: 0 8px;
    }
    .banner-text-container {
        padding: 1.15rem 0.75rem;
    }
    .site-title {
        font-size: 1.25rem;
    }
    .site-subtitle {
        font-size: 1rem;
    }
}