/**
 * BMAD AI&D Single Post Styles
 * Professional single blog post design for KI-expertise content
 */

/* ==========================================================================
   SINGLE POST LAYOUT
   ========================================================================== */

.blog-single-main {
    background: #fafafa;
    padding: 40px 0 80px 0;
    min-height: 100vh;
}

.blog-single-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   POST HEADER
   ========================================================================== */

.single-post-header {
    margin-bottom: 40px;
}

/* Breadcrumbs */
.post-breadcrumbs {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.post-breadcrumbs a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.post-breadcrumbs a:hover {
    color: #764ba2;
}

.post-breadcrumbs .separator {
    color: #ccc;
}

.post-breadcrumbs .current {
    color: #999;
}

/* Post Meta Top */
.post-meta-top {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.category-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.category-badge:hover {
    transform: translateY(-2px);
}

/* Post Title */
.single-post-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 24px;
    word-wrap: break-word;
}

/* Post Meta Info */
.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.meta-icon {
    font-size: 18px;
}

/* ==========================================================================
   FEATURED IMAGE
   ========================================================================== */

.single-featured-image {
    margin: 40px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

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

/* ==========================================================================
   POST CONTENT
   ========================================================================== */

.single-post-content {
    background: white;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.single-entry-content {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 50px;
}

.single-entry-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 50px;
    margin-bottom: 20px;
    scroll-margin-top: 100px;
}

.single-entry-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin-top: 40px;
    margin-bottom: 16px;
    scroll-margin-top: 100px;
}

.single-entry-content p {
    margin-bottom: 24px;
}

.single-entry-content ul,
.single-entry-content ol {
    margin-bottom: 24px;
    padding-left: 30px;
}

.single-entry-content li {
    margin-bottom: 12px;
}

.single-entry-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 24px;
    margin: 32px 0;
    font-style: italic;
    color: #555;
    background: #f8f9ff;
    padding: 24px;
    border-radius: 8px;
}

.single-entry-content code {
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    color: #e83e8c;
}

.single-entry-content pre {
    background: #282c34;
    color: #abb2bf;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
}

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

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

/* Page Links */
.page-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.page-links-title {
    font-weight: 600;
    margin-right: 12px;
}

.page-links a,
.page-links > span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    background: #f4f4f4;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

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

/* ==========================================================================
   POST FOOTER
   ========================================================================== */

.single-post-footer {
    padding: 40px 0;
    border-top: 2px solid #e0e0e0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 50px;
}

/* Tags */
.post-tags {
    margin-bottom: 30px;
}

.tags-label {
    font-weight: 600;
    color: #666;
    margin-right: 12px;
}

.tag-link {
    display: inline-block;
    padding: 6px 14px;
    background: #f4f4f4;
    border-radius: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin: 4px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

/* Share Buttons */
.post-share {
    display: flex;
    align-items: center;
    gap: 16px;
}

.share-label {
    font-weight: 600;
    color: #666;
}

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

.share-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.twitter {
    background: #000000;
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.email {
    background: #666;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   AUTHOR BIO
   ========================================================================== */

.author-bio {
    display: flex;
    gap: 24px;
    padding: 40px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 12px;
    margin-bottom: 50px;
}

.author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.author-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
}

.author-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.author-link:hover {
    color: #764ba2;
}

/* ==========================================================================
   POST NAVIGATION
   ========================================================================== */

.post-navigation {
    margin-bottom: 60px;
}

.nav-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.nav-previous,
.nav-next {
    padding: 24px;
    background: #f8f9ff;
    border-radius: 12px;
    transition: all 0.3s;
}

.nav-previous:hover,
.nav-next:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.nav-previous:hover a,
.nav-next:hover a {
    color: white;
}

.nav-previous a,
.nav-next a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-subtitle {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

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

/* ==========================================================================
   RELATED POSTS
   ========================================================================== */

.related-posts {
    margin-bottom: 60px;
}

.related-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 30px;
}

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

.related-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.related-post-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

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

.related-post-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

.related-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.related-post-title a:hover {
    color: #667eea;
}

.related-post-meta {
    font-size: 13px;
    color: #999;
}

.related-post-meta .separator {
    margin: 0 8px;
}

/* ==========================================================================
   COMMENTS SECTION
   ========================================================================== */

.comments-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 2px solid #e0e0e0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.single-post-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 20px;
}

/* Table of Contents */
.toc-content {
    font-size: 14px;
}

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

.toc-list li {
    margin-bottom: 12px;
}

.toc-list li.h3 {
    padding-left: 20px;
}

.toc-list a {
    color: #666;
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
}

.toc-list a:hover {
    background: #f8f9ff;
    color: #667eea;
}

/* Newsletter Widget */
.widget-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.newsletter-form input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.subscribe-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.gdpr-notice {
    margin-top: 12px;
    font-size: 12px;
    color: #666;
    display: flex;
    gap: 8px;
}

.gdpr-notice input[type="checkbox"] {
    margin-top: 3px;
}

.gdpr-notice a {
    color: #667eea;
    text-decoration: none;
}

/* Categories Widget */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #666;
    border-radius: 6px;
    transition: all 0.2s;
}

.category-link:hover {
    background: #f8f9ff;
    color: #667eea;
}

.category-count {
    background: #f0f0f0;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-widget .widget-title {
    color: white;
}

.cta-widget .cta-description {
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    display: block;
    width: 100%;
    padding: 14px;
    background: white;
    color: #667eea;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cta-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-features .feature {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
}

/* ==========================================================================
   BOTTOM CTA SECTION
   ========================================================================== */

.single-bottom-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-top: 80px;
}

.single-bottom-cta .cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.single-bottom-cta .cta-content p {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: white;
    color: #667eea;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablets */
@media (max-width: 1024px) {
    .blog-single-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .single-post-sidebar {
        position: static;
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .blog-single-main {
        padding: 20px 0 40px 0;
    }

    .single-post-content {
        padding: 30px 20px;
    }

    .single-post-title {
        font-size: 28px;
    }

    .post-meta-info {
        flex-direction: column;
        gap: 12px;
    }

    .single-entry-content {
        font-size: 16px;
    }

    .single-entry-content h2 {
        font-size: 24px;
    }

    .single-entry-content h3 {
        font-size: 20px;
    }

    .nav-links {
        grid-template-columns: 1fr;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .author-bio {
        flex-direction: column;
        padding: 24px;
    }

    .single-bottom-cta .cta-content h2 {
        font-size: 24px;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .single-post-title {
        font-size: 24px;
    }

    .post-breadcrumbs {
        font-size: 12px;
    }

    .category-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
}
