/**
 * Blog styles for NetworkUstad
 * Includes styles for blog archive, single posts, and related components
 */

/* Blog Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Blog Cards */
.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px 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 30px rgba(0, 0, 0, 0.1);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.entry-content {
    padding: 1.5rem;
}

.entry-header {
    margin-bottom: 1rem;
}

.entry-title {
    font-size: 1.5rem;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.entry-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-title a:hover {
    color: #3b82f6;
}

.entry-meta {
    font-size: 0.875rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.entry-meta a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-meta a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.entry-summary {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #2563eb;
    text-decoration: underline;
}

.read-more span {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.read-more:hover span {
    transform: translateX(3px);
}

/* Single Post Styles */
.single-post .entry-header {
    margin-bottom: 2rem;
    text-align: center;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.single-post .entry-meta {
    justify-content: center;
    margin-bottom: 2rem;
}

.single-post .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}

.single-post .entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem;
}

.single-post .entry-content h2,
.single-post .entry-content h3,
.single-post .entry-content h4 {
    margin: 2.5rem 0 1.5rem;
    color: #1e293b;
}

/* Pagination */
.pagination {
    margin: 3rem 0;
    text-align: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 8px;
    background: #f8fafc;
    color: #64748b;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pagination .page-numbers.current {
    background: #3b82f6;
    color: #ffffff;
}

.pagination .page-numbers:hover:not(.current) {
    background: #e2e8f0;
    color: #1e40af;
}

/* Sidebar Styles */
.widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.widget-title {
    font-size: 1.25rem;
    margin: 0 0 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
    color: #1e293b;
}

/* Popular Posts Widget */
.widget_popular_posts ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget_popular_posts li {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.widget_popular_posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.popular-post-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    float: left;
    margin-right: 1rem;
}

.popular-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content h4 {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    line-height: 1.4;
}

.popular-post-content h4 a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.popular-post-content h4 a:hover {
    color: #3b82f6;
}

.post-date {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

/* Categories Widget */
.widget_categories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.widget_categories li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.widget_categories li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget_categories a {
    display: flex;
    justify-content: space-between;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget_categories a:hover {
    color: #3b82f6;
}

.category-count {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.widget_categories a:hover .category-count {
    background: #3b82f6;
    color: #ffffff;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud a {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: #f1f5f9;
    color: #475569;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8125rem !important;
    transition: all 0.2s ease;
}

.tag-cloud a:hover {
    background: #3b82f6;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .single-post .entry-title {
        font-size: 2rem;
    }
    
    .entry-meta {
        font-size: 0.8125rem;
    }
    
    .popular-post-thumbnail {
        width: 70px;
        height: 50px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .blog-card,
    .widget {
        background: #1e293b;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }
    
    .entry-title a,
    .single-post .entry-title,
    .widget-title,
    .popular-post-content h4 a {
        color: #f8fafc;
    }
    
    .entry-summary,
    .single-post .entry-content,
    .post-date,
    .widget_categories a {
        color: #cbd5e1;
    }
    
    .entry-meta,
    .category-count {
        color: #94a3b8;
    }
    
    .widget_categories a .category-count,
    .tag-cloud a {
        background: #334155;
        color: #e2e8f0;
    }
    
    .widget_categories a:hover .category-count,
    .tag-cloud a:hover {
        background: #3b82f6;
        color: #ffffff;
    }
}
