/* `root variable` Section */
:root {
    --primary-color: #4361ee;
    --secondary-color: #f00707;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}
/* Blog Styles
-------------------------------------------------- */

/* Blog Hero Section */
.blog-hero {
    background-color: #F9F9F9; /* Changed to match main site's light gray */
    color: #333; /* Adjusted text color for better contrast */
    padding: 120px 0 80px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #000; /* Ensure heading is dark for contrast */
}

.blog-hero p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Blog Categories */
.blog-categories {
    background-color: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.category-filter {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.category-filter::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.category-filter li {
    padding: 10px 20px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.category-filter li:hover {
    background-color: #f5f5f5;
}

.category-filter li.active {
    background-color: var(--primary-color);
    color: #fff;
}

/* Blog Posts Grid */
.blog-posts {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.blog-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
}

.blog-image {
    height: 280px; /* Increased from 220px */
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
}

.blog-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-date {
    color: #777;
}

.blog-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    line-height: 1.4;
    font-weight: 600;
}

.blog-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: #f5f5f5;
}

.pagination-btn.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Blog Post Detail Page */
.blog-detail {
    padding: 120px 0 60px;
}

/* Add breadcrumb navigation */
/* Blog Post Detail Page */
.blog-breadcrumb {
    max-width: 800px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #777;
    padding: 0 15px;
    box-sizing: border-box;
}

.blog-breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.blog-breadcrumb .separator {
    margin: 0 8px;
}

.blog-breadcrumb .category {
    background-color: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.blog-header-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #777;
    font-size: 16px;
}

.blog-header-meta i {
    margin-right: 5px;
    color: #555;
}

.blog-header {
    text-align: center;
    margin-bottom: 40px;
    max-width: 800px; /* Match blog-body width */
    margin-left: auto;
    margin-right: auto;
}

.blog-header h1 {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-header-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: #777;
    font-size: 16px;
}

.blog-featured-image {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px; /* Match blog-body width */
    margin-left: auto;
    margin-right: auto;
    height: 400px; /* Fixed height for featured images */
}

.blog-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio and cover container */
}

.blog-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 18px;
    color: #444;
}

.blog-body p {
    margin-bottom: 25px;
}

.blog-body h2 {
    font-size: 28px;
    margin: 40px 0 20px;
    font-weight: 600;
    border-bottom: 1px solid #e1e4e8;
}

.blog-body h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    font-weight: 600;
}

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

.blog-body li {
    margin-bottom: 10px;
}

.blog-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 30px 0;
}

.blog-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
}

/* Table of Contents Styling */
.blog-body .table-of-contents {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px 30px;
    margin: 30px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.blog-body .table-of-contents h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #333;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.blog-body .table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 0;
}

.blog-body .table-of-contents ul li {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.blog-body .table-of-contents ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: #0366d6;
}

.blog-body .table-of-contents ul li a {
    color: #0366d6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-body .table-of-contents ul li a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Table Styling */
.blog-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    font-size: 0.9em;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d1d5db; 
}

.blog-body table th {
    background-color: #dbeafe; 
    color: #2c3e50; 
    text-align: left;
    font-weight: 700;
    padding: 12px 15px;
    border: none;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
}

.blog-body table td {
    padding: 12px 15px;
    border: none;
    border-right: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
}

.blog-body table th:last-child,
.blog-body table td:last-child {
    border-right: none;
}

.blog-body table tr:last-of-type th,
.blog-body table tr:last-of-type td {
    border-bottom: none;
}

/* .blog-body table tr {
    border-bottom: 1px solid #d1d5db;
} */

.blog-body table tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

/* .blog-body table tr:last-of-type {
    border-bottom: none;
} */

.blog-body table tr:hover {
    background-color: #f1f5f9;
}

/* Fix top-left corner rounded */
.blog-body table th:first-child {
    border-top-left-radius: 8px;
}

/* Fix top-right corner rounded */
.blog-body table th:last-child {
    border-top-right-radius: 8px;
}

.blog-related {
    background-color: #f9f9f9;
    padding: 60px 0;
    margin-top: 60px;
}

.blog-related h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 32px;
    font-weight: 600;
}

.blog-related .blog-grid {
    grid-template-columns: repeat(3, 1fr); /* Show 3 related articles by default */
}

/* Blog Content Links */
.blog-body a {
    color: #0366d6; /* Standard blue color for links */
    text-decoration: underline; /* Underline for better accessibility */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.blog-body a:hover {
    color: #0056b3; /* Darker blue on hover */
    text-decoration: underline; /* Maintain underline on hover */
    cursor: pointer !important;
}

.blog-body a:visited {
    color: #6f42c1; /* Purple for visited links - standard convention */
}

.blog-body a:active {
    color: #e36209; /* Orange for active state */
}

/* Enhanced List Styling */
.blog-body ul {
    list-style-type: disc; /* Standard bullet points */
}

.blog-body ol {
    list-style-type: decimal; /* Numbered lists */
}

.blog-body ul li, .blog-body ol li {
    margin-bottom: 12px; /* Slightly increased from your current 10px */
    line-height: 1.6;
}

/* Nested lists */
.blog-body ul ul, 
.blog-body ul ol, 
.blog-body ol ul, 
.blog-body ol ol {
    margin-top: 8px;
    margin-bottom: 8px;
}

/* Styling for list items with strong tags and spans as in your example */
.blog-body li strong {
    color: #2c3e50; /* Slightly darker than normal text for emphasis */
    font-weight: 600;
}

.blog-body li p {
    margin-bottom: 8px; /* Smaller margin for paragraphs inside list items */
}


/* Responsive Styles */
@media (max-width: 992px) {
    .blog-hero {
        padding: 100px 0 60px;
    }
    
    .blog-hero h1 {
        font-size: 40px;
    }
    
    .blog-hero p {
        font-size: 18px;
    }
    
    .blog-header h1 {
        font-size: 36px;
    }
    
    .blog-featured-image {
        height: 350px;
    }
    
    .blog-related .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on medium screens */
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-hero {
        padding: 90px 0 50px;
    }
    
    .blog-hero h1 {
        font-size: 32px;
    }
    
    .blog-hero p {
        font-size: 16px;
    }
    
    .category-filter li {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .blog-header h1 {
        font-size: 28px;
    }
    
    .blog-body {
        font-size: 16px;
    }
    
    .blog-body h2 {
        font-size: 24px;
    }
    
    .blog-body h3 {
        font-size: 20px;
    }
    
    .blog-header-meta {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .blog-breadcrumb {
        flex-wrap: wrap;
        font-size: 12px;
    }
    
    /* Table of Contents Mobile Adaptation */
    .blog-body .table-of-contents {
        padding: 15px;
        margin: 20px 0;
    }
    
    .blog-body .table-of-contents h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }
    
    .blog-body .table-of-contents ul li {
        margin-bottom: 8px;
        font-size: 0.9em;
    }
    
    /* Table Mobile Adaptation */
    .blog-body table {
        font-size: 0.8em;
        margin: 20px 0;
        display: block;
        overflow-x: auto;  /* Enable horizontal scrolling for tables */
        white-space: nowrap;  /* Prevent text wrapping in table cells */
    }
    
    .blog-body table th,
    .blog-body table td {
        padding: 8px 10px;
    }
}

@media (max-width: 576px) {
    .blog-hero h1 {
        font-size: 28px;
    }
    
    .blog-content h3 {
        font-size: 18px;
    }
    
    .blog-header h1 {
        font-size: 24px;
    }
    
    .blog-header-meta {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .blog-breadcrumb {
        flex-wrap: wrap;
        font-size: 12px;
    }

    .blog-featured-image {
        height: 250px;
    }
    
    .blog-related .blog-grid {
        grid-template-columns: 1fr; /* 1 column on small screens */
    }
    
    /* Further adjustments for very small screens */
    .blog-body .table-of-contents {
        padding: 12px;
    }
    
    .blog-body .table-of-contents h2 {
        font-size: 1.2rem;
    }
    
    .blog-body .table-of-contents ul li {
        padding-left: 15px;
        font-size: 0.85em;
    }
    
    .blog-body table th,
    .blog-body table td {
        padding: 6px 8px;
    }
}
