/* Article-specific styles for pillar pages and blog posts */

:root {
    --text-color: #1f2937;
}

.article-container {
    background: #fff;
    min-height: calc(100vh - 200px);
}

.article-container .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb-container {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    font-size: 14px;
    color: #6c757d;
    padding: 0;
}

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

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Article Header */
.article-header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    font-size: 14px;
    color: #6c757d;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-intro {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #495057;
    margin-bottom: 30px;
    font-weight: 400;
}

/* Calculator CTAs */
.calculator-cta {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
}

.calculator-cta.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: var(--primary-color);
}

.calculator-cta.primary p {
    color: white;
    margin: 0;
}

.calculator-cta p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.cta-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.calculator-cta.primary .cta-link {
    color: white;
    border-bottom-color: rgba(255,255,255,0.5);
}

.cta-link:hover {
    border-bottom-color: currentColor;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    margin: 10px 0;
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Table of Contents */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
}

.table-of-contents h2 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.5rem;
}

.table-of-contents ol {
    margin: 0;
    padding-left: 20px;
}

.table-of-contents li {
    margin: 8px 0;
    line-height: 1.5;
}

.table-of-contents a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.table-of-contents a:hover {
    text-decoration: underline;
}

/* Article Content */
.article-content {
    line-height: 1.7;
    font-size: 16px;
    color: var(--text-color);
}

.content-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px; /* For anchor links */
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color);
}

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

.content-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 25px 0 15px 0;
}

.content-section h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 20px 0 10px 0;
}

.content-section p {
    margin-bottom: 20px;
}

.content-section ul,
.content-section ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.content-section li {
    margin-bottom: 8px;
}

/* Info Boxes and Highlights */
.info-box {
    background: #e8f4f8;
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
}

.info-box h4 {
    margin-top: 0;
    color: var(--primary-color);
}

/* Formula Boxes */
.formula-box {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
}

.formula-box.primary {
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    border-color: var(--primary-color);
}

.formula-box h4,
.formula-box h5,
.formula-box h6 {
    margin-top: 0;
    color: var(--primary-color);
}

.formula-box p {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    margin: 10px 0;
}

.scientific-formula {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.scientific-formula h4 {
    margin-top: 0;
    color: #856404;
}

/* Method Steps */
.method-steps {
    margin: 30px 0;
}

.step-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.step-item h5 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Grids and Layouts */
.misconception-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.misconception-item {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
}

.misconception-item h4 {
    margin-top: 0;
    color: #856404;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.pros-section {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 20px;
}

.cons-section {
    background: #f8d7da;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 20px;
}

.pros-section h5 {
    margin-top: 0;
    color: #155724;
}

.cons-section h5 {
    margin-top: 0;
    color: #721c24;
}

/* Energy Flow Diagram */
.energy-flow-diagram {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin: 30px 0;
}

.energy-flow-diagram h4 {
    margin-top: 0;
    text-align: center;
    color: var(--primary-color);
}

.energy-flow-diagram ol {
    counter-reset: energy-step;
    list-style: none;
    padding-left: 0;
}

.energy-flow-diagram li {
    counter-increment: energy-step;
    position: relative;
    padding: 15px 0 15px 60px;
    border-left: 3px solid var(--primary-color);
    margin-left: 30px;
}

.energy-flow-diagram li::before {
    content: counter(energy-step);
    position: absolute;
    left: -20px;
    top: 15px;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Tables */
.fuel-energy-table,
.temperature-effects,
.fuel-log-example {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.fuel-energy-table th,
.temperature-effects th,
.fuel-log-example th {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.fuel-energy-table td,
.temperature-effects td,
.fuel-log-example td {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
}

.fuel-energy-table tr:nth-child(even),
.temperature-effects tr:nth-child(even),
.fuel-log-example tr:nth-child(even) {
    background: #f8f9fa;
}

.average-row {
    background: #e3f2fd !important;
    font-weight: 600;
}

/* Accuracy Factors */
.accuracy-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.factor-item {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.factor-item h5 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Implementation Steps */
.implementation-steps {
    margin: 30px 0;
}

.step-phase {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    position: relative;
}

.step-phase h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.step-phase::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* FAQ Section */
.faq-container {
    margin: 30px 0;
}

.faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-item h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Related Content */
.related-content {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 40px 20px;
    margin: 60px 0;
}

.related-content h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-item {
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-item:hover {
    transform: translateY(-5px);
}

.related-item h3 {
    margin-top: 0;
    margin-bottom: 15px;
}

.related-item h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.related-item h3 a:hover {
    text-decoration: underline;
}

/* Final CTA Section */
.final-cta {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 60px 20px;
    border-radius: 12px;
    margin: 60px 0;
}

.final-cta h2 {
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.final-cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

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

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

.btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

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

/* Conversion Formulas */
.conversion-formulas {
    background: #e8f4f8;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.conversion-formulas p {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 500;
    margin: 10px 0;
}

/* Quality Metrics */
.quality-metrics {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.quality-metrics h5 {
    margin-top: 0;
    color: #856404;
}

/* Error Prevention */
.error-prevention {
    background: #f8d7da;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

/* Success Factors */
.success-factors {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

/* Internal Links */
.internal-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.internal-link:hover {
    border-bottom-color: var(--primary-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .article-header h1 {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .final-cta {
        padding: 40px 20px;
    }
    
    .final-cta h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .article-container .container {
        padding: 0 15px;
    }
    
    .breadcrumb-container .container {
        padding: 0 15px;
    }
    
    .breadcrumb {
        font-size: 13px;
    }
    
    .article-header {
        padding: 30px 0;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .content-section h2 {
        font-size: 1.6rem;
    }
    
    .accuracy-factors {
        grid-template-columns: 1fr;
    }
    
    .misconception-grid {
        grid-template-columns: 1fr;
    }
    
    .calculator-cta {
        padding: 15px;
    }
    
    .table-of-contents {
        padding: 15px;
    }
}