/* ============================================================
   CO-ENTREPRENEUR — SINGLE POST TEMPLATES
   Child theme CSS for BeTheme
   ============================================================ */

/* ── CRITICAL: Hide BeTheme's default post header & related ── */
body.single-post .section-post-header,
body.single-post .section-post-related,
body.single-post .section-post-footer,
body.single-post .post-nav,
body.single-post header.section.mcb-section.section-post-header {
    display: none !important;
}

/* Also hide BeTheme's default article wrapper styling */
body.single-post article.post > header,
body.single-post .post-header,
body.single-post .post-photo-wrapper {
    display: none !important;
}

/* ── Dark Background ── */
body.single-post,
body.single-post #Wrapper,
body.single-post #Content,
body.single-post .content_wrapper,
body.single-post .sections_group,
body.single-post article.post {
    background: #0a0f1a !important;
}

/* ── Base Typography ── */
.ce-single-page {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #e2e8f0;
    line-height: 1.7;
}

.ce-single-page *,
.ce-single-page *::before,
.ce-single-page *::after {
    box-sizing: border-box;
}

/* ── Shared: Back Link ── */
.ce-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c47834 !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: opacity 0.2s;
}
.ce-back-link:hover {
    opacity: 0.8;
}
.ce-back-link--center {
    justify-content: center;
    width: 100%;
}
.ce-back-link svg {
    width: 16px;
    height: 16px;
    stroke: #c47834;
}

/* ── Shared: Category Badges ── */
.ce-cat-badge {
    display: inline-block;
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.ce-cat-badge--news {
    background: #c47834;
    color: #fff;
}
.ce-cat-badge--article,
.ce-cat-badge--articles {
    background: #2563eb;
    color: #fff;
}
.ce-cat-badge--guide,
.ce-cat-badge--guides {
    background: #059669;
    color: #fff;
}

/* ── Shared: Title ── */
.ce-single__title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.15;
    margin: 0 0 1rem 0;
    letter-spacing: -0.02em;
}
.ce-single__title--center {
    text-align: center;
}

/* ── Shared: Meta Line ── */
.ce-post-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #94a3b8;
    flex-wrap: wrap;
}
.ce-post-meta-line--center {
    justify-content: center;
}
.ce-post-meta-line svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 4px;
    opacity: 0.7;
}
.ce-meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #475569;
    display: inline-block;
}

/* ── Shared: Post Content ── */
.ce-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
/* Hide any H1 inside post content — title is already in our header */
.ce-post-content h1 {
    display: none !important;
}
.ce-post-content h2 {
    font-size: 1.75rem !important;
    font-weight: 700;
    color: #ffffff !important;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}
.ce-post-content h3 {
    font-size: 1.35rem !important;
    font-weight: 600;
    color: #f1f5f9 !important;
    margin: 2rem 0 0.75rem;
}
.ce-post-content p {
    margin-bottom: 1.25rem;
    color: #cbd5e1;
}
.ce-post-content a {
    color: #c47834 !important;
    text-decoration: underline;
}
.ce-post-content a:hover {
    color: #d4923f !important;
}
.ce-post-content ul,
.ce-post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: #cbd5e1;
}
.ce-post-content li {
    margin-bottom: 0.5rem;
}
.ce-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5rem 0;
}
.ce-post-content blockquote {
    border-left: 3px solid #c47834;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(196, 120, 52, 0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #e2e8f0;
}
.ce-post-content strong {
    color: #f1f5f9;
    font-weight: 600;
}

/* ── Drop Cap (Article) ── */
.ce-post-content--dropcap > p:first-of-type::first-letter {
    float: left;
    font-size: 4rem;
    font-weight: 800;
    line-height: 0.8;
    margin: 0.1em 0.15em 0 0;
    color: #c47834;
}

/* ============================================================
   NEWS TEMPLATE
   ============================================================ */
.ce-single--news {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* News body content wrapper */
.ce-news-body-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.ce-news-hero-wrap {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
}
.ce-news-hero-wrap img {
    width: 100%;
    height: auto;
    display: block;
}
.ce-news-hero-wrap .ce-cat-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    margin: 0;
}

/* News timestamp bar */
.ce-news-timestamp {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #94a3b8;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.ce-live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    display: inline-block;
    animation: ce-pulse 2s ease-in-out infinite;
}
@keyframes ce-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Key takeaways box */
.ce-key-takeaways {
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
    overflow: hidden;
    max-width: 100%;
}
.ce-key-takeaways h4 {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #c47834;
    margin: 0 0 1rem 0;
}
.ce-key-takeaways ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ce-key-takeaways li {
    padding: 0.5rem 0;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.ce-key-takeaways li:last-child {
    border-bottom: none;
}

/* ============================================================
   ARTICLE TEMPLATE
   ============================================================ */
.ce-single--article {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.ce-article-header-wrap {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 2.5rem;
}
.ce-article-subtitle {
    font-size: 1.15rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Author card */
.ce-author-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
    padding: 12px 20px;
    background: rgba(148, 163, 184, 0.06);
    border-radius: 50px;
}
.ce-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c47834, #d4923f);
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ce-author-info {
    text-align: left;
}
.ce-author-info strong {
    display: block;
    font-size: 0.9rem;
    color: #f1f5f9;
}
.ce-author-info span {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Article hero */
.ce-article-hero-wrap {
    margin: 0 auto 3rem;
    border-radius: 16px;
    overflow: hidden;
    max-width: 900px;
}
.ce-article-hero-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article body */
.ce-article-body-wrap {
    max-width: 720px;
    margin: 0 auto;
}

/* ============================================================
   GUIDE TEMPLATE
   ============================================================ */
.ce-single--guide {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.ce-guide-header-wrap {
    max-width: 780px;
    margin: 0 auto 2.5rem;
}
.ce-guide-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0 0 1.5rem 0;
}

/* Guide hero */
.ce-guide-hero-wrap {
    margin: 0 auto 3rem;
    border-radius: 16px;
    overflow: hidden;
    max-width: 900px;
}
.ce-guide-hero-wrap img {
    width: 100%;
    height: auto;
    display: block;
}

/* Guide 2-column layout */
.ce-guide-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
    align-items: start;
}

/* TOC sidebar */
.ce-toc {
    position: sticky;
    top: 100px;
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
}
.ce-toc h4 {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 0 1rem 0;
}
.ce-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.ce-toc-list li {
    counter-increment: toc;
    margin-bottom: 0;
}
.ce-toc-list li a {
    display: block;
    padding: 8px 10px;
    color: #94a3b8 !important;
    text-decoration: none !important;
    font-size: 0.85rem;
    line-height: 1.4;
    border-radius: 6px;
    transition: all 0.2s;
}
.ce-toc-list li a::before {
    content: counter(toc) ". ";
    color: #475569;
    font-weight: 600;
}
.ce-toc-list li a:hover,
.ce-toc-list li a.active {
    color: #c47834 !important;
    background: rgba(196, 120, 52, 0.08);
}
.ce-toc-list li a.active::before {
    color: #c47834;
}

/* Guide body */
.ce-guide-body-wrap {
    min-width: 0;
}

/* Step numbers for guide H2s */
.ce-step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c47834, #d4923f);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Guide progress bar */
.ce-guide-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(148, 163, 184, 0.1);
    z-index: 9999;
}
.ce-guide-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #c47834, #d4923f);
    transition: width 0.1s linear;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.ce-post-cta {
    margin: 3rem 0;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(196, 120, 52, 0.12), rgba(196, 120, 52, 0.04));
    border: 1px solid rgba(196, 120, 52, 0.2);
    border-radius: 16px;
    text-align: center;
}
.ce-post-cta h3 {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 0.5rem 0;
}
.ce-post-cta p {
    color: #94a3b8;
    margin: 0 0 1.5rem 0;
    font-size: 1rem;
}
.ce-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: #c47834;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.2s;
}
.ce-cta-btn:hover {
    background: #d4923f;
    transform: translateY(-1px);
}
.ce-cta-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================================
   SHARE BAR
   ============================================================ */
.ce-share-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    margin-top: 2rem;
}
.ce-share-bar span {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}
.ce-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: #94a3b8 !important;
    text-decoration: none !important;
    transition: all 0.2s;
}
.ce-share-btn:hover {
    background: rgba(196, 120, 52, 0.15);
    border-color: rgba(196, 120, 52, 0.3);
    color: #c47834 !important;
}
.ce-share-btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.ce-related-section {
    max-width: 1100px;
    margin: 3rem auto 0;
    padding: 3rem 1.5rem 4rem;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
}
.ce-related-section h3 {
    font-size: 1.5rem !important;
    font-weight: 700;
    color: #ffffff !important;
    margin: 0 0 2rem 0;
}
.ce-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.ce-related-card {
    background: rgba(148, 163, 184, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.08);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none !important;
    display: block;
    transition: all 0.3s;
}
.ce-related-card:hover {
    border-color: rgba(196, 120, 52, 0.3);
    transform: translateY(-2px);
}
.ce-related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.ce-related-card-body {
    padding: 1.25rem;
}
.ce-related-card-body .ce-cat-badge {
    font-size: 0.65rem;
    padding: 4px 10px;
    margin-bottom: 0.75rem;
}
.ce-related-card-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #f1f5f9 !important;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}
.ce-related-card-body .ce-related-meta {
    font-size: 0.8rem;
    color: #64748b;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .ce-guide-layout {
        grid-template-columns: 1fr;
    }
    .ce-toc {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .ce-single__title {
        font-size: 2rem;
    }
    .ce-related-grid {
        grid-template-columns: 1fr;
    }
    .ce-single--news,
    .ce-single--article,
    .ce-single--guide {
        padding: 2rem 1rem;
    }
    .ce-post-cta {
        padding: 1.5rem;
    }
    .ce-article-header-wrap {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .ce-single__title {
        font-size: 1.6rem;
    }
    .ce-author-card {
        padding: 10px 16px;
    }
    .ce-share-bar {
        flex-wrap: wrap;
    }
}
