/**
 * Single Blog Post Styles for SpeedRead Theme
 * Professional styling for individual blog post pages
 */

/* Site Main - Full Width Layout */
body.single .site-main,
body.single-post .site-main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Single Post Container - Full Width Layout */
body.single .single-container,
body.single-post .single-container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-sizing: border-box !important;
}

/* Post Article - Full Width Layout */
body.single .single-post,
body.single-post .single-post {
    background: #ffffff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Post Header - Full Width Hero Section */
body.single .post-header,
body.single-post .post-header {
    text-align: center !important;
    padding: 5rem 2rem 4rem !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    position: relative !important;
    border-bottom: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
}

.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="50" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="30" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

body.single-post .post-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.5rem !important;
    line-height: 1.2 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    position: relative !important;
    z-index: 1 !important;
    color: white !important;
}

body.single-post .post-meta {
    display: flex !important;
    justify-content: center !important;
    gap: 2rem !important;
    font-size: 1rem !important;
    opacity: 0.9 !important;
    position: relative !important;
    z-index: 1 !important;
    color: white !important;
}

body.single-post .post-meta span {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    backdrop-filter: blur(10px) !important;
}

body.single-post .post-meta a {
    color: white !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

body.single-post .post-meta a:hover {
    text-decoration: underline !important;
}

/* Post Thumbnail - Centered */
body.single-post .post-thumbnail {
    max-width: 900px !important;
    margin: -2rem auto 2rem !important;
    padding: 0 2rem !important;
    position: relative !important;
    z-index: 2 !important;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

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

/* Post Content - Centered Container */
body.single-post .post-content {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 3rem 2rem !important;
    font-size: 1.125rem !important;
    line-height: 1.8 !important;
    color: #374151 !important;
}

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

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    font-weight: 700;
}

.post-content h2 {
    font-size: 2rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: #667eea;
}

.post-content h4 {
    font-size: 1.25rem;
}

.post-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
}

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

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

.post-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

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

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post Footer - Centered */
body.single-post .post-footer {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 3rem 2rem !important;
    background: #f8fafc !important;
    border-top: 1px solid #e5e7eb !important;
}

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

.post-tags strong {
    display: block;
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1.1rem;
}

.post-tags a {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.post-tags a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Post Navigation - Centered */
body.single-post .post-navigation {
    max-width: 900px !important;
    margin: 3rem auto 0 !important;
    padding: 2rem !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.nav-previous:hover,
.nav-next:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.nav-subtitle {
    display: block;
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.nav-title {
    display: block;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Comments Section */
.comments-section {
    margin-top: 3rem;
    background: #f8fafc;
    padding: 2rem 0;
}

.comments-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.comments-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

/* Comment List */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem;
}

.comment-list .comment {
    margin-bottom: 2rem;
}

.comment-body {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author .avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-metadata {
    flex: 1;
}

.comment-metadata .fn {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1f2937;
    text-decoration: none;
    font-style: normal;
}

.comment-metadata .fn:hover {
    color: #667eea;
}

.comment-metadata time {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.comment-metadata time a {
    color: inherit;
    text-decoration: none;
}

.comment-metadata time a:hover {
    color: #667eea;
}

.edit-link {
    margin-left: 1rem;
    font-size: 0.875rem;
}

.edit-link a {
    color: #667eea;
    text-decoration: none;
}

.comment-awaiting-moderation {
    display: block;
    background: #fef3c7;
    color: #92400e;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-style: normal;
}

.comment-content {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 1rem;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    text-align: right;
}

.comment-reply-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.comment-reply-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Nested Comments */
.comment-list .children {
    list-style: none;
    margin-top: 2rem;
    margin-left: 2rem;
    padding-left: 2rem;
    border-left: 3px solid #e5e7eb;
}

/* Comment Form */
.comment-respond {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 2rem;
}

.comment-reply-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2rem;
    text-align: center;
}

.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: flex;
    flex-direction: column;
}

.comment-form label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.required {
    color: #ef4444;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.submit-button {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    justify-self: start;
}

.submit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Comment Navigation */
.comment-navigation {
    margin: 2rem 0;
    text-align: center;
}

.comment-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.comment-navigation a {
    background: #ffffff;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.comment-navigation a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.no-comments {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
}

/* Page Links */
.page-links {
    margin: 2rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.page-links a,
.page-links > span {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    text-decoration: none;
    color: #374151;
}

.page-links a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .single-container {
        padding: 1rem;
    }
    
    .post-header {
        padding: 2rem 1rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .post-thumbnail {
        margin: -0.5rem 1rem 1.5rem;
    }
    
    .post-content {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .post-footer {
        padding: 1.5rem;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-navigation {
        padding: 1.5rem;
    }
    
    .comments-container {
        padding: 0 1rem;
    }
    
    .comment-body {
        padding: 1.5rem;
    }
    
    .comment-respond {
        padding: 1.5rem;
    }
    
    .comment-list .children {
        margin-left: 1rem;
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .post-title {
        font-size: 1.75rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-footer {
        padding: 1rem;
    }
    
    .post-navigation {
        padding: 1rem;
    }
    
    .comments-container {
        padding: 0 0.5rem;
    }
    
    .comment-body {
        padding: 1rem;
    }
    
    .comment-respond {
        padding: 1rem;
    }
    
    .comment-list .children {
        margin-left: 0.5rem;
        padding-left: 0.5rem;
    }
    
    .comment-author {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-navigation .nav-links {
        flex-direction: column;
    }
}
