﻿/* ==========================================================================
   Project: KHURC Official Website
   Version: Beta_115.2.12.v2_DynamicBreadcrumb
   Date: 2026-02-12
   ========================================================================== */

/* ==========================================================================
   1. 配色主題與全站變數
   ========================================================================== */
:root {
    --primary-color: #5a4035 !important;
    --primary-hover: #5D4037;
    --accent-color: #A67B5B;
    --text-dark: #3E3836;
    --text-muted: #665C58;
    --bg-light: #F9F7F5;
    --nav-height: 80px;
    --nav-height-shrink: 50px;
    --logo-height-default: 60px;
    --logo-height-shrink: 35px;
    /*--logo-max-width: 280px;*/
    --logo-max-width: 100%;
}

/* ==========================================================================
   2. 基礎設定
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Noto Sans TC", sans-serif;
    /*font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;*/
    color: var(--text-dark);
    line-height: 1.2;
    /* background-color: #fff; */
    padding-top: var(--nav-height);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: url(../image/main-index-bg.webp) repeat;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

/* 通用圖片特效 */
.kh-news-img-box, .related-img-box {
    overflow: hidden;
    position: relative;
}

    .kh-news-img-box img, .related-img-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease;
        will-change: transform;
    }

    .kh-news-card:hover .kh-news-img-box img, .related-img-box:hover img {
        transform: scale(1.1);
    }

/* ==========================================================================
   3. Header
   ========================================================================== */
app-header {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    /*background: #fff;*/
    background: url(../image/main-index-bg.webp) repeat;
    box-shadow: 0 2px 10px rgba(62,56,54,0.08);
    border-bottom: 1px solid #E8E4E0;
    transition: all 0.4s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--nav-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    transition: height 0.4s ease;
    background: url(../image/main-index-bg.webp) repeat;
}

    .header-container.shrink {
        height: var(--nav-height-shrink);
    }

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: font-size 0.4s ease;
}

.logo img {
    height: var(--logo-height-default);
    width: auto;
    max-width: var(--logo-max-width);
    object-fit: contain;
    transition: all 0.4s ease;
}

.header-container.shrink .logo img {
    height: var(--logo-height-shrink);
}

.header-container.shrink .logo a {
    font-size: 1.3rem;
}

.nav-menu {
    display: flex;
    gap: 0px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    padding: 10px 0;
}

.nav-link {
    padding: 8px 15px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 2px;
    font-size: 1.05rem;
    display: block;
    color: var(--text-dark);
}

    .nav-link:hover {
        background: var(--primary-color);
        color: #fff;
    }

.dropdown {
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
    border: 1px solid #eee;
    top: 100%;
    left: 0;
    border-top: 3px solid var(--primary-color);
    z-index: 10000;
}

    .dropdown li a {
        padding: 12px 20px;
        border-bottom: 1px solid #f9f9f9;
        display: block;
        font-size: 0.95rem;
    }

        .dropdown li a:hover {
            background: var(--bg-light);
            color: var(--primary-color);
            padding-left: 25px;
        }

.nav-item:hover > .dropdown {
    opacity: 1;
    visibility: visible;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary-color);
}

.text-center {
    text-align: center;
}

.loading-box {
    padding: 50px;
    text-align: center;
}

@media (max-width: 992px) {
    .hamburger {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

        .nav-menu.active {
            max-height: 80vh;
            overflow-y: auto;
        }

    .nav-item {
        width: 100%;
        text-align: left;
    }

    .nav-link {
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
        width: 100%;
        background: #fafafa;
        border: none;
    }

    .nav-item.mobile-expand > .dropdown {
        display: block;
    }
}

/* ==========================================================================
   4. 首頁 Banner (V1.3 穩定版)
   ========================================================================== */
.hero-section {
    position: relative;
    width: 100%;
    height: 600px;
    /*background: #fff;*/
    overflow: hidden;
    display: flex;
    background: url(../image/main-index-bg.webp) repeat;
}

.hero-text-area {
    width: 25%;
    height: 100%;
    /*background: #fff;*/
    background: url(../image/main-index-bg.webp) repeat;
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .hero-text-area::after {
        display: none;
    }

.vertical-text-wrap {
    writing-mode: vertical-rl;
    text-orientation: upright;
    color: var(--primary-color);
    letter-spacing: 0.5em;
    padding-right: 20px;
    display: block;
}

.main-title {
    font-size: calc(1.43125rem + 2.175vw);
    font-weight: 700;
    /*white-space: nowrap;*/
    margin: 0;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.sub-title {
    font-size: 1.6rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 20px;
}

.hero-slider-area {
    width: 75%;
    height: 80%;
    position: relative;
    /*background: #fff;*/
    overflow: visible;
    z-index: 5;
    border-bottom-left-radius: 0;
}

.slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-bottom-left-radius: 200px;
}

    .slide-item.active {
        opacity: 1;
    }

.slider-dots {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ccc;
    /*
    border: 1px solid #bbb;
    border-radius: 50%;
    */
    border-radius: 0;
    cursor: pointer;
    transition: 0.3s;
    -webkit-clip-path: polygon(50% 0%, 100% 45%, 100% 100% 100%, 0 100%, 0 45%);
    clip-path: polygon(50% 0%, 100% 45%, 100% 100%, 0 100%, 0 45%);
    opacity: 1;
    border: none;
}

    .dot:hover {
        background: var(--primary-hover);
    }

    .dot.active {
        background: var(--primary-color);
        transform: scale(1.2);
    }

@media (max-width: 992px) {
    .hero-section {
        flex-direction: column-reverse;
        height: auto;
    }

    .hero-slider-area {
        width: 100%;
        height: 300px;
        margin: 0;
        border-bottom-left-radius: 0;
    }

    .slide-item {
        border-bottom-left-radius: 0;
    }

    .hero-text-area {
        width: 100%;
        height: auto;
        padding: 40px 20px;
    }

    .vertical-text-wrap {
        writing-mode: horizontal-tb;
        text-align: center;
        padding: 0;
    }

    .main-title {
        /* font-size: 2rem; */
        /*white-space: normal;*/
        margin: 0 0 10px 0;
    }

        .main-title br {
            display: none;
        }

        .main-title::after {
            content: ' ';
        }

    .sub-title {
        font-size: 1rem;
        margin: 0;
        margin-top: 10px;
    }

    .slider-dots {
        bottom: 20px;
    }
}

@media (min-width: 1200px) {
    .main-title {
        font-size: 3.0625rem;
    }
}

/* ==========================================================================
   5. News Layout
   ========================================================================== */
.news-section-layout {
    max-width: 1300px;
    margin: 60px auto;
    padding: 0 40px;
    display: flex;
    gap: 60px;
    align-items: start;
    background: url(../image/main-index-bg.webp) repeat;
    /* ★ 關鍵：確保容器有基本高度，避免載入時畫面跳動 */
    min-height: 600px;
}

/* 左側選單區 */
.news-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 120px;
    z-index: 10;
}

.ns-ch-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 30px;
    letter-spacing: 2px;
    position: relative;
    padding-left: 10px;
}

    .ns-ch-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 4px;
        background-color: var(--primary-color);
        margin-top: 15px;
    }

.ns-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .ns-links li {
        font-size: 1.15rem;
        color: #888;
        padding: 15px 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-bottom: 1px solid #eee;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .ns-links li:hover {
            color: var(--primary-color);
            padding-left: 15px;
        }

        .ns-links li.active {
            color: var(--text-dark);
            font-weight: 900;
            font-size: 1.25rem;
            padding-left: 10px;
            border-bottom: 2px solid var(--primary-color);
            background-color: transparent;
        }

            .ns-links li.active::after {
                content: '→';
                font-family: monospace;
                margin-left: 10px;
                color: var(--accent-color);
                font-weight: normal;
                animation: arrowMove 0.8s infinite alternate;
            }

@keyframes arrowMove {
    from {
        transform: translateX(0);
        opacity: 0.8;
    }

    to {
        transform: translateX(5px);
        opacity: 1;
    }
}

/* --- 右側內容區 --- */
.news-grid-area {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%; /* 確保佔滿剩餘空間 */
    min-height: 500px; /* ★ 關鍵：設定最小高度，防止內容未載入時版型塌陷 */
    align-content: start;
    /*transition: opacity 0.2s ease;*/
    /* ★ 關鍵：轉場動畫設定 */
    opacity: 1;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
    transform: translateY(0);
}

    /* 載入中/切換時的狀態 */
    .news-grid-area.loading {
        opacity: 0.5; /* 變半透明，不要全白 */
        transform: translateY(5px); /* 微微下沉效果 */
        pointer-events: none; /* 禁止點擊 */
    }

.kh-news-card {
    display: block;
}

.kh-news-img-box {
    width: 100%;
    aspect-ratio: 16/10;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.kh-news-title {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #000;
}

.kh-news-card:hover .kh-news-title {
    color: var(--primary-color);
}

.kh-news-summary {
    color: #666;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kh-news-date {
    font-family: monospace;
    color: #888;
}

.more-btn-container {
    grid-column: 1 / -1;
    text-align: right;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.more-link {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    transition: all 0.3s;
}

    .more-link:hover {
        background-color: var(--primary-color);
        color: #fff;
    }

.tab-content-fade {
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RWD */
@media (max-width: 992px) {
    .news-section-layout {
        flex-direction: column;
        min-height: auto; /* 手機版取消最小高度限制 */
        padding: 0 20px;
        gap: 20px;
        margin: 40px auto;
        align-items: stretch;
    }

    .news-sidebar {
        width: 100%;
        position: static;
    }

    .ns-ch-title {
        font-size: 1.8rem;
        margin-bottom: 20px;
        text-align: center;
        padding-left: 0;
    }

        .ns-ch-title::after {
            margin: 10px auto 0;
        }

    .ns-links {
        display: flex;
        overflow-x: auto;
        gap: 10px;
        padding-bottom: 10px;
        white-space: nowrap;
        border-bottom: none;
        -webkit-overflow-scrolling: touch;
        justify-content: center;
    }

        .ns-links::-webkit-scrollbar {
            display: none;
        }

        .ns-links li {
            flex: 0 0 auto;
            padding: 8px 20px;
            border: 1px solid #ddd;
            border-radius: 30px;
            font-size: 1rem;
            color: #666;
            background-color: #fff;
        }

            .ns-links li.active {
                background-color: var(--primary-color);
                color: #fff;
                border-color: var(--primary-color);
                font-size: 1rem;
                font-weight: normal;
                padding-left: 20px;
            }

                .ns-links li.active::after {
                    display: none;
                }

    .news-grid-area {
        grid-template-columns: 1fr;
        min-height: auto; /* 手機版自動高度 */
        gap: 30px;
    }
}

/* ==========================================================================
   6. Footer (高擬真版)
   ========================================================================== */
app-footer {
    display: block;
    background-color: #fff;
    color: #333;
    border-top: 5px solid var(--primary-color);
    margin-top: auto;
    font-size: 0.9rem;
}

.footer-main {
    background-color: #FDFDFD;
    /*background-image: url("data:../image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");*/
    /*background:url(../image/main-index-bg.webp) repeat; -webkit-transition:all .5s ease-in-out;transition:all .5s ease-in-out};*/
    background: url(../image/main-index-bg.webp) repeat;
    padding: 10px 0;
    color: #333;
    justify-content:space-between;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-left-group {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.footer-logo img {
    height: 45px;
    width: auto;
}

.footer-contact p {
    margin: 6px 0;
    font-size: 0.95rem;
    color: #222;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.footer-right-group {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.footer-badge img {
    height: 45px;
    width: auto;
}

.footer-policies {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

    .footer-policies li {
        margin-bottom: 8px;
    }

    .footer-policies a {
        color: #444;
        font-size: 0.95rem;
        text-decoration: none;
        font-weight: 500;
    }

        .footer-policies a:hover {
            color: var(--primary-color);
            text-decoration: underline;
        }

.footer-bottom {
    background-color: #4a3b32;
    color: #fff;
    padding: 20px 0;
    text-align: left;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    margin: 0 0px;
}

.footer-bottom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

/* 回到頂部按鈕 (優化版) */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999;
    border: 2px solid #fff;
    /* ★ 修改：預設隱藏 (透明 + 下沉 + 不可點擊) */
    opacity: 0;
    visibility: hidden; /* 確保不擋到下方物件 */
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

    /* ★ 新增：顯示狀態 (搭配 JS 控制) */
    .scroll-top-btn.show {
        opacity: 0.8;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto; /* 恢復可點擊 */
    }

        /* Hover 狀態 (在顯示時才生效) */
        .scroll-top-btn.show:hover {
            opacity: 1;
            background-color: var(--primary-color);
        }

    .scroll-top-btn::after {
        content: '↑';
        font-size: 1.2rem;
        font-weight: bold;
    }

@media (max-width: 992px) {
    .footer-left-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .footer-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right-group {
        align-items: flex-start;
        width: 100%;
        border-top: 1px solid #eee;
        padding-top: 20px;
    }

    .footer-policies {
        text-align: left;
    }

    .footer-bottom {
        margin: 0 10px;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        text-align: center;
    }
}

/* ==========================================================================
   7. 內頁：通用樣式 (Breadcrumb, Content)
   ========================================================================== */
.main-content {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
    width: 100%;
}

.page-title {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    display: block; /* 還原預設 display */
}
    /* 移除通用標題的偽元素，避免干擾 */
    .page-title::before {
        content: none;
        display: none;
    }

/* 2. 政策頁專用標題 (Security, Policy 頁面使用：左側帶有裝飾槓) */
.page-title-policy {
    font-size: 1.5rem;
    font-weight: 900;
    color: #222; /* 深黑色 */
    margin-bottom: 40px;
    padding-bottom: 0;
    border-bottom: none; /* 無底線 */
    /* Flex 排列讓橫槓垂直置中 */
    display: flex;
    display: none;
    align-items: center;
}

    /* 左側深咖啡色橫槓 */
    .page-title-policy::before {
        content: '';
        display: inline-block;
        width: 30px; /* 橫槓長度 */
        height: 6px; /* 橫槓厚度 */
        background-color: #5D4638; /* 深咖啡色 */
        margin-right: 12px;
        border-radius: 2px;
        flex-shrink: 0;
    }

.news-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.breadcrumb {
    font-size: 0.95rem;
    color: #666;
    display: flex;
    gap: 5px;
}

    .breadcrumb a {
        color: #666;
    }

        .breadcrumb a:hover {
            color: var(--primary-color);
        }

.func-icons {
    display: flex;
    gap: 10px;
}

.func-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

    .func-btn:hover {
        background: var(--primary-color);
        color: #fff;
        border-color: var(--primary-color);
    }

/* ==========================================================================
   8. 頁面專用樣式 (Detail, Gallery, List, Board, Bylaws, Profile, Links)
   ========================================================================== */

/* Detail & Gallery */
.news-main-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: #000;
    line-height: 1.4;
    margin-bottom: 15px;
    text-align: left;
}

.news-content-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 60px;
    text-align: justify;
}

.news-featured-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

    .news-featured-image img {
        width: 100%;
        height: auto;
        display: block;
    }

.featured-caption {
    background: #f9f9f9;
    color: #666;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-left: 4px solid var(--primary-color);
}

.related-gallery-section {
    margin-top: 60px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.related-section-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.related-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.related-img-box {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    background: #f0f0f0;
}

.related-caption {
    font-size: 0.9rem;
    color: #333;
}

@media (max-width: 992px) {
    .related-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* List */
.full-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 30px;
}

@media (max-width: 992px) {
    .full-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .full-list-grid {
        grid-template-columns: 1fr;
    }
}

/* Board */
.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    margin-bottom: 40px;
}

    .board-table caption {
        text-align: left;
        font-size: 1.5rem;
        font-weight: bold;
        margin-bottom: 10px;
        color: var(--primary-color);
    }

    .board-table th {
        background: var(--primary-color);
        color: #fff;
        padding: 15px;
        text-align: left;
        white-space: nowrap;
    }

    .board-table td {
        border-bottom: 1px solid #eee;
        padding: 15px;
        color: #444;
    }

    .board-table tr:hover {
        background: var(--bg-light);
    }

@media (max-width: 768px) {
    .board-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Bylaws (各單位執掌) */
.bylaw-main-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 40px 0 30px;
    padding-left: 10px;
}

.bylaw-list {
    max-width: 1000px;
    margin: 0 auto 60px;
}

.bylaw-item {
    margin-bottom: 40px;
}

.bylaw-head {
    display: flex;
    align-items: stretch;
}

.bylaw-num {
    background-color: #5D4638;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    padding: 10px 40px 10px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 1;
    clip-path: polygon(0 0, 100% 0, 75% 100%, 0% 100%);
    flex-shrink: 0;
    min-width: 100px;
}

.bylaw-dept-text {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    padding-left: 5px;
    border-top: 3px solid #5D4638;
    border-bottom: none;
}

.bylaw-content-list {
    list-style: none;
    padding: 20px 0 0 0;
    margin: 0;
    counter-reset: bylaw-counter;
}

    .bylaw-content-list li {
        font-size: 1.05rem;
        color: #444;
        line-height: 1.8;
        margin-bottom: 5px;
        padding-left: 20px;
        position: relative;
    }

        .bylaw-content-list li::before {
            counter-increment: bylaw-counter;
            content: counter(bylaw-counter) ". ";
            font-weight: bold;
            color: #333;
            position: absolute;
            left: 0;
        }

@media (max-width: 768px) {
    .bylaw-num {
        font-size: 1.5rem;
        padding: 10px 30px 10px 15px;
        min-width: 80px;
    }

    .bylaw-dept-text {
        font-size: 1.1rem;
        padding-left: 0;
        align-items: flex-end;
        padding-bottom: 5px;
    }
}

/* Regulations */
.reg-list li {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
}

.reg-id {
    background: var(--text-muted);
    color: #fff;
    width: 40px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.reg-name {
    flex: 1;
    font-weight: 500;
    font-size: 1.1rem;
    color: #333;
}

.reg-date {
    margin-right: 20px;
    color: #888;
    font-family: monospace;
    white-space: nowrap;
}

.btn-pdf {
    background: #d32f2f;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin-left: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

    .btn-pdf:hover {
        background: #b71c1c;
    }

@media (max-width: 600px) {
    .reg-list li {
        flex-wrap: wrap;
    }

    .reg-name {
        width: 100%;
        margin-bottom: 5px;
        order: 1;
    }

    .reg-id {
        order: 0;
    }

    .reg-date {
        margin-left: auto;
        order: 2;
        font-size: 0.85rem;
    }

    .btn-pdf {
        order: 3;
    }
}

/* Profile */
.profile-section {
    max-width: 1000px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.profile-item {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
}

.profile-text {
    flex: 1;
    padding-top: 20px;
}

.profile-title-row {
    font-size: 2rem;
    font-weight: 900;
    color: #4a3b32;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.profile-job-title {
    margin-right: 15px;
}

.profile-subtitle {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-top: 20px;
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

    .profile-subtitle::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 5px;
        height: 5px;
        background-color: var(--primary-color);
        border-radius: 50%;
        display: none;
    }

.profile-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .profile-list li {
        font-size: 1.05rem;
        color: #444;
        line-height: 1.8;
        margin-bottom: 5px;
        position: relative;
        padding-left: 20px;
    }

        .profile-list li::before {
            content: '•';
            position: absolute;
            left: 0;
            color: #888;
            font-weight: bold;
        }

.profile-img-wrap {
    flex: 0 0 450px;
    position: relative;
    padding-top: 30px;
    padding-bottom: 30px;
}

.profile-shape {
    content: "";
    display: block;
    position: absolute;
    z-index: -1;
    inset: 0;
    background-color: #5a4035;
    -webkit-clip-path: polygon(50% 0%, 100% 0%, 50% 100%, 0% 100%);
    clip-path: polygon(50% 0%, 100% 0%, 50% 100%, 0% 100%);
}

.profile-photo {
    position: relative;
    z-index: 1;
    width: 90%;
    margin-right: auto;
    display: block;
    box-shadow: 5px 5px 20px rgba(0,0,0,0.15);
}

.profile-separator {
    border: none;
    border-top: 1px dashed #ccc;
    margin: 60px 0;
    width: 100%;
}

@media (max-width: 992px) {
    .profile-item {
        flex-direction: column-reverse;
        align-items: center;
        gap: 30px;
    }

    .profile-img-wrap {
        flex: none;
        width: 100%;
        max-width: 450px;
    }

    .profile-text {
        width: 100%;
        text-align: left;
    }
}

/* Links */
.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 60px;
}

.link-card {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    text-decoration: none;
    overflow: hidden;
    height: 100%;
}

    .link-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-color: var(--primary-color);
    }

.link-img-area {
    width: 100%;
    height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}

    .link-img-area img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.3s;
    }

.link-card:hover .link-img-area img {
    transform: scale(1.05);
}

.link-text-area {
    width: 100%;
    padding: 15px 10px;
    text-align: center;
    background-color: #fafafa;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: #444;
    line-height: 1.4;
}

.link-card:hover .link-name {
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .link-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .link-grid {
        grid-template-columns: 1fr;
    }

    .link-img-area {
        height: 120px;
    }
}

/* ==========================================================================
   ★ [採用您的修正] 組織架構圖 (Beta_115.2.4.v11 Corrected)
   ========================================================================== */
.org-chart-wrapper {
    width: 100%;
    overflow-x: auto;
    padding: 60px 20px;
    text-align: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .org-chart-wrapper::-webkit-scrollbar {
        display: none;
    }

.org-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 1000px;
    padding-right: 120px;
}

.org-main-title {
    background: linear-gradient(135deg, #F09819 0%, #EB8636 100%);
    color: #fff;
    font-size: 2.94rem;
    font-weight: 900;
    padding: 18px 80px;
    border-radius: 30px;
    margin-bottom: 60px;
    box-shadow: 0 10px 20px rgba(235, 134, 54, 0.4);
    letter-spacing: 2px;
}

.org-box {
    background-color: #EB8636;
    color: #fff;
    padding: 12px 36px;
    border-radius: 8px;
    font-weight: normal;
    font-size: 1.25rem;
    position: relative;
    z-index: 5;
    display: inline-block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.org-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    margin-bottom: 50px;
}

    .org-top-section .org-box {
        position: relative;
    }

        .org-top-section .org-box::after {
            content: '';
            position: absolute;
            bottom: -50px;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 50px;
            background-color: #EB8636;
        }

        .org-top-section .org-box::before {
            content: '';
            position: absolute;
            right: -60px;
            top: 50%;
            transform: translateY(-50%);
            width: 60px;
            height: 2px;
            background-color: #EB8636;
        }

.side-branch {
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-left: 80px;
    text-align: left;
}

    .side-branch::before {
        content: '';
        position: absolute;
        left: 60px;
        top: 20px;
        bottom: 20px;
        width: 2px;
        background-color: #EB8636;
    }

.side-node {
    background-color: #EB8636;
    color: #fff;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: bold;
    position: relative;
    white-space: nowrap;
}

    .side-node::before {
        content: '';
        position: absolute;
        left: -20px;
        top: 50%;
        width: 20px;
        height: 2px;
        background-color: #EB8636;
    }

.mid-level-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mid-level-node {
    margin-bottom: 20px;
}

    .mid-level-node::after {
        content: '';
        position: absolute;
        bottom: -50px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 50px;
        background-color: #EB8636;
        z-index: 1;
    }

.departments-wrapper {
    display: flex;
    justify-content: center;
    gap: 0;
    padding-top: 30px;
    position: relative;
    width: 100%;
}

    .departments-wrapper::before {
        content: '';
        position: absolute;
        top: -55px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 55px;
        background-color: #EB8636;
        z-index: 1;
    }

.dept-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    padding: 0 10px;
}

    .dept-group::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #EB8636;
    }

    .dept-group:first-child::before {
        width: 50%;
        left: 50%;
    }

    .dept-group:last-child::before {
        width: 50%;
        left: 0;
    }

    .dept-group::after {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 30px;
        background-color: #EB8636;
    }

.dept-box {
    background-color: #fff;
    border: 2px solid #EB8636;
    color: #EB8636;
    padding: 12px 10px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 1.25rem;
    margin-bottom: 30px;
    margin-top: 30px;
    width: 100%;
    max-width: 180px;
    text-align: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

    .dept-box::after {
        content: '';
        position: absolute;
        bottom: -30px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 30px;
        background-color: #EB8636;
    }

.units-container {
    display: flex;
    justify-content: center;
    gap: 0;
    position: relative;
    padding-top: 20px;
    width: 100%;
}

    .units-container::before {
        content: '';
        position: absolute;
        top: 0;
        height: 2px;
        background-color: #EB8636;
        left: calc(100% / var(--count) / 2);
        right: calc(100% / var(--count) / 2);
    }

    .units-container::after {
        content: '';
        position: absolute;
        top: -30px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 30px;
        background-color: #EB8636;
    }

.unit-box {
    background-color: #fff;
    border: 2px solid #EB8636;
    color: #EB8636;
    padding: 20px 8px;
    border-radius: 8px;
    font-weight: bold;
    writing-mode: vertical-lr;
    letter-spacing: 4px;
    position: relative;
    font-size: 1.25rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 120px;
    margin: 0 20px; /* ★ 使用您指定的 20px */
}

    .unit-box::before {
        content: '';
        position: absolute;
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
        background-color: #EB8636;
    }

/* Vision (成立宗旨) */
.vision-section-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text-dark);
    text-align: center;
    margin: 40px 0 30px;
    padding-bottom: 10px;
    position: relative;
    letter-spacing: 1px;
}

    .vision-section-title::after {
        content: '';
        display: block;
        width: 60px;
        height: 3px;
        background-color: var(--text-dark);
        margin: 10px auto 0;
    }

.vision-list {
    margin-bottom: 60px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.vision-item {
    margin-bottom: 30px;
}

.vision-head {
    display: flex;
    align-items: stretch;
}

.vision-num {
    background-color: #5D4638;
    color: #fff;
    font-size: 2rem;
    font-weight: 900;
    padding: 10px 40px 10px 25px;
    display: flex;
    align-items: center;
    position: relative;
    line-height: 1;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%);
    flex-shrink: 0;
}

.vision-title-text {
    flex: 1;
    display: flex;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-dark);
    padding-left: 15px;
    border-top: 3px solid #5D4638;
    border-bottom: none;
}

.vision-desc {
    margin-top: 15px;
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
    padding-left: 0;
}

.task-container {
    max-width: 1000px;
    margin: 0 auto 60px;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .task-list li {
        font-size: 1.05rem;
        color: #333;
        line-height: 1;
        margin-bottom: 12px;
        padding-left: 30px;
        text-indent: -30px;
    }

@media (max-width: 768px) {
    .vision-num {
        font-size: 1.5rem;
        padding: 10px 30px 10px 15px;
    }

    .vision-title-text {
        font-size: 1.1rem;
        line-height: 1.4;
        padding-bottom: 5px;
    }

    .task-container {
        padding: 0 10px;
    }
}

/* ==========================================================================
   ★ [新增] Beta_115.2.8.v1_HomeNewsSlider 首頁新聞底部導覽列
   ========================================================================== */

/* 導覽列容器 */
.news-nav-bar {
    grid-column: 1 / -1; /* 跨滿 grid 欄位 */
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    width: 100%;
}

/* 左側黑色裝飾線 */
.nav-line {
    flex-grow: 1; /* 填滿剩餘空間 */
    height: 1px;
    background-color: #000;
    margin-right: 30px; /* 與右側按鈕的距離 */
}

/* 右側控制區 (箭頭 + 查看更多) */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 箭頭按鈕群組 */
.nav-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    color: #000;
    font-family: "Microsoft JhengHei", sans-serif;
}

/* 箭頭按鈕本體 */
.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 5px;
    font-size: 1.5rem; /* 放大箭頭 */
    color: #000;
    transition: color 0.3s, opacity 0.3s;
    line-height: 1;
}

    .nav-btn:hover {
        color: var(--primary-color);
    }

    .nav-btn:disabled {
        color: #ccc;
        cursor: default;
    }

/* 分隔線 | */
.nav-divider {
    color: #ccc;
    font-weight: 300;
    font-size: 1.2rem;
}

/* 查看更多按鈕 (仿截圖設計) */
.view-more-styled {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #4a3b32; /* 深咖啡文字 */
    font-weight: bold;
    font-size: 1rem;
    transition: opacity 0.3s;
    margin-left: 15px;
}

    .view-more-styled:hover {
        opacity: 0.8;
    }

/* 圓形箭頭圖示 */
.view-more-icon {
    width: 32px;
    height: 32px;
    background-color: #C8C4BE; /* 截圖中的灰藕色 */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

.view-more-styled:hover .view-more-icon {
    background-color: var(--primary-color);
}

/* ==========================================================================
   ★ [修改] Temp_115.2.8.v3_VisionDesignFix 首頁願景區塊 (單圖+框線版)
   ========================================================================== */
.home-vision-section {
    position: relative;
    padding: 80px 0;
    background-color: #fff;
    overflow: hidden;
    background: url(../image/main-index-bg.webp) repeat;
}

/* 內容容器 */
.hv-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
}

/* ★ 關鍵：C字型框線 (上、下、左) */
.hv-frame {
    display: flex;
    align-items: center;
    gap: 60px;
    padding: 60px 40px; /* 內距讓線條與內容有呼吸空間 */
    position: relative;
    /* 繪製線條 */
    border-top: 1px solid #8D6E63; /* 上線 */
    border-bottom: 1px solid #8D6E63; /* 下線 */
    border-left: 1px solid #8D6E63; /* 左線 */
    /* 這裡可以選擇是否要讓右邊留空，目前設定是開放的 */
    margin-left: 20px; /* 稍微往右移，讓左線明顯 */
}

/* --- 左側：單張大圖 --- */
.hv-images-area {
    flex: 0 0 40%; /* 圖片佔 45% 寬度 */
    position: relative;
    /* 確保圖片往左跑時不會被裁切，若父層有 overflow:hidden 這裡要小心 */
    z-index: 5;
}

/* 單張圖片容器 */
.hv-single-img {
    width: 130%;
    height: auto;
    /*aspect-ratio: 4/3;*/ /* 固定比例 */
    background-color: transparent;
    /* 讓圖片稍微超出框線一點，增加層次感 (可選) */
    transform: translateX(-80px);
    /*box-shadow: 10px 10px 30px rgba(0,0,0,0.1);*/
    box-shadow: 0px 0px 30px rgba(0,0,0,0.0);
    /* 增加一點陰影讓它浮起來 */
    /*box-shadow: 15px 15px 40px rgba(0,0,0,0.15);*/
    border-radius: 8px; /* 保持圓角 */
    overflow: hidden;
}

    .hv-single-img img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* 填滿容器 */
        display: block; /* 消除圖片底部空隙 */
        transition: transform 0.6s ease;
    }

    .hv-single-img:hover img {
        transform: scale(1.05);
    }

/* --- 右側：文字內容區 --- */
.hv-text-area {
    flex: 1;
    text-align: left;
}

.hv-en-title {
    font-family: 'Arial', sans-serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: #222;
    margin-bottom: 10px;
    line-height: 1;
}

.hv-ch-title {
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--text-dark); /* 深色 */
    line-height: 1.4;
    margin-bottom: 30px;
    letter-spacing: 1px;
}

.hv-desc {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 40px;
    text-align: justify;
}

.hv-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: #666;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    background: #f4f4f4;
    padding: 10px 20px;
    border-radius: 30px;
}

.hv-btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.hv-btn:hover {
    background: var(--primary-color);
    color: #fff;
}

    .hv-btn:hover .hv-btn-icon {
        transform: translateX(5px);
    }

/* RWD */
@media (max-width: 992px) {
    .hv-frame {
        flex-direction: column; /* 手機版垂直排列 */
        padding: 40px 20px;
        border-right: 1px solid #8D6E63; /* 手機版可能需要封閉框線或是調整 */
        margin-left: 0;
    }

    .hv-images-area {
        width: 100%;
        flex: none;
    }

    .hv-single-img {
        transform: none; /* 手機版不偏移 */
        /*aspect-ratio: 16/9;*/
    }

    .hv-text-area {
        width: 100%;
    }
}

/* ==========================================================================
   ★ [新增] Temp_115.2.9.v5_HomeLinks 首頁相關連結區塊
   ========================================================================== */

.home-links-section {
    position: relative;
    /* 背景圖設定 */
    background-image: url('../image/related-links-bg.webp');
    background-size: cover;
    background-position: center;
    /*background-attachment: fixed;*/ /* 視差滾動效果 (可選) */
    /* 透過漸層疊加深藍色遮罩，讓白字清楚 */
    /*background-color: #1a3c54;*/
    background-blend-mode: multiply;
    padding: 80px 20px;
    margin-top: 60px;
    /* 上方圓角 */
    border-top-left-radius: 50px;
    border-top-right-radius: 50px;
    color: #fff;
    text-align: center;
}

    /* 標題區 (覆寫原本的通用標題顏色為白色) */
    .home-links-section .hv-en-title {
        color: #fff;
        opacity: 0.9;
    }

    .home-links-section .hv-ch-title {
        color: #fff;
    }

/* 連結容器 (Grid) */
.home-links-grid {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 連結按鈕 (白色膠囊) */
.home-link-btn {
    display: flex;
    align-items: center;
    justify-content: center; /* 內容置中 */
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.85); /* 半透明白 */
    border-radius: 20px;
    padding: 15px 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: 80px; /* 固定高度讓排版整齊 */
    border: 1px solid transparent;
}

    .home-link-btn:hover {
        background-color: #fff;
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    }

/* 按鈕內的 Logo */
.home-link-icon {
    /*width: 50px;*/
    height: 140px;
    object-fit: contain;
    flex-shrink: 0;
}

/* 按鈕內的文字 */
.home-link-text {
    color: #333;
    font-weight: 900;
    font-size: 1.1rem;
    text-align: left;
    line-height: 1.3;
}

.home-link-btn:hover .home-link-text {
    color: var(--primary-color);
}

/* 更多連結按鈕 (透明框) */
.home-link-more-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 40px;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    background-color: rgba(0,0,0,0.3);
    transition: all 0.3s;
    letter-spacing: 1px;
}

    .home-link-more-btn:hover {
        background-color: #fff;
        color: var(--primary-color);
    }

/* RWD */
@media (max-width: 992px) {
    .home-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .home-links-grid {
        grid-template-columns: 1fr;
    }

    .home-link-btn {
        justify-content: flex-start; /* 手機版靠左對齊比較好看 */
    }
}

/* ==========================================================================
   ★ 政策頁面樣式 (Security & Policy & OpenData) - V2 修正版
   ========================================================================== */

.policy-container {
    max-width: 1000px;
    margin: 0 auto 60px;
    padding: 0 20px;
}

/* 強調前言區塊 */
.policy-intro {
    font-size: 1.1rem;
    font-weight: 700;
    color: #444;
    line-height: 1.8;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #fafafa;
    border-left: 5px solid var(--primary-color);
}

/* 章節區塊 */
.policy-section {
    margin-bottom: 40px;
}

/* ★ 修改：章節標題 (修正線條顏色與粗細) */
.policy-heading {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 15px; /* 增加文字與線的距離 */
    position: relative;
    padding-left: 0; /* 移除之前的縮排 */

    /* 1. 底層：全寬的灰色細線 */
    border-bottom: 4px solid #CCCCCC;
}
    /* 2. 上層：左側的咖啡色粗線 (約6個字寬) */
    .policy-heading::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -4px; /* 蓋在灰色線上 (視粗細調整，若線粗4px，bottom設為-2px可置中對齊，或是0貼底) */
        /* 這裡設為 -1px 讓它蓋在 border-bottom 上方 */

        width: 160px; /* 1.5rem * 6字 約為 144px，抓個整數 */
        height: 4px; /* 粗度 */
        background-color: #5a4035; /* 採用您之前指定的深咖啡色 */
        /* 確保層級 */
        z-index: 1;
    }

/* 內容樣式 */
.policy-text {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.8;
    text-align: justify;
    margin-bottom: 15px;
}

/* ★ 新增：有序列表 (1. 2. 3.) 樣式 */
.policy-list-ordered {
    list-style: decimal; /* 顯示數字 */
    padding-left: 1.5em; /* 縮排 */
    margin-top: 10px;
}

    .policy-list-ordered li {
        font-size: 1.1rem;
        color: #444;
        line-height: 1.8;
        margin-bottom: 8px;
        padding-left: 5px;
    }

/* 無序列表 (移除 CSS 自動編號，因為 JSON 內文已有編號) */
.policy-custom-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* 移除計數器重置 */
}

    .policy-custom-list li {
        font-size: 1.1rem;
        color: #444;
        line-height: 1.8;
        margin-bottom: 8px;
        position: relative;
        /* ★ 修改：移除原本為了塞符號的左縮排，改為正常的 0 或微調 */
        padding-left: 0;
    }

        .policy-custom-list li::before {
            counter-increment: section-counter;
            /*content: counter(section-counter) "、";*/
            content: none; /* 隱藏原本的自動編號 */
            position: absolute;
            left: 0;
            font-weight: bold;
            color: var(--primary-color);
        }

/* RWD */
@media (max-width: 768px) {
    .policy-heading {
        font-size: 1.3rem;
    }

    .policy-text, .policy-list-ordered li, .policy-custom-list li {
        font-size: 1rem;
    }
}

/* ==========================================================================
   ★ [新增] Dev_115.03.01.v7_OpenDataPage 著作權聲明專用樣式
   ========================================================================== */

/* 著作權聲明內文容器 */
.opendata-content {
    margin-top: 20px;
}

/* 內文列表 (1. 2. 3. ...) */
.opendata-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .opendata-list > li {
        font-size: 1.1rem;
        color: #444;
        line-height: 1.8;
        margin-bottom: 20px;
        text-align: justify;
    }

/* 巢狀子列表 (● 項目符號) */
.policy-nested-list {
    list-style: disc; /* 實心圓點 */
    padding-left: 40px; /* 縮排 */
    margin-top: 10px;
}

    .policy-nested-list li {
        margin-bottom: 5px;
        font-size: 1.05rem;
        color: #555;
    }

/* 次標題 (一著作權聲明) */
.opendata-sub-heading {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-left: 5px;
}

/* ★ 新增：內容段落間距 (用於 JSON 陣列生成的文字區塊) */
.policy-paragraph {
    margin-bottom: 15px; /* 段落間距 */
    line-height: 1.8;
    text-align: justify;
    font-size: 1.1rem;
    color: #444;
}

/* 確保列表內的段落不留白 */
.policy-custom-list .policy-paragraph,
.opendata-list .policy-paragraph {
    margin-bottom: 0;
}