/* Blog Page Specific Styles - Professional & Minimalistic */

:root {
    --blog-card-bg: #ffffff;
    --blog-text-muted: #6c757d;
    --blog-border: rgba(16, 24, 40, 0.08);
    --blog-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
    --blog-transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Blog Cards */
.blog-card {
    background-color: var(--blog-card-bg);
    border: 1px solid var(--blog-border);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--blog-transition);
    height: 100%;
    position: relative;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--blog-shadow);
    border-color: rgba(16, 24, 40, 0.14);
}

.blog-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 10;
}

.blog-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--blog-transition);
}

.blog-card:hover .card-img-top {
    transform: scale(1.08);
}

.blog-card .card-body {
    padding: 1.5rem !important;
}

.blog-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--blog-text-muted);
    margin-bottom: 5px;
    align-items: center;
}

.blog-meta i {
    color: var(--color-accent);
    margin-right: 6px;
}

.blog-title {
    font-size: 16px !important;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 5px;
}

.blog-title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--blog-transition);
}

.blog-title a:hover {
    color: var(--color-secondary);
}

.blog-excerpt {
    color: var(--blog-text-muted);
    font-size: 14px !important;
    line-height: 1.65;
    margin-bottom: 1px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--blog-transition);
}

.read-more-link i {
    transition: transform 0.3s ease;
}

.read-more-link:hover {
    color: var(--color-secondary);
}

.read-more-link:hover i {
    transform: translateX(5px);
}

/* Sidebar Styling */
.sidebar-widget {
    background: #fff;
    padding: 1.6rem;
    border-radius: 14px;
    border: 1px solid var(--blog-border);
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 18px rgba(16, 24, 40, 0.04);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent);
    border-radius: 2px;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    margin-bottom: 2px;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px !important;
    padding: 0.5rem 0;
    color: #444;
    font-weight: 500;
    transition: var(--blog-transition);
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-list a span {
    font-size: 0.8rem;
    color: var(--blog-text-muted);
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 10px;
}

.sidebar-list a:hover {
    color: var(--color-secondary);
    padding-left: 8px;
    border-bottom-color: var(--color-secondary);
}

.recent-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    align-items: center;
}

.recent-post-img {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.recent-post-content h6 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.4;
}

.recent-post-content h6 a {
    color: var(--color-primary);
}

.recent-post-content h6 a:hover {
    color: var(--color-secondary);
}

.recent-post-date {
    font-size: 0.8rem;
    color: var(--blog-text-muted);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 6px 14px;
    background: #f8f9fa;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #444;
    font-weight: 500;
    transition: var(--blog-transition);
}

.tag-item:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Keep sidebar visible while scrolling long blog lists */
@media (min-width: 992px) {
    .blog-sidebar-sticky {
        position: sticky;
        top: 118px;
        align-self: flex-start;
    }

    .blog-sidebar-sticky .sidebar-widget:last-child {
        margin-bottom: 0;
    }
}

/* Blog Detail Page Styles */
.blog-detail-header {
    padding: 4rem 0;
    background-color: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.blog-detail-featured-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 24px;
    margin-bottom: 3rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content h2, .blog-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 800;
}

.blog-content blockquote {
    padding: 2rem;
    background: var(--color-light);
    border-left: 5px solid var(--color-primary);
    font-style: italic;
    font-size: 1.2rem;
    margin: 2.5rem 0;
    border-radius: 0 16px 16px 0;
}

.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--color-primary);
    transition: var(--blog-transition);
}

.share-btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-3px);
}

.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2.5rem;
    background: #f8f9fa;
    border-radius: 20px;
    margin-top: 4rem;
}

.author-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h5 {
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--blog-text-muted);
    margin-bottom: 1rem;
}

/* Pagination Customization */
.pagination-custom .page-item .page-link {
    border: 1px solid #eee;
    color: var(--color-primary);
    margin: 0 4px;
    border-radius: 12px;
    font-weight: 700;
    transition: var(--blog-transition);
}

.pagination-custom .page-item.active .page-link {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.pagination-custom .page-item .page-link:hover:not(.active) {
    background-color: var(--color-light);
    border-color: var(--color-light);
}

@media (max-width: 768px) {
    .blog-detail-featured-img {
        height: 300px;
    }
    
    .blog-title {
        font-size: 1.25rem;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-img {
        margin: 0 auto;
    }
}

@media (min-width: 992px) and (max-width: 1399.98px) {
    .blog-card .card-body {
        padding: 1.25rem !important;
    }

    .blog-meta {
        gap: 1rem;
        font-size: 0.8rem;
    }

    .blog-title {
        font-size: 1.05rem;
    }

    .blog-excerpt {
        font-size: 0.88rem;
    }
}
