/* Blog Stylesheet - Modern Blog Design with Bootstrap 5 Utilities */

/* Blog Post Card */
.blog-post-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.blog-post-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background-color: #f8f9fa;
}

.blog-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-post-card:hover .blog-post-image {
    transform: scale(1.05);
}

.blog-post-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.blog-post-meta i {
    margin-right: 0.25rem;
}

/* Blog Post Cover Image */
.blog-post-cover {
    max-height: 500px;
    overflow: hidden;
    border-radius: 0.5rem;
}

.blog-post-cover img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Blog Post Header */
.blog-post-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1.5rem;
}

.blog-author-avatar {
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Author Card Styling */
.blog-author-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.blog-author-card .blog-author-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.blog-author-card .author-info {
    flex: 1;
}

.blog-author-card .author-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #212529;
}

.blog-author-card .author-bio {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
}

/* Category Badge Styling */
.blog-category-badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.blog-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-post-categories .badge,
.blog-post-categories .blog-category-badge {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blog Content */
.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #0d6efd;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6c757d;
}

.blog-content code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.blog-content pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content pre code {
    background-color: transparent;
    padding: 0;
}

.blog-content a {
    color: #0d6efd;
    text-decoration: underline;
}

.blog-content a:hover {
    color: #0a58ca;
}

/* Blog Post Sharing */
.blog-post-sharing {
    border-top: 1px solid #dee2e6;
}

/* Related Posts Section */
.blog-related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
}

.blog-related-posts h2 {
    font-size: 1.75rem;
    font-weight: 600;
}

.blog-related-posts .blog-post-card {
    height: 100%;
}

.blog-related-posts .blog-post-image-wrapper {
    height: 150px;
}

/* Responsive Design - Mobile First Approach */

/* Extra Small Devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    .blog-content {
        font-size: 0.95rem;
    }

    .blog-post-cover {
        max-height: 250px;
    }

    .blog-post-header h1 {
        font-size: 1.5rem;
    }

    .blog-post-meta {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    .blog-post-image-wrapper {
        height: 180px;
    }

    .blog-author-card {
        flex-direction: column;
        text-align: center;
    }

    .blog-related-posts h2 {
        font-size: 1.5rem;
    }

    .blog-related-posts .blog-post-image-wrapper {
        height: 120px;
    }
}

/* Small Devices (tablets, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .blog-content {
        font-size: 1rem;
    }

    .blog-post-cover {
        max-height: 350px;
    }

    .blog-post-header h1 {
        font-size: 2rem;
    }

    .blog-post-image-wrapper {
        height: 200px;
    }

    .blog-related-posts .blog-post-image-wrapper {
        height: 140px;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .blog-content {
        font-size: 1.0625rem;
    }

    .blog-post-cover {
        max-height: 400px;
    }

    .blog-post-header h1 {
        font-size: 2.25rem;
    }

    .blog-post-image-wrapper {
        height: 220px;
    }

    .blog-related-posts .blog-post-image-wrapper {
        height: 150px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .blog-content {
        font-size: 1.125rem;
    }

    .blog-post-cover {
        max-height: 500px;
    }

    .blog-post-header h1 {
        font-size: 2.5rem;
    }

    .blog-post-image-wrapper {
        height: 240px;
    }

    .blog-related-posts .blog-post-image-wrapper {
        height: 160px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .blog-content {
        font-size: 1.125rem;
        max-width: 800px;
        margin: 0 auto;
    }

    .blog-post-header {
        max-width: 800px;
        margin: 0 auto;
    }
}

/* Pagination */
.pagination .page-link {
    color: #0d6efd;
    border-color: #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.pagination .page-link:hover {
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Blog Grid Enhancements */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 575.98px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Blog Post Title Links */
.blog-post-card .card-title a {
    color: #212529;
    transition: color 0.2s ease;
}

.blog-post-card .card-title a:hover {
    color: #0d6efd;
}

/* Blog Post Excerpt */
.blog-post-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Blog Post Footer */
.blog-post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid #dee2e6;
}

/* Blog Section Spacing */
.blog-section {
    margin-bottom: 3rem;
}

.blog-section:last-child {
    margin-bottom: 0;
}

/* Blog Empty State */
.blog-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.blog-empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Blog Loading State */
.blog-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

/* Blog Post Tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Blog Post Reading Time (if needed) */
.blog-reading-time {
    font-size: 0.875rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog Post Featured Badge */
.blog-post-featured {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* Blog Post Date Styling */
.blog-post-date {
    font-size: 0.875rem;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Blog Post Author Link */
.blog-post-author-link {
    color: #212529;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blog-post-author-link:hover {
    color: #0d6efd;
}

/* Author Meta Link Wrapper */
.blog-post-meta a {
    transition: opacity 0.2s ease;
}

.blog-post-meta a:hover {
    opacity: 0.8;
}

.blog-post-meta a:hover .fw-bold {
    color: #0d6efd !important;
}

/* Category Badge Links */
.blog-post-categories a {
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.blog-post-categories a:hover {
    transform: translateY(-2px);
}

.blog-post-categories a:hover .badge {
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

/* Blog Content Table Styling */
.blog-content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.blog-content table th,
.blog-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
}

.blog-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.blog-content table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Blog Sidebar */
.blog-sidebar-section {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.blog-sidebar-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #212529;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.blog-sidebar-section .list-group-item {
    border: none;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem;
    transition: background-color 0.2s ease;
}

.blog-sidebar-section .list-group-item:last-child {
    border-bottom: none;
}

.blog-sidebar-section .list-group-item:hover {
    background-color: #e9ecef;
}

.blog-sidebar-section .list-group-item img {
    flex-shrink: 0;
}

.blog-sidebar-section .list-group-item h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #212529;
}

.blog-sidebar-section .list-group-item small {
    font-size: 0.75rem;
}

/* Mobile adjustments for sidebar */
@media (max-width: 991.98px) {
    .blog-sidebar-section {
        margin-bottom: 1.5rem;
    }
}

