/* Blog Styles */

/* Main Blog Section */
.blog-section {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Blog Filters */
.blog-filters .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Blog Post Cards */
.blog-post-card .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

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

.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.post-image-placeholder {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.placeholder-bg {
    color: rgba(255, 255, 255, 0.7);
}

.featured-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.post-category .badge {
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 15px;
    padding: 0.5rem 1rem;
}

.post-category .badge:hover {
    opacity: 0.8;
    text-decoration: none;
}

.card-title a {
    color: inherit;
    transition: color 0.3s ease;
}

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

/* Post Meta */
.post-meta {
    font-size: 0.875rem;
}

.post-meta .btn {
    transition: all 0.3s ease;
}

.post-meta .btn:hover {
    transform: translateX(5px);
}

/* Sidebar Widgets */
.sidebar-widget .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.sidebar-widget .card-header {
    background: linear-gradient(135deg, var(--bs-primary), #667eea);
    color: white;
    border: none;
}

.featured-post-item:last-child {
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.featured-post-item h6 a {
    color: inherit;
    transition: color 0.3s ease;
}

.featured-post-item h6 a:hover {
    color: var(--bs-primary);
}

.category-item a {
    padding: 0.5rem 0;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.category-item a:hover {
    background-color: rgba(0, 123, 255, 0.1);
    padding-left: 0.5rem;
}

/* Single Post Styles */
.blog-post-section {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.blog-post {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.post-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 2rem;
}

.post-title {
    line-height: 1.2;
    color: #2c3e50;
}

.badge-lg {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* Author Info */
.author-info {
    margin-bottom: 1rem;
}

.avatar-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bs-primary), #667eea);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.author-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--bs-primary), #667eea);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    margin: 0 auto;
}

.author-name {
    color: #2c3e50;
}

/* Social Share */
.social-share .btn {
    width: 35px;
    height: 35px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-share .btn:hover {
    transform: translateY(-2px);
}

/* Post Content */
.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #34495e;
}

.post-content h2 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.post-content h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

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

.post-content blockquote {
    background: #f8f9fa;
    border-left: 4px solid var(--bs-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

.post-content code {
    background: #f1f2f6;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.post-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

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

/* Tags */
.post-tags {
    margin-top: 2rem;
}

.tag-link {
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.tag-link:hover {
    background-color: var(--bs-primary) !important;
    color: white !important;
    border-color: var(--bs-primary);
    text-decoration: none;
}

/* Author Bio */
.author-bio {
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.author-bio:hover {
    border-color: var(--bs-primary);
}

/* Comments Section */
.comments-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.comment-form .card {
    border: 2px solid #e9ecef;
}

.comment-form .card-header {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
}

.comment-item .card {
    border-left: 4px solid var(--bs-primary);
    background: #f8f9fa;
}

.comment-author a {
    color: var(--bs-primary);
    text-decoration: none;
}

.comment-author a:hover {
    text-decoration: underline;
}

.comment-content {
    line-height: 1.6;
}

/* Pagination */
.pagination .page-link {
    color: var(--bs-primary);
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
    transform: translateY(-2px);
}

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

/* No Posts/Comments */
.no-posts, .no-comments {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-post {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .comments-section {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .social-share {
        margin-top: 1rem;
    }
    
    .author-info {
        flex-direction: column;
        text-align: center;
    }
    
    .avatar-circle {
        margin-bottom: 1rem;
    }
    
    .sidebar-widget {
        margin-top: 2rem;
    }
}

@media (max-width: 576px) {
    .blog-filters .row {
        flex-direction: column;
    }
    
    .blog-filters .col-md-2,
    .blog-filters .col-md-4,
    .blog-filters .col-md-6 {
        margin-bottom: 1rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .featured-badge {
        position: static;
        display: inline-block;
        margin-top: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Focus States for Accessibility */
.form-control:focus,
.btn:focus,
.page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Print Styles */
@media print {
    .sidebar-widget,
    .social-share,
    .comment-form,
    .pagination {
        display: none;
    }
    
    .blog-post,
    .comments-section {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .post-content {
        font-size: 12pt;
        line-height: 1.5;
    }
}