/**
 * Single Post Page Styles
 * 
 * Styles for the default WordPress single post template
 */

.single-post-page {
    padding: var(--spacing-xl) 0 var(--spacing-xxl);
    background: #f8fafb;
}

/* ============================================
   Container
   ============================================ */

.single-post-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ============================================
   Back Navigation
   ============================================ */

.post-back-nav {
    margin-bottom: var(--spacing-lg);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7b89;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: #154D8C;
}

.back-link svg {
    transition: transform 0.2s ease;
}

.back-link:hover svg {
    transform: translateX(-2px);
}

/* ============================================
   Post Header
   ============================================ */

.post-header {
    background: transparent;
    border-radius: 0;
    margin-bottom: var(--spacing-xl);
    box-shadow: none;
}

.post-header-main {
    max-width: 900px;
}

.post-categories {
    margin-bottom: var(--spacing-md);
}

.category-badge {
    display: inline-block;
    background: #E8F4F8;
    color: #154D8C;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-badge:hover {
    background: #154D8C;
    color: #fff;
}

.post-title {
    font-size: 42px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 var(--spacing-lg) 0;
}

.post-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

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

.meta-item svg {
    color: #9ca3af;
    flex-shrink: 0;
}

/* ============================================
   Featured Image
   ============================================ */

.post-featured-image {
    margin-bottom: var(--spacing-xl);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

.image-caption {
    padding: var(--spacing-sm) var(--spacing-md);
    background: #f0f4f7;
    color: #6b7b89;
    font-size: 13px;
    font-style: italic;
    text-align: center;
}

/* ============================================
   Post Article
   ============================================ */

.post-article {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: var(--spacing-xl);
}

/* Entry Content */
.post-article .entry-content {
    color: #374151;
    font-size: 17px;
    line-height: 1.8;
}

.post-article .entry-content h1,
.post-article .entry-content h2,
.post-article .entry-content h3,
.post-article .entry-content h4,
.post-article .entry-content h5,
.post-article .entry-content h6 {
    color: #111827;
    font-weight: 700;
    margin: var(--spacing-xl) 0 var(--spacing-md) 0;
    line-height: 1.3;
}

.post-article .entry-content h2 {
    font-size: 32px;
    padding-top: var(--spacing-md);
    border-top: 2px solid #E9F0F5;
}

.post-article .entry-content h2:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.post-article .entry-content h3 {
    font-size: 26px;
}

.post-article .entry-content h4 {
    font-size: 22px;
}

.post-article .entry-content p {
    margin: 0 0 var(--spacing-md) 0;
}

.post-article .entry-content p img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Handle WordPress image alignment classes */
.post-article .entry-content img.alignleft {
    float: left;
    margin: 0 var(--spacing-lg) var(--spacing-md) 0;
}

.post-article .entry-content img.alignright {
    float: right;
    margin: 0 0 var(--spacing-md) var(--spacing-lg);
}

.post-article .entry-content img.aligncenter {
    display: block;
    margin: 0 auto var(--spacing-md);
}

/* Clear floats after images */
.post-article .entry-content::after {
    content: "";
    display: table;
    clear: both;
}

.post-article .entry-content ul,
.post-article .entry-content ol {
    margin: var(--spacing-md) 0;
    padding-left: var(--spacing-xl);
}

.post-article .entry-content li {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.post-article .entry-content a {
    color: #154D8C;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.post-article .entry-content a:hover {
    border-bottom-color: #154D8C;
}

.post-article .entry-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: 8px;
}

.post-article .entry-content blockquote {
    margin: var(--spacing-lg) 0;
    padding: var(--spacing-md) var(--spacing-lg);
    border-left: 4px solid #154D8C;
    background: #f0f7fb;
    border-radius: 4px;
    font-style: italic;
    color: #4b5563;
}

.post-article .entry-content code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e11d48;
}

.post-article .entry-content pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: var(--spacing-md);
    border-radius: 8px;
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

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

.page-links {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid #e5e7eb;
    font-weight: 600;
}

/* ============================================
   Tags Section
   ============================================ */

.post-tags-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin: var(--spacing-xl) 0;
}

.tags-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7b89;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.tags-label svg {
    color: #9ca3af;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-badge {
    display: inline-block;
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag-badge:hover {
    background: #154D8C;
    color: #fff;
}

/* ============================================
   Author Bio
   ============================================ */

.post-author-bio {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, #F6FBFF 0%, #F0F7FB 100%);
    border-radius: 12px;
    margin-top: var(--spacing-xl);
}

.author-avatar {
    flex-shrink: 0;
}

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

.author-info {
    flex: 1;
}

.author-name {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 var(--spacing-sm) 0;
}

.author-description {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 var(--spacing-sm) 0;
}

.view-all-posts {
    color: #154D8C;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.view-all-posts:hover {
    color: #0d3a6b;
}

/* ============================================
   Post Navigation
   ============================================ */

.post-navigation-wrapper {
    margin: var(--spacing-xxl) 0;
}

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-previous:hover,
.nav-next:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.nav-previous {
    text-align: left;
}

.nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7b89;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

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

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
    color: #154D8C;
}

/* ============================================
   Related Posts
   ============================================ */

.related-posts-section {
    margin: var(--spacing-xxl) 0;
    padding: var(--spacing-xxl) 0;
    border-top: 2px solid #e9ecef;
}

.related-posts-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 var(--spacing-xl) 0;
}

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

.related-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.related-post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.related-post-thumbnail {
    display: block;
    overflow: hidden;
}

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

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

.related-post-content {
    padding: var(--spacing-md);
}

.related-post-category {
    display: inline-block;
    background: #E8F4F8;
    color: #154D8C;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.related-post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 var(--spacing-sm) 0;
}

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

.related-post-title a:hover {
    color: #154D8C;
}

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

/* ============================================
   Comments Wrapper
   ============================================ */

.comments-wrapper {
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-xxl);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1200px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .post-title {
        font-size: 36px;
    }

    .post-article {
        padding: var(--spacing-xl);
    }

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

    .post-article .entry-content h2 {
        font-size: 28px;
    }

    .post-article .entry-content h3 {
        font-size: 24px;
    }

    .post-navigation {
        grid-template-columns: 1fr;
    }

    .nav-next {
        text-align: left;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 32px;
    }

    .post-article {
        padding: var(--spacing-lg);
    }

    .post-author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

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

    .post-tags-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .comments-wrapper {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 480px) {
    .single-post-container {
        max-width: 350px;
        padding: 0;
    }

    .post-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .post-header {
        margin-bottom: 0;
    }

    .post-article {
        padding: var(--spacing-md);
        border-radius: 8px;
    }

    .post-article .entry-content {
        font-size: 15px;
    }

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

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

    .post-featured-image {
        border-radius: 8px;
    }

    .related-posts-title {
        font-size: 24px;
    }
}
