/* ==========================================
   RISASTARS – Single Blog Post Styles
   Use alongside style.css and blog.css
   ========================================== */

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    color: #666;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
}

/* ---------- MATCHING HERO VARIANT FOR POST ---------- */
.blog-hero--post {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 350px;
    display: flex;
    align-items: center;
    padding: 80px 0;
    position: relative;
}

/* Ensure proper overlay layering and standard page-header alignment */
.blog-hero--post .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blog-hero--post .container.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.blog-hero--post .hero-copy {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
}

.blog-hero--post .hero-copy .eyebrow {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
}

.blog-hero--post .hero-copy h1 {
    font-size: 2.8rem;
    line-height: 1.3;
    margin: 15px 0 20px;
    color: #ffffff;
}

.blog-hero--post .hero-copy .lead {
    font-size: 1.2rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.blog-hero--post .post-meta {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 20px;
    margin-top: 20px;
}

.blog-hero--post .views-count {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ---------- MAIN CONTAINER ---------- */
.single-post-container {
    max-width: 860px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ---------- OPTIONAL FEATURED IMAGE BELOW HERO ---------- */
.post-featured-image {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.post-featured-image img {
    width: 100%;
    display: block;
}

/* ---------- POST BODY TYPOGRAPHY ---------- */
.post-body {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #374151;
}

.post-body h2 {
    font-size: 1.875rem;
    font-weight: 600;
    margin: 50px 0 20px;
    color: #111827;
}

.post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 40px 0 16px;
    color: #1f2937;
}

.post-body p {
    margin-bottom: 24px;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 30px 0;
}

.post-body blockquote {
    border-left: 4px solid #007bff;
    padding-left: 20px;
    margin: 40px 0;
    font-style: italic;
    color: #4b5563;
    font-size: 1.25rem;
    line-height: 1.7;
}

.post-body ul,
.post-body ol {
    margin: 20px 0 30px 40px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
    color: #1e293b;
}

.post-body pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 30px 0;
    font-size: 0.875rem;
}

/* ---------- TAGS ---------- */
.post-tags {
    margin: 50px 0 30px;
}

.post-tags h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: #111827;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.tag:hover {
    background: #007bff;
    color: #fff;
}

/* ---------- AUTHOR BOX ---------- */
.author-box {
    background: #f9fafb;
    border-radius: 12px;
    padding: 40px;
    margin: 60px 0;
    display: flex;
    gap: 30px;
    align-items: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.5rem;
    margin: 0 0 15px;
    color: #111827;
}

.author-bio {
    color: #6b7280;
    line-height: 1.6;
    font-size: 1rem;
}

/* ---------- POST NAVIGATION ---------- */
.post-navigation {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
    gap: 30px;
}

.nav-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s;
    background: #fff;
}

.nav-link:hover {
    border-color: #007bff;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-link.prev {
    text-align: left;
}

.nav-link.next {
    text-align: right;
    align-items: flex-end;
}

.nav-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
}

/* ---------- RELATED POSTS ---------- */
.related-posts {
    margin: 80px 0 60px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.related-posts h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #111827;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.related-post {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 25px;
}

.related-content h3 {
    font-size: 1.125rem;
    margin: 0 0 10px;
    line-height: 1.4;
}

.related-content h3 a {
    color: #111827;
    text-decoration: none;
}

.related-content h3 a:hover {
    color: #007bff;
}

.related-meta {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-excerpt {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
    margin: 0;
}

/* ---------- RESPONSIVE ADJUSTMENTS ---------- */
@media (max-width: 768px) {
    .blog-hero--post .hero-copy h1 {
        font-size: 2rem;
    }

    .blog-hero--post .hero-copy .lead {
        font-size: 1rem;
    }

    .single-post-container {
        padding: 20px 16px;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }

    .nav-link.next {
        text-align: left;
        align-items: flex-start;
    }
}

/* ---------- UTILITY: KEEP CONSISTENCY WITH BLOG LISTING HERO ---------- */
.blog-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35); /* optional additional overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}