/* Article Page Specific Styles */

.article-page {
    background: var(--white);
}

.article-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--white);
    padding: 3rem 0 2rem;
}

.article-header-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-category-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.article-page-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.article-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 1.5rem;
    color: #cbd5e1;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item i {
    font-size: 1rem;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.article-share span {
    font-weight: 600;
    color: #cbd5e1;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
    text-decoration: none;
}

.share-btn:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.article-body {
    padding: 3rem 0 5rem;
}

.article-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-main-content {
    min-width: 0; /* Prevents overflow in grid */
}

.article-featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2.5rem;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-text h2 {
    font-size: 2rem;
    color: var(--dark-bg);
    margin: 2.5rem 0 1.5rem;
    font-weight: 700;
}

.article-text h3 {
    font-size: 1.5rem;
    color: var(--dark-bg);
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.article-text p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

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

.article-text li {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

.article-text a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.article-text a:hover {
    color: var(--secondary-color);
}

/* Video Embed */
.video-embed {
    margin: 2.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-embed iframe {
    display: block;
}

/* Stock Widget */
.stock-widget {
    margin: 2.5rem 0;
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.tradingview-widget-container {
    width: 100%;
}

/* Key Takeaways Box */
.key-takeaways {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary-color);
    padding: 2rem;
    border-radius: 8px;
    margin: 2.5rem 0;
}

.key-takeaways ul {
    margin: 0;
    padding-left: 1.5rem;
}

.key-takeaways li {
    color: var(--dark-bg);
    font-weight: 500;
}

/* Article Tags */
.article-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

/* Sidebar */
.article-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    color: var(--dark-bg);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.sidebar-widget p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.subscribe-widget {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
}

.subscribe-widget h3 {
    color: var(--white);
}

.subscribe-widget p {
    color: rgba(255, 255, 255, 0.9);
}

.subscribe-widget .btn {
    background: var(--white);
    color: var(--primary-color);
}

.subscribe-widget .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

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

.related-article-item {
    padding: 1rem;
    border-radius: 8px;
    background: var(--light-bg);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.related-article-item:hover {
    transform: translateX(5px);
    background: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.related-article-item h4 {
    color: var(--dark-bg);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.related-date {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 0.8rem;
}

.category-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.category-list a::after {
    content: '\f105';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

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

    .article-sidebar {
        position: static;
    }

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

    .article-text h2 {
        font-size: 1.6rem;
    }

    .article-text h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 640px) {
    .article-header {
        padding: 2rem 0 1.5rem;
    }

    .article-page-title {
        font-size: 1.6rem;
    }

    .article-meta-info {
        gap: 1rem;
    }

    .article-text {
        font-size: 1rem;
    }

    .video-embed iframe {
        height: 250px;
    }
}

/* ========================================
   EDUCATIONAL ARTICLE STYLES
   ======================================== */

.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    position: relative;
    min-height: 100vh;
}

.article-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(59, 130, 246, 0.06) 100%);
    z-index: 0;
    border-radius: 0 0 50% 50% / 0 0 30px 30px;
}

.article-container .article-header {
    margin-bottom: 4rem;
    padding: 3rem 2.5rem 2.5rem;
    border-bottom: none;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

.article-container .article-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.article-container .article-meta span {
    color: #64748b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.article-container .article-meta .category {
    color: #2563eb;
    font-weight: 800;
    font-size: 1.05rem;
}

.article-container .article-header h1 {
    font-size: 3.2rem;
    color: #0f172a;
    margin-bottom: 1.75rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.article-container .article-subtitle {
    font-size: 1.35rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 2rem;
    font-weight: 400;
}

.article-container .article-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
}

.article-content {
    font-size: 1.15rem;
    line-height: 1.95;
    color: #1e293b;
    background: white;
    padding: 3.5rem 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1;
}

/* HEADING STYLES WITH PROPER SPACING */
.article-content h2 {
    font-size: 2.4rem;
    color: #0f172a;
    margin-top: 4rem;
    margin-bottom: 1.75rem;
    padding-top: 0.5rem;
    font-weight: 900;
    padding-bottom: 1rem;
    border-bottom: 4px solid #2563eb;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    font-size: 1.75rem;
    color: #1e293b;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-top: 0.25rem;
    font-weight: 800;
    line-height: 1.35;
}

.article-content h4 {
    font-size: 1.4rem;
    color: #334155;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

/* PARAGRAPH SPACING */
.article-content p {
    margin-bottom: 2rem;
    line-height: 1.95;
}

/* LIST SPACING */
.article-content ul, .article-content ol {
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    padding-left: 2.25rem;
}

.article-content li {
    margin-bottom: 1.25rem;
    line-height: 1.85;
}

.article-content li:last-child {
    margin-bottom: 0;
}

/* BOLD TEXT */
.article-content strong {
    color: #0f172a;
    font-weight: 800;
}

/* KEY TAKEAWAYS BOX */
.article-content .key-takeaways {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-left: 6px solid #2563eb;
    padding: 2.5rem 2.5rem 2rem;
    border-radius: 12px;
    margin-top: 4rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.1);
}

.article-content .key-takeaways h3 {
    font-size: 1.6rem;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.article-content .key-takeaways h3 i {
    color: #2563eb;
    font-size: 1.4rem;
}

.article-content .key-takeaways ul {
    margin: 0;
    padding-left: 2rem;
}

.article-content .key-takeaways li {
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* ARTICLE FOOTER */
.article-footer {
    margin-top: 4rem;
    padding: 2.5rem 2.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    position: relative;
    z-index: 1;
}

.article-footer .article-tags {
    margin-top: 0;
    margin-bottom: 2.5rem;
    padding-top: 0;
    padding-bottom: 2rem;
    border-top: none;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.article-navigation .btn-secondary {
    background: #2563eb;
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
}

.article-navigation .btn-secondary:hover {
    background: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .article-container .article-header h1 {
        font-size: 2.2rem;
    }
    
    .article-content {
        padding: 2.5rem 2rem;
    }
    
    .article-content h2 {
        font-size: 1.9rem;
        margin-top: 3rem;
    }
    
    .article-content h3 {
        font-size: 1.5rem;
        margin-top: 2.5rem;
    }
    
    .article-footer {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .article-container .article-header {
        padding: 2rem 1.5rem;
    }
    
    .article-container .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-container .article-subtitle {
        font-size: 1.1rem;
    }
    
    .article-content {
        font-size: 1.05rem;
        padding: 2rem 1.5rem;
    }
    
    .article-content h2 {
        font-size: 1.6rem;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
    }
}
