/* Blog Template Styles */

.blog-content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 60px 0;
}

/* Header fix for scrolling */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: white;
}

/* Sidebar Styles */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    margin-bottom: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
}

.sidebar-section h3 {
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.article-list {
    list-style: none;
}

.article-list li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.article-list a {
    display: flex;
    align-items: flex-start;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-list a:hover {
    color: var(--accent-color);
}

.article-list .article-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.article-list .article-info {
    flex: 1;
}

.article-list .article-title {
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.4;
    font-size: 15px;
}

.article-list .article-meta {
    font-size: 12px;
    color: var(--text-light);
}

.categories-list-sidebar {
    list-style: none;
}

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

.categories-list-sidebar a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.categories-list-sidebar a:hover {
    color: var(--accent-color);
}

.categories-list-sidebar .category-count {
    background-color: var(--light-color);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.search-form-sidebar {
    display: flex;
    margin-bottom: 10px;
}

.search-form-sidebar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.search-form-sidebar button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form-sidebar button:hover {
    background-color: #c0392b;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tags-cloud a {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--light-color);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
}

.tags-cloud a:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Main Content Styles */
.blog-main-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    padding: 40px;
}

.article-header {
    margin-bottom: 30px;
}

.article-category-label {
    display: inline-block;
    padding: 5px 12px;
    background-color: var(--light-color);
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.article-title {
    font-size: 32px;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.article-meta-info {
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 20px;
}

.article-meta-info .author {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 10px;
}

.article-meta-info .date {
    margin-right: 20px;
}

.article-meta-info .read-time {
    display: flex;
    align-items: center;
}

.article-meta-info .read-time i {
    margin-right: 5px;
}

.article-featured-image {
    width: 100%;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 16px;
}

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

.article-content h2 {
    font-size: 24px;
    margin: 40px 0 20px;
    color: var(--dark-color);
}

.article-content h3 {
    font-size: 20px;
    margin: 30px 0 15px;
    color: var(--dark-color);
}

.article-content ul, .article-content ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

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

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

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    margin: 20px 0;
    background-color: var(--light-color);
    font-style: italic;
}

.article-content code {
    background-color: #f8f9fa;
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
}

.article-content pre {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

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

.article-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-tags .tags-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.article-share {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.article-share .share-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.share-button:hover {
    opacity: 0.8;
}

.share-button.twitter {
    background-color: #1DA1F2;
}

.share-button.facebook {
    background-color: #4267B2;
}

.share-button.linkedin {
    background-color: #0077B5;
}

.share-button.email {
    background-color: #D44638;
}

.author-bio {
    margin-top: 40px;
    padding: 30px;
    background-color: var(--light-color);
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
}

.author-bio .author-avatar {
    width: 80px;
    height: 80px;
    margin-right: 20px;
}

.author-bio-content {
    flex: 1;
}

.author-bio-content h4 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

.author-bio-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.author-social {
    display: flex;
    gap: 10px;
}

.author-social a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-social a:hover {
    color: var(--accent-color);
}

.related-articles {
    margin-top: 60px;
}

.related-articles h3 {
    margin-bottom: 30px;
    color: var(--dark-color);
    font-size: 24px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-article {
    background-color: var(--light-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.related-article:hover {
    transform: translateY(-5px);
}

.related-article-image {
    height: 150px;
    background-size: cover;
    background-position: center;
}

.related-article-content {
    padding: 20px;
}

.related-article-title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 10px;
    font-weight: 600;
}

.related-article-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-article-title a:hover {
    color: var(--accent-color);
}

.related-article-meta {
    font-size: 12px;
    color: var(--text-light);
}

.comments-section {
    margin-top: 60px;
}

.comments-section h3 {
    margin-bottom: 30px;
    color: var(--dark-color);
    font-size: 24px;
}

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

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

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #eee;
    margin-right: 15px;
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
}

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

.comment-content {
    line-height: 1.6;
    color: var(--text-color);
}

.comment-form {
    margin-top: 40px;
}

.comment-form h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

.comment-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.comment-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

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

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

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

.comment-form button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.comment-form button:hover {
    background-color: #c0392b;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .blog-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
        margin-bottom: 40px;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .blog-main-content {
        padding: 25px;
    }
    
    .article-title {
        font-size: 28px;
    }
    
    .article-featured-image {
        height: 300px;
    }
    
    .author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .author-bio .author-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .related-articles-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .article-meta-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .article-meta-info .author,
    .article-meta-info .date {
        margin-bottom: 10px;
    }
}
