/* ========================================
   ENHANCED BLOG POST STYLES
   Use this in all blog posts for consistency
   ======================================== */

/* Enhanced Blog Article Container */
.blog-article {
    max-width: 900px;
    margin: 0 auto;
}

.blog-header {
    margin-bottom: 3rem;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

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

.blog-meta i {
    color: var(--secondary-color);
}

.blog-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.blog-header img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--secondary-color);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--secondary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
    margin: 2rem 0;
    position: static; /* Not sticky by default - prevents overlap */
    clear: both; /* Ensure it doesn't overlap with floated elements */
    z-index: 1; /* Keep it below fixed elements */
}

.table-of-contents h3 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

.table-of-contents li {
    margin-bottom: 0.8rem;
}

.table-of-contents a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
}

.table-of-contents a:hover {
    color: var(--secondary-color);
    background: white;
    transform: translateX(5px);
}

.table-of-contents a i {
    font-size: 0.8rem;
    color: var(--secondary-color);
}

/* Information Boxes */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #2196F3;
    margin: 2rem 0;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    margin: 2rem 0;
}

.success-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #4caf50;
    margin: 2rem 0;
}

.danger-box {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #f44336;
    margin: 2rem 0;
}

/* Icon Boxes */
.icon-box {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin: 1.5rem 0;
}

.icon-box i {
    font-size: 2rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

/* Stats Cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.stat-card h4 {
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-card p {
    color: var(--text-light);
    margin: 0;
}

/* FAQ Accordion */
.faq-section {
    margin: 3rem 0;
}

.faq-item {
    background: white;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--secondary-color);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.5rem;
}

.faq-answer.active {
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* Case Study Box */
.case-study {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid #9c27b0;
    margin: 2rem 0;
}

.case-study h3,
.case-study h4 {
    color: #9c27b0;
    margin-top: 0;
}

/* Cost Table */
.cost-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.cost-table thead {
    background: var(--primary-color);
    color: white;
}

.cost-table th,
.cost-table td {
    padding: 1rem;
    text-align: left;
}

.cost-table tbody tr {
    border-bottom: 1px solid #eee;
}

.cost-table tbody tr:hover {
    background: var(--bg-light);
}

/* Enhanced CTA Box */
.cta-box {
    text-align: center;
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 15px;
    color: white;
}

.cta-box h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-box p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-box .btn {
    background: white;
    color: var(--primary-color);
    padding: 1rem 3rem;
    font-size: 1.1rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.cta-box .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-card h4 {
    color: var(--primary-color);
    margin: 0.5rem 0;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
}

.checklist li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist li i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }
    
    .blog-header img {
        height: 250px;
    }
    
    .table-of-contents {
        position: static !important;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .icon-box {
        flex-direction: column;
    }
    
    .cta-box {
        padding: 2rem 1rem;
    }
    
    .cta-box h3 {
        font-size: 1.5rem;
    }
}
