/* ===================================
   Single Post Template Styles
   =================================== */
.single-post-template {
    display: flex;
    justify-content: center;
}
.single-container {
    width: var(--container-max-width);
    margin: 0 var(--container-margin-inline);
}

/* Tags Section */
.tags-container {
    padding: 20px 0;
}

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

.post-tags a {
    background-color: #d0e7ff;
    color: var(--color-berkeley-blue);
    font-family: var(--font-family-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}
.post-tags a:hover {
    color: var(--color-science-blue);
    cursor: pointer;
}

/* Post Title - Matches page-sidebar.css .page-title styling */
.post-header {
    padding: var(--space-l) 0;
}

.post-title {
    font-family: var(--font-family-secondary);
    font-size: clamp(28px, 2vw + 28px, 59px);
    font-weight: var(--fw-medium);
    color: var(--color-berkeley-blue);
    margin: 0;
    line-height: 1.2;
}

@media (max-width: 1023px) {
    .post-header {
        padding: var(--space-m) 0;
    }

    .post-title {
        font-size: var(--page-title-font-size-mobile);
    }
}

@media (max-width: 650px) {
    .post-header {
        padding: var(--space-s) 0;
    }
}

/* Post Content Wrapper - Narrow Container */

.post-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Two Column Grid */
.post-grid {
    display: grid;
    grid-template-columns: 2fr 0.8fr;
    gap: 40px;
}

/* Main Content Column */
.post-content-column {
    min-width: 0;
}

/* Author and Meta Info Row */
.post-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
    font-family: var(--font-family-primary);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.meta-text {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.author-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
}

.author-link:hover {
    color: #0066cc;
}

.meta-separator {
    margin: 0 8px;
    color: #ccc;
}

/* Social Share Buttons */
.social-share {
    display: flex;
    gap: 10px;
}

.share-button {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #666;
}

.share-button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Featured Image */
.post-featured-image {
    margin-bottom: 30px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Post Content - Reference page-sidebar.css styling */
.entry-content {
    font-family: var(--font-family-primary);
    font-size: var(--copy-size-standard);
    line-height: 1.7;
    color: #333;
}

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

.entry-content h2 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #222;
}

.entry-content h3 {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 30px;
    margin-bottom: 16px;
    color: #222;
}

.entry-content h4 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #222;
}

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

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

.entry-content a {
    color: #0066cc;
    text-decoration: none;
}

.entry-content a:hover {
    text-decoration: underline;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 30px 0;
}

.entry-content blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
}

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

.related-posts-sidebar {
    position: relative;
    margin-bottom: 100px;
}

.related-posts-title {
    font-family: var(--font-family-primary);
    font-size: 28px;
    font-weight: var(--fw-semibold);
    color: black;
    padding: 0 0 50px 0;
    margin-top: 0px;
    border-bottom: 1px solid #cbcbcb;
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-m);
}

.related-post-item {
    padding-bottom: 48px;
    border-bottom: 1px solid #cbcbcb;
}

.related-post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.related-post-date {
    font-family: var(--font-family-primary);
    font-size: 12px;
    font-weight: 400;
    color: black;
    display: block;
    margin-bottom: 7px;
    text-transform: uppercase;
}

.related-post-title {
    font-family: var(--font-family-primary);
    font-size: var(--fs-500);
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.related-post-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color 0.2s ease;
}

.related-post-title a:hover,
.related-post-title a:focus {
    color: var(--color-science-blue);
}

@media (max-width: 1023px) {
    .single-container {
        width: var(--container-max-width);
        margin: 0 var(--mobile-horizontal-padding);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .social-share {
        width: 100%;
        justify-content: flex-start;
    }

    .related-posts-sidebar {
        margin-top: 40px;
        padding-top: 40px;
        margin-bottom: 100px;
        border-top: 2px solid #e0e0e0;
    }
}