/* ========================================
   Article Detail Page Styles
   ======================================== */

/* Article Page Layout */
.article-page {
    margin-top: 72px;
    min-height: calc(100vh - 72px);
    background: var(--bg-light);
}

.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 40px;
    align-items: start;
}

/* Article Header */
.article-header {
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-section) 100%);
    padding: 60px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><g fill="none" stroke="%232d6e3e" stroke-width="0.1" opacity="0.1"><path d="M30 30l15-15M30 30l15 15M30 30l-15 15M30 30l-15-15"/></g></svg>');
    opacity: 0.05;
}

.article-header-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    color: var(--text-light);
    font-size: 10px;
}

.breadcrumb span {
    color: var(--text-gray);
}

/* Article Meta */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 24px;
    align-items: center;
}

.article-category {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
}

.article-category:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.article-date,
.article-read-time,
.article-views {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-gray);
    font-size: 14px;
}

.article-date i,
.article-read-time i,
.article-views i {
    color: var(--primary);
    font-size: 12px;
}

/* Article Title */
.article-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-weight: 800;
}

.article-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--text-gray);
    margin-bottom: 32px;
}

/* Author Info */
.author-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-details h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.author-details p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

/* Article Main Content */
.article-main {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.article-content {
    padding: 40px;
}

/* Featured Image */
.article-featured-image {
    width: 100%;
    margin-bottom: 40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 14px;
    color: var(--text-gray);
    font-style: italic;
    margin-top: 12px;
}

/* Article Typography */
.article-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 48px 0 24px;
    position: relative;
    padding-bottom: 12px;
}

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

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 36px 0 20px;
}

.article-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 28px 0 16px;
}

.article-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.article-content p.lead {
    font-size: 20px;
    line-height: 1.7;
    color: var(--text-gray);
    font-weight: 500;
    margin-bottom: 32px;
}

.article-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: var(--transition);
}

.article-content a:hover {
    color: var(--primary-dark);
    text-decoration-thickness: 2px;
}

/* Lists */
.article-content ul,
.article-content ol {
    margin: 0 0 24px 20px;
    padding-left: 20px;
}

.article-content li {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.article-content ul li::marker {
    color: var(--primary);
}

/* Blockquotes */
.article-content blockquote {
    position: relative;
    padding: 24px 32px;
    margin: 36px 0;
    background: var(--bg-section);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    font-style: italic;
}

.article-content blockquote::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 60px;
    color: var(--primary);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.article-content blockquote p {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0;
}

/* Code Blocks */
.article-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 24px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 24px 0;
}

.article-content code {
    background: rgba(45, 110, 62, 0.1);
    color: var(--primary-dark);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 15px;
}

.article-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Images in Content */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 32px 0;
    box-shadow: var(--shadow-md);
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, var(--bg-section), var(--bg-light));
    border: 2px solid var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 32px 0;
}

.highlight-box h3 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.highlight-box ul {
    margin: 0;
    padding-left: 20px;
}

.highlight-box li {
    margin-bottom: 8px;
}

/* Tips Box */
.tips-box {
    background: linear-gradient(135deg, #fff9e6, #fff5d6);
    border-left: 4px solid var(--accent);
    padding: 24px;
    margin: 32px 0;
    border-radius: var(--radius);
}

.tips-box h3 {
    color: var(--accent);
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Article Actions */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px;
    border-top: 1px solid var(--border);
    background: var(--bg-light);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.share-label {
    font-weight: 600;
    color: var(--text-dark);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0077b5; }
.share-btn.pinterest { background: #bd081c; }

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-gray);
    text-decoration: none;
    transition: var(--transition);
}

.article-tag:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Article Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-widget {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--bg-light);
}

/* Table of Contents */
.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 12px;
}

.toc-link {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 15px;
    line-height: 1.5;
    display: block;
    padding: 8px 0 8px 16px;
    border-left: 2px solid transparent;
    transition: var(--transition);
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 20px;
    background: linear-gradient(90deg, rgba(45, 110, 62, 0.05) 0%, transparent 100%);
}

/* Related Posts */
.related-posts {
    margin-top: 60px;
    padding: 60px 0;
    background: var(--bg-section);
}

.related-posts-header {
    text-align: center;
    margin-bottom: 40px;
}

.related-posts-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.related-posts-subtitle {
    color: var(--text-gray);
    font-size: 16px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.related-post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-decoration: none;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.related-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

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

.related-post-content {
    padding: 20px;
}

.related-post-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-post-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 12px;
}

.related-post-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
    padding: 40px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.comments-header {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--bg-light);
}

.comment-form {
    margin-bottom: 40px;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    resize: vertical;
    transition: var(--transition);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 110, 62, 0.1);
}

.comment-submit {
    margin-top: 16px;
    padding: 12px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.comment-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .article-container {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .article-header {
        padding: 40px 0;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-subtitle {
        font-size: 1.1rem;
    }

    .article-content {
        padding: 24px;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content p {
        font-size: 16px;
    }

    .article-actions {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }

    .related-posts-title {
        font-size: 2rem;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .article-header {
        padding: 30px 0;
    }

    .article-meta {
        gap: 12px;
    }

    .article-content {
        padding: 20px;
    }

    .article-content h2 {
        font-size: 1.3rem;
        margin: 32px 0 20px;
    }

    .author-info {
        flex-direction: column;
        text-align: center;
    }

    .highlight-box,
    .tips-box {
        padding: 16px;
    }

    .related-posts {
        padding: 40px 0;
    }
}