/* Single Post Styles */

/* Remove gray background, make everything white */
body.single-post {
    background-color: #ffffff;
}

.single-post-wrapper {
    background-color: #ffffff;
}

.single-post-container {
    max-width: 848px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: #ffffff;
}

/* Title Section */
.article-title-section {
    margin-bottom: 40px;
}

/* Tags */
.article-tags {
    margin-bottom: 16px;
}

.tag-label {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    color: #0056b3;
    background: #e6f0ff;
    padding: 2px 6px;
    border-radius: 25px;
    margin-right: 8px;
    height: 24px;
    width: 85px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.tag-label:hover {
    background-color: #d4e5ff;
}

/* Article Title */
.article-title {
    font-size: 48px;
    color: #FF6F00;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    font-family: 'Lato', sans-serif;
}

/* Article Summary */
.article-summary {
    font-size: 20px;
    color: #4B5563;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Meta Information */
.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: #111827;
    font-size: 16px;
}

.author-title {
    font-size: 14px;
    color: #6B7280;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #6B7280;
    font-size: 14px;
}

.reading-time::before {
    content: "•";
    margin-right: 16px;
}

/* Section Divider */
.section-divider {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 40px 0;
}

/* Article Content */
.article-content {
    margin-bottom: 60px;
}

.featured-image {
    margin-bottom: 40px;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Post Content Typography */
.post-content {
    font-family: 'Lato', sans-serif;
    font-size: 18px;
    color: #111827;
    line-height: 1.8;
    font-weight: 400;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #111827;
    margin: 32px 0 16px 0;
    line-height: 1.3;
}

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

/* Blockquote Styles */
.post-content blockquote {
    position: relative;
    padding: 20px 24px;
    margin: 32px 0;
    background-color: #F9FAFB;
    border-left: 4px solid #FF6F00;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.post-content blockquote::before,
.post-content blockquote::after {
    content: '';
    font-size: 24px;
    color: #9CA3AF;
}

.post-content blockquote p {
    margin: 0;
    color: #374151;
}

/* Links in content */
.post-content a {
    color: #FF6F00;
    text-decoration: underline;
}

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

/* Lists */
.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.post-content li {
    margin-bottom: 8px;
}

/* Images in content */
.post-content img {
    max-width: 100%;
    height: auto;
    margin: 24px 0;
    border-radius: 8px;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background-color: #F9FAFB;
    border-radius: 8px;
    margin-bottom: 60px;
}

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

.author-details {
    flex: 1;
}

.author-details .author-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.author-bio {
    color: #4B5563;
    line-height: 1.6;
}

/* Related Posts Section */
.related-posts-section {
    background-color: #ffffff;
    padding: 60px 60px;
    margin: 0;
}

.related-posts-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0;
}

.section-header {
    margin-bottom: 32px;
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
}

.section-title .arrow-icon {
    width: 24px;
    height: 24px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 315px);
    gap: 24px;
    justify-content: center;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

.related-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    width: 315px;
    height: 264px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.related-post-card .post-thumbnail-link {
    display: block;
    position: relative;
    height: 134px;
    overflow: hidden;
}

.related-post-card .post-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card .no-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #F3F4F6;
}

.related-post-card .post-content {
    padding: 16px;
    height: 130px;
    display: flex;
    flex-direction: column;
}

.related-post-card .featured-label {
    font-size: 12px;
    font-weight: bold;
    color: #0056b3;
    background: #e6f0ff;
    padding: 4px 12px;
    border-radius: 25px;
    display: inline-block;
    margin: 0 0 10px 0;
    height: 22px;
    width: fit-content;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    line-height: 14px;
}

.related-post-card .post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 2.6em; /* 16px × 1.3 × 2行 = 41.6px */
    height: auto;
}

.related-post-card .post-title a {
    color: #111827;
    text-decoration: none;
}

.related-post-card .post-title a:hover {
    color: #FF6F00;
}

.related-post-card .post-meta {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-top: auto;
    height: 24px;
}

.related-post-card .post-author {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 24px;
}

.related-post-card .post-author img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 315px);
    }
    
    .related-posts-section {
        padding: 60px 40px;
    }
}

@media (max-width: 1080px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 315px);
    }
    
    .related-posts-section {
        padding: 50px 30px;
    }
}

@media (max-width: 720px) {
    .related-posts-grid {
        grid-template-columns: 315px;
    }
}

@media (max-width: 768px) {
    .single-post-container {
        padding: 20px 16px;
    }

    .article-title {
        font-size: 36px;
    }

    .article-summary {
        font-size: 18px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .meta-right {
        width: 100%;
    }

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

    .post-content h1,
    .post-content h2,
    .post-content h3,
    .post-content h4,
    .post-content h5,
    .post-content h6 {
        font-size: 20px;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .related-posts-section {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .article-title {
        font-size: 28px;
    }
    
    /* Related posts grid - mobile center alignment */
    .related-posts-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .related-post-card {
        width: 315px !important;
        margin: 0 auto !important;
    }
    
    /* Post title height consistency */
    .related-post-card .post-title {
        height: 40px !important;
        line-height: 1.25 !important;
    }
}

/* Hide default WordPress post navigation */
.navigation.post-navigation {
    display: none;
}

/* Comments section styling */
#comments {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #E5E7EB;
}