/**
 * Blog Content Type Styles
 * /css/content-types/blog.css
 */

/* ========================================
   Blog Header
   ======================================== */
.blog-header {
    background: #f8fafc;
}

.blog-header .page-title {
    font-weight: 700;
}

/* ========================================
   Blog Posts
   ======================================== */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ========================================
   Blog Post Card
   ======================================== */
.blog-post {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-post:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Featured Post */
.blog-post.featured-post {
    margin-bottom: 2rem;
}

.blog-post.featured-post .post-image {
    position: relative;
    height: 350px;
}

.blog-post.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post.featured-post .post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.blog-post.featured-post .post-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 4px;
}

.blog-post.featured-post .post-content {
    padding: 1.5rem;
}

.blog-post.featured-post .post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Regular Post */
.blog-post .post-image {
    height: 200px;
    overflow: hidden;
}

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

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

.blog-post .post-content {
    padding: 1.25rem;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
}

.post-meta i {
    margin-right: 0.25rem;
}

.post-category-inline {
    color: var(--bs-primary);
    font-weight: 500;
}

/* Post Title */
.post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--bs-primary);
}

/* Post Excerpt */
.post-excerpt {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Read More */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-primary);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* ========================================
   Blog Sidebar
   ======================================== */
.blog-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f1f5f9;
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    border-bottom: 1px solid #f1f5f9;
}

.category-list li:last-child {
    border-bottom: none;
}

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-list li a:hover {
    color: var(--bs-primary);
    padding-left: 0.5rem;
}

.category-list .count {
    background: #f1f5f9;
    color: #6b7280;
    font-size: 0.8rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, var(--bs-primary) 0%, #4338ca 100%);
    color: #fff;
}

.newsletter-widget .widget-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.newsletter-widget .form-control {
    border: none;
}

.newsletter-widget .btn-primary {
    background: #fff;
    color: var(--bs-primary);
    border: none;
}

/* ========================================
   Blog Detail
   ======================================== */
.blog-detail .article-header {
    padding-bottom: 2rem;
}

.blog-detail .article-categories {
    margin-bottom: 1rem;
}

.blog-detail .category-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: var(--bs-primary);
    color: #fff;
    font-size: 0.8rem;
    border-radius: 50px;
    text-decoration: none;
    margin-right: 0.5rem;
    transition: background 0.2s ease;
}

.blog-detail .category-badge:hover {
    background: #4338ca;
    color: #fff;
}

.blog-detail .article-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.blog-detail .article-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    color: #6b7280;
}

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

.blog-detail .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Featured Image */
.article-featured-image {
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.article-featured-image figure {
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.article-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
}

/* Article Lead */
.article-lead {
    font-size: 1.25rem;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #374151;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.article-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4b5563;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--bs-primary);
    text-decoration: underline;
}

.article-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.article-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre code {
    background: transparent;
    padding: 0;
}

/* Tags */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.tags-label {
    color: #6b7280;
    font-weight: 500;
}

.article-tags .tag {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.2s ease;
}

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

/* Share */
.article-share {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.share-label {
    color: #6b7280;
    font-weight: 500;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.share-btn.facebook { background: #1877f2; }
.share-btn.twitter { background: #1da1f2; }
.share-btn.linkedin { background: #0a66c2; }
.share-btn.whatsapp { background: #25d366; }
.share-btn.copy { background: #6b7280; }

/* Author Box */
.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
}

.author-avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: #6b7280;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Article Navigation */
.article-navigation .nav-link {
    display: block;
    text-decoration: none;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.article-navigation .nav-link:hover {
    background: #f1f5f9;
}

.article-navigation .nav-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.article-navigation .nav-title {
    display: block;
    font-weight: 500;
    color: #1f2937;
}

/* Mini Post Card */
.blog-post.mini {
    height: 100%;
}

.blog-post.mini .post-image {
    height: 150px;
}

.blog-post.mini .post-content {
    padding: 1rem;
}

.blog-post.mini .post-title {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991.98px) {
    .blog-sidebar {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .blog-detail .article-title {
        font-size: 1.5rem;
    }
    
    .blog-detail .article-meta {
        gap: 1rem;
    }
    
    .article-featured-image figure {
        border-radius: 0;
        margin: 0 -15px;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar-lg {
        margin: 0 auto;
    }
    
    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }
}
