/*
 * Fixydo Theme: Single Post Styles
 */

/* --- FONTS --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Source+Serif+Pro:wght@400;700&display=swap');

/* --- VARIABLES --- */
:root {
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Source Serif Pro', serif;
    --color-text: #2c3e50;
    --color-text-light: #7f8c8d;
    --color-primary: #4F46E5; /* Indigo color from screenshot */
    --color-bg: #F3F4F6; /* Light grey background */
    --color-border: #eaeaee;
    --content-width: 1200px; /* Wider layout */
    --border-radius: 12px;
    --shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
}

/* --- BASE & LAYOUT --- */
body.single-post { background-color: var(--color-bg); font-family: var(--font-body); }
.reading-progress-bar { position: fixed; top: 0; left: 0; height: 4px; background: var(--color-primary); width: 0%; z-index: 9999; }
.new-gen-container { display: flex; gap: 30px; max-width: var(--content-width); margin: 40px auto; padding: 0 20px; align-items: flex-start; }
.content-area { flex: 1; min-width: 0; }
.post-content-card { background-color: #fff; border-radius: var(--border-radius); padding: 40px; box-shadow: var(--shadow); }
.post-sidebar { width: 320px; flex-shrink: 0; position: relative; }
.sidebar-inner { width: 320px; }

/* --- POST HEADER --- */
.post-header { text-align: left; margin-bottom: 30px; }
.post-title { font-family: var(--font-heading); font-size: 2.5rem; font-weight: 700; color: var(--color-text); line-height: 1.25; margin: 0 0 15px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; font-size: 0.875rem; color: var(--color-text-light); font-family: var(--font-heading); }
.author-meta { display: flex; align-items: center; gap: 8px; }
.author-meta img { border-radius: 50%; }
.author-name a { color: var(--color-text); text-decoration: none; font-weight: 500; }
.author-name a:hover { color: var(--color-primary); }
.meta-separator { color: #ccc; }
.meta-category-button {
    background-color: var(--color-primary);
    color: #fff !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 4px;
    transition: background-color 0.2s ease;
}
.meta-category-button:hover { background-color: #3e3ab5; }

/* --- FEATURED IMAGE --- */
.post-featured-image { margin: 0 0 30px; border-radius: var(--border-radius); overflow: hidden; }
.post-featured-image img { width: 100%; height: auto; display: block; }
.post-featured-image figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--color-text-light); text-align: center; font-style: italic; }

/* --- POST BODY --- */
.post-body { font-size: 1.1rem; line-height: 1.75; color: var(--color-text); }
.post-body h2, .post-body h3, .post-body h4 { font-family: var(--font-heading); font-weight: 700; margin: 2em 0 0.8em; }
.post-body h2 { font-size: 1.75rem; }
.post-body h3 { font-size: 1.4rem; }
.post-body h4 { font-size: 1.2rem; }
.post-body p, .post-body ul, .post-body ol { margin-bottom: 1.5em; }
.post-body a { color: var(--color-primary); text-decoration: none; border-bottom: 1px solid var(--color-primary); }
.post-body hr { border: 0; height: 1px; background-color: var(--color-border); margin: 2.5em 0; }
.post-body blockquote { border-left: 3px solid var(--color-primary); padding: 10px 20px; margin: 2em 0; background-color: #f9f9f9; font-style: italic; }
.post-body blockquote p { margin-bottom: 0; }
.post-body img { max-width: 100%; height: auto; border-radius: 4px; }

/* --- RELATED POSTS (NEW CARD STYLE) --- */
.related-posts-section { margin-top: 50px; }
.section-title { font-family: var(--font-heading); text-align: left; font-size: 1.5rem; margin-bottom: 25px; font-weight: 700; color: var(--color-text); }
.related-posts-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 25px; }
.related-post-card {
    background-color: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.related-post-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); }
.related-post-card a { text-decoration: none; }
.related-post-image-link { display: block; }
.related-post-image-wrapper { width: 100%; aspect-ratio: 16 / 9; background-color: var(--color-border); }
.related-post-image, .related-post-placeholder { width: 100%; height: 100%; object-fit: cover; }
.related-post-content { padding: 20px; }
.related-post-title { font-family: var(--font-heading); font-size: 1.1rem; margin: 0 0 8px; line-height: 1.4; font-weight: 700; }
.related-post-title a { color: var(--color-text); }
.related-post-title a:hover { color: var(--color-primary); }
.related-post-date { font-size: 0.8rem; color: var(--color-text-light); font-family: var(--font-heading); }

/* --- SIDEBAR STYLES --- */
.sidebar-widget { background-color: #fff; padding: 20px; border-radius: var(--border-radius); box-shadow: var(--shadow); margin-bottom: 25px; }
.sidebar-widget-title { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; margin: 0 0 15px; color: var(--color-text); }
.sidebar-post-list { list-style: none; padding: 0; margin: 0; }
.sidebar-post-list li:last-child .sidebar-post-item { border-bottom: none; padding-bottom: 0; }
.sidebar-post-list li:first-child .sidebar-post-item { padding-top: 0; }
.sidebar-post-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--color-border); text-decoration: none; }
.sidebar-post-image { width: 50px; height: 50px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.sidebar-post-image img, .sidebar-post-placeholder { width: 100%; height: 100%; object-fit: cover; background-color: #f0f0f0; }
.sidebar-post-title { font-family: var(--font-heading); font-weight: 500; font-size: 0.9rem; color: var(--color-text); line-height: 1.4; transition: color 0.2s ease; }
.sidebar-post-item:hover .sidebar-post-title { color: var(--color-primary); }

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .new-gen-container { flex-direction: column; }
    .post-sidebar { width: 100%; margin-top: 40px; }
    .sidebar-inner { position: static !important; width: 100%; }
    .post-title { font-size: 2.25rem; }
    .post-content-card { padding: 30px; }
    .related-posts-grid { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
    .post-content-card { padding: 20px; }
    .post-title { font-size: 1.8rem; }
}