/*
 * This is the stylesheet for the EarningsIQ article pages.
 * It extends the main styles.css with specific styling for article content
 * while maintaining the clean, professional aesthetic of the EarningsIQ brand.
 */

/* 
 * Removed body styling to prevent overriding styles.css
 * This ensures consistent header height across all pages
 */

/* Article Layout */
.article-content {
    padding: 3rem 0 0;
    /* Added 3rem top padding to match the hero section on index page */
}

.article-content .container {
    max-width: 1200px;
}

/* Article Container */
.article-container {
    max-width: 820px;
    margin: 0 auto;
    background: transparent;
}

/* Match the spacing from template-v3 */
.article-body {
    margin-top: 2rem;
}

/* Interaction bar styling */
.interaction-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin: 1.5rem 0;
    border-top: 1px solid #E5E8EC;
    border-bottom: 1px solid #E5E8EC;
}

.interaction-actions {
    display: flex;
    gap: 1.5rem;
}

.interaction-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #22305A;
    text-decoration: none;
    font-size: 0.93rem;
    cursor: pointer;
}

.interaction-action:hover {
    color: #4D71F7;
}

.interaction-count {
    color: #6B7687;
    font-size: 0.93rem;
}

/* Article content styling */
#article-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-top: 40px;
    margin-bottom: 1.5rem;
    color: #0E1726;
    max-width: 720px;
    line-height: 1.3;
}

#article-content .article-meta {
    font-size: 0.96rem;
    color: #6B7687;
    margin-bottom: 22px;
    margin-top: 0;
}

#article-content .article-excerpt {
    background: #F2F6FC;
    color: #2D364C;
    border-left: 4px solid #4D71F7;
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-size: 1.3rem;
    font-weight: 500;
    max-width: 720px;
    border-radius: 4px;
    line-height: 1.7;
    padding-right: 0.4rem;
}

#article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1A2340;
    margin-top: 2rem;
    margin-bottom: 1rem;
    letter-spacing: 0em;
    border-bottom: 1.5px solid #E5E8EC;
    padding-bottom: 4px;
    max-width: 700px;
    line-height: 1.4;
}

#article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2940a1;
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: 0em;
    line-height: 1.4;
}

#article-content p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    max-width: 760px;
    line-height: 1.8;
}

#article-content ul, #article-content ol {
    margin-top: 0;
    margin-bottom: 22px;
    margin-left: 1.6rem;
    padding-left: 0;
    max-width: 750px;
    list-style-position: outside;
}

#article-content li {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

#article-content strong {
    font-weight: 600;
    color: #1C3879;
}

.article-excerpt {
    font-size: 1.3rem;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-right: 0.4rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
}

.ticker-tag {
    background-color: rgba(38, 74, 110, 0.1);
    color: #264A6E;
}

.sector-tag {
    background-color: rgba(38, 74, 110, 0.05);
    color: #1F1F1D;
}

.theme-tag {
    background-color: rgba(0, 0, 0, 0.05);
    color: #1F1F1D;
}

.tone-tag {
    padding: 0.15rem 0.5rem;
}

.tone-tag.positive {
    background-color: rgba(0, 128, 0, 0.1);
    color: #006400;
}

.tone-tag.neutral {
    background-color: rgba(0, 0, 255, 0.1);
    color: #00008B;
}

.tone-tag.cautious {
    background-color: rgba(255, 165, 0, 0.1);
    color: #FF8C00;
}

/* Article Body */
.article-body {
    font-size: 1.3rem;
    line-height: 1.7;
}

.full-article-content {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #1F1F1D;
}

.full-article-content p {
    margin-bottom: 1.5rem;
}

.full-article-content h2 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.8rem;
    line-height: 1.3;
    margin: 2rem 0 1rem;
    color: #040F10;
    letter-spacing: 0em;
}

.full-article-content h3 {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.5rem;
    line-height: 1.3;
    margin: 1.8rem 0 1rem;
    color: #040F10;
    letter-spacing: 0em;
}

.full-article-content ul, .full-article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.full-article-content li {
    margin-bottom: 0.5rem;
}

#article-content .quote {
    background: #F8F9FB;
    border-left: 4px solid #7A9EFF;
    margin: 2rem 0;
    padding: 1rem 1rem 1rem 1rem;
    font-size: 1.3rem;
    color: #22406C;
    border-radius: 4px;
    max-width: 700px;
    line-height: 1.7;
}

#article-content .quote p {
    font-style: italic;
    margin-bottom: 0.7rem;
    font-size: 1.3rem;
}

#article-content .quote p:last-child {
    color: #425185;
    font-size: 1.3rem;
    margin-top: 1rem;
    margin-bottom: 0;
    font-weight: 500;
}

#article-content .article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 36px;
    margin-bottom: 0;
    max-width: 750px;
}

#article-content .article-tags span {
    background: #E5E8EC;
    color: #22305A;
    font-size: 0.93rem;
    padding: 4px 14px;
    border-radius: 100px;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-right: 3px;
    margin-bottom: 4px;
}

/* Related content and CTA section */
.article-footer {
    margin-top: 40px;
    border-top: 1px solid #E5E8EC;
    padding-top: 30px;
}

.related-content h3, .article-cta h3 {
    font-size: 1.3rem;
    color: #1A2340;
    margin-bottom: 15px;
}

.related-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 30px;
}

.related-link {
    color: #2940a1;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
}

.related-link:hover {
    text-decoration: underline;
}

.article-cta {
    background: #F2F6FC;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
}

.article-cta p {
    font-size: 1rem;
    margin-bottom: 20px;
}

/* Homepage CTA button - larger and more compelling */
.cta-button {
    display: inline-block;
    background: #4D71F7;
    color: white;
    padding: 0.85rem 2.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(77, 113, 247, 0.3);
}

.cta-button:hover {
    background: #3A5CD9;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(77, 113, 247, 0.4);
}

/* Responsive styles */
@media (max-width: 700px) {
    #article-content h1 {
        font-size: 2.2rem;
        margin-top: 1.5rem;
        max-width: 99vw;
    }
    #article-content h2 {
        font-size: 1.6rem;
    }
    #article-content h3 {
        font-size: 1.4rem;
    }
    #article-content p, 
    #article-content li {
        font-size: 1.3rem;
        line-height: 1.7;
    }
    #article-content h2, #article-content h3, #article-content p, 
    #article-content ul, #article-content ol, 
    #article-content .article-excerpt, #article-content .quote {
        max-width: 99vw;
    }
    #article-content .article-excerpt {
        font-size: 1.3rem;
        padding: 1.2rem;
        padding-right: 0.4rem;
    }
    #article-content .quote {
        font-size: 1.3rem;
        padding: 0.8rem 0.4rem 0.8rem 1.2rem;
    }
    #article-content .article-tags {
        flex-direction: column;
        gap: 0.5rem;
        max-width: 99vw;
    }
    .article-container {
        padding: 0 0.25rem;
    }
}

.article-body section {
    margin-bottom: 3rem;
}

.article-body h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: #040F10;
}

.article-body h3 {
    font-size: 1.375rem;
    margin: 2rem 0 1rem;
    color: #264A6E;
}

.article-body p {
    margin-bottom: 1.5rem;
}

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

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

/* Key Metrics Section */
.key-metrics {
    margin-bottom: 3rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.metric {
    padding: 1.25rem;
    background-color: #f8f5f0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.875rem;
    color: #1F1F1D;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.875rem;
    font-weight: 500;
}

.metric-change.positive {
    color: #006400;
}

.metric-change.negative {
    color: #8B0000;
}

/* Executive Commentary Section */
.executive-commentary {
    margin-bottom: 3rem;
}

.quote {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #f8f5f0;
    border-left: 4px solid #264A6E;
    border-radius: 0 4px 4px 0;
}

.quote:last-child {
    margin-bottom: 0;
}

.attribution {
    font-style: italic;
    margin-top: 0.5rem;
    text-align: right;
}

/* Article Footer */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.related-content {
    margin-bottom: 3rem;
}

.related-content h3 {
    margin-bottom: 1rem;
}

.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.related-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #f8f5f0;
    border-radius: 4px;
    text-decoration: none;
    color: #264A6E;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.related-link:hover {
    background-color: #e8e5e0;
}

.article-cta {
    padding: 2rem;
    background-color: #264A6E;
    color: #FEFCF9;
    border-radius: 8px;
    text-align: center;
}

.article-cta h3 {
    margin-bottom: 1rem;
}

.article-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Article-specific CTA button - slightly smaller than homepage CTA */
.article-cta .cta-button {
    padding: 0.75rem 2rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.article-cta .cta-button:hover {
    background: #3A5CD9;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(77, 113, 247, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-excerpt {
        font-size: 1.3rem;
        padding-right: 0.4rem;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 2rem 0 3rem;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}
