/* Article Header */
.article-header-area {
    background: linear-gradient(135deg, #FF9900 0%, #FF9900 100%);
    padding: 60px 0;
    color: white;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-breadcrumb {
    margin-bottom: 20px;
}

.article-breadcrumb .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.article-breadcrumb .breadcrumb-item {
    color: rgba(255,255,255,0.8);
}

.article-breadcrumb .breadcrumb-item a {
    color: white;
    text-decoration: none;
}

.article-breadcrumb .breadcrumb-item.active {
    color: white;
}

.article-breadcrumb .breadcrumb-sep {
    color: rgba(255,255,255,0.5);
    padding: 0 8px;
}

.article-title {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 700;
	color:#fff;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.meta-item a:hover {
    opacity: 0.8;
}

.reading-time-badge {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

/* Article Content */
.article-content-area {
    padding: 60px 0;
    background: #f8f9fa;
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
}

.article-main {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.featured-image {
    margin-bottom: 40px;
    border-radius: 10px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: #6c757d;
    margin-top: 10px;
    font-style: italic;
}

/* Table of Contents */
.table-of-contents {
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 40px;
    border: 1px solid #e9ecef;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
}

.toc-header h4 {
    margin: 0;
    font-size: 18px;
}

.toc-header h4 i {
    color: #FF9900;
    margin-right: 10px;
}

.toc-toggle {
    background: none;
    border: none;
    color: #FF9900;
    cursor: pointer;
    padding: 5px;
}

.toc-content {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.toc-content.collapsed {
    display: none;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-link {
    display: block;
    padding: 8px 15px;
    color: #495057;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.toc-link:hover,
.toc-link.active {
    background: rgba(102,126,234,0.1);
    color: #FF9900;
    border-left-color: #FF9900;
}

.toc-level-3 {
    padding-left: 20px;
    font-size: 14px;
}

/* Article Body */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 40px;
}

.article-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    color: #333;
    border-bottom: 2px solid #FF9900;
    padding-bottom: 10px;
}

.article-body h3 {
    font-size: 22px;
    margin: 30px 0 15px;
    color: #444;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-body blockquote {
    border-left: 4px solid #FF9900;
    padding: 20px 30px;
    margin: 30px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

/* Article Tags */
.article-tags {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.article-tags h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.article-tags h4 i {
    color: #FF9900;
    margin-right: 10px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-block;
    padding: 8px 20px;
    background: #f8f9fa;
    color: #555;
    border-radius: 25px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid #e9ecef;
}

.tag:hover {
    background: #FF9900;
    color: white;
    border-color: #FF9900;
    transform: translateY(-2px);
}

/* Article Share */
.article-share {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.article-share h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.share-btn.facebook {
    background: #4267B2;
    color: white;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.linkedin {
    background: #0077B5;
    color: white;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.copy-link {
    background: #6c757d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.share-btn.copied {
    background: #28a745;
}

/* Article Navigation */
.article-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border-radius: 10px;
    background: #f8f9fa;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    flex: 1;
    margin: 0 10px;
}

.nav-link.prev-article {
    text-align: left;
}

.nav-link.next-article {
    text-align: right;
    flex-direction: row-reverse;
}

.nav-arrow {
    font-size: 24px;
    color: #FF9900;
}

.nav-content {
    flex: 1;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.nav-content h5 {
    font-size: 16px;
    margin: 0;
    line-height: 1.4;
    color: #333;
}

.nav-link:hover {
    background: #FF9900;
    color: white;
    transform: translateX(5px);
}

.nav-link.prev-article:hover {
    transform: translateX(-5px);
}

.nav-link:hover .nav-arrow,
.nav-link:hover .nav-label {
    color: white;
}

/* Article Comments */
.article-comments {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.comments-header {
    margin-bottom: 30px;
    text-align: center;
}

.comments-header h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.comments-header h3 i {
    color: #FF9900;
    margin-right: 10px;
}

.comments-count {
    color: #6c757d;
    font-size: 16px;
}

.comments-subtitle {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Comments List */
.comments-list {
    margin-bottom: 40px;
}

.comment-item {
    display: flex;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 3px solid #FF9900;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    margin-right: 20px;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #333;
}

.comment-date {
    font-size: 12px;
    color: #6c757d;
}

.comment-date i {
    margin-right: 5px;
}

.comment-reply-btn {
    background: none;
    border: 1px solid #FF9900;
    color: #FF9900;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-reply-btn:hover {
    background: #FF9900;
    color: white;
}

.comment-body {
    margin-bottom: 15px;
}

.comment-body p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Comment Replies */
.comment-replies {
    margin-top: 20px;
    padding-left: 30px;
    border-left: 2px solid #e9ecef;
}

.comment-reply {
    display: flex;
    margin-bottom: 15px;
}

.reply-avatar {
    width: 35px;
    height: 35px;
    margin-right: 15px;
    flex-shrink: 0;
}

.reply-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.reply-content {
    flex: 1;
}

.reply-header {
    margin-bottom: 5px;
}

.reply-author {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.reply-date {
    font-size: 11px;
    color: #6c757d;
}

.reply-date i {
    margin-right: 5px;
}

.reply-body p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.no-comments i {
    margin-bottom: 20px;
    color: #dee2e6;
}

.no-comments h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #6c757d;
}

.no-comments p {
    margin: 0;
}

/* Comment Form */
.comment-form-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.comment-form-container h4 {
    font-size: 20px;
    margin-bottom: 25px;
    color: #333;
}

.comment-form-container h4 i {
    color: #FF9900;
    margin-right: 10px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert i {
    margin-right: 10px;
}

/* Comment Form */
.comment-form {
    margin-bottom: 25px;
}

.logged-in-user {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.user-info p {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group label i {
    color: #FF9900;
    margin-right: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
    outline: none;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.char-counter {
    text-align: right;
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.anti-spam {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.spam-check-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.spam-equation {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

.form-submit {
    text-align: center;
    margin-top: 30px;
}

.btn-submit-comment {
    background: #FF9900;
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-comment:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.btn-submit-comment:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.form-note {
    margin-top: 15px;
    font-size: 13px;
    color: #6c757d;
    text-align: center;
}

.form-note i {
    color: #FF9900;
    margin-right: 5px;
}

.reply-cancel {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: rgba(102,126,234,0.1);
    border-radius: 8px;
    border-left: 3px solid #FF9900;
}

.btn-cancel-reply {
    background: #6c757d;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

#replying-to {
    font-size: 14px;
    color: #333;
}

/* Comment Policy */
.comment-policy {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-top: 25px;
}

.comment-policy h5 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.comment-policy h5 i {
    color: #FF9900;
    margin-right: 10px;
}

.comment-policy ul {
    margin: 0;
    padding-left: 20px;
    font-size: 14px;
    color: #666;
}

.comment-policy li {

}

/* Comments Disabled */
.comments-disabled {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.comments-disabled i {
    margin-bottom: 20px;
    color: #dee2e6;
}

.comments-disabled h4 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #6c757d;
}

.comments-disabled p {
    margin: 0;
    font-size: 16px;
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
}

.author-widget {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.author-bio {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF9900;
}

.author-info h5 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.author-info p {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

.related-articles {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-article {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.related-article:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.related-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.related-article:hover .related-image img {
    transform: scale(1.1);
}

.related-content h6 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.related-content h6 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.related-content h6 a:hover {
    color: #FF9900;
}

.related-date {
    font-size: 12px;
    color: #6c757d;
}

.no-related {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 0;
}

/* Popular Posts */
.popular-posts {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.popular-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-posts-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.popular-posts-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
}

.popular-post-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-post-link:hover .popular-post-image img {
    transform: scale(1.1);
}

.popular-post-content {
    flex: 1;
}

.popular-post-content h5 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
}

.popular-post-meta {
    font-size: 12px;
    color: #6c757d;
}

.popular-post-meta i {
    margin-right: 5px;
}

/* Reading Progress */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s;
}

.reading-progress.active {
    opacity: 1;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF9900, #FF9900);
    width: 0%;
    transition: width 0.1s;
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #FF9900;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 9998;
    box-shadow: 0 5px 15px rgba(102,126,234,0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: #5a67d8;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.4);
}

/* Custom Messages */
.custom-message {
    position: fixed;
    top: 30px;
    right: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s;
    border-left: 4px solid #FF9900;
}

.custom-message.show {
    transform: translateX(0);
    opacity: 1;
}

.custom-message.message-error {
    border-left-color: #dc3545;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.message-content i {
    font-size: 18px;
}

.message-content i.fa-info-circle {
    color: #FF9900;
}

.message-content i.fa-exclamation-circle {
    color: #dc3545;
}

.message-content span {
    font-size: 14px;
    color: #333;
}

.message-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.message-close:hover {
    background: #f8f9fa;
    color: #333;
}

/* Responsive */
@media (max-width: 991px) {
    .article-main {
        padding: 30px;
    }
    
    .article-title {
        font-size: 30px;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .article-sidebar {
        margin-top: 40px;
        position: static;
    }
    
    .article-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-link {
        margin: 0;
    }
    
    .comment-item {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comment-reply-btn {
        margin-top: 10px;
    }
    
    .comment-replies {
        padding-left: 15px;
    }
}

@media (max-width: 767px) {
    .article-header-area {
        padding: 40px 0;
    }
    
    .article-main {
        padding: 5px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .featured-image {
        margin-bottom: 30px;
    }
    
    .article-body {
        font-size: 15px;
    }
    
    .article-body h2 {
        font-size: 22px;
    }
    
    .article-body h3 {
        font-size: 18px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .comment-form-container {
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-row .form-group {
        width: 100%;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .custom-message {
        top: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
        max-width: none;
    }
}

/* ====== 統一文章列表樣式（最新文章 & 熱門文章） ====== */
.article-list-widget {
    background: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.article-list-widget .widget-title {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-list-widget .widget-title i {
    color: #667eea;
    font-size: 16px;
}

/* 文章列表容器 */
.article-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* 文章項目 */
.article-item {
    display: flex;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.article-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.article-item:hover {
    transform: translateX(5px);
    background: rgba(102, 126, 234, 0.02);
    border-radius: 8px;
    padding-left: 10px;
    padding-right: 10px;
}

/* 圖片樣式 */
.article-item .item-image {
    width: 70px;
    height: 70px;
    min-width: 70px;
    margin-right: 15px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.article-item .item-image::before {
    content: '';
    display: block;
    padding-top: 100%; /* 保持正方形比例 */
}

.article-item .item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-item:hover .item-image img {
    transform: scale(1.1);
}

/* 內容樣式 */
.article-item .item-content {
    flex: 1;
    min-width: 0; /* 防止內容溢出 */
    overflow: hidden;
}

.article-item .item-content h5 {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em;
}

.article-item .item-content h5 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-item:hover .item-content h5 a {
    color: #667eea;
}

/* 元數據 */
.article-item .item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #888;
}

.article-item .item-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-item .item-meta i {
    color: #667eea;
    font-size: 11px;
}

/* 無內容時的顯示 */
.no-articles {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 0;
    padding: 20px 0;
}

/* ====== 手機版專用樣式 ====== */
@media (max-width: 767px) {
    .article-list-widget {
        padding: 20px !important;
    }
    
    .article-list-widget .widget-title {
        font-size: 16px;
        margin-bottom: 15px;
        padding-bottom: 10px;
    }
    
    .article-item {
        padding-bottom: 12px;
        align-items: flex-start; /* 手機版改為頂部對齊 */
    }
    
    .article-item .item-image {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin-right: 12px;
    }
    
    .article-item .item-content h5 {
        font-size: 13px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        max-height: 2.6em;
    }
    
    .article-item .item-meta {
        font-size: 11px;
        gap: 10px;
    }
    
    .article-item:hover {
        transform: translateX(3px);
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* 超小螢幕 */
@media (max-width: 480px) {
    .article-item .item-image {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }
    
    .article-item .item-content h5 {
        font-size: 12px;
        -webkit-line-clamp: 3;
        max-height: 3.9em;
    }
    
    .article-item .item-meta {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
}

/* 平板設備 */
@media (min-width: 768px) and (max-width: 991px) {
    .article-list-widget {
        padding: 20px !important;
    }
    
    .article-item {
        padding-bottom: 12px;
    }
    
    .article-item .item-content h5 {
        font-size: 13px;
    }
}

/* 修復側邊欄整體響應式 */
@media (max-width: 991px) {
    .article-sidebar {
        margin-top: 40px;
    }
    
    .sidebar-widget {
        margin-bottom: 25px;
    }
}

/* 修復連結點擊區域 */
.article-item a {
    text-decoration: none;
    color: inherit;
}

.article-item .item-image a,
.article-item .item-content a {
    display: block;
}

/* 增加觸摸友好性 */
@media (hover: none) {
    .article-item:hover {
        transform: none;
        background: transparent;
        padding-left: 0;
        padding-right: 0;
    }
    
    .article-item:active {
        background-color: rgba(102, 126, 234, 0.05);
    }
}

/* 相關文章 - 左圖右文布局（桌面版和手機版通用） */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-article {
    display: flex;
    align-items: center; /* 垂直居中對齊 */
    gap: 20px; /* 圖片和文字之間的間距 */
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-article:hover {
    background: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: #FF9900;
}

.related-article a {
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

/* 圖片容器 - 固定寬度 */
.related-image {
    width: 120px; /* 圖片固定寬度 */
    height: 80px; /* 圖片固定高度 */
    min-width: 120px; /* 防止被壓縮 */
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; /* 防止圖片被壓縮 */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    position: relative;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 確保圖片覆蓋整個容器 */
    transition: transform 0.5s ease;
}

.related-article:hover .related-image img {
    transform: scale(1.1);
}

/* 文字內容 - 自動填充剩餘空間 */
.related-content {
    flex: 1;
    min-width: 0; /* 防止文字溢出 */
    overflow: hidden; /* 確保文字不會溢出容器 */
}

.related-content h6 {
    font-size: 16px;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制最多顯示2行 */
    -webkit-box-orient: vertical;
    max-height: 2.8em; /* 2行文字的大約高度 */
}

.related-article:hover .related-content h6 {
    color: #FF9900;
}

.related-date {
    font-size: 13px;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-date:before {
    content: "📅";
    font-size: 12px;
}

/* 熱門文章使用同樣的樣式 */
.popular-posts .related-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.popular-posts .related-article {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px;
    border-radius: 10px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.popular-posts .related-image {
    width: 120px;
    height: 80px;
    min-width: 120px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

/* 為熱門文章添加瀏覽次數標示 */
.popular-views {
    font-size: 12px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.popular-views:before {
    content: "👁️";
    font-size: 11px;
}

/* ====== 手機版專用優化 ====== */
@media (max-width: 768px) {
    .related-article {
        gap: 15px;
        padding: 12px;
    }
    
    .related-article a {
        gap: 15px;
    }
    
    /* 手機版保持左圖右文，但縮小圖片 */
    .related-image {
        width: 90px;  /* 手機版圖片稍小 */
        height: 70px; /* 保持比例 */
        min-width: 90px;
    }
    
    .related-content h6 {
        font-size: 15px;
        -webkit-line-clamp: 2;
        line-height: 1.3;
        max-height: 2.6em;
        margin-bottom: 6px;
    }
    
    .related-date {
        font-size: 12px;
    }
	
	.blog-detail{
		margin-right: 0px !important;
		width: 100% !important;
	}
	
	.blog-row{
		margin:0px !important;
	}
	
	.article-main{
		padding:10px;
	}
}

@media (max-width: 576px) {
    .related-article {
        gap: 12px;
        padding: 10px;
        border-radius: 8px;
    }
    
    .related-article a {
        gap: 12px;
    }
    
    /* 在超小手機上圖片更小，但保持左圖右文 */
    .related-image {
        width: 80px;
        height: 60px;
        min-width: 80px;
    }
    
    .related-content h6 {
        font-size: 14px;
        -webkit-line-clamp: 2; /* 保持2行，不增加到3行 */
        max-height: 2.6em;
    }
    
    .related-date {
        font-size: 11px;
    }
    
    /* 手機版熱門文章的瀏覽次數調整 */
    .popular-views {
        font-size: 11px;
        padding: 1px 6px;
    }
}

/* 超小手機（iPhone SE等） */
@media (max-width: 375px) {
    .related-article {
        gap: 10px;
        padding: 8px;
    }
    
    .related-article a {
        gap: 10px;
    }
    
    .related-image {
        width: 70px;
        height: 55px;
        min-width: 70px;
    }
    
    .related-content h6 {
        font-size: 13px;
        -webkit-line-clamp: 3; /* 在很小屏幕上顯示3行 */
        max-height: 3.9em;
    }
    
    /* 確保文字在小屏幕上不會被截斷太多 */
    .related-content {
        flex: 1;
        min-width: 0;
        overflow: hidden;
    }
}

/* 手機版觸摸優化 */
@media (hover: none) {
    .related-article:hover {
        transform: none;
        box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    }
    
    .related-article:active {
        background: #e9ecef;
        transform: scale(0.99);
    }
    
    .related-article:hover .related-image img {
        transform: none;
    }
    
    .related-article:active .related-image img {
        transform: scale(1.05);
    }
}

/* 平板設備優化 */
@media (min-width: 577px) and (max-width: 991px) {
    .related-article {
        gap: 18px;
        padding: 14px;
    }
    
    .related-image {
        width: 110px;
        height: 75px;
        min-width: 110px;
    }
    
    .related-content h6 {
        font-size: 15px;
        -webkit-line-clamp: 2;
        max-height: 2.8em;
    }
}

/* 無相關文章時的樣式（手機版調整） */
.no-related {
    text-align: center;
    padding: 30px 20px;
    color: #6c757d;
    font-style: italic;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
}

.no-related:before {
    content: "📄";
    display: block;
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .no-related {
        padding: 20px 15px;
        font-size: 14px;
    }
    
    .no-related:before {
        font-size: 30px;
        margin-bottom: 10px;
    }
}

/* 側邊欄整體手機版優化 */
@media (max-width: 991px) {
    .article-sidebar {
        margin-top: 40px;
    }
    
    .sidebar-widget {
        margin-bottom: 25px;
    }
}

/* 確保在小屏幕上不會出現水平滾動條 */
@media (max-width: 576px) {
    .related-article {
        max-width: 100%;
        overflow: hidden;
    }
    
    .related-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* 增加觸摸目標大小（可訪問性） */
@media (max-width: 768px) {
    .related-article {
        min-height: 90px; /* 確保觸摸區域足夠大 */
    }
    
    .related-article a {
        min-height: inherit;
    }
}