/* Blog Post Header */
.blog-post-header {
    background-color: var(--secondary-color);
    padding: 80px 0;
    text-align: center;
}

.blog-post-header h1 {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 2.8rem;
    line-height: 1.2;
}

.post-meta {
    margin-bottom: 20px;
    justify-content: center;
}

.post-category {
    background-color: var(--primary-color);
    color: white;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 1rem;
}

.post-category a {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--dark-color);
}

.post-date {
    color: #666;
    font-size: 0.9rem;
}

.post-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.default-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.author-info {
    text-align: left;
}

.author-name {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
}

.author-title {
    font-size: 0.9rem;
    color: #777;
}

/* Post Content */
.blog-post-content {
    padding: 60px 0;
}

.post-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.featured-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

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

.post-body {
    padding: 40px;
    line-height: 1.7;
    color: #444;
}

.post-body h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.post-body h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

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

.post-body ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

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

.post-body blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: rgba(var(--primary-color-rgb), 0.05);
    font-style: italic;
}

.post-body blockquote p {
    margin-bottom: 0;
}

.post-image {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    background-color: #f9f9f9;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.post-tags {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.post-tags span {
    font-weight: 600;
    margin-right: 0.5rem;
}

.post-tags a {
    display: inline-block;
    background-color: #f1f1f1;
    padding: 0.3rem 0.8rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #666;
    transition: var(--transition);
}

.post-tags a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.post-share {
    margin: 2rem 0;
    display: flex;
    align-items: center;
}

.post-share span {
    font-weight: 600;
    margin-right: 1rem;
}

.post-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #f1f1f1;
    color: #666;
    margin-right: 0.8rem;
    transition: var(--transition);
}

.post-share a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.prev-post, .next-post {
    width: 48%;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    transition: var(--transition);
}

.prev-post:hover, .next-post:hover {
    background-color: #f1f1f1;
    text-decoration: none;
}

.prev-post span, .next-post span {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.prev-post h3, .next-post h3 {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin: 0;
}

.next-post {
    text-align: right;
}

.post-author-bio {
    display: flex;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.post-author-bio .author-avatar {
    width: 100px;
    height: 100px;
    margin-right: 2rem;
}

.author-details h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.author-details .author-title {
    display: block;
    margin-bottom: 1rem;
    color: #666;
}

.author-social {
    margin-top: 1rem;
}

.author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #eee;
    color: #666;
    margin-right: 0.8rem;
    transition: var(--transition);
}

.author-social a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.related-posts {
    margin-bottom: 3rem;
}

.related-posts h3 {
    margin-bottom: 1.5rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.related-post {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.related-post-image {
    height: 150px;
    overflow: hidden;
}

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

.related-post:hover .related-post-image img {
    transform: scale(1.1);
}

.related-post h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1rem;
}

.related-post h4 a {
    color: var(--dark-color);
    transition: var(--transition);
}

.related-post h4 a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.post-comments {
    margin-bottom: 3rem;
}

.post-comments h3 {
    margin-bottom: 2rem;
}

.comment {
    display: flex;
    margin-bottom: 2rem;
}

.comment.reply {
    margin-left: 4rem;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex-grow: 1;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    position: relative;
}

.comment-content:before {
    content: '';
    position: absolute;
    left: -10px;
    top: 20px;
    border-width: 10px 10px 10px 0;
    border-style: solid;
    border-color: transparent #f9f9f9 transparent transparent;
}

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

.comment-meta h4 {
    margin: 0;
    font-size: 1.1rem;
}

.comment-meta span {
    color: #666;
    font-size: 0.9rem;
}

.reply-btn {
    display: inline-block;
    margin-top: 0.8rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.comment-form h3 {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

/* Sidebar */
.post-sidebar {
    position: sticky;
    top: 20px;
}

.sidebar-section {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.sidebar-section h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.about-author .author-bio {
    text-align: center;
}

.about-author img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.about-author h4 {
    margin-bottom: 0.5rem;
}

.about-author .author-role {
    color: #666;
    margin-bottom: 1rem;
}

.about-author .author-social {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.categories ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories li {
    border-bottom: 1px solid #eee;
}

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

.categories a {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    color: #333;
    transition: var(--transition);
}

.categories a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.categories span {
    color: #666;
    font-size: 0.9rem;
}

.popular-post {
    margin-bottom: 1.5rem;
}

.popular-post:last-child {
    margin-bottom: 0;
}

.popular-post a {
    display: flex;
    color: #333;
    transition: var(--transition);
}

.popular-post a:hover {
    text-decoration: none;
}

.popular-post-image {
    width: 80px;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    margin-right: 1rem;
    flex-shrink: 0;
}

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

.popular-post:hover .popular-post-image img {
    transform: scale(1.1);
}

.popular-post-title h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    line-height: 1.4;
    transition: var(--transition);
}

.popular-post:hover .popular-post-title h4 {
    color: var(--primary-color);
}

.popular-post-title .post-date {
    color: #666;
    font-size: 0.85rem;
}

.cta-box {
    text-align: center;
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.cta-box p {
    margin-bottom: 1.5rem;
}

.cta-box .btn {
    display: block;
    width: 100%;
}

.newsletter-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.newsletter-form .btn {
    width: 100%;
}

/* Additional Blog Post Elements */

/* Code Blocks */
.post-body pre {
    background-color: #f5f5f5;
    border-radius: 5px;
    padding: 1.5rem;
    margin: 2rem 0;
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    border-left: 3px solid var(--primary-color);
}

.post-body code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #d63384;
}

.post-body pre code {
    background-color: transparent;
    padding: 0;
    color: #333;
}

/* Table Styles */
.post-body table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.post-body table th,
.post-body table td {
    padding: 0.8rem;
    border: 1px solid #ddd;
    text-align: left;
}

.post-body table th {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    font-weight: 600;
}

.post-body table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.post-body table tr:hover {
    background-color: #f5f5f5;
}

/* Image Gallery */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.image-gallery-item {
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

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

.image-gallery-item:hover img {
    transform: scale(1.05);
}

/* Pull Quote */
.pull-quote {
    float: right;
    width: 40%;
    margin: 0 0 1.5rem 1.5rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.5;
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
}

.pull-quote-left {
    float: left;
    margin: 0 1.5rem 1.5rem 0;
}

/* Reading Time */
.reading-time {
    display: inline-block;
    margin-left: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.reading-time i {
    margin-right: 0.5rem;
}

/* Table of Contents */
.table-of-contents {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid #eee;
}

.table-of-contents h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.table-of-contents ol {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: var(--primary-color);
}

/* Social Sharing Sticky */
.social-sharing-sticky {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 99;
}

.social-sharing-sticky a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    color: #666;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.social-sharing-sticky a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Author Bio Expanded */
.author-bio-expanded {
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 10px;
    margin: 3rem 0;
    display: flex;
    gap: 2rem;
}

.author-bio-expanded .author-image {
    flex: 0 0 120px;
}

.author-bio-expanded .author-image img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

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

.author-bio-expanded h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.author-bio-expanded .author-role {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.author-bio-expanded p {
    margin-bottom: 1rem;
}

.author-bio-expanded .author-social {
    display: flex;
    gap: 0.8rem;
}

.author-bio-expanded .author-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #eee;
    color: #666;
    transition: var(--transition);
}

.author-bio-expanded .author-social a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* Newsletter Box in Content */
.content-newsletter {
    background-color: rgba(var(--primary-color-rgb), 0.05);
    padding: 2rem;
    border-radius: 10px;
    margin: 3rem 0;
    text-align: center;
}

.content-newsletter h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.content-newsletter p {
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.content-newsletter-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    gap: 0.8rem;
}

.content-newsletter-form input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Raleway', sans-serif;
}

.content-newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

/* Post Series Navigation */
.post-series {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.post-series h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.post-series-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.post-series-items li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
}

.post-series-items li:last-child {
    border-bottom: none;
}

.post-series-items .current {
    font-weight: 600;
    color: var(--primary-color);
}

.post-series-items a {
    color: var(--dark-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-series-items a:hover {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    
    .post-sidebar {
        position: static;
        margin-top: 3rem;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .social-sharing-sticky {
        display: none;
    }
    
    .pull-quote {
        width: 100%;
        float: none;
        margin: 2rem 0;
    }
    
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-post-header h1 {
        font-size: 2rem;
    }
    
    .post-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .post-author-bio .author-avatar {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .prev-post, .next-post {
        width: 100%;
    }
    
    .next-post {
        text-align: left;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .table-of-contents {
        margin: 1.5rem 0;
        padding: 1.2rem;
    }
    
    .content-newsletter {
        padding: 1.5rem;
    }
    
    .content-newsletter-form {
        flex-direction: column;
    }
    
    .author-bio-expanded {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .author-bio-expanded .author-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .post-body pre {
        padding: 1rem;
    }
    
    .post-body table {
        display: block;
        width: 100%;
        overflow-x: auto;
    }
}