/* Blog-specific Styles */

/* Article Content Styling */
.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--primary-color);
}

.article-body h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body ul li {
    list-style: disc;
}

.article-body ol li {
    list-style: decimal;
}

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

.article-body a:hover {
    color: var(--tertiary-color);
}

.article-body blockquote {
    padding: 20px;
    margin: 20px 0;
    background-color: #f6f9fc;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-body table th,
.article-body table td {
    padding: 10px;
    border: 1px solid var(--border-color);
}

.article-body table th {
    background-color: #f6f9fc;
    font-weight: 600;
}

.article-body img {
    display: block;
    max-width: 100%;
    margin: 30px auto;
    border-radius: var(--radius);
}

.article-body figure {
    margin: 30px 0;
}

.article-body figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* Blog Post Cards Enhanced Styling */
.blog-post-content h2 {
    font-size: 1.8rem;
    line-height: 1.3;
    margin-bottom: 15px;
    transition: var(--transition);
}

.blog-post-meta {
    margin-bottom: 15px;
}

.blog-post-category {
    font-weight: 500;
}

.blog-read-more {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

.blog-read-more:after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}

.blog-read-more:hover:after {
    margin-left: 10px;
}

/* Sidebar Enhanced Styling */
.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-newsletter-form input[type="email"] {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    margin-bottom: 10px;
    width: 100%;
}

.sidebar-newsletter-form .form-consent {
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.popular-posts {
    counter-reset: post-counter;
}

.popular-posts li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
}

.popular-posts li:before {
    counter-increment: post-counter;
    content: counter(post-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Article Share Section Enhanced */
.article-share {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    margin: 40px 0;
}

/* Related Posts Enhanced */
.related-post h4 {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Blog Post Navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.nav-previous,
.nav-next {
    max-width: 48%;
}

.nav-previous a,
.nav-next a {
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-previous a:hover,
.nav-next a:hover {
    color: var(--primary-color);
}

.nav-previous a:before {
    content: '←';
    margin-right: 10px;
    transition: var(--transition);
}

.nav-next a:after {
    content: '→';
    margin-left: 10px;
    transition: var(--transition);
}

.nav-previous a:hover:before {
    margin-right: 15px;
}

.nav-next a:hover:after {
    margin-left: 15px;
}

/* Article Comments Section */
.article-comments {
    margin-top: 60px;
}

.article-comments h3 {
    font-size: 1.5rem;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

.article-comments h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.comment-list {
    margin-bottom: 40px;
}

.comment {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    background-color: rgba(44, 90, 160, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: var(--primary-color);
}

.comment-content {
    flex: 1;
}

.comment-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    font-size: 0.9rem;
    color: var(--text-light);
}

.comment-text p {
    margin-bottom: 10px;
}

.comment-reply {
    font-weight: 500;
    color: var(--primary-color);
}

.comment-form {
    background-color: #f6f9fc;
    padding: 30px;
    border-radius: var(--radius);
}

.comment-form h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.comment-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.comment-form-row .form-group {
    flex: 1;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.comment-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form-consent {
    margin-bottom: 20px;
}

.comment-form-consent label {
    display: inline;
    font-weight: normal;
}

.comment-form .btn {
    padding: 12px 25px;
}

/* Responsive Adjustments for Blog */
@media (max-width: 768px) {
    .blog-post {
        flex-direction: column;
    }
    
    .blog-post-image {
        max-width: 100%;
        height: 200px;
    }
    
    .comment-form-row {
        flex-direction: column;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-previous,
    .nav-next {
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .blog-content {
        grid-template-columns: 1fr;
    }
    
    .article-hero .container {
        flex-direction: column;
    }
    
    .article-image {
        margin-top: 30px;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .comment-avatar {
        margin-bottom: 15px;
    }
    
    .related-posts {
        grid-template-columns: 1fr;
    }
}