/* ==========================================================================
   Blog Post Shared Styles - CalcIQ
   All blog posts link to this file. Only the header gradient color
   is set per-post via a small inline <style> block.
   ========================================================================== */

/* Layout */
.article-main {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    padding: 2rem 0;
}

.blog-article {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 auto;
    max-width: 900px;
    text-align: left;
}

/* Header (gradient color set per-post) */
.article-header {
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-category,
.read-time {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.article-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 700px;
    margin: 0 auto;
}

/* Content Area */
.article-content {
    padding: 3rem 2rem;
    line-height: 1.8;
    color: #374151;
    font-size: 1.05rem;
    text-align: left;
}

/* Sections */
.article-content section {
    margin: 3rem 0;
}

.article-content section h2 {
    color: #1f2937;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

.article-content section h3 {
    color: #374151;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

.article-content section h4 {
    color: #4b5563;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
}

/* Disclaimer Box */
.disclaimer-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border: 2px solid #f59e0b;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.disclaimer-box h3 {
    color: #92400e;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    border: 2px solid #0ea5e9;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.table-of-contents h2 {
    color: #0c4a6e;
    margin-bottom: 1rem;
}

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

.table-of-contents li {
    margin: 0.5rem 0;
}

.table-of-contents a {
    color: #0ea5e9;
    text-decoration: none;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: #0284c7;
}

/* Highlight Box (Green) */
.highlight-box {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.highlight-box h3 {
    color: #065f46;
    margin-bottom: 1rem;
}

/* Calculation Example */
.calculation-example {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

/* Pro Tip */
.pro-tip {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.pro-tip::before {
    content: "💡 Pro Tip: ";
    font-weight: 700;
    color: #92400e;
}

/* CTA Box */
.cta-box {
    color: white;
    padding: 3rem 2rem;
    margin: 3rem 0;
    border-radius: 16px;
    text-align: center;
}

/* Tables */
.rate-table,
.calculation-table,
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.rate-table th,
.calculation-table th,
.comparison-table th {
    background: linear-gradient(135deg, #1f2937, #374151);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.rate-table td,
.calculation-table td,
.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.rate-table tr:hover,
.calculation-table tr:hover,
.comparison-table tr:hover {
    background: #f9fafb;
}

/* CTA Buttons Container */
.blog-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* Related Articles */
.related-articles a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Mobile Responsive (768px)
   ========================================================================== */
@media (max-width: 768px) {
    .article-header {
        padding: 2rem 1rem;
    }

    .article-header h1 {
        font-size: 2rem;
    }

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

    .article-content {
        padding: 1.5rem 1rem;
        font-size: 0.95rem;
    }

    .article-meta {
        gap: 0.5rem;
    }

    .article-category,
    .read-time {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    /* Tables: horizontal scroll on mobile */
    .rate-table,
    .calculation-table,
    .comparison-table,
    .article-content table {
        font-size: 0.9rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rate-table th, .rate-table td,
    .calculation-table th, .calculation-table td,
    .comparison-table th, .comparison-table td,
    .article-content table th,
    .article-content table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
    }

    /* Content boxes: reduced padding */
    .table-of-contents,
    .highlight-box,
    .disclaimer-box {
        padding: 1.5rem;
        margin: 1.5rem 0;
    }

    .calculation-example,
    .pro-tip {
        padding: 1rem;
        margin: 1rem 0;
        font-size: 0.9rem;
    }

    .cta-box {
        padding: 2rem 1rem;
        margin: 2rem 0;
    }

    /* Section headings */
    .article-content section {
        margin: 2rem 0;
    }

    .article-content section h2 {
        font-size: 1.4rem;
    }

    .article-content section h3 {
        font-size: 1.15rem;
    }
}
