/* Article Template Styles */

/* Container utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Article Main */
.article-main {
    margin-top: 60px;
    background: #fff;
}

/* Breadcrumb */
.breadcrumb {
    padding: 20px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: #6c757d;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin: 0 8px;
    color: #dee2e6;
}

.breadcrumb-item a {
    color: #2c5f6f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #1a4854;
}

.breadcrumb-item.active {
    color: #495057;
}

/* Article Header */
.article-header {
    padding: 40px 0;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.article-meta {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.article-category {
    background: #2c5f6f;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 500;
    font-size: 0.8rem;
}

.article-date {
    color: #6c757d;
    font-weight: 500;
}

.article-reading-time {
    color: #6c757d;
    font-weight: 500;
}

.article-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #1a4854;
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-excerpt {
    font-size: 1.2rem;
    color: #495057;
    line-height: 1.6;
    max-width: 800px;
}

/* Article Image */
.article-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #f8f9fa;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Article Layout */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    padding: 40px 0;
}

/* Article Content */
.article-content {
    max-width: none;
}

.table-of-contents {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #2c5f6f;
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: #1a4854;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: #2c5f6f;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.toc-list a:hover {
    color: #1a4854;
}

.article-section {
    margin-bottom: 40px;
}

.article-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a4854;
    margin-bottom: 20px;
    margin-top: 30px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.article-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2c5f6f;
    margin-bottom: 15px;
    margin-top: 25px;
}

.article-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    margin-top: 20px;
}

.article-section p {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    margin-bottom: 15px;
}

.article-list {
    padding-left: 25px;
    margin-bottom: 20px;
}

.article-list li {
    margin-bottom: 8px;
    color: #495057;
    line-height: 1.6;
}

.article-highlight {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    padding: 20px;
    margin: 25px 0;
    border-radius: 4px;
}

.article-highlight h4 {
    color: #d68910;
    margin-top: 0;
    margin-bottom: 10px;
}

.article-highlight p {
    margin-bottom: 0;
    color: #856404;
}

.article-image-inline {
    margin: 30px 0;
    text-align: center;
}

.article-image-inline img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.article-image-inline figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

.article-cta {
    background: linear-gradient(135deg, #2c5f6f 0%, #1a4854 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin: 40px 0;
}

.article-cta h3 {
    color: white;
    margin-bottom: 10px;
}

.article-cta p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 20px;
}

.cta-button {
    background: #d4af37;
    color: #1a4854;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background: #c19b26;
    transform: translateY(-2px);
}

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.2rem;
    color: #1a4854;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

/* Author Widget */
.author-widget {
    text-align: center;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.author-details h4 {
    margin: 0 0 10px 0;
    color: #2c5f6f;
    font-size: 1.1rem;
}

.author-details p {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* Related Articles */
.related-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.related-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.related-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.related-content h4 {
    margin: 0 0 5px 0;
    font-size: 0.95rem;
    line-height: 1.3;
}

.related-content a {
    color: #2c5f6f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content a:hover {
    color: #1a4854;
}

.related-date {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Contact Widget */
.contact-widget .contact-info p {
    margin-bottom: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.contact-widget .contact-info a {
    color: #2c5f6f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-widget .contact-info a:hover {
    color: #1a4854;
}

/* Share Section */
.article-share {
    background: #f8f9fa;
    padding: 40px 0;
    border-top: 1px solid #e9ecef;
}

.share-content {
    text-align: center;
}

.share-content h3 {
    margin-bottom: 20px;
    color: #1a4854;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.linkedin {
    background: #0077b5;
    color: white;
}

.share-btn.copy {
    background: #6c757d;
    color: white;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-main {
        margin-top: 50px;
    }
    
    .article-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .article-sidebar {
        position: static;
        order: 2;
    }
    
    .article-header {
        padding: 30px 0;
    }
    
    .article-meta {
        gap: 15px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-image-container {
        height: 250px;
    }
    
    .article-section h2 {
        font-size: 1.5rem;
    }
    
    .article-section h3 {
        font-size: 1.2rem;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .article-layout {
        padding: 30px 0;
    }
    
    .article-header {
        padding: 20px 0;
    }
    
    .article-title {
        font-size: 1.6rem;
    }
    
    .article-excerpt {
        font-size: 1rem;
    }
    
    .article-image-container {
        height: 200px;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .sidebar-widget {
        padding: 20px;
    }
    
    .article-cta {
        padding: 25px 20px;
    }
    
    .related-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .related-item img {
        width: 100%;
        height: 150px;
    }
}

/* Print Styles */
@media print {
    .article-sidebar,
    .article-share,
    .breadcrumb {
        display: none;
    }
    
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .article-main {
        margin-top: 0;
    }
    
    .article-header {
        padding: 20px 0;
    }
    
    .article-image-container {
        height: 300px;
    }
    
    .article-section {
        break-inside: avoid;
    }
    
    .article-cta {
        background: #f8f9fa;
        color: #333;
    }
    
    .cta-button {
        display: none;
    }
}

/* Smooth scrolling for TOC links */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.toc-list a:focus,
.cta-button:focus,
.share-btn:focus,
.related-content a:focus {
    outline: 2px solid #2c5f6f;
    outline-offset: 2px;
}