/* Article Page Specific Styles */

/* Article Container */
.article-container {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 1.1rem;
}

/* Article Header */
.article-header {
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    margin-top: 80px; /* Account for fixed header */
}

.article-meta {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
    flex-wrap: wrap;
    gap: 1rem;
}

.article-category {
    background-color: var(--accent);
    color: white;
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.article-category:hover {
    opacity: 0.9;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-date::before,
.article-read-time::before {
    content: '•';
    color: var(--text-light);
    margin-right: 0.5rem;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 2rem;
    color: var(--text);
    font-weight: 700;
    max-width: 900px;
}

.article-author {
    display: flex;
    align-items: center;
    margin-top: 2.5rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    border: 2px solid var(--accent);
}

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

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

.author-name {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.author-title {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Featured Image */
.article-featured-image {
    margin: 0;
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.article-featured-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: block;
}

.article-featured-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.75rem;
    font-style: italic;
}

/* Article Content */
.article-content {
    padding: 2rem 0 5rem;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
}

.article-body {
    line-height: 1.6;
    color: var(--text);
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem;
    color: var(--text);
    line-height: 1.3;
    font-weight: 700;
    scroll-margin-top: 100px; /* Account for fixed header */
}

.article-body h3 {
    font-size: 1.4rem;
    margin: 2.5rem 0 1.25rem;
    color: var(--text);
    line-height: 1.4;
    font-weight: 600;
}

.article-body h4 {
    font-size: 1.2rem;
    margin: 2rem 0 1rem;
    color: var(--text);
    font-weight: 600;
}

.article-body p {
    margin: 0 0 1.25rem;
    line-height: 1.6;
    font-size: 1rem;
}

.article-body ul,
.article-body ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.article-body a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.article-body a:hover {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
}

/* Table of Contents */
.table-of-contents {
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 1.25rem;
    margin: 1.5rem 0 2rem;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.table-of-contents h3 {
    margin-top: 0 !important;
    margin-bottom: 1rem !important;
    font-size: 1.2rem !important;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
}

.table-of-contents li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.8em;
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
}

.table-of-contents a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 1rem;
}

.table-of-contents a:hover {
    color: var(--accent);
}

/* Key Takeaways */
.key-takeaways {
    background-color: rgba(49, 130, 206, 0.08);
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.key-takeaways h4 {
    margin-top: 0 !important;
    color: var(--accent) !important;
    font-size: 1.1rem !important;
}

.key-takeaways ul {
    margin: 0.75rem 0 0 !important;
    padding-left: 1.25rem !important;
}

.key-takeaways li {
    margin-bottom: 0.5rem !important;
    font-size: 1rem;
}

/* Charts and Visuals */
.chart-container {
    margin: 2rem 0;
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border);
}

.chart-placeholder {
    padding: 3rem 1rem;
    color: var(--text-light);
}

.chart-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.7;
    color: var(--accent);
}

.chart-placeholder p {
    margin: 0;
    font-size: 0.95rem;
}

/* Sector Preferences */
.sector-preferences {
    margin: 2rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.sector-preference {
    display: flex;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: center;
}

.sector-preference:last-child {
    border-bottom: none;
}

.sector-name {
    font-weight: 600;
    min-width: 120px;
    color: var(--text);
}

.sector-tags {
    flex: 1;
    color: var(--text-light);
}

/* Article Actions */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.article-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.article-tags span {
    font-weight: 600;
    color: var(--text);
    margin-right: 0.5rem;
}

.tag {
    background-color: var(--bg-secondary);
    color: var(--text-light);
    padding: 0.35rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background-color: var(--accent);
    color: white;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-share span {
    font-weight: 600;
    color: var(--text);
    margin-right: 0.5rem;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    color: var(--text);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Article Navigation */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
}

.nav-prev,
.nav-next {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: var(--bg-secondary);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: right;
}

.nav-prev:hover,
.nav-next:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.nav-prev span,
.nav-next span {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.5rem;
}

.nav-prev h4,
.nav-next h4 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
}

/* Sidebar */
.article-sidebar {
    position: relative;
}

.sidebar-widget {
    background-color: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 1.75rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.sidebar-widget h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text);
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
    border-radius: 3px;
}

/* About Author */
.about-author {
    text-align: center;
}

.author-bio {
    text-align: left;
}

.author-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: block;
    border: 3px solid var(--accent);
    padding: 3px;
}

.author-details h4 {
    margin: 0 0 0.25rem;
    font-size: 1.2rem;
    color: var(--text);
}

.author-title {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    display: block;
}

.author-description {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}

.author-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.author-social a:hover {
    background-color: var(--accent);
    color: white;
    transform: translateY(-2px);
}

/* Related Articles */
.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.related-article {
    display: block;
    text-decoration: none;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
}

.related-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    display: block;
}

.related-article h4 {
    font-size: 1rem;
    margin: 0 0 0.5rem;
    color: var(--text);
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.related-article:hover h4 {
    color: var(--accent);
}

.related-category {
    display: inline-block;
    font-size: 0.75rem;
    background-color: var(--bg);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-weight: 600;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    text-align: center;
}

.newsletter-widget h3 {
    color: white !important;
}

.newsletter-widget p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
}

.newsletter-form .btn {
    background-color: white;
    color: var(--accent);
    border: none;
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.newsletter-form .btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.privacy-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        max-width: 900px;
    }
    
    .article-sidebar {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (min-width: 992px) {
    .content-wrapper {
        display: flex;
        gap: 2rem;
    }
    
    .article-main {
        flex: 1;
        min-width: 0;
    }
    
    .article-sidebar {
        display: block;
        width: 280px;
        position: sticky;
        top: 2rem;
        margin-left: 2rem;
    }
}

@media (max-width: 991px) {
    .article-header {
        padding: 4rem 0 2.5rem;
        margin-top: 70px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        font-size: 0.9rem;
    }
    
    .article-body h2 {
        font-size: 1.6rem;
    }
    
    .article-body h3 {
        font-size: 1.3rem;
    }
    
    .article-actions {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-sidebar {
        display: none; /* Hide sidebar on mobile */
    }
    
    .article-author {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-avatar {
        margin: 0 auto 1rem;
    }
    
    .author-info {
        text-align: center;
    }
    
    .table-of-contents {
        padding: 1.25rem;
    }
    
    .sidebar-widget {
        padding: 1.5rem;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 1rem;
        right: 1rem;
    }
    
    .back-to-top i {
        font-size: 1rem;
    }
}
