/* 共用設定 */
body { margin: 0; font-family: "Microsoft JhengHei", sans-serif; color: #565656; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
.banner img { width: 100%; display: block; }
*/
.nav-blue, .nav-green, .nav-orange, .sub-header-blue, .sub-header-green, .sub-header-orange {
    position: relative !important; /* 確保裝飾條相對於此容器定位 */
    padding-left: 40px !important; /* 重要：推開文字，讓左邊 40px 專門放點點條 */
    overflow: hidden; /* 防止點點溢出 */
}

.nav-blue::before, .nav-green::before, .nav-orange::before, 
.sub-header-blue::before, .sub-header-green::before, .sub-header-orange::before, .sub-header-purple::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;      /* 裝飾條寬度 */
    height: 100%;     /* 隨父容器高度延伸 */
    z-index: 1;
    
    /* 製作點點矩陣圖案 (使用純 CSS 繪製) */
    background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1.2px, transparent 1.2px);
    background-size: 10px 10px; /* 點點間距 */
    background-position: left;
}

/* 各區塊裝飾條的底色 (依顏色類別區分) */
.nav-blue::before, .sub-header-blue::before { background-color: #1e8ca0; }
.nav-green::before, .sub-header-green::before { background-color: #478c39; }
.nav-orange::before, .sub-header-orange::before { background-color: #df6631; }
.nav-orange::before, .sub-header-purple::before { background-color: #6a64a7; }
/* 導覽列 */
.custom-navbar { background: #fff; border-bottom: 1px solid #eee; }
.navbar-hamburger { display: none; width: 100%; background: #1e8ca0; color: #fff; border: none; padding: 10px; cursor: pointer; }
.nav-list { display: flex; list-style: none; padding: 0; margin: 0; }
.nav-item { flex: 1; text-align: center; padding: 10px; margin: 5px; }
.nav-item span { color: white; font-size: 1.2rem; display: block; }
.nav-icon { width: 30px; margin-bottom: 5px; }

/* 顏色 */
.bg-green { background: linear-gradient(to right, #9bcb6c, #38a96e); }
.bg-blue { background: linear-gradient(to right, #65c5d7, #519cd0); }
.bg-orange { background: linear-gradient(to right, #bea6ce, #635fa4); }


/* 下拉選單 */
.dropdown { position: relative; }
.dropdown-content { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: white; z-index: 99; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.dropdown-content a { display: block; padding: 10px; color: #333; border-bottom: 1px solid #eee; text-align: left; font-size: 0.9rem; }
.dropdown.active .dropdown-content { display: block; }

/* 內文版面 */
.content-container { width: 90%; margin: 0 auto; padding: 20px 0; }
.section-title { text-align: center; padding: 15px; color: white; margin: 40px 0 20px; }
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px; }
.poster-item img { width: 100%; border: 1px solid #ddd; padding: 5px; border-radius: 4px; }
.poster-item h6 { margin-top: 10px; font-size: 0.9rem; color: #444; }

/* RWD */
@media (max-width: 768px) {
    .navbar-hamburger { display: block; }
    .nav-list { display: none; flex-direction: column; }
    .nav-list.show { display: flex; }
    .nav-item { border-radius: 0; }
    .dropdown-content { position: static; }
}

/* Footer */
.footer { background: #67b3c1; color: white; padding: 15px; text-align: center; }
.footer-wrap span { display: inline-block; margin: 0 10px; }<style>
        /* 全域基礎設定 - 移除外部依賴，純手寫 CSS */
        :root {
            --primary-blue: #519cd0;
            --primary-green: #38a96e;
            --primary-orange: #635fa4;
            --ncdr-cyan: #1e8ca0;
        }

        body { color: #565656; font-family: "Microsoft JhengHei", Arial, sans-serif; margin: 0; padding: 0; line-height: 1.6; }
        a { color: #565656; text-decoration: none; transition: 0.2s;}
        a:hover { color: #4b4b4b; text-decoration: none; }
        
        .w-100 { width: 100%; display: block; }
        .text-center { text-align: center; }
        .p-0 { padding: 0; }
        .mt-5 { margin-top: 3rem; }
        .mt-3 { margin-top: 1rem; }
        .mb-2 { margin-bottom: 0.5rem; }
        .mb-3 { margin-bottom: 1rem; }
        .mb-4 { margin-bottom: 1.5rem; }
        .bold { font-weight: bold; }

        /* 導覽列設計 - 取代 Bootstrap Navbar */
        .navbar-container { background-color: #49b2df; position: relative; z-index: 1000;padding: 0 ;margin: 0; }
        .navbar-toggler { display: none; width: 100%; background: var(--ncdr-cyan); color: white; border: none; padding: 3px; cursor: pointer; text-align: right; }
        .navbar-nav { display: flex; width: 100%; list-style: none; margin: 0; padding: 0; }
        .nav-item { flex: 1; position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0px 0; margin:0px;}
        .nav-link { color: #FFF !important; font-size: 1.4em; display: block; width: 100%; cursor: pointer; }
		.sidebar_blue {
		  width: 200px;
		  background-image: radial-gradient(circle at 10px 10px, transparent 2px, #fff 2px);
		  background-size: 20px 20px;
		  background-repeat: repeat-y;
		  background-color: #007bff;
		  position: absolute;
		  top: 0;
		  left: 0;
		  height: 100%;
		}
        
        /* 下拉選單邏輯 */
        .dropdown-menu { 
            display: none; position: absolute; top: 100%; left: 0; width: 100%; 
            background: white; box-shadow: 0 8px 16px rgba(0,0,0,0.1); z-index: 1100; border: 1px solid #ddd;
        }
        .dropdown-menu.show { display: block; }
        .dropdown-item { display: block; padding: 12px 20px; color: #333; text-align: left; font-size: 16px; border-bottom: 1px solid #eee; }
        .dropdown-item:hover { background-color: #f1f1f1; text-decoration: none; }

        /* 漸層背景色 */
        .bg-blue-grad { background: linear-gradient(to right, #FFF 0%, #49b2df 100%); }
        .bg-green-grad { background: linear-gradient(to right, #FFF 0%, #f3a050 100%); }
        .bg-orange-grad { background: linear-gradient(to right, #FFF 0%, #8cc76d 100%);}
		.bg-purple-grad { background: linear-gradient(to right, #FFF 0%, #6662a6 100%);}
		.bg-blue-grad-2 { background: linear-gradient(to right, #65c5d7 0%, #49b2df 100%); }
        .bg-green-grad-2 { background: linear-gradient(to right, #b3d9a0 0%, #5e9f3c 100%); }
        .bg-orange-grad-2 { background: linear-gradient(to right, #fbd5a4 0%, #f3a050 100%);}

        /* 內文區域 */
        .content-wrap { padding: 0 5%; width: 90%; margin: auto; }
        h5 { line-height: 1.5em; font-size: 1.1em; }
        ul { padding-left: 0; }
        li { line-height: 1.8em; font-size: 1.1em; margin-bottom: 10px; list-style:none; position: relative; padding-left: 25px; }
        li.arrow::before { content: ""; position: absolute; left: 0; top: 8px; width: 15px; height: 15px; background: url('img/arrow.png') no-repeat center/contain; }

        /* 區塊標題樣式 */
        .section-bar { padding: 1.5rem; color: white; margin: 0; font-size: 1.75rem; }
        /* --- 標題裝飾樣式 (還原原本的藍色邊框設計) --- */
.sub-heading {
    /* 左邊粗線裝飾 */
    border-left: 3px solid #519cd0; 
    /* 底部細線裝飾 */
    border-bottom: 1px solid #519cd0; 
    
    /* 調整間距與原本樣式一致 */
    padding: 8px 0 8px 10px; 
    margin: 0 0 15px 0; 
    
    /* 文字樣式 */
    font-size: 1.5rem; 
    color: #434343;
    font-weight: normal; /* 原本是 H2 預設粗度 */
    line-height: 1.2;
}

/* 針對海報區不同的綠色裝飾線 (2-1, 2-2, 2-3) */
.sub-heading-green {
    border-left: 3px solid #478c39;
    border-bottom: 1px solid #478c39;
    padding: 8px 0 8px 10px;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #434343;
}

/* 針對科普區不同的橘色裝飾線 (3) */
.sub-heading-orange {
    border-left: 3px solid #df6631;
    border-bottom: 1px solid #df6631;
    padding: 5px 0 5px 10px;
    margin: 0 0 15px 0;
    font-size: 1.5rem;
    color: #434343;
}

/* 調整列表容器的間距，確保文字不會貼著邊框 */
.container.content-inner {
    padding: 20px 0;
}

.link-list {
    margin-bottom: 30px;
}

        /* 海報與格狀排版 - 取代 Bootstrap Grid */
        .row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
        .col-item { flex: 0 0 16.66%; padding: 10px; box-sizing: border-box; text-align: center; }
        .img-thumbnail { width: 100%; border: 1px solid #ddd; border-radius: 4px; padding: 4px; transition: 0.3s; background: white; }
        .img-thumbnail:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
        .col-item h6 { font-size: 1.0rem; margin-top: 10px; color: #565656; line-height: 1.4; text-align: left; }

        footer { background-color: #67b3c1; color: white; padding: 25px 0; margin-top: 50px; }

        /* RWD 響應式佈局 */
        @media (max-width: 992px) { .col-item { flex: 0 0 33.33%; } }
        @media (max-width: 768px) {
            .navbar-toggler { display: block; }
            .navbar-nav { display: none; flex-direction: column; }
            .navbar-nav.active { display: flex; }
            .nav-item { width: 100% !important; border-bottom: 1px solid rgba(255,255,255,0.1); }
            .dropdown-menu { position: static; box-shadow: none; border: none; }
            .col-item { flex: 0 0 50%; }
        }
        @media (max-width: 576px) { .col-item { flex: 0 0 100%; } }
		
		/* 漢堡按鈕圖示樣式 */
.navbar-toggler .material-icons {
    font-size: 30px;
    vertical-align: middle;
	background-color: #046b97;
}

/* --- 響應式 RWD 修正 (關鍵區塊) --- */
@media (max-width: 768px) {
    /* 1. 顯示漢堡條 */
    .navbar-toggler {
        display: block;	
    }

    /* 2. 預設隱藏手機版選單，並改為垂直排列 */
    .navbar-nav {
        display: none; 
        flex-direction: column;
        width: 100%;
        background-color: #000000;
    }

    /* 3. 當 JS 加入 active 類別時顯示選單 */
    .navbar-nav.active {
        display: flex;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    /* 4. 手機版下拉選單改為靜態顯示，避免超出螢幕 */
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #f9f9f9;
    }

    /* 5. 調整海報區在手機版為 2 欄 */
    .grid-col {
        flex: 0 0 50%;
    }
	
	
}
/* 導覽列內容包裝層 */
.nav-content-wrapper {
    display: inline-flex;
    align-items: center;    /* 垂直置中：確保文字、三角形、Icon 在同一水平線 */
    justify-content: center;
    width: auto;
    padding: 10px 0;
}

/* 文字區域：包含單行文字與三角形 */
.nav-text {
    display: flex;
    align-items: center;    /* 讓三角形對齊單行文字的中心 */
    flex: 0 0 auto;
    padding-left: 10px;     /* 留給左側點點條的空間 */
    margin-right: 12px;     /* 文字組合與右側 Icon 的間距 */
}

.nav-title {
    font-size: 2rem;        /* 放大字體至 2rem (約 32px) */
    font-weight: bold;
    color: #FFF;
    white-space: nowrap;    /* 確保文字絕對不換行 */
    line-height: 1;         /* 移除多餘行高，確保置中精準 */
}
/* 向下三角形：緊跟在文字後方 */
.dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 8px;       /* 文字與三角形的間距 */
    border-top: 7px solid #FFF;    /* 三角形高度與顏色 */
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
}

/* 圖片 Icon 區域 */
.nav-image {
    flex: 0 0 150px;         /* 稍微縮小 Icon 以配合單行比例 */
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 點點裝飾條修正：確保它不影響文字置中，但依然貼在左邊 */
.nav-blue::before, .nav-green::before, .nav-orange::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    z-index: 1;
    /* 點點樣式維持不變 */
    background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1.2px, transparent 1.2px);
    background-size: 6px 6px;
    background-position: center;
}
/* 向下三角形樣式 */
.dropdown-arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;      /* 與左邊文字的距離 */
    margin-right: 10px;    /* 與右邊 Icon 的距離 */
    vertical-align: middle;
    
    /* 使用 CSS 邊框繪製三角形 */
    border-top: 6px solid #FFF;    /* 三角形的高度與顏色 */
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
    
    transition: transform 0.3s;    /* 增加旋轉動畫感 */
}

/* 當選單開啟時，讓三角形翻轉 (可選) */
.dropdown-menu.show ~ .nav-link .dropdown-arrow {
    transform: rotate(180deg);
}

/* 微調 nav-text 確保與三角形對齊 */
.nav-text {
    flex: 0 0 auto;
    text-align: left;
    line-height: 1.1;
    padding-left: 10px;
}

/* 調整 wrapper 確保所有元素垂直置中 */
.nav-content-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
	
}

/* 歷年選單定位與樣式 */
.history-dropdown-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1000;
    font-family: sans-serif;
}

/* 按鈕原生樣式調整 */
.history-toggle-btn {
    background-color: rgba(0, 98, 157, 0.85); /* 搭配主題藍色，帶有半透明感 */
    color: #ffffff;
    border: 1px solid #ffffff;
    padding: 8px 12px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.history-toggle-btn:hover {
    background-color: rgba(0, 98, 157, 1);
}

/* 下拉選單選單本體（預設隱藏） */
.history-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 105%;
    background-color: #ffffff;
    min-width: 120px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* 顯示選單的 class */
.history-menu.show {
    display: block;
}

/* 選單內的每一行連結 */
.history-menu li {
    border-bottom: 1px solid #eee;
}

.history-menu li:last-child {
    border-bottom: none;
}

.history-menu li a {
    display: block;
    padding: 5px 5px;
    color: #333333;
    text-decoration: none;
    font-size: 15px;
    text-align: center;
    transition: background-color 0.2s ease;
}

/* 滑鼠移入時的反應 */
.history-menu li a:hover {
    background-color: #f5f5f5;
    color: #00629d;
}

/* RWD 響應式調整：小尺寸螢幕 (如手機、平板) */
@media screen and (max-width: 768px) {
    
    /* 1. 確保歷年選單容器處於絕對最上層 */
    .history-dropdown-container {
        position: absolute !important; /* 強制維持絕對定位 */
        top: 10px;                     /* 貼近右上角，可微調配合漢堡條位置 */
        right: 10px;
        z-index: 9999 !important;      /* 設為最高層級，絕對壓在漢堡條與導覽列上方 */
    }

    /* 2. 微調小螢幕下的按鈕大小，方便點擊又不失精緻 */
    .history-toggle-btn {
        padding: 6px 10px;
        font-size: 14px;
        background-color: rgba(0, 98, 157, 0.95); /* 手機版提高不透明度，避免看得到底下的漢堡條 */
        border: 1px solid #ffffff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);    /* 加深陰影，增強視覺層級 */
    }
    
    .history-toggle-btn .material-icons {
        font-size: 15px !important; 
    }

    /* 3. 下拉選單同步提升層級 */
    .history-menu {
        min-width: 110px;
        top: 110%;
        right: 0;
        z-index: 10000 !important;     /* 展開的選單也要比按鈕更高層 */
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    
    .history-menu li a {
        padding: 12px 10px;            /* 加大觸控範圍，符合 RWD 拇指點擊友善設計 */
        font-size: 14px;
    }
}