html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* 輪播圖動畫效果 */
#carouselExampleCaptions {
    transition: all 0.3s ease-in-out;
    transform: translateY(0);
    opacity: 1;
}

#carouselExampleCaptions:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* 標題區塊樣式 - 移除動畫效果 */
.title {
    position: relative;
}

/* RWD 優化的行區塊 */
.row.mt-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
}

/* 菜單圖片基本樣式 */
.menuPicture {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.HomeURLImage img {
    width: 100%;
    height: auto;
    display: block;
}

/* 最新消息表格動畫 */
#NEWS tr {
    transition: all 0.2s ease-in-out;
}

#NEWS tr:hover {
    background-color: rgba(0,0,0,0.05);
    transform: translateX(10px);
}

/* RWD 響應式設計 */
@media (max-width: 768px) {
    .row.mt-3 {
        grid-template-columns: repeat(1, 1fr);
        gap: 1rem;
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .row.mt-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.menu-container {
    padding: 15px;
    max-width: 1400px;
    margin: 0 auto;
}

.menu-item {
    margin-bottom: 16px;
    transition: transform 0.3s ease;
    /* 設定固定寬高且防止覆寫 */
    width: 280px !important;
    height: 200px !important;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    padding: 0 !important;
}

.menu-item:hover {
    transform: translateY(-8px);
}

.menu-item a {
    width: 280px !important;
    height: 200px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.menu-item img {
    /* 固定圖片尺寸且防止任何覆寫 */
    width: 210px !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
    /* 防止任何形式的縮放 */
    max-width: none !important;
    flex-shrink: 0 !important;
    transform: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.menu-item img:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* 確保 col-auto 不會影響固定寬度 */
.col-auto {
    padding: 10px !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
}

/* 移除可能影響固定寬度的樣式 */
.row {
    margin: 0 !important;
}

/* News styles */
.news-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-news {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-news:hover, .btn-news.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 10px;
}

/* Enhanced News Card Styles */
.news-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.news-image {
    position: relative;
    overflow: hidden;
    padding-top: 66%;
}

.news-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.news-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
}

.read-more {
    color: white;
    font-size: 1.1rem;
    padding: 10px 20px;
    border: 2px solid white;
    border-radius: 30px;
    transform: translateY(20px);
    transition: all 0.4s ease;
    background: rgba(0, 0, 0, 0.5);
}

.news-card:hover .news-overlay {
    opacity: 1;
}

.news-card:hover .read-more {
    transform: translateY(0);
}

.news-card:hover .news-image img {
    transform: scale(1.1);
}

.news-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-title {
    margin: 0 0 12px 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #007bff;
}

.news-date {
    color: #007bff;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: auto;
}

/* Improved Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.paginationjs .paginationjs-pages li {
    margin: 0 3px;
}

.paginationjs .paginationjs-pages li > a {
    border-radius: 30px;
    min-width: 40px;
    height: 40px;
    line-height: 40px;
    padding: 0 15px;
    background: white;
    color: #333;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.paginationjs .paginationjs-pages li.active > a {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.paginationjs .paginationjs-pages li:hover > a {
    background: #e9ecef;
    border-color: #dee2e6;
    color: #007bff;
}

/* News Grid Responsive Improvements */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 15px;
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .news-title {
        font-size: 1.2rem;
    }
    
    .news-excerpt {
        font-size: 0.9rem;
    }
}

/* RWD adjustments */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-sidebar {
        margin-bottom: 20px;
    }
}

/* Title underline animation */
.title-underline {
    width: 250px;
    height: 3px;
    background: #007bff;
    margin: 15px auto;
    position: relative;
    overflow: hidden;
}

.title-underline::after {
    content: '';
    position: absolute;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: underline-shine 2s infinite;
}

@keyframes underline-shine {
    100% {
        left: 100%;
    }
}

/* News Filter and Search Styles */
.search-box {
    position: relative;
}

.search-box input {
    padding-right: 40px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.search-box input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    border-color: #80bdff;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.news-filter {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.filter-text {
    color: #666;
    font-size: 0.95rem;
}

.sort-options .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 8px 36px 8px 12px;
    font-size: 0.95rem;
    background-color: white;
    transition: all 0.3s ease;
}

.sort-options .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.15);
    border-color: #80bdff;
}

.badge {
    transition: all 0.3s ease;
}

.btn-news:hover .badge {
    background-color: white !important;
    color: #007bff !important;
}

/* Enhance responsive layout */
@media (max-width: 768px) {
    .news-filter {
        padding: 12px;
    }
    
    .filter-text {
        margin-bottom: 10px;
    }
    
    .sort-options {
        width: 100%;
    }
    
    .sort-options .form-select {
        width: 100%;
    }
}

/* Loading animation */
.news-grid.loading {
    position: relative;
    min-height: 200px;
}

.news-grid.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state */
.news-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.news-empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

.news-empty-state p {
    margin: 0;
    font-size: 1.1rem;
}

/* Social Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.share-btn i {
    font-size: 1rem;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.share-btn.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Enhance News Meta Layout */
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .news-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: flex-start;
    }
    
    .share-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    .share-buttons {
        display: none;
    }
}

/* Article Content Styles */
.news-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    max-width: 900px;
    margin: 0 auto;
}

.news-body h1,
.news-body h2,
.news-body h3,
.news-body h4,
.news-body h5,
.news-body h6 {
    margin-top: 2em;
    margin-bottom: 1em;
    font-weight: 600;
    color: #222;
}

.news-body p {
    margin-bottom: 1.5em;
}

.news-body img {
    max-width: 100%;
    height: auto;
    margin: 2em auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-body img.img-enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1000;
    cursor: zoom-out;
    box-shadow: 0 0 0 100vmax rgba(0,0,0,0.8);
}

.news-body img.img-enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1000;
    cursor: zoom-out;
    transition: all 0.3s ease;
}

.news-body img.img-enlarged:hover {
    transform: translate(-50%, -50%) scale(0.98);
}

.news-body a {
    color: #007bff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.news-body a:hover {
    border-bottom-color: #007bff;
}

.news-body ul,
.news-body ol {
    padding-left: 2em;
    margin-bottom: 1.5em;
}

.news-body li {
    margin-bottom: 0.5em;
}

.news-body blockquote {
    margin: 2em 0;
    padding: 1em 2em;
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
}

.news-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 2em 0;
}

.news-body th,
.news-body td {
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}

.news-body th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.news-body tr:nth-child(even) {
    background-color: #f8f9fa;
}

.news-body code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: Monaco, Consolas, monospace;
    font-size: 0.9em;
    color: #d63384;
}

.news-body pre {
    background-color: #f8f9fa;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
}

.news-body hr {
    margin: 3em 0;
    border: none;
    height: 1px;
    background-color: #dee2e6;
}

/* Enhanced image captions */
.news-body figure {
    margin: 2em 0;
    text-align: center;
}

.news-body figcaption {
    margin-top: 1em;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* Print optimizations */
@media print {
    .news-body {
        font-size: 12pt;
        line-height: 1.6;
    }

    .news-body a {
        text-decoration: none;
        color: #000;
    }

    .news-body img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    .news-body blockquote {
        border-left: 2pt solid #000;
        padding: 0.5em 1em;
        background: none;
    }
}

/* Reading Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 1000;
    background: transparent;
}

.reading-progress {
    height: 100%;
    width: 0;
    background: linear-gradient(to right, #007bff, #00bfff);
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #007bff;
    color: white;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    z-index: 999;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    background: #0056b3;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* News Detail Styles */
.news-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.news-featured-image {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.news-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.6s ease;
}

.news-featured-image:hover img {
    transform: scale(1.02);
}

.news-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    line-height: 1.3;
}

.news-meta {
    color: #666;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Breadcrumb enhancements */
.news-detail .breadcrumb {
    padding: 0.5rem 0;
    margin-bottom: 1.5rem;
    background: transparent;
    border-bottom: 1px solid #eee;
}

.news-detail .breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.news-detail .breadcrumb-item a:hover {
    color: #0056b3;
    transform: translateX(2px);
}

.news-detail .breadcrumb-item.active {
    color: #6c757d;
}

.news-detail .breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Title animations */
.news-detail .news-title {
    position: relative;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.news-detail .news-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #007bff;
    transition: width 0.6s ease;
}

.news-detail .news-title:hover::after {
    width: 100px;
}

/* Loading effect */
.news-detail {
    opacity: 0;
    animation: contentFadeIn 0.8s ease-out forwards;
}

@keyframes contentFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation-name: fadeIn;
    animation-duration: 0.8s;
    animation-timing-function: ease-out;
}

.animate-fade-up {
    animation-name: fadeUp;
    animation-duration: 1s;
    animation-timing-function: ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes underline-shine {
    100% {
        left: 100%;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Media Queries */
@media (max-width: 768px) {
    .news-title {
        font-size: 2rem;
    }

    .news-body {
        font-size: 1rem;
    }

    .news-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .social-share {
        margin-top: 1rem;
    }
}

@media print {
    .news-featured-image,
    .news-body img {
        max-width: 100% !important;
    }
    
    .social-share,
    .news-footer,
    .back-to-top,
    .progress-container {
        display: none !important;
    }

    .news-body {
        font-size: 12pt;
        line-height: 1.6;
    }

    .news-body a {
        text-decoration: none;
        color: #000;
    }

    .news-body blockquote {
        border-left: 2pt solid #000;
        padding: 0.5em 1em;
        background: none;
    }
}

/* Animation timing adjustments */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
    opacity: 0;
    will-change: opacity;
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
    will-change: transform, opacity;
}

/* Stagger animations for multiple elements */
.news-meta > * {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.news-meta > *:nth-child(1) { animation-delay: 0.2s; }
.news-meta > *:nth-child(2) { animation-delay: 0.4s; }

.share-buttons > * {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.share-buttons > *:nth-child(1) { animation-delay: 0.3s; }
.share-buttons > *:nth-child(2) { animation-delay: 0.4s; }
.share-buttons > *:nth-child(3) { animation-delay: 0.5s; }
.share-buttons > *:nth-child(4) { animation-delay: 0.6s; }
.share-buttons > *:nth-child(5) { animation-delay: 0.7s; }

/* Optimize animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .animate-fade-up,
    .news-meta > *,
    .share-buttons > * {
        animation: none;
        opacity: 1;
    }
}

/* Image overlay and zoom styles */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Social Share Animation Effects */
.share-buttons .share-btn {
    transform: translateY(0);
    opacity: 0;
    animation: shareButtonsAppear 0.5s ease forwards;
}

@keyframes shareButtonsAppear {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.share-buttons .share-btn:nth-child(1) { animation-delay: 0.1s; }
.share-buttons .share-btn:nth-child(2) { animation-delay: 0.2s; }
.share-buttons .share-btn:nth-child(3) { animation-delay: 0.3s; }
.share-buttons .share-btn:nth-child(4) { animation-delay: 0.4s; }
.share-buttons .share-btn:nth-child(5) { animation-delay: 0.5s; }

.share-btn.btn-success {
    transition: all 0.3s ease;
}

/* Optimize for reduced motion */
@media (prefers-reduced-motion: reduce) {
    .share-buttons .share-btn {
        animation: none;
        opacity: 1;
    }
}

/* Enhanced Table Styles */
.news-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2em 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-body th,
.news-body td {
    padding: 12px 16px;
    border: 1px solid #eee;
    background: white;
}

.news-body th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.news-body tr:hover td {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Enhanced List Styles */
.news-body ul,
.news-body ol {
    padding-left: 2em;
    margin: 1.5em 0;
}

.news-body ul li,
.news-body ol li {
    margin-bottom: 0.8em;
    position: relative;
    padding-left: 0.5em;
}

.news-body ul li::marker {
    color: #007bff;
}

.news-body ol li::marker {
    color: #007bff;
    font-weight: 600;
}

/* Enhanced Blockquote */
.news-body blockquote {
    margin: 2em 0;
    padding: 1.5em 2em;
    border-left: 4px solid #007bff;
    background-color: #f8f9fa;
    font-style: italic;
    color: #555;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
}

.news-body blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 3em;
    color: rgba(0,123,255,0.1);
    font-family: Georgia, serif;
}

/* Code Block Enhancements */
.news-body pre {
    background-color: #f8f9fa;
    padding: 1.5em;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2em 0;
    border: 1px solid #eee;
    position: relative;
}

.news-body code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    background-color: rgba(0,123,255,0.1);
    color: #007bff;
}

/* Image Zoom Overlay Enhancements */
.overlay-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.overlay-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.overlay-backdrop::after {
    content: "點擊關閉";
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.overlay-backdrop.active::after {
    opacity: 1;
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.news-body img {
    cursor: zoom-in;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-body img.img-enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1000;
    cursor: zoom-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.news-body img.img-enlarged:hover {
    transform: translate(-50%, -50%) scale(0.98);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Loading spinner for images */
.news-body img {
    position: relative;
}

.news-body img::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
}

/* 更新主色調 */
:root {
    --primary-color: #952B32;
    --primary-hover: #7D2329;
    --primary-light: rgba(149, 43, 50, 0.1);
    --primary-shadow: rgba(149, 43, 50, 0.2);
}

/* 更新按鈕和互動元素顏色 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 更新連結顏色 */
a {
    color: var(--primary-color);
}

a:hover {
    color: var(--primary-hover);
}

/* 更新進度條顏色 */
.reading-progress {
    background: linear-gradient(to right, var(--primary-color), #C04048);
}

/* 更新返回頂部按鈕 */
.back-to-top {
    background: var(--primary-color);
}

.back-to-top:hover {
    background: var(--primary-hover);
}

/* 更新新聞卡片樣式 */
.news-card:hover {
    box-shadow: 0 8px 20px var(--primary-shadow);
}

.news-date {
    color: var(--primary-color);
}

.news-title a:hover {
    color: var(--primary-color);
}

/* 更新分頁導航樣式 */
.paginationjs {
    display: flex;
    justify-content: center;
    margin: 2rem 0;
}

.paginationjs .paginationjs-pages {
    display: inline-flex;
}

.paginationjs .paginationjs-pages ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    border-radius: 8px;
    overflow: hidden;
}

.paginationjs .paginationjs-pages li {
    margin: 0 2px;
}

.paginationjs .paginationjs-pages li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: white;
    color: #333;
    font-weight: 500;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
    text-decoration: none;
}

.paginationjs .paginationjs-pages li.active > a {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.paginationjs .paginationjs-pages li:hover:not(.active) > a {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.paginationjs .paginationjs-pages li.disabled > a {
    color: #ccc;
    background: #f9f9f9;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.paginationjs .paginationjs-pages li.disabled:hover > a {
    background: #f9f9f9;
}

/* 更新標題下劃線顏色 */
.title-underline {
    background: var(--primary-color);
}

.title-underline::after {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
}

/* 更新新聞側邊欄樣式 */
.btn-news:hover, .btn-news.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.search-box input:focus {
    box-shadow: 0 0 0 0.2rem var(--primary-shadow);
    border-color: var(--primary-color);
}

/* 更新引用區塊樣式 */
.news-body blockquote {
    border-left: 4px solid var(--primary-color);
}

/* 更新列表標記顏色 */
.news-body ul li::marker,
.news-body ol li::marker {
    color: var(--primary-color);
}

/* 更新代碼塊樣式 */
.news-body code {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* 更新表格標題列樣式 */
.news-body th {
    border-bottom: 2px solid var(--primary-color);
}

/* 更新麵包屑導航 */
.news-detail .breadcrumb-item a {
    color: var(--primary-color);
}

.news-detail .breadcrumb-item a:hover {
    color: var(--primary-hover);
}

/* 更新文章標題下劃線 */
.news-detail .news-title::after {
    background: var(--primary-color);
}

/* 更新 badge 顏色 */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 更新表單元素焦點樣式 */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-shadow);
}

/* 更新加載動畫顏色 */
.news-grid.loading::after {
    border-top-color: var(--primary-color);
}

/* 修正排序選擇器樣式 */
.sort-options .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 8px 36px 8px 12px;
    font-size: 0.95rem;
    background-color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 200px;
}

.sort-options .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem var(--primary-shadow);
}

/* 分頁導航額外樣式 */
.paginationjs .total {
    color: #666;
    margin-left: 10px;
    font-size: 0.9rem;
}

.paginationjs-pages {
    margin: 0 15px;
}

.paginationjs .paginationjs-pages li.paginationjs-next a,
.paginationjs .paginationjs-pages li.paginationjs-prev a {
    font-size: 0;
    position: relative;
}

.paginationjs .paginationjs-pages li.paginationjs-next a::after {
    content: '›';
    font-size: 20px;
    line-height: 38px;
}

.paginationjs .paginationjs-pages li.paginationjs-prev a::after {
    content: '‹';
    font-size: 20px;
    line-height: 38px;
}

.paginationjs .paginationjs-pages li.paginationjs-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    color: #666;
}

/* 分頁導航在移動設備上的優化 */
@media (max-width: 576px) {
    .paginationjs .paginationjs-pages li > a {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 0.9rem;
    }

    .paginationjs .total {
        display: block;
        text-align: center;
        margin: 10px 0;
    }
    
    .paginationjs-pages {
        margin: 0;
        width: 100%;
        justify-content: center;
    }
}

/* Store Styles */
.store-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.store-image {
    position: relative;
    overflow: hidden;
    padding-top: 66%;
}

.store-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.store-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.store-title {
    color: #952B32;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.store-address {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.store-phone {
    color: #952B32;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.store-time {
    color: #666;
    font-size: 0.85rem;
    margin-top: auto;
}

.store-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-store {
    display: block;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    margin-bottom: 0.5rem;
}

.btn-store:hover,
.btn-store.active {
    background: #952B32;
    color: white;
    text-decoration: none;
}

.btn-store i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

.title-underline {
    height: 3px;
    width: 60px;
    background: #952B32;
    margin: 1rem auto;
    border-radius: 2px;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.store-map {
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1rem;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact page responsive styles */
@media (max-width: 768px) {
    .contact-content {
        padding: 1rem;
    }
    
    .contact-form-iframe {
        height: 1000px;
    }
}