/* 
 * Article Detail Page Styles
 * 單篇文章詳細頁面樣式
 */

/* ==========================================================================
   Article Detail Layout
   ========================================================================== */

#display-article {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Article Cover Section */
#cover {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

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

#cover:hover .cover-image {
    transform: scale(1.02);
}

/* Article Header Overlay */
.article-header {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 60px 40px 40px 40px;
}

.article-header .time {
    display: inline-block;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
}

.article-header h1 {
    font-family: 'Noto Serif TC', serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* Main Content Area */
#main {
    padding: 50px 40px;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.article-content h2 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #FF6B6B;
    position: relative;
}

.article-content h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B, #8336D6);
    border-radius: 2px;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #444;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 30px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.article-content img:hover {
    transform: scale(1.02);
}

.article-content ul, .article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.article-content blockquote {
    border-left: 4px solid #FF6B6B;
    background: #f8f9fa;
    margin: 30px 0;
    padding: 20px 30px;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    position: relative;
}

.article-content blockquote::before {
    content: '"';
    font-size: 4rem;
    color: #FF6B6B;
    position: absolute;
    top: -10px;
    left: 15px;
    font-family: Georgia, serif;
}

.article-content a {
    color: #FF6B6B;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.article-content a:hover {
    color: #8336D6;
    border-bottom-color: #8336D6;
    text-decoration: none;
}

/* Article Meta Information */
.article-meta {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.article-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.stat-item i {
    color: #FF6B6B;
}

/* Social Share Section */
.social-share h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.social-share .btn {
    margin-right: 10px;
    margin-bottom: 10px;
    border-radius: 25px;
    padding: 8px 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Article Actions */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.article-actions .btn {
    border-radius: 25px;
    padding: 12px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.article-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Related Articles Section */
#display-article-bottom {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

#display-article-bottom h4 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

#display-article-bottom h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FF6B6B, #8336D6);
    border-radius: 2px;
}

.related-articles {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Related Articles Grid */
.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.related-article-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.related-article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.related-article-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.related-article-image {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
}

.related-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    margin: 0;
    box-shadow: none;
}

.related-article-item:hover .related-article-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    color: #6c757d;
    font-size: 2rem;
}

.related-article-info {
    padding: 20px;
}

.related-article-info h5 {
    font-family: 'Noto Serif TC', serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-info p {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #999;
}

.related-article-meta .category {
    background: rgba(255, 107, 107, 0.1);
    color: #FF6B6B;
    padding: 4px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.related-article-meta .date {
    color: #999;
}

/* Preview Mode Alert */
#preview {
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    border: none;
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
    border-radius: 0;
    padding: 15px;
}

#preview i {
    margin-right: 10px;
}

/* Facebook Embedded Content */
.fb-embedded {
    margin: 30px 0;
    text-align: center;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    #display-article {
        margin: 20px;
        border-radius: 10px;
    }
    
    #cover {
        height: 300px;
    }
    
    .article-header {
        padding: 40px 20px 20px 20px;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    #main {
        padding: 30px 20px;
    }
    
    .article-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .article-meta {
        padding: 20px;
        margin: 20px;
    }
    
    .article-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .article-actions {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .article-actions .btn {
        width: 100%;
        text-align: center;
    }
    
    .social-share .btn {
        width: 100%;
        margin-right: 0;
        text-align: center;
    }
    
    /* Related Articles Responsive */
    .related-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .related-articles {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #display-article {
        margin: 10px;
    }
    
    #cover {
        height: 250px;
    }
    
    .article-header {
        padding: 30px 15px 15px 15px;
    }
    
    .article-header h1 {
        font-size: 1.5rem;
    }
    
    #main {
        padding: 20px 15px;
    }
    
    .article-meta {
        padding: 15px;
        margin: 15px;
    }
    
    #display-article-bottom {
        padding: 20px 10px;
    }
    
    .related-articles {
        padding: 20px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    #display-article {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .article-actions,
    .social-share {
        display: none;
    }
    
    .article-header {
        background: none;
        color: black;
        position: static;
        padding: 20px;
    }
    
    .article-content a {
        color: black;
        text-decoration: underline;
    }
    
    .article-content img {
        box-shadow: none;
    }
}
