/* article_detail.css — 文章詳情 專屬樣式 */

/* Article container */
.article-container {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Article header */
.article-header {
    padding: 40px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.article-category {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.category-badge {
    background-color: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s;
}

.category-badge:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.category-divider {
    color: #ccc;
    font-weight: 300;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Article featured image */
.article-featured-image {
    position: relative;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-featured-image:hover img {
    transform: scale(1.02);
}

/* Article content */
.article-content {
    padding: 40px;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.article-text h1,
.article-text h2,
.article-text h3,
.article-text h4,
.article-text h5,
.article-text h6 {
    color: var(--secondary-color);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-text h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-text h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.article-text p {
    margin-bottom: 1.5rem;
}

.article-text img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.article-text iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 20px 0;
}

.article-text blockquote {
    border-left: 4px solid var(--primary-color);
    background-color: rgba(189, 86, 27, 0.05);
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.article-text ul,
.article-text ol {
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

/* Social sharing */
.social-sharing {
    background-color: var(--bg-light);
    padding: 20px 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.sharing-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.share-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.share-btn.facebook {
    background-color: #1877f2;
    color: white;
}

.share-btn.facebook:hover {
    background-color: #166fe5;
    color: white;
}

.share-btn.line {
    background-color: #06c755;
    color: white;
}

.share-btn.line:hover {
    background-color: #05b04d;
    color: white;
}

.share-btn.copy {
    background-color: #6c757d;
    color: white;
}

.share-btn.copy:hover {
    background-color: #5a6268;
    color: white;
}

/* Recommended articles */
.recommended-section {
    padding: 50px 0;
}

/* 覆寫 section-title 置中對齊 */
.section-title {
    text-align: center;
}

.section-title::after {
    margin: 15px auto 0;
    width: 60px;
}

.recommend-card {
    border-radius: 12px;
    overflow: hidden;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recommend-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.recommend-image {
    position: relative;
    overflow: hidden;
}

.recommend-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recommend-card:hover .recommend-image img {
    transform: scale(1.05);
}

.recommend-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recommend-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recommend-excerpt {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.read-more-link {
    margin-top: 15px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.read-more-link:hover {
    color: var(--primary-dark);
}

/* Navigation */
.article-nav {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.nav-btn:hover {
    background-color: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
    .article-header {
        padding: 30px 20px;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-content {
        padding: 30px 20px;
    }

    .social-sharing {
        padding: 20px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .share-buttons {
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .share-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .article-nav {
        padding: 20px;
        text-align: center;
    }

    footer {
        margin-bottom: 60px;
    }
}

@media (max-width: 576px) {
    .article-title {
        font-size: 1.8rem;
    }

    .article-text {
        font-size: 1rem;
    }

    .recommend-content {
        padding: 15px;
    }
}

/* Toast notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px 8px 0 0;
}
