/**
 * Blog Styles - Fanbase Lab
 * Consolidated styles for blog articles
 *
 * Table of Contents:
 * 1. CSS Variables (Blog-specific)
 * 2. Reading Progress Bar
 * 3. Post Hero Section
 * 4. Post Meta & Stats
 * 5. Expert Badge
 * 6. Key Takeaways Box
 * 7. Author Box
 * 8. Share Buttons
 * 9. Post Content
 * 10. CTA Box
 * 11. Related Posts
 * 12. Quiz Section
 * 13. Budget Calculator
 * 14. Product Cards
 * 15. Comparison Table
 * 16. Sources Box
 * 17. Footer CTA
 * 18. Responsive Styles
 */

/* ==========================================================================
   1. CSS VARIABLES (Blog-specific)
   ========================================================================== */

:root {
    --gradient-primary: linear-gradient(135deg, #1E40AF, #6366f1);
    --gradient-hover: linear-gradient(135deg, #1e3a8a, #4f46e5);
    --shadow-glow: 0 12px 40px rgba(30, 64, 175, 0.15);
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 16px 50px rgba(0, 0, 0, 0.12);
}

section {
    padding: var(--space-xl) 0;
}

.btn-primary {
    background: var(--gradient-primary) !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    color: white !important;
}

.btn-primary:hover {
    background: var(--gradient-hover) !important;
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* ==========================================================================
   2. READING PROGRESS BAR
   ========================================================================== */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-primary);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ==========================================================================
   3. POST HERO SECTION
   ========================================================================== */

.post-hero {
    background-color: var(--secondary-bg);
    padding: var(--space-xl) 0 var(--space-lg) 0;
    text-align: center;
}

.post-hero h1 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-hero .meta {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   4. POST META & STATS
   ========================================================================== */

.post-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.post-meta .meta-icon {
    font-size: 1rem;
}

.post-meta .divider {
    color: var(--border-light);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: var(--space-md) 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-item .stat-icon {
    font-size: 1rem;
}

.stat-item strong {
    color: var(--text-primary);
}

/* ==========================================================================
   5. EXPERT BADGE
   ========================================================================== */

.expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    margin-top: var(--space-sm);
}

.expert-badge .badge-icon {
    font-size: 1rem;
}

/* ==========================================================================
   6. KEY TAKEAWAYS BOX
   ========================================================================== */

.key-takeaways {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.03), rgba(99, 102, 241, 0.06));
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.key-takeaways h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: #1E40AF;
    margin-bottom: var(--space-sm);
}

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

.key-takeaways li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.key-takeaways li::marker {
    color: #1E40AF;
}

/* ==========================================================================
   7. AUTHOR BOX
   ========================================================================== */

.author-box {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.author-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
}

.author-info .author-title {
    font-size: 0.9rem;
    color: #1E40AF;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ==========================================================================
   8. SHARE BUTTONS
   ========================================================================== */

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: var(--space-md) 0;
    flex-wrap: wrap;
}

.share-buttons span {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--secondary-bg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    border: 1px solid var(--border-light);
}

.share-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    border-color: transparent;
}

.share-btn.copy-link {
    width: auto;
    padding: 0 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    gap: 0.35rem;
}

.share-btn.copy-link.copied {
    background: #059669;
    color: white;
    border-color: transparent;
}

/* ==========================================================================
   9. POST CONTENT
   ========================================================================== */

.post-content-section {
    background: white;
    padding: var(--space-lg) 0 var(--space-xl) 0;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.post-content h2,
.post-content h3 {
    color: var(--text-primary);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
    line-height: 1.4;
}

.post-content h2 {
    font-size: 2rem;
}

.post-content h3 {
    font-size: 1.5rem;
}

.post-content p {
    margin-bottom: var(--space-md);
}

.post-content ul,
.post-content ol {
    margin-bottom: var(--space-md);
    padding-left: 1.5rem;
}

.post-content ul li,
.post-content ol li {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: var(--space-lg) 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   10. CTA BOX
   ========================================================================== */

.cta-box {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.05), rgba(99, 102, 241, 0.08));
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    text-align: center;
}

.cta-box h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.cta-box p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* ==========================================================================
   11. RELATED POSTS
   ========================================================================== */

.related-posts {
    margin-top: var(--space-xl);
}

.related-posts h3 {
    margin-bottom: var(--space-md);
}

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

.related-card {
    display: block;
    padding: 1.25rem;
    background: var(--secondary-bg);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.related-card:hover {
    border-color: #6366f1;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.related-card .card-category {
    font-size: 0.75rem;
    color: #1E40AF;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.related-card strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.related-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* ==========================================================================
   12. QUIZ SECTION
   ========================================================================== */

.quiz-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(30, 64, 175, 0.08));
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
}

.quiz-section h3 {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.quiz-question {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    text-align: center;
    font-weight: 500;
}

.quiz-options {
    display: grid;
    gap: 0.75rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-option:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.03);
}

.quiz-option.selected {
    border-color: #1E40AF;
    background: rgba(30, 64, 175, 0.05);
}

.quiz-option .option-icon {
    font-size: 1.5rem;
}

.quiz-option .option-text strong {
    display: block;
    color: var(--text-primary);
}

.quiz-option .option-text span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.quiz-result {
    display: none;
    text-align: center;
    padding: var(--space-md);
    background: white;
    border-radius: 12px;
    margin-top: var(--space-md);
}

.quiz-result.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.quiz-result h4 {
    color: #1E40AF;
    margin-bottom: 0.5rem;
}

.quiz-result p {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   13. BUDGET CALCULATOR
   ========================================================================== */

.budget-calc {
    background: var(--secondary-bg);
    border-radius: 16px;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
}

.budget-calc h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--space-sm);
}

.budget-slider-wrap {
    margin: var(--space-sm) 0;
}

.budget-slider-wrap input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #e0e7ff, #1E40AF);
    -webkit-appearance: none;
}

.budget-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #1E40AF;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.budget-display {
    text-align: center;
    margin: var(--space-sm) 0;
}

.budget-display .amount {
    font-size: 2rem;
    font-weight: 800;
    color: #1E40AF;
}

.budget-recommendation {
    background: white;
    border-radius: 12px;
    padding: var(--space-sm);
    margin-top: var(--space-sm);
}

.budget-recommendation h5 {
    color: #1E40AF;
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.budget-recommendation p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ==========================================================================
   14. PRODUCT CARDS
   ========================================================================== */

.product-card {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
}

.product-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   15. COMPARISON TABLE
   ========================================================================== */

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0;
    font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--secondary-bg);
    font-weight: 600;
    position: sticky;
    top: 60px;
}

.comparison-table tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

/* ==========================================================================
   16. SOURCES BOX
   ========================================================================== */

.sources-box {
    background: var(--secondary-bg);
    border-radius: 12px;
    padding: var(--space-md);
    margin: var(--space-lg) 0;
}

.sources-box h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.sources-box ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.sources-box li {
    margin-bottom: 0.35rem;
}

.sources-box a {
    color: #1E40AF;
    text-decoration: none;
}

.sources-box a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   17. FOOTER CTA
   ========================================================================== */

.footer-cta {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-innovation));
    padding: var(--space-xl) 0;
}

.footer-cta-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-cta-content h2 {
    color: white;
    margin-bottom: var(--space-sm);
}

.footer-cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-lg);
}

.footer-cta-button {
    background: white;
    color: var(--accent-primary);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   18. RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 768px) {
    .comparison-table {
        font-size: 0.85rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }

    .stats-bar {
        gap: 0.75rem;
    }

    .stat-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}
