/**
 * Single Post Styles
 * Styles specific to single post pages
 */

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.article-meta .post-categories {
    margin-right: 1rem;
}

.article-meta .post-date {
    display: flex;
    align-items: center;
}

.article-meta .post-date i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Featured Image */
.featured-image {
    position: relative;
    margin: 2rem 0;
    border-radius: 4px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.featured-image:hover img {
    transform: scale(1.02);
}

/* Article Content */
.article-content {
    line-height: 1.8;
    color: var(--text-color);
    font-size: 1.1rem;
}

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

.article-content h2,
.article-content h3,
.article-content h4 {
    margin: 2rem 0 1.5rem;
    color: var(--secondary-color);
}

.article-content h2 {
    font-size: 1.8rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.3rem;
}

/* Blockquotes */
.article-content blockquote {
    border-right: 4px solid var(--primary-color);
    background-color: #f9f9f9;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    font-style: italic;
    position: relative;
}

.article-content blockquote:before {
    content: '\201C';
    font-family: Georgia, serif;
    font-size: 4rem;
    position: absolute;
    left: 10px;
    top: 10px;
    color: var(--primary-color);
    opacity: 0.3;
}

/* Author Box */
.author-box {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 2rem;
    margin: 3rem 0;
    display: flex;
    align-items: flex-start;
}

.author-avatar {
    flex: 0 0 100px;
    margin-right: 2rem;
}

.author-avatar img {
    border-radius: 50%;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.author-info h4 {
    margin: 0 0 0.5rem;
    font-size: 1.3rem;
}

.author-bio {
    color: #555;
    margin-bottom: 0.5rem;
}

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

.author-social a {
    display: inline-block;
    margin-right: 0.75rem;
    color: #666;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

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

/* Social Sharing */
.social-sharing {
    margin: 2.5rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-title {
    display: inline-block;
    margin-right: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

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

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: #fff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

.share-btn i {
    font-size: 1rem;
}

/* Related Posts */
.related-posts {
    margin: 4rem 0;
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.related-post {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.related-post-thumbnail {
    height: 200px;
    overflow: hidden;
}

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

.related-post:hover .related-post-thumbnail img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.5rem;
}

.related-post-title {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.related-post-meta {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
}

.related-post-meta i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Comments Section */
.comments-area {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.comments-title {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--secondary-color);
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.comment-body {
    position: relative;
    padding-left: 90px;
    min-height: 80px;
}

.comment-author {
    margin-bottom: 0.5rem;
}

.comment-author img {
    position: absolute;
    left: 0;
    top: 0;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-meta {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #666;
}

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

.comment-reply-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

.comment-reply-link:hover {
    text-decoration: underline;
}

/* Comment Form */
.comment-respond {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 8px;
}

.comment-reply-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--secondary-color);
}

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

.comment-form-comment,
.comment-form-url,
.comment-form-comment {
    grid-column: 1 / -1;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(229, 43, 43, 0.2);
}

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

.form-submit {
    margin-top: 1rem;
}

.submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit:hover {
    background-color: var(--primary-dark);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin: 0 auto 1.5rem;
    }
    
    .author-info {
        text-align: center;
    }
    
    .author-social {
        justify-content: center;
    }
    
    .share-title {
        display: block;
        margin-bottom: 1rem;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .comment-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
    }
    
    .article-content h4 {
        font-size: 1.1rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-body {
        padding-left: 0;
        padding-top: 80px;
    }
    
    .comment-author img {
        top: -50px;
        left: 0;
    }
}

/* Print Styles */
@media print {
    .article-header,
    .article-content,
    .author-box,
    .social-sharing,
    .related-posts,
    .comments-area {
        max-width: 100%;
        padding: 0;
    }
    
    .site-header,
    .site-footer,
    .article-bar,
    .social-sharing,
    .related-posts,
    .comments-area {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    a {
        text-decoration: none;
        color: #000;
    }
    
    .article-title {
        page-break-before: always;
        page-break-after: avoid;
    }
    
    .article-content h2,
    .article-content h3,
    .article-content h4 {
        page-break-after: avoid;
    }
    
    .article-content p,
    .article-content ul,
    .article-content ol {
        page-break-inside: avoid;
    }
    
    @page {
        margin: 2cm;
    }
}
