/* ==========================================================================
   Single Post Styles
   ========================================================================== */

.single-post-wrapper {
    padding: var(--space-2xl) 0 var(--space-4xl);
}

/* Post Header */
.post-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.post-header__category {
    display: inline-block;
    color: var(--color-primary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    background: var(--color-primary-light);
    padding: 4px 12px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-md);
    transition: opacity var(--transition-fast);
}

.post-header__category:hover {
    opacity: 0.8;
}

.post-header__title {
    font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl));
    line-height: var(--lh-tight);
    margin-bottom: var(--space-xl);
    color: var(--color-text);
}

.post-header__meta {
    display: flex;
    justify-content: center;
}

.post-header__author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-align: right;
}

.post-header__avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.post-header__author-name {
    display: block;
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--color-text);
    margin-bottom: 2px;
}

.post-header__date-reading {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
}

/* Featured Image */
.post-featured-image {
    margin-bottom: var(--space-2xl);
}

.post-featured-image__img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Post Content Typography */
.post-content {
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
    color: var(--color-text);
}

.post-content p {
    margin-bottom: var(--space-xl);
}

.post-content h2 {
    font-size: var(--fs-2xl);
    margin: var(--space-2xl) 0 var(--space-lg);
    color: var(--color-text);
}

.post-content h3 {
    font-size: var(--fs-xl);
    margin: var(--space-xl) 0 var(--space-md);
}

.post-content ul, 
.post-content ol {
    margin-bottom: var(--space-xl);
    padding-right: var(--space-xl);
}

.post-content li {
    margin-bottom: var(--space-sm);
}

.post-content ul li {
    list-style-type: disc;
}

.post-content ul li::marker {
    color: var(--color-primary);
}

.post-content blockquote {
    margin: var(--space-2xl) 0;
    padding: var(--space-lg) var(--space-xl);
    border-right: 4px solid var(--color-primary);
    background: var(--color-bg-alt);
    border-radius: var(--radius-sm);
    font-size: var(--fs-xl);
    font-style: italic;
    color: var(--color-text);
}

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

.post-content img {
    border-radius: var(--radius-sm);
    margin: var(--space-xl) 0;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-primary-light);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all var(--transition-fast);
}

.post-content a:hover {
    background-color: var(--color-primary-light);
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin: var(--space-2xl) auto;
}

.post-tag {
    font-size: var(--fs-sm);
    color: var(--color-text-secondary);
    background: var(--color-bg-alt);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.post-tag:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
}

/* Post Share */
.post-share {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-3xl) auto;
    padding-top: var(--space-2xl);
    border-top: 1px solid var(--color-border-light);
}

.post-share__label {
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    color: var(--color-text);
}

.post-share__buttons {
    display: flex;
    gap: var(--space-md);
}

.post-share__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-bg-alt);
    color: var(--color-text);
    transition: all var(--transition-fast);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.post-share__btn:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
    transform: translateY(-2px);
}

/* Related Posts */
.related-posts {
    margin-top: var(--space-4xl);
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--color-border-light);
}

.related-posts__title {
    font-size: var(--fs-2xl);
    margin-bottom: var(--space-2xl);
}

.related-posts__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 768px) {
    .related-posts__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Infinite Scroll Loader */
.post-separator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.post-separator__line {
    width: 100px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin-bottom: var(--space-xl);
}
