/* =====================================================================
   site-fixes.css — 全站檢查（2026-11-11）修正，最後載入、覆寫舊樣式
   主色 #16a34a 只用在圖示/邊框/標籤；有白字的按鈕底色用 #15803d（對比約 5:1）
   ===================================================================== */

/* ---------- 1-4 Minty 主題色改成本站主色系 ---------- */
:root {
    --bs-primary: #15803d;
    --bs-primary-rgb: 21, 128, 61;
    --bs-success: #15803d;
    --bs-success-rgb: 21, 128, 61;
    --bs-secondary: #475569;
    --bs-secondary-rgb: 71, 85, 105;
    --bs-danger: #b91c1c;
    --bs-danger-rgb: 185, 28, 28;
    --bs-info: #0369a1;
    --bs-info-rgb: 3, 105, 161;
    --bs-link-color: #15803d;
    --bs-link-color-rgb: 21, 128, 61;
    --bs-link-hover-color: #166534;
    --bs-link-hover-color-rgb: 22, 101, 52;
    --bs-primary-text-emphasis: #14532d;
    --bs-success-text-emphasis: #14532d;
    --bs-primary-bg-subtle: #dcfce7;
    --bs-success-bg-subtle: #dcfce7;
    --bs-primary-border-subtle: #86efac;
    --bs-success-border-subtle: #86efac;
    /* 中文頁面不用 Montserrat（Minty 預設），改用系統中文字型 */
    --bs-body-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    --bs-font-sans-serif: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .btn, .navbar, .form-control, .form-select {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.btn-primary, .btn-success {
    --bs-btn-bg: #15803d;
    --bs-btn-border-color: #15803d;
    --bs-btn-hover-bg: #166534;
    --bs-btn-hover-border-color: #166534;
    --bs-btn-active-bg: #14532d;
    --bs-btn-active-border-color: #14532d;
    --bs-btn-disabled-bg: #15803d;
    --bs-btn-disabled-border-color: #15803d;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    background-color: #15803d;
    border-color: #15803d;
    color: #fff;
}

    .btn-primary:hover, .btn-success:hover { background-color: #166534; border-color: #166534; color: #fff; }

.btn-outline-primary, .btn-outline-success {
    --bs-btn-color: #15803d;
    --bs-btn-border-color: #15803d;
    --bs-btn-hover-bg: #15803d;
    --bs-btn-hover-border-color: #15803d;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #166534;
    --bs-btn-active-border-color: #166534;
}

.btn-outline-secondary {
    --bs-btn-color: #15803d;
    --bs-btn-border-color: #94a3b8;
    --bs-btn-hover-bg: #f0fdf4;
    --bs-btn-hover-color: #166534;
    --bs-btn-hover-border-color: #15803d;
    --bs-btn-active-bg: #dcfce7;
    --bs-btn-active-color: #14532d;
}

.btn-secondary {
    --bs-btn-bg: #475569;
    --bs-btn-border-color: #475569;
    --bs-btn-hover-bg: #334155;
    --bs-btn-hover-border-color: #334155;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

.btn-danger {
    --bs-btn-bg: #b91c1c;
    --bs-btn-border-color: #b91c1c;
    --bs-btn-hover-bg: #991b1b;
    --bs-btn-hover-border-color: #991b1b;
}

.badge.bg-danger, .bg-danger { background-color: #b91c1c !important; color: #fff; }
.badge.bg-warning, .bg-warning { background-color: #fde68a !important; color: #78350f !important; }
.text-success { color: #15803d !important; }
.text-muted { color: #475569 !important; }

/* Minty 的粉紅連結 → 主色加底線 */
a.link-secondary, .text-secondary { color: #475569 !important; }
main a:not(.btn):not(.nav-link):not([class*="card"]):not(.nma-btn):not(.stretched-link) { text-underline-offset: 2px; }

/* _layout.css 的 Minty 綠 #78c2ad 換掉 */
.homeA { background-color: #f0fdf4 !important; }
.norBtn:hover { background-color: #15803d !important; color: #fff !important; }

/* ---------- 1-5 有白字的按鈕底色改 #15803d ---------- */
.navbar .btn-primary,
.btn-primary,
.nav-mobile-account .nma-btn.pri,
.hero-main-cta {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #fff !important;
}

    .btn-primary:hover,
    .nav-mobile-account .nma-btn.pri:hover { background: #166534 !important; border-color: #166534 !important; }

.nav-mobile-account .nma-btn { border-color: #15803d; }

/* LIVE 徽章：較深的紅＋粗體 */
.fo .live, .farm-live .live { font-weight: 800; }

/* ---------- 1-3 手機頁首 380px → 不溢出 ---------- */
.nav-logo { min-width: 0; flex: 0 1 auto; color: inherit; text-decoration: none; }
.nav-logo .logo-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: baseline; gap: 2px; }
.nav-logo .logo-icon { flex: none; }
.nav-inner > .nav-toggle { flex: none; }

@media (max-width: 900px) {
    .nav-inner { padding: 0 12px; column-gap: 8px; }
}

@media (max-width: 520px) {
    .nav-logo .logo-text { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; }
    .nav-logo .lt-main { font-size: 17px; font-weight: 800; }
    .nav-logo .lt-sub { font-size: 12px; font-weight: 600; color: #475569; letter-spacing: .02em; }
}

/* ---------- 1-6 / 1-9 觸控目標、選單 ---------- */
.nav-links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 10px;
}

.nav-links a.active, .nav-links a[aria-current="page"] {
    background: #dcfce7;
    color: #14532d;
    box-shadow: inset 0 -3px 0 #15803d;
}

.nav-links .nav-soon, .nav-mobile-links .nav-soon {
    font-size: 11px;
    font-weight: 700;
    color: #78350f;
    background: #fde68a;
    border-radius: 999px;
    padding: 1px 6px;
    margin-left: 4px;
    line-height: 1.4;
}

.nav-auth .btn { min-height: 40px; }

/* 漢堡鈕：標準 ☰／✕，48×48 */
.nav-toggle { width: 48px; height: 48px; }
.nav-toggle .nav-toggle-icon { width: 40px; height: 40px; border-radius: 12px; }
.nav-toggle .nav-toggle-svg { width: 24px; height: 24px; }

/* 手機選單：項目 52px、字 16px、目前頁綠色左條 */
.nav-mobile-links a {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 0 12px;
    font-size: 16px;
    border-radius: 12px;
    border-left: 4px solid transparent;
}

    .nav-mobile-links a.active, .nav-mobile-links a[aria-current="page"] {
        background: #f0fdf4;
        color: #14532d;
        border-left-color: #15803d;
        font-weight: 700;
    }

.nav-mobile { z-index: 21; }

/* 選單遮罩 */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 64px 0 0 0;
    background: rgba(15, 23, 42, .45);
    z-index: 19;
}

@media (max-width: 900px) {
    body.nav-open .nav-backdrop { display: block; }
}

/* ---------- 1-7 小精靈不擋最後一段內容 ---------- */
@media (max-width: 900px) {
    .Layout_BODY { padding-bottom: 84px; }
}

/* ---------- 2-5 / reduced-motion：取消淡入與動畫 ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero-label, .hero-title, .hero-subtitle, .hero-actions { animation: none !important; opacity: 1 !important; transform: none !important; }
    .animate-on-scroll { opacity: 1 !important; transform: none !important; transition: none !important; }
    .hero-video { animation: none !important; }
    .btn-ai-route.is-pulsing { animation: none !important; }
}

/* ---------- 2-2 首頁 H1 讀得到：白字＋文字後方深色漸層 ---------- */
.hero .hero-content { position: relative; isolation: isolate; }

    .hero .hero-content::before {
        content: "";
        position: absolute;
        inset: -24px -40px;
        z-index: -1;
        background: radial-gradient(ellipse at center, rgba(15, 23, 42, .62) 0%, rgba(15, 23, 42, .38) 55%, rgba(15, 23, 42, 0) 78%);
        pointer-events: none;
    }

.hero .hero-title { color: #fff !important; text-shadow: 0 2px 12px rgba(0, 0, 0, .55); }
.hero .hero-label, .hero .hero-subtitle { color: #f8fafc !important; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.hero .hero-actions .btn-outline { background: rgba(15, 23, 42, .35); color: #fff; border-color: rgba(255, 255, 255, .7); }

/* ---------- 2-6 小字最少 12px ---------- */
.hero-label { font-size: max(12px, 1em); }
small, .small { font-size: max(12px, .875em); }

/* ---------- 1-8 h1 視覺上不要太大 ---------- */
.page-h1 { font-size: clamp(22px, 4vw, 28px); font-weight: 800; color: #0f172a; margin: 8px 0 12px; }

/* ---------- 聊天視窗不撐寬頁面 ---------- */
.chat-window { max-width: calc(100vw - 24px); }

/* ---------- 9 / 10 登入、註冊 ---------- */
.auth-page { max-width: 440px; margin: 28px auto 40px; padding: 0 4px; }
.auth-sub { color: #475569; margin: -4px 0 16px; }
.auth-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 20px; box-shadow: 0 6px 20px rgba(15, 23, 42, .06); margin-bottom: 16px; }
.auth-field { margin-bottom: 14px; }
.auth-label { display: block; font-weight: 700; color: #0f172a; margin-bottom: 6px; font-size: 15px; }
.auth-label .req, .auth-label .opt { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.auth-label .req { background: #fee2e2; color: #991b1b; }
.auth-label .opt { background: #f1f5f9; color: #475569; }
.auth-input { min-height: 50px; font-size: 16px; border-radius: 12px; }
.auth-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; margin-bottom: 8px; font-weight: 600; }
.auth-check .form-check-input { width: 22px; height: 22px; margin: 0; }
.auth-submit { min-height: 50px; border-radius: 14px !important; font-weight: 800; }
.auth-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; }
.auth-links a { display: inline-flex; align-items: center; min-height: 44px; color: #15803d; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 8 查詢報名 ---------- */
.lookup-card .card-header { background: #15803d !important; }
.lookup-card .lookup-input { min-height: 50px; font-size: 16px; border-radius: 12px; }
.lookup-card .lookup-label { display: block; font-weight: 700; margin-bottom: 6px; }
.lookup-card .lookup-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: #15803d; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 575.98px) { .lookup-card .card-body { padding: 20px !important; } }
