/* 自訂CSS：補充Bootstrap，移動優先。避免覆蓋核心navbar行為，只自訂外觀/動畫。 */
/* Base styles - Mobile-first, minimal reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    height: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: 'Microsoft JhengHei', 'Arial Unicode MS', 'Noto Sans TC', sans-serif !important;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
    overflow-x: hidden;
}
a {
    color: #2244EE !important;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #0056b3 !important;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
:root {
    font-size: 16px;
}

/* Layout - 與Bootstrap兼容，使用其.container/.row/.col */
.container {
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
    width: 100%;
}
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}
.col, .col-md-8, .col-md-4 {
    padding: 0 15px;
    flex: 0 0 100%;
    max-width: 100%;
}
@media (min-width: 769px) {
    .col-md-8 {
        flex: 0 0 70%;
        max-width: 70%;
    }
    .col-md-4 {
        flex: 0 0 30%;
        max-width: 30%;
    }
}
@media (min-width: 992px) {
    .col-md-8 {
        flex: 0 0 65%;
        max-width: 65%;
    }
    .col-md-4 {
        flex: 0 0 35%;
        max-width: 35%;
    }
}
@media (min-width: 768px) {
    .container {
        padding: 2rem;
    }
}
main .container {
    max-width: 1400px; /* 稍微大一點，給內部區塊空間 */
    padding-left: 15px;
    padding-right: 15px;
}

/* Navigation - 與Bootstrap navbar兼容，自訂外觀但保留其行為。漢堡包用CSS偽元素，動畫滑入。 */
nav.navbar {
    background-color: #fff !important;
    border-bottom: 1px solid #e0e0e0 !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease;
    margin: 0;
}
nav.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: #6f42c1 !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
    padding-left: 20px !important;
}
.navbar-brand img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
    border: none;
    outline: none;
    margin-top: 0;
    vertical-align: middle;
}
.navbar-brand:hover img {
    transform: scale(1.05);
}
/* 自訂漢堡包圖標：用CSS偽元素繪製線條，與Bootstrap [aria-expanded]同步 */
.navbar-toggler {
    border: 1px solid #dee2e6 !important;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.3s ease;
    width: 40px;
    height: 40px;
    background: none !important;
    cursor: pointer;
}
.navbar-toggler:hover {
    background: #f8f9fa !important;
}
.navbar-toggler:focus {
    outline: 2px solid #6f42c1 !important;
}
.navbar-toggler-icon {
    position: relative;
    width: 25px;
    height: 2px;
    background-color: #6f42c1;
    transition: all 0.3s ease;
    border-radius: 2px;
    display: block;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: #6f42c1;
    transition: all 0.3s ease;
    border-radius: 2px;
    left: 0;
}
.navbar-toggler-icon::before {
    top: -8px;
    transform-origin: left center;
}
.navbar-toggler-icon::after {
    top: 8px;
    transform-origin: left center;
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-color: transparent;
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg) translate(5px, 5px);
}
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg) translate(7px, -6px);
}
.navbar-toggler:hover .navbar-toggler-icon,
.navbar-toggler:hover .navbar-toggler-icon::before,
.navbar-toggler:hover .navbar-toggler-icon::after {
    background-color: #007bff;
}
/* 自訂collapse菜單：全屏滑入，與Bootstrap .show類兼容 */
.navbar-collapse {
    flex-direction: column;
    gap: 0.5rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 1rem 0;
}
@media (max-width: 768px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%; /* 初始隱藏 */
        width: 100%;
        height: 100vh;
        padding-top: 5rem;
        transition: right 0.3s ease;
        z-index: 999;
        border-radius: 0;
        box-shadow: none;
        overflow-y: auto;
    }
    .navbar-collapse.show {
        right: 0; /* 滑入顯示 */
    }
    body.navbar-open {
        overflow: hidden; /* 鎖定body滾動 */
    }
    .navbar-brand {
        padding-left: 10px !important;
    }
}
@media (min-width: 769px) {
    .navbar-brand {
        padding-left: 0 !important;
        font-size: 1rem;
    }
    .navbar-brand img {
        display: block;
    }
    .navbar-collapse {
        flex-direction: row !important;
        gap: 1.5rem;
        position: static !important;
        background: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        width: auto;
        height: auto;
        right: auto;
        top: auto;
        overflow: visible;
    }
}
.navbar-nav {
    list-style: none !important;
    margin: 0;
    padding: 0;
}
.nav-item {
    position: relative;
    border: none;
}
.nav-link {
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: #333 !important;
    transition: color 0.3s ease, background 0.3s ease;
    white-space: nowrap;
    border-radius: 4px;
    display: block;
}
.nav-link:hover,
.nav-link.active {
    color: #6f42c1 !important;
    background-color: #f8f9fa !important;
}
.nav-link.highlight-ad {
    background-color: #ffff00 !important;
    color: #000 !important;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    box-shadow: 0 2px 4px rgba(255, 255, 0, 0.3);
}
.nav-link.highlight-ad:hover {
    background-color: #ffed4e !important;
    color: #000;
    transform: scale(1.02);
}
.search-item .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    min-width: auto;
}
.search-item .nav-link:hover {
    background-color: #f8f9fa;
}
.search-icon {
    font-size: 1.2rem;
    color: #6f42c1;
    transition: color 0.3s ease;
}
.search-item .nav-link:hover .search-icon {
    color: #007bff;
}
/* Dropdown - 與Bootstrap兼容，自訂樣式 */
.dropdown-toggle {
    cursor: pointer;
}
.dropdown-menu {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    min-width: 220px;
    z-index: 1000;
}
.dropdown-item {
    padding: 0.75rem 1rem;
    color: #333 !important;
    transition: background 0.3s ease;
}
.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #6f42c1 !important;
}
.dropdown-divider {
    height: 1px;
    background-color: #dee2e6;
    margin: 0.5rem 0;
}

/* ========================================
   Hero Section - 主標題與副標題
   ======================================== */
.hero {
    padding: 0.5rem 0;
    margin-bottom: 0;
    text-align: left;
}
.hero-content {
    text-align: left;
}
/* 主標題 */
.hero-title {
    font-size: 1.4rem;
    margin-bottom: 0.25rem;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
    word-break: keep-all;
    overflow-wrap: break-word;
    hyphens: auto;
}
.hero-title br {
    display: inline;
}
@media (min-width: 769px) and (max-width: 991px) {
    .hero-title {
        font-size: 1.6rem;
        line-height: 1.4;
    }
}
@media (min-width: 992px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }
}
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.35rem;
        line-height: 1.45;
        margin-bottom: 0.5rem;
    }
    .hero-title br {
        display: block;
    }
}
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.25rem;
        line-height: 1.5;
        padding: 0 5px;
    }
}
/* 副標題樣式 */
.hero-subtitle,
.hero-title small,
.hero-title span.subtitle {
    display: block;
    font-size: 0.7em;
    font-weight: 400;
    color: #666;
    margin-top: 0.5rem;
    line-height: 1.4;
    font-style: italic;
}
@media (max-width: 768px) {
    .hero-subtitle,
    .hero-title small,
    .hero-title span.subtitle {
        font-size: 0.75em;
        margin-top: 0.4rem;
        line-height: 1.5;
    }
}
@media (max-width: 400px) {
    .hero-subtitle,
    .hero-title small,
    .hero-title span.subtitle {
        font-size: 0.8em;
        margin-top: 0.3rem;
    }
}
.hero-subtitle:hover,
.hero-title small:hover,
.hero-title span.subtitle:hover {
    color: #333;
}
/* 期數資訊 */
.issue-info {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.25rem;
}
.issue-link {
    color: #6f42c1;
    font-weight: bold;
}
.category {
    font-size: 0.95rem;
    color: #007bff;
    font-weight: 500;
    margin-bottom: 0.75rem;
}
/* 分享區域 */
.share-row {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.5rem 0 0;
}
@media (max-width: 768px) {
    .share-row {
        justify-content: flex-start;
        margin: 0.3rem 0 0;
        gap: 0.3rem;
    }
}
.share-label {
    font-weight: bold;
    color: #333;
    margin-right: 0.5rem;
    white-space: nowrap;
    font-size: 0.95rem;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .share-label {
        font-size: 0.9rem;
    }
}
.share-container {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scrollbar-width: thin;
    flex: 1;
}
@media (max-width: 768px) {
    .share-container {
        justify-content: space-around;
        gap: 0.4rem;
        padding: 0.3rem 0;
    }
}
.share-item {
    display: inline-block;
}
.share-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.share-icon:hover {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
@media (max-width: 768px) {
    .share-icon {
        width: 30px !important;
        height: 30px !important;
    }
}
@media (max-width: 400px) {
    .share-icon {
        width: 28px !important;
        height: 28px !important;
    }
}
.font-adjust-buttons {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .font-adjust-buttons {
        margin-left: 0.5rem;
        margin-top: 0.5rem;
        gap: 0.2rem;
    }
    .language-toggle-btn {
        margin-left: 0.5rem;
    }
}
.font-adjust-btn, .language-toggle-btn {
    background: linear-gradient(135deg, #007bff, #6f42c1);
    color: white !important;
    border: none !important;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.9rem;
    margin-left: 0.25rem;
}
.font-adjust-btn:hover, .language-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
}
.font-adjust-btn:focus, .language-toggle-btn:focus {
    outline: 2px solid #6f42c1;
    outline-offset: 2px;
    border-radius: 50%;
}
@media (max-width: 768px) {
    .font-adjust-btn, 
    .language-toggle-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.8rem !important;
    }
}
@media (max-width: 400px) {
    .font-adjust-btn, 
    .language-toggle-btn {
        width: 24px !important;
        height: 24px !important;
        font-size: 0.75rem !important;
    }
}
.small-font { font-size: 0.8rem; }
.large-font { font-size: 1.2rem; }

/* Separator & Pic Image */
.hero-separator {
    border-top: 1px solid #e0e0e0;
    margin: 1rem 0;
    padding-top: 0;
}
.pic {
    width: 100%;
    max-width: 576px;
    height: auto;
    transition: transform 0.3s ease;
    position: relative;
    margin: 1rem auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
    text-align: center;
}
.pic .caption {
    background-color: rgba(255, 255, 255, 0.9);
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
    padding: 0.8rem 1rem;
    margin: 0;
    text-align: center;
    border-top: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
}
.pic p {
    margin: 0;
    padding: 0;
    text-align: center;
}
.pic span {
    display: block;
}
.pic:hover {
    transform: scale(1.02);
}
@media (max-width: 768px) {
    .pic {
        max-width: 100%;
        margin: 0.5rem auto;
    }
    .pic .caption {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Main Content & Headings */
.main-content {
    margin: 1rem 0;
}
main {
    padding: 2rem 0;
    padding-bottom: 2rem;
    min-height: calc(100vh - 200px);
}
@media (max-width: 768px) {
    main {
        padding: 1.188rem 0;
    }
}
h1, h5 {
    font-size: 1.35em;
    color: #096A26;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
}
h1 {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}
h8 {
    background-color: #f0f0f0;
    color: #380354;
    font-size: 16pt;
    padding: 10px;
    border-radius: 5px;
}
p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Issue Header */
.issue-header {
    text-align: center;
    margin-bottom: 2rem;
}
#publishinfo {
    font-size: 1.6em;
    color: #026b45;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
    line-height: 1.4;
}
@media (max-width: 768px) {
    #publishinfo {
        font-size: 1.2em;
        line-height: 1.5;
        padding: 0 10px;
    }
}
@media (max-width: 400px) {
    #publishinfo {
        font-size: 1.1em;
        line-height: 1.6;
    }
}
.issue-separator {
    border-top: 2px solid #e0e0e0;
    margin: 1rem 0;
}

/* 統一所有內容區塊的最大寬度 */
.featured-news,
.weekly-recommendations,
.toc,
.columns-wrapper {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.featured-news:hover,
.weekly-recommendations:hover,
.toc-category:hover,
.columns-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.featured-news {
    border-left: none;
    padding: 2rem 1.5rem;
}
.weekly-recommendations {
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%);
    border-left: 5px solid #4caf50;
    padding: 0.3rem 1.5rem 1rem;
    margin: 0.05rem auto 1rem;
    text-align: center;
}
.weekly-recommendations:hover {
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.15);
}
.toc {
    max-width: 800px;
    padding: 1.5rem;
}
.columns-wrapper {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
    border-left: 4px solid #ff9800;
    padding: 1.5rem;
    margin-bottom: 3rem;
}
.columns-wrapper .toc-category {
    background: rgba(255, 255, 255, 0.7);
    border-left-color: #ff9800;
    margin-bottom: 0.7128rem;
    padding: 0.5346rem;
}
.news-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
    max-width: 100%;
}
@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 992px) {
    .news-grid {
        gap: 2rem;
    }
}
/* 手機版優化 */
@media (max-width: 768px) {
    .featured-news,
    .weekly-recommendations,
    .toc,
    .columns-wrapper {
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    .featured-news {
        padding: 1rem 15px;
        margin-bottom: 1.5rem;
    }
    .weekly-recommendations {
        padding: 0.2rem 15px;
        margin-bottom: 0.3rem;
    }
    .toc {
        padding: 1.188rem;
    }
    .columns-wrapper {
        padding: 1.188rem 15px;
        margin-bottom: 1.782rem;
    }
    .columns-wrapper .toc-category {
        margin-bottom: 0.5346rem;
        padding: 0.3564rem;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
}
/* 平板版優化 */
@media (min-width: 769px) and (max-width: 991px) {
    .featured-news,
    .weekly-recommendations,
    .toc,
    .columns-wrapper {
        max-width: 900px;
        padding-left: 30px;
        padding-right: 30px;
    }
    .weekly-recommendations {
        padding: 0.3rem 30px 1rem;
    }
    .columns-wrapper {
        padding: 1.5rem 30px;
    }
}
/* 大螢幕優化 */
@media (min-width: 992px) {
    .featured-news,
    .weekly-recommendations,
    .toc,
    .columns-wrapper {
        max-width: 1200px;
        padding-left: 30px;
        padding-right: 30px;
    }
    .weekly-recommendations {
        padding: 0.3rem 30px 1rem;
    }
    .columns-wrapper {
        padding: 1.5rem 30px;
    }
}
/* 極小螢幕優化 */
@media (max-width: 400px) {
    .weekly-recommendations {
        padding: 0.5rem 15px;
    }
}

/* Weekly Recommendations */
.weekly-recommendations .linklisthead {
    font-size: 1.1rem;
    color: #4caf50;
    margin-bottom: 0.3rem;
    font-weight: 600;
    border-bottom: 2px solid #4caf50;
    padding-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.weekly-recommendations .linklisthead::before {
    content: '⭐';
    font-size: 1.1rem;
}
@media (max-width: 768px) {
    .weekly-recommendations .linklisthead {
        font-size: 1rem;
        margin-bottom: 0.2rem;
        padding-bottom: 0.2rem;
    }
}
@media (min-width: 768px) {
    .weekly-recommendations .linklisthead {
        font-size: 1rem; /* 小欄縮小標題 */
    }
}
.weekly-recommendations p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    margin: 0;
}
.weekly-recommendations p a {
    color: #2e7d32 !important;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}
.weekly-recommendations p a:hover {
    color: #1b5e20 !important;
    background: rgba(46, 125, 50, 0.1);
}
/* 行動裝置調整：全寬垂直多行 */
@media (max-width: 767.98px) {
    .weekly-recommendations {
        margin-bottom: 1.5rem;
    }
    .weekly-recommendations p {
        flex-direction: column !important;
        gap: 0.8rem;
        font-size: 0.9rem;
    }
    .weekly-recommendations p a {
        display: block;
        width: 100%;
        max-width: 300px;
        padding: 0.5rem 1rem;
        background: rgba(76, 175, 80, 0.1);
        border-radius: 6px;
        margin: 0 auto;
        white-space: normal;
    }
    .weekly-recommendations p .separator {
        display: none;
    }
}
/* 桌面端調整：大空間一行，小欄垂直多行 */
@media (min-width: 768px) {
    .weekly-recommendations:not(.recommendations-col) p {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: center;
    }
    .weekly-recommendations:not(.recommendations-col) p a {
        max-width: none;
        padding: 0.4rem 0.8rem;
        font-size: 0.95rem;
    }
    .recommendations-col .weekly-recommendations p {
        flex-direction: column !important;
        gap: 0.6rem;
        align-items: center;
    }
    .recommendations-col .weekly-recommendations p a {
        display: block;
        width: 100%;
        max-width: 250px;
        padding: 0.5rem 1rem;
        background: rgba(76, 175, 80, 0.1);
        border-radius: 6px;
        margin: 0 auto;
        white-space: normal;
    }
    .recommendations-col .weekly-recommendations p .separator {
        display: none;
    }
    .recommendations-col {
        max-height: 100%;
    }
    .columns-wrapper {
        padding: 1.5rem;
    }
    .columns-wrapper ul.linklist li {
        margin-bottom: 0.75rem;
    }
}
/* 極大螢幕優化（> 1200px） */
@media (min-width: 1200px) {
    .weekly-recommendations p {
        gap: 1rem;
    }
    .weekly-recommendations p a {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}
@media (max-width: 400px) {
    .weekly-recommendations p {
        font-size: 0.85rem;
        gap: 0.6rem;
    }
}

/* Featured News Section */
.featured-news .linklisthead {
    font-size: 1.4rem;
    color: #026b45;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #026b45;
    padding-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.featured-news .linklisthead::before {
    content: '📖';
    font-size: 1.4rem;
}
@media (max-width: 768px) {
    .featured-news .linklisthead {
        font-size: 1.2rem;
    }
}
.carousel-caption h5 {
    font-size: 1.4rem;
    font-weight: bold;
}
.carousel-caption p {
    font-size: 1rem;
    color: #f1f1f1;
}
.news-content {
    margin-top: 1.5rem;
    padding: 1rem;
    text-align: left;
}
.news-title {
    font-size: 1.4rem;
    color: #026b45;
    font-weight: 600;
    margin-bottom: 1rem;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal !important;
    line-height: 1.5;
}
@media (max-width: 768px) {
    .news-title {
        font-size: 1.2rem;
        line-height: 1.6;
    }
}
.news-desc {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}
.btn-outline-success {
    transition: all 0.3s ease;
}
.btn-outline-success:hover {
    background: #026b45;
    color: #fff;
}
.news-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}
.news-image {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.read-more-btn {
    display: inline-block;
    background: #fff;
    color: #026b45 !important;
    border: 1px solid #026b45;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}
.read-more-btn:hover {
    background: #026b45;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(2, 107, 69, 0.2);
}

/* Table of Contents */
.toc-category {
    margin-bottom: 2rem;
    border-left: 4px solid #026b45;
    padding: 1.5rem;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}
@media (max-width: 768px) {
    .toc-category {
        padding: 1.188rem;
        margin-bottom: 1.782rem;
        overflow: visible;
    }
    .toc-category > *,
    .featured-news > *,
    .columns-wrapper > * {
        max-width: 100%;
        overflow-wrap: break-word;
    }
}
.linklisthead {
    font-size: 1.2rem !important;
    color: #026b45;
    padding-bottom: 0.1rem;
    border-bottom: 1px solid #ccc;
    margin-bottom: 0;
    margin-top: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    word-break: keep-all;
    overflow-wrap: break-word;
    white-space: normal !important;
    line-height: 1.5;
}
h2.linklisthead::before, h3.linklisthead::before {
    content: '📖';
    font-size: 1.2rem;
}
.columns-wrapper .linklisthead {
    color: #026b45;
    border-bottom: 1px solid #ffcc80;
    margin-top: 0.3564rem;
    padding-bottom: 0.03564rem;
}
.columns-wrapper h3.linklisthead {
    color: #ff9800;
    border-bottom: 1px solid #ff9800;
}
.columns-wrapper h3.linklisthead::before {
    content: '✍️';
    font-size: 1.2rem;
}
.church-touch-category .linklisthead {
    margin-top: 1rem;
    padding-top: 0.5rem;
}
@media (max-width: 768px) {
    .linklisthead {
        font-size: 1.05rem !important;
        line-height: 1.6;
    }
    .church-touch-category .linklisthead {
        font-size: 1rem !important;
        margin-top: 0.8rem;
    }
    .columns-wrapper .linklisthead {
        font-size: 1.1rem !important;
        margin-top: 0.2376rem;
        padding-bottom: 0.02376rem;
    }
}
ul.linklist {
    list-style: none !important;
    padding-left: 0;
    margin: 0;
    margin-top: 0.25rem;
}
.columns-wrapper ul.linklist {
    margin-top: 0.0891rem;
}
ul.linklist li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid #e9ecef;
    position: relative;
    overflow: hidden;
}
ul.linklist li::before {
    content: '';
    display: none;
}
.columns-wrapper ul.linklist li {
    margin-bottom: 0.2673rem;
    padding: 0.1782rem;
}
@media (max-width: 768px) {
    ul.linklist li {
        padding: 0.75rem 1rem;
        margin-bottom: 0.75rem;
    }
    ul.linklist li a {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: 100%;
    }
}
@media (max-width: 400px) {
    ul.linklist li {
        padding: 0.6rem 0.8rem;
        font-size: 0.95rem;
    }
}
ul.linklist li a {
    display: block;
    color: #333 !important;
    text-decoration: none;
    padding-left: 0.5rem;
    transition: color 0.3s ease;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all;
    overflow-wrap: break-word;
    line-height: 1.6;
}
ul.linklist li:hover {
    background: #e8f4fd;
    border-left-color: #6f42c1;
    transform: translateX(5px);
}
ul.linklist li:hover a {
    color: #6f42c1 !important;
}
.church-touch-category ul.linklist li a {
    white-space: normal !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.author {
    font-size: 1rem;
    color: #666;
    margin-top: 0.25rem;
    display: block;
}

/* 補充樣式：Bootstrap col 內的「本週推介」與「專欄文章」布局調整 */
.recommendations-col,
.columns-col {
    display: flex;
    flex-direction: column;
    height: 100%; /* 確保高度一致 */
}

/* 專欄文章列表邊距調整：左/右各一個字距離（強化版） */
.columns-wrapper .linklist.inline li {
    display: flex !important; /* 使用 Flexbox 排版，讓內容左右分佈 */
    align-items: baseline !important; /* 將元素垂直對齊基線 */
    gap: 0.5rem !important;
    padding: 0.75rem 1.5rem !important; /* 桌面：左右 1.5rem，上下 0.75rem */
    margin-bottom: 0.75rem !important;
    background: #f8f9fa !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    border-left: 3px solid #e9ecef !important;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

/* 新增：將作者名字右對齊 */
.columns-wrapper .linklist.inline .author {
    margin-left: auto !important; /* 將作者推到最右側 */
    white-space: nowrap !important; /* 防止作者名字換行 */
    color: #666 !important; /* 設置作者字體顏色 */
    font-size: 0.95rem !important; /* 調整字體大小 */
    text-align: right !important; /* 文字向右對齊 */
    flex-shrink: 0 !important; /* 防止作者名縮小 */
    font-style: italic; /* 可選：讓作者名以斜體顯示 */
}

/* 讓超連結的內容占據左側空間 */
.columns-wrapper .linklist.inline li a {
    display: inline !important;
    padding-left: 0 !important;
    flex: 1 !important; /* 讓超連結內容自動占據剩餘空間 */
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    white-space: normal !important; /* 允許換行 */
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    line-height: 1.6 !important;
    margin-right: 0.5rem !important; /* 標題右邊小間距，讓 ◎ 符號有空間 */
}
.columns-wrapper .linklist.inline li::before {
    display: none !important;
}
.columns-wrapper .linklist.inline li a {
    display: inline !important;
    padding-left: 0 !important;
    flex: 1 !important;
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.3s ease !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    line-height: 1.6 !important;
    margin-right: 0.5rem !important; /* 標題右邊小間距，讓 ◎ 符號有空間 */
}
.columns-wrapper .linklist.inline .author {
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: 0.5rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    color: #666 !important;
    font-size: 0.95rem !important;
}
.columns-wrapper .linklist.inline li:hover {
    background: #e8f4fd !important;
    border-left-color: #6f42c1 !important;
    transform: translateX(5px) !important;
}
.columns-wrapper .linklist.inline li:hover a {
    color: #6f42c1 !important;
}
/* 行動裝置調整：垂直布局時，邊距減小避免過寬（強化版） */
@media (max-width: 767.98px) {
    .columns-wrapper .linklist.inline li {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem !important;
        padding: 0.75rem 1rem !important; /* 行動：左右 1rem */
    }
    .columns-wrapper .linklist.inline li a {
        flex: none !important;
        width: 100% !important;
        display: block !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-right: 0 !important;
    }
    .columns-wrapper .linklist.inline .author {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0.25rem !important;
        align-self: flex-end !important;
    }
    .columns-wrapper ul.linklist li {
        padding: 0.75rem 1rem !important;
    }
    .linklist.inline li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .linklist.inline li a {
        flex: none;
        width: 100%;
        display: block;
        padding-left: 0;
        padding-right: 0;
    }
    .linklist.inline .author {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.25rem;
        align-self: flex-end;
    }
}
/* 桌面端優化：確保邊距一致（強化版） */
@media (min-width: 768px) {
    .columns-wrapper .linklist.inline li {
        padding: 0.75rem 1.5rem !important;
    }
    .columns-wrapper .linklist.inline .author {
        margin-right: 0.5rem !important;
    }
    .columns-wrapper ul.linklist li {
        padding: inherit !important;
    }
    .linklist.inline li {
        padding: 0.75rem 1.5rem;
    }
    .linklist.inline .author {
        margin-right: 0.5rem;
    }
}
@media (max-width: 400px) {
    .columns-wrapper .linklist.inline li {
        padding: 0.6rem 1rem !important;
    }
    .columns-wrapper .linklist.inline .author {
        font-size: 0.9rem !important;
    }
}
.church-touch-category .category-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
    .church-touch-category .category-image {
        height: 150px;
    }
}

/* Sidebar */
.sidebar {
    background: linear-gradient(135deg, #f8f7ff 0%, #f8f7ff 100%);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
aside {
    margin-top: 2rem;
}
@media (min-width: 769px) {
    aside {
        margin-top: 0;
    }
}
@media (max-width: 768px) {
    .sidebar {
        padding: 1rem;
    }
}
.clear {
    clear: both;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
.footer-section h3 {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}
.footer-section p,
.footer-section ul li {
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.footer-section ul {
    list-style: none !important;
    padding: 0;
}
.footer-section ul li a {
    color: #6c757d !important;
    transition: color 0.3s ease;
}
.footer-section a {
    color: #6c757d !important;
    transition: color 0.3s ease;
}
.footer-section ul li a:hover,
.footer-section a:hover {
    color: #007bff !important;
}
.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
}
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        text-align: left;
    }
}

/* Accessibility */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #6f42c1 !important;
    outline-offset: 2px;
}
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: white;
    color: #333;
    padding: 0.5rem 1rem;
    z-index: 10000;
    border-radius: 4px;
    text-decoration: none;
    transition: top 0.3s ease;
}
.skip-link:focus {
    top: 6px;
}
input.gsc-input,
.gsc-input-box,
.gsc-input-box-hover,
.gsc-input-box-focus {
    border-color: #D9D9D9 !important;
}
.plain-link {
    color: inherit !important;
    text-decoration: none;
}
.award-item:focus {
    outline: 2px solid #3498db;
}

/* 揭頁版連結樣式 */
.highlight-box {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.image-link img {
    width: 500px;
    display: block;
    margin: 20px auto;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    transition: transform 0.3s ease;
}
.image-link img:hover {
    transform: scale(1.05);
}

/* 徵文比賽樣式 */
.group-section {
    margin-bottom: 2rem;
}
.award-list {
    list-style: none;
    padding: 0;
}
.award-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 0 4px 4px 0;
}
.award-item:first-child {
    background-color: #e8f5e8;
    border-left-color: #f39c12;
}
.award-item:nth-child(2) {
    background-color: #fff3cd;
    border-left-color: #ffc107;
}
.award-item:nth-child(3) {
    background-color: #f8d7da;
    border-left-color: #dc3545;
}
.award-item:nth-child(n+4):nth-child(-n+6) {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
}
.award-type {
    font-weight: bold;
    flex: 0 0 30%;
    color: #2c3e50;
}
.award-winner {
    flex: 1;
    text-align: right;
    margin-left: 1rem;
}
@media (min-width: 768px) {
    .award-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .award-type {
        flex: 0 0 25%;
    }
}

@media print {
    body {
        background-color: #fff;
    }
    .container {
        box-shadow: none;
        max-width: none;
    }
}
/* 修正：讓 toc 和 toc-category 在 Bootstrap col 內全寬適配，忽略固定 max-width */
.toc.full-col-width,
.columns-col .toc,
.church-touch-category.full-col-width {
    max-width: none !important; /* 移除 800px 限制 */
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.toc-category.full-col-width,
.columns-col .toc-category,
.church-touch-category.full-col-width {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding: inherit; /* 繼承 col 的 padding，避免額外內縮 */
}

/* 確保圖片在 col 內全寬 */
.church-touch-category .category-image {
    width: 100% !important;
    max-width: none !important;
    height: auto;
    margin: 0 0 1rem 0;
}

/* 媒體查詢調整：桌面/平板時，確保 col-md-10 / col-lg-10 生效 */
@media (min-width: 768px) {
    .col-md-10 .toc,
    .col-md-10 .toc-category,
    .col-md-10 .church-touch-category {
        max-width: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .col-md-10 {
        flex: 0 0 83.333333% !important;
        max-width: 83.333333% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (min-width: 992px) {
    .col-lg-10 .toc,
    .col-lg-10 .toc-category,
    .col-lg-10 .church-touch-category {
        max-width: none !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .col-lg-10 {
        flex: 0 0 83.333333% !important;
        max-width: 83.333333% !important;
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 行動裝置：全寬，無邊距 */
@media (max-width: 767.98px) {
    .col-12 .toc,
    .col-12 .toc-category,
    .col-12 .church-touch-category {
        max-width: none !important;
        margin: 0 !important;
        padding: 1rem 15px !important; /* 標準行動 padding */
    }
}

/* 移除可能造成偏移的 box-shadow 或 border 在 col 內 */
.col-md-10 .toc-category,
.col-lg-10 .toc-category {
    box-shadow: none !important; /* 如果有陰影，暫時移除以測試 */
    border-left: none !important;
}
/* ========================================
   改良專欄文章上下空間設計（縮小版）
   ======================================== */
/* 整體容器：微調頂/底 padding，保持平衡但更緊湊 */
.columns-wrapper {
    padding: 1rem 0 !important; /* 頂部/底部空間縮小，避免過多空白 */
    margin-bottom: 1.5rem !important; /* 整個專欄區塊底部間距縮小 */
}

/* 每個子文章 (toc-category)：縮小垂直間距與內部空間 */
.columns-wrapper .toc-category {
    margin-bottom: 1.25rem !important; /* 預設間距：每個專欄文章間垂直分隔（縮小） */
    padding: 0.75rem !important; /* 內部 padding：上下左右縮小空間感 */
    border-radius: 8px !important; /* 保留輕微圓角，提升視覺分隔 */
    transition: all 0.3s ease; /* 輕微動畫，hover時微抬 */
}

.columns-wrapper .toc-category:hover {
    transform: translateY(-2px); /* hover 微抬，增加互動感 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* 標題與列表間距優化（縮小版） */
.columns-wrapper .linklisthead {
    margin-bottom: 0.5rem !important; /* 標題 (h3) 與 ul 間距縮小 */
    padding-bottom: 0.25rem !important; /* 標題底部小 padding 縮小 */
}

.columns-wrapper ul.linklist {
    margin-bottom: 0.25rem !important; /* 列表底部小間距縮小，避免最後一項貼底 */
}

.columns-wrapper ul.linklist li {
    margin-bottom: 0.5rem !important; /* li 內部間距縮小（如果有多個項目） */
}

/* 覆蓋原有小間距規則（確保新設計生效） */
.columns-wrapper .toc-category {
    margin-bottom: 1.25rem !important; /* 覆蓋原有，確保縮小 */
}

.columns-wrapper .toc-category:last-child {
    margin-bottom: 0 !important; /* 最後一個子文章無底部間距 */
}

/* 桌面端：適中空間（縮小版） */
@media (min-width: 768px) {
    .columns-wrapper {
        padding: 1.25rem 0 !important;
    }
    
    .columns-wrapper .toc-category {
        margin-bottom: 1.25rem !important; /* 桌面：縮小垂直間距 */
        padding: 1rem !important; /* 內部空間適中 */
    }
    
    .columns-wrapper .linklisthead {
        margin-bottom: 0.75rem !important;
    }
}

/* 平板端：適中空間（與桌面一致） */
@media (min-width: 769px) and (max-width: 991px) {
    .columns-wrapper .toc-category {
        margin-bottom: 1rem !important;
        padding: 0.75rem !important;
    }
}

/* 行動裝置：更緊湊 */
@media (max-width: 767.98px) {
    .columns-wrapper {
        padding: 0.75rem 0 !important;
    }
    
    .columns-wrapper .toc-category {
        margin-bottom: 0.75rem !important; /* 行動：縮小間距，避免頁面過長 */
        padding: 0.5rem !important; /* 內部空間更緊湊 */
    }
    
    .columns-wrapper .linklisthead {
        margin-bottom: 0.25rem !important;
    }
    
    /* 行動端 inline li 垂直調整（縮小版） */
    .columns-wrapper .linklist.inline li {
        margin-bottom: 0.25rem !important;
        padding: 0.5rem !important;
    }
}

/* 極小螢幕優化 */
@media (max-width: 400px) {
    .columns-wrapper .toc-category {
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
    }
}
/* ========================================
   改良專欄文章：左右邊界齊平 + 包圍效果
   ======================================== */
/* 整體容器：移除內部左右margin，讓背景填滿 col-md-10 寬度，與本週推介齊平 */
.columns-wrapper {
    padding: 1rem 0 1rem 0 !important; /* 頂/底空間，左右無padding，讓背景延伸到col邊界 */
    margin: 0 !important; /* 移除任何margin，確保左右齊平 */
    width: 100% !important;
    max-width: none !important; /* 忽略任何max-width */
    box-sizing: border-box !important;
    border-left: 4px solid #ff9800 !important; /* 強化橙色左邊框 */
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%) !important; /* 確保漸層背景全寬 */
}

/* 內部子文章：添加包圍效果（邊框 + 陰影），並統一左右空間 */
.columns-wrapper .toc-category {
    margin-bottom: 1.25rem !important; /* 垂直間距保持 */
    padding: 0.75rem 1rem !important; /* 內部左右padding 1rem，與本週推介一致 */
    border: 1px solid rgba(255, 152, 0, 0.2) !important; /* 淺橙邊框，"包圍"效果 */
    border-radius: 8px !important;
    box-shadow: 0 2px 6px rgba(255, 152, 0, 0.1) !important; /* 輕微橙陰影，增強包圍感 */
    background: rgba(255, 255, 255, 0.8) !important; /* 內部白色半透明，與橙背景對比 */
    transition: all 0.3s ease;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

.columns-wrapper .toc-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2) !important; /* hover 強化橙陰影 */
    border-color: rgba(255, 152, 0, 0.4) !important;
}

/* 標題與列表：統一左右對齊，增強包圍感 */
.columns-wrapper .linklisthead {
    margin: 0 0 0.5rem 0 !important; /* 無左右margin，貼近邊框 */
    padding: 0.5rem 0 !important; /* 上下小padding */
    text-align: left; /* 確保左對齊 */
    border-bottom: 1px solid rgba(255, 152, 0, 0.3) !important; /* 標題下淺橙線，包圍效果 */
}

.columns-wrapper ul.linklist {
    padding-left: 0.5rem !important; /* 列表左小padding，貼近邊框但不貼邊 */
    margin: 0 !important;
}

.columns-wrapper ul.linklist li {
    margin-bottom: 0.5rem !important;
    padding: 0.25rem 0.5rem !important; /* li 內部小padding，內容有空間 */
    border-left: 3px solid rgba(255, 152, 0, 0.5) !important; /* 每個li左橙線，增強包圍 */
    background: rgba(255, 255, 255, 0.9) !important; /* li 背景微白 */
    border-radius: 4px !important;
}

.columns-wrapper ul.linklist li:hover {
    background: rgba(255, 152, 0, 0.1) !important; /* hover 淺橙背景 */
    border-left-color: #ff9800 !important;
}

/* 覆蓋原有規則，確保齊平 */
.columns-wrapper .toc-category:last-child {
    margin-bottom: 0 !important;
}

/* 桌面端：確保左右齊平本週推介 */
@media (min-width: 768px) {
    .columns-wrapper {
        padding-left: 0 !important; /* 無左padding，讓橙邊框從col左邊開始 */
        padding-right: 0 !important; /* 無右padding，讓背景到col右邊 */
    }
    
    .columns-wrapper .toc-category {
        padding-left: 1rem !important; /* 內部內容左1rem，與本週推介一致 */
        padding-right: 1rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* 與本週推介齊平：如果本週推介有特定padding，匹配它 */
    .col-md-10 .weekly-recommendations,
    .col-md-10 .columns-wrapper {
        padding-left: 1.5rem !important; /* 假設本週推介內部padding 1.5rem，匹配它 */
        padding-right: 1.5rem !important;
    }
}

/* 行動裝置：全寬，無邊距 */
@media (max-width: 767.98px) {
    .columns-wrapper {
        padding: 0.75rem 1rem !important; /* 行動左右1rem，與其他區塊一致 */
        border-left: none !important; /* 行動隱藏左邊框，避免過窄 */
    }
    
    .columns-wrapper .toc-category {
        padding: 0.5rem 0.75rem !important;
        border: 1px solid rgba(255, 152, 0, 0.3) !important; /* 行動保留包圍邊框 */
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .col-12 .weekly-recommendations,
    .col-12 .columns-wrapper {
        padding-left: 15px !important; /* Bootstrap標準行動padding */
        padding-right: 15px !important;
    }
}

/* 極小螢幕：更緊湊 */
@media (max-width: 400px) {
    .columns-wrapper .toc-category {
        padding: 0.5rem 0.5rem !important;
    }
}
/* ========================================
   強制齊平 + 包圍效果（高優先級版）
   ======================================== */
/* 本週推介：統一padding，讓作為基準 */
.col-md-10 .weekly-recommendations.full-col-width,
.col-lg-10 .weekly-recommendations.full-col-width {
    padding: 0.3rem 1.5rem 1rem !important; /* 與專欄匹配，左右1.5rem */
    margin: 0 !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
    background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%) !important; /* 綠背景全寬 */
    border-left: 5px solid #4caf50 !important; /* 綠左邊框全寬 */
    border-radius: 12px !important;
}

/* 專欄文章整體容器：左右齊平本週推介，橙背景全寬 */
.col-md-10 .columns-wrapper.full-col-width,
.col-lg-10 .columns-wrapper.full-col-width {
    padding: 1rem 0 1rem 0 !important; /* 頂/底空間，左右無padding（讓橙背景延伸到col邊界） */
    margin: 0 !important; /* 移除任何margin，強制齊平 */
    width: 100% !important;
    max-width: none !important; /* 忽略原有max-width */
    box-sizing: border-box !important;
    border-left: 4px solid #ff9800 !important; /* 橙左邊框從col左邊開始 */
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%) !important; /* 橙漸層全寬 */
    border-radius: 12px !important; /* 與本週推介一致圓角 */
}

/* 內部子文章：包圍效果（邊框 + 陰影），內容貼近邊框 */
.col-md-10 .columns-wrapper .toc-category.full-col-width,
.col-lg-10 .columns-wrapper .toc-category.full-col-width {
    margin-bottom: 1.25rem !important; /* 垂直間距 */
    padding: 0.75rem 1.5rem !important; /* 內部左右1.5rem，與本週推介一致（內容像被包圍） */
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    border: 1px solid rgba(255, 152, 0, 0.3) !important; /* 淺橙邊框包圍 */
    border-radius: 6px !important; /* 小圓角 */
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15) !important; /* 橙陰影增強包圍感 */
    background: rgba(255, 255, 255, 0.9) !important; /* 內部白背景，對比橙外框 */
    transition: all 0.3s ease !important;
}

.col-md-10 .columns-wrapper .toc-category.full-col-width:hover,
.col-lg-10 .columns-wrapper .toc-category.full-col-width:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25) !important; /* hover 強化包圍 */
    border-color: #ff9800 !important;
}

/* 標題：貼近邊框，包圍線 */
.col-md-10 .columns-wrapper .linklisthead,
.col-lg-10 .columns-wrapper .linklisthead {
    margin: 0 0 0.5rem 0 !important; /* 無左右margin，貼邊框 */
    padding: 0.5rem 0 !important; /* 上下小空間 */
    border-bottom: 1px solid rgba(255, 152, 0, 0.4) !important; /* 下橙線包圍 */
    text-align: left !important;
}

/* 列表：左小padding，li有橙左線包圍 */
.col-md-10 .columns-wrapper ul.linklist,
.col-lg-10 .columns-wrapper ul.linklist {
    padding-left: 0.5rem !important; /* 左小空間，貼邊框 */
    margin: 0 !important;
}

.col-md-10 .columns-wrapper ul.linklist li,
.col-lg-10 .columns-wrapper ul.linklist li {
    margin-bottom: 0.5rem !important;
    padding: 0.25rem 0.5rem !important; /* 小內部空間 */
    border-left: 3px solid rgba(255, 152, 0, 0.6) !important; /* li左橙線，包圍效果 */
    background: rgba(255, 255, 255, 1) !important; /* 白背景 */
    border-radius: 4px !important;
}

.col-md-10 .columns-wrapper ul.linklist li:hover,
.col-lg-10 .columns-wrapper ul.linklist li:hover {
    background: rgba(255, 152, 0, 0.1) !important; /* hover淺橙 */
    border-left-color: #ff9800 !important;
}

/* 覆蓋原有規則（高優先級） */
.toc .columns-wrapper .toc-category {
    margin-bottom: 1.25rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.toc .columns-wrapper .toc-category:last-child {
    margin-bottom: 1rem !important; /* 最後一個小間距 */
}

/* 行動裝置：全寬，隱藏邊框避免過窄 */
@media (max-width: 767.98px) {
    .col-12 .weekly-recommendations.full-col-width,
    .col-12 .columns-wrapper.full-col-width {
        padding: 0.3rem 1rem 1rem !important; /* 行動左右1rem */
        border-left-width: 3px !important; /* 細邊框 */
    }
    
    .col-12 .columns-wrapper .toc-category.full-col-width {
        padding: 0.5rem 1rem !important; /* 內部緊湊 */
        border: 1px solid rgba(255, 152, 0, 0.4) !important;
        border-left-width: 3px !important;
    }
    
    .col-12 .columns-wrapper ul.linklist {
        padding-left: 0.25rem !important;
    }
}

/* 桌面/平板：確保齊平 */
@media (min-width: 768px) {
    .col-md-10 .weekly-recommendations.full-col-width,
    .col-md-10 .columns-wrapper.full-col-width {
        padding-left: 1.5rem !important; /* 統一左右1.5rem，齊平 */
        padding-right: 1.5rem !important;
    }
    
    .col-md-10 .columns-wrapper .toc-category.full-col-width {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 992px) {
    .col-lg-10 .weekly-recommendations.full-col-width,
    .col-lg-10 .columns-wrapper.full-col-width {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}
/* ========================================
           最小內嵌CSS：專欄文章齊平 + 包圍效果（高優先級，合併版）
           ======================================== */
        /* 本週推介：統一padding，讓作為齊平基準 */
        .col-md-10 .weekly-recommendations.full-col-width,
        .col-lg-10 .weekly-recommendations.full-col-width {
            padding: 0.3rem 1.5rem 1rem !important;
            margin: 0 !important;
            width: 100% !important;
            max-width: none !important;
            box-sizing: border-box !important;
            background: linear-gradient(135deg, #e8f5e8 0%, #f1f8e9 100%) !important;
            border-left: 5px solid #4caf50 !important;
            border-radius: 12px !important;
        }

        /* 專欄文章整體容器：左右齊平本週推介，橙背景全寬 */
        .col-md-10 .columns-wrapper.full-col-width,
        .col-lg-10 .columns-wrapper.full-col-width {
            padding: 1rem 0 !important; /* 頂/底空間，左右無padding（背景延伸到col邊界） */
            margin: 0 !important; /* 強制齊平 */
            width: 100% !important;
            max-width: none !important;
            box-sizing: border-box !important;
            border-left: 4px solid #ff9800 !important; /* 橙左邊框從col左邊開始 */
            background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%) !important; /* 橙漸層全寬 */
            border-radius: 12px !important; /* 與本週推介一致圓角 */
            margin-bottom: 1.5rem !important; /* 整體底部間距（縮小版） */
        }

        /* 內部子文章：包圍效果 + 緊湊空間 */
        .col-md-10 .columns-wrapper .toc-category.full-col-width,
        .col-lg-10 .columns-wrapper .toc-category.full-col-width {
            margin-bottom: 1.25rem !important; /* 垂直間距（縮小版） */
            padding: 0.75rem 1.5rem !important; /* 內部左右1.5rem，齊平本週推介 */
            margin-left: 0 !important;
            margin-right: 0 !important;
            width: 100% !important;
            border: 1px solid rgba(255, 152, 0, 0.3) !important; /* 淺橙邊框包圍 */
            border-radius: 6px !important;
            box-shadow: 0 2px 8px rgba(255, 152, 0, 0.15) !important; /* 橙陰影增強包圍感 */
            background: rgba(255, 255, 255, 0.9) !important; /* 白背景對比橙外框 */
            transition: all 0.3s ease !important;
        }
        .col-md-10 .columns-wrapper .toc-category.full-col-width:hover,
        .col-lg-10 .columns-wrapper .toc-category.full-col-width:hover {
            transform: translateY(-1px) !important;
            box-shadow: 0 4px 12px rgba(255, 152, 0, 0.25) !important;
            border-color: #ff9800 !important;
        }
        .col-md-10 .columns-wrapper .toc-category.full-col-width:last-child,
        .col-lg-10 .columns-wrapper .toc-category.full-col-width:last-child {
            margin-bottom: 0 !important;
        }

        /* 標題：貼近邊框，包圍線 */
        .col-md-10 .columns-wrapper .linklisthead,
        .col-lg-10 .columns-wrapper .linklisthead {
            margin: 0 0 0.5rem 0 !important;
            padding: 0.5rem 0 !important;
            border-bottom: 1px solid rgba(255, 152, 0, 0.4) !important; /* 下橙線包圍 */
            text-align: left !important;
        }
        .columns-wrapper h3.linklisthead {
            color: #ff9800 !important;
            border-bottom: 1px solid #ff9800 !important;
        }
        .columns-wrapper h3.linklisthead::before {
            content: '✍️';
            font-size: 1.2rem;
        }

        /* 列表：左小padding，li橙左線包圍 */
        .col-md-10 .columns-wrapper ul.linklist,
        .col-lg-10 .columns-wrapper ul.linklist {
            padding-left: 0.5rem !important;
            margin: 0 !important;
        }
        .col-md-10 .columns-wrapper ul.linklist li,
        .col-lg-10 .columns-wrapper ul.linklist li {
            margin-bottom: 0.5rem !important;
            padding: 0.25rem 0.5rem !important;
            border-left: 3px solid rgba(255, 152, 0, 0.6) !important; /* li左橙線包圍 */
            background: rgba(255, 255, 255, 1) !important;
            border-radius: 4px !important;
        }
        .col-md-10 .columns-wrapper ul.linklist li:hover,
        .col-lg-10 .columns-wrapper ul.linklist li:hover {
            background: rgba(255, 152, 0, 0.1) !important; /* hover淺橙 */
            border-left-color: #ff9800 !important;
        }

        /* 行動裝置：全寬，隱藏邊框避免過窄 */
        @media (max-width: 767.98px) {
            .col-12 .weekly-recommendations.full-col-width,
            .col-12 .columns-wrapper.full-col-width {
                padding: 0.3rem 1rem 1rem !important;
                border-left-width: 3px !important; /* 細邊框 */
            }
            .col-12 .columns-wrapper .toc-category.full-col-width {
                padding: 0.5rem 1rem !important;
                border: 1px solid rgba(255, 152, 0, 0.4) !important;
                border-left-width: 3px !important;
            }
            .col-12 .columns-wrapper ul.linklist {
                padding-left: 0.25rem !important;
            }
        }

        /* 桌面/平板：確保齊平 */
        @media (min-width: 768px) {
            .col-md-10 .weekly-recommendations.full-col-width,
            .col-md-10 .columns-wrapper.full-col-width {
                padding-left: 1.5rem !important;
                padding-right: 1.5rem !important;
            }
            .col-md-10 .columns-wrapper .toc-category.full-col-width {
                padding-left: 1.5rem !important;
                padding-right: 1.5rem !important;
            }
        }
        @media (min-width: 992px) {
            .col-lg-10 .weekly-recommendations.full-col-width,
            .col-lg-10 .columns-wrapper.full-col-width {
                padding-left: 1.5rem !important;
                padding-right: 1.5rem !important;
            }
        }
/* 偽元素清除 */
.toc-category::before,
.toc-category::after,
.columns-wrapper::before,
.columns-wrapper::after {
    content: none !important;
    display: none !important;
}

/* 強制清除相關容器樣式 */
.toc-category,
.columns-wrapper,
.toc.full-col-width {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    overflow: visible !important;
    height: auto !important;
}

/* 清除底部間距問題 */
.toc-category:last-child,
.columns-wrapper:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}