/* ============================================
   5. SHARED COMPONENT: VIEW BLOG BUTTON
   ============================================
   Used by:
   - news-detail.html
   - blog-detail.html
   - any "View All Blog Posts" style link
   ============================================ */

.view-blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 35px;
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    color: #ffffff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: none;
}

.view-blog-btn:hover {
    transform: translateY(-3px);
    box-shadow: none;
    gap: 15px;
    color: #ffffff;
    text-decoration: none;
}

.view-blog-btn i:first-child {
    font-size: 1.3rem;
}

.view-blog-btn i:last-child {
    transition: transform 0.3s ease;
}

.view-blog-btn:hover i:last-child {
    transform: translateX(5px);
}

/* ============================================
   11. BLOG-DETAIL.HTML - BLOG DETAIL PAGE
   ============================================ */

/* Blog Detail Page Styles */

.blog-detail-section {
    padding: 120px 20px 80px;
    min-height: 100vh;
    background: #ffffff;
}

.blog-detail-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Blog Header */
.blog-detail-header {
    margin-bottom: 40px;
}

.blog-detail-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-detail-category.product {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.blog-detail-category.cooking {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.blog-detail-category.health {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #ffffff;
}

.blog-detail-category.technology {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #ffffff;
}

.blog-detail-category.news {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.blog-detail-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}

.blog-detail-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.blog-detail-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a42, #ffa726);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.author-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
}

.meta-separator {
    color: #999;
    font-size: 1rem;
}

.meta-date {
    font-size: 1.1rem;
    font-weight: 400;
    color: #1a1a1a;
}

.meta-views {
    font-size: 1.1rem;
    font-weight: 400;
    color: #1a1a1a;
}

.blog-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #d9d9d9;
    background: #fff;
    color: #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ⭐ icon 同步外框顏色 */
.action-btn i {
    color: inherit;
}

.action-btn:hover {
    border-color: #ff7a42;
    color: #ff7a42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 66, 0.2);
}

/* active */
.action-btn.active {
    border-color: #ff7a42;
    color: #ff7a42;
}

/* Featured Image */
.blog-detail-image {
    width: 100%;
    height: 420px;  /* 👈 控制橫幅高度 */
    margin: 40px 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.blog-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* 👈 關鍵！裁切成橫幅 */
    display: block;
}

/* Blog Content */
.blog-detail-content {
    color: #333;
    line-height: 1.8;
}

.blog-intro {
    font-size: 1.25rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-left: 4px solid #ff7a42;
    border-radius: 8px;
}

.blog-intro p {
    margin: 0;
}

.blog-body {
    margin-bottom: 50px;
}

.blog-section {
    margin-bottom: 40px;
}

.blog-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
    margin-top: 40px;
}

.blog-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #444;
}

.blog-section strong {
    color: #1a1a1a;
    font-weight: 700;
}

.blog-list {
    list-style: none;
    padding-left: 0;
    margin: 25px 0;
}

.blog-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.blog-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #ff7a42;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Tags */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 30px 0;
    margin-bottom: 40px;
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
}

.blog-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f8f9fa;
    color: #666;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid #e0e0e0;   /* ⭐ 邊框 */
    border-radius: 20px;
}

.blog-tag:hover {
    background: #ff7a42;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 122, 66, 0.3);
}

.blog-tag:active {
    transform: translateY(0);
}

.blog-tag i {
    font-size: 0.8rem;
}

/* Share Section */
.blog-share-section {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 60px;
    text-align: right;
}

.blog-share-section h3 {
    color: #999;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.share-buttons {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 24px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
    color: #ff7a42;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    color: #5A3E36;
    transform: translateY(-3px);
}

.share-btn.facebook,
.share-btn.twitter,
.share-btn.linkedin,
.share-btn.copy {
    color: #ff7a42;
}

.share-btn.facebook:hover,
.share-btn.twitter:hover,
.share-btn.linkedin:hover,
.share-btn.copy:hover {
    color: #5A3E36;
}

/* More Blogs Section */
.more-blog-section {
    margin-top: 80px;
}

.more-blog-section h3 {
    font-size: 2.2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 35px;
    text-align: center;
}

.more-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.related-blog-card {
    background: #ffffff;
    border: 2px solid rgba(255, 122, 66, 0.25);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.related-blog-card:hover {
    transform: translateY(-5px);
    border-color: #ff7a42;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.related-blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.related-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-blog-card:hover .related-blog-image img {
    transform: scale(1.05);
}

.related-blog-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.related-blog-badge.product {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.related-blog-badge.cooking {
    background: linear-gradient(135deg, #f093fb, #f5576c);
}

.related-blog-badge.health {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
}

.related-blog-badge.technology {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
}

.related-blog-badge.news {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.related-blog-content {
    padding: 25px;
}

.related-blog-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #999;
}

.related-blog-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.related-blog-meta i {
    color: #ff7a42;
}

.related-blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-blog-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-blog-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ff7a42;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: gap 0.3s ease;
}

.related-blog-link:hover {
    gap: 12px;
}

/* View All Blog Button Container */
.view-all-blog {
    text-align: center;
    margin-top: 40px;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #28a745;
    color: #ffffff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Dark Theme */
body.dark-theme .blog-detail-section {
    background: #1a1a1a;
}

body.dark-theme .blog-detail-title {
    color: #ffffff;
}

body.dark-theme .author-name {
    color: #ffffff;
}

body.dark-theme .meta-separator {
    color: #666;
}

body.dark-theme .meta-date {
    color: #ffffff;
}

body.dark-theme .meta-views {
    color: #ffffff;
}

body.dark-theme .action-btn {
    background: #2a2a2a;
    border-color: #444;
    color: #999;
}

body.dark-theme .action-btn:hover {
    border-color: #ff7a42;
    color: #ff7a42;
    background: #2a2a2a;
}

body.dark-theme .action-btn.active {
    background: #ff7a42;
    border-color: #ff7a42;
    color: #ffffff;
}

body.dark-theme .action-btn.active i {
    color: #ffffff;
}

body.dark-theme .action-btn.active:hover {
    background: #ff7a42;
    border-color: #ff7a42;
    color: #ffffff;
}

body.dark-theme .action-btn.active:hover i {
    color: #ffffff;
}

body.dark-theme .blog-intro {
    background: #2a2a2a;
    color: #ccc;
}

body.dark-theme .blog-section h2 {
    color: #ffffff;
}

body.dark-theme .blog-section p {
    color: #ccc;
}

body.dark-theme .blog-section li {
    color: #ccc;
}

body.dark-theme .blog-section strong {
    color: #ffffff;
}

body.dark-theme .blog-tag {
    background: #2a2a2a;
    color: #999;
}

body.dark-theme .blog-tag:hover {
    background: #ff7a42;
    color: #ffffff;
}

body.dark-theme .related-blog-card {
    background: #2a2a2a;
}

body.dark-theme .related-blog-title {
    color: #ffffff;
}

body.dark-theme .related-blog-excerpt {
    color: #999;
}

body.dark-theme .more-blog-section h3 {
    color: #ffffff;
}

body.dark-theme .share-btn {
    color: #ff7a42;
}

body.dark-theme .share-btn:hover {
    color: #ffa726;
}

body.dark-theme .blog-share-section h3 {
    color: #777;
}

/* Responsive - Blog Detail */
@media (max-width: 768px) {
    .blog-detail-image {
        height: auto;
        background: #111;
        border-radius: 20px;
        overflow: hidden;
    }

    .blog-detail-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }
   
    .blog-detail-section {
        padding: 100px 20px 60px;
    }
    
    .blog-detail-title {
        font-size: 2.2rem;
    }
    
    .blog-detail-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .author-avatar-large {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
    
    .author-line {
        font-size: 1rem;
    }
    
    .author-name {
        font-size: 1rem;
    }
    
    .meta-date,
    .meta-views {
        font-size: 1rem;
    }
    
    .blog-intro {
        font-size: 1.1rem;
        padding: 20px;
    }
    
    .blog-section h2 {
        font-size: 1.6rem;
    }
    
    .blog-section p {
        font-size: 1rem;
    }
    
    .share-buttons {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 20px;
    }
    
    .share-btn {
        font-size: 1.3rem;
    }
    
    .more-blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .blog-detail-image {
        height: auto;
        background: #111;
    }

    .blog-detail-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
   
    .blog-detail-title {
        font-size: 1.8rem;
    }
    
    .author-line {
        font-size: 0.95rem;
    }
    
    .author-name {
        font-size: 0.95rem;
    }
    
    .meta-date,
    .meta-views {
        font-size: 0.95rem;
    }
    
    .blog-intro {
        font-size: 1rem;
        padding: 15px;
    }
    
    .blog-section h2 {
        font-size: 1.4rem;
    }
    
    .blog-section p {
        font-size: 0.95rem;
    }
    
    .blog-share-section {
        padding: 0;
        text-align: right;
    }
    
    .blog-share-section h3 {
        font-size: 0.8rem;
    }
    
    .share-buttons {
        justify-content: flex-end;
        gap: 16px;
    }
    
    .share-btn {
        font-size: 1.2rem;
    }
    
    .more-blog-section h3 {
        font-size: 1.8rem;
    }
    
    .notification {
        bottom: 20px;
        right: 20px;
        left: 20px;
        text-align: center;
    }
}
