/* ==========================================================================
   Blog-Specific Styles — Nautilus Techlabs
   Loaded after main site CSS (style.min.css, enhancements.min.css)
   ========================================================================== */

:root {
    --brand: #5479EE;
    --brand-light: #EEF2FD;
    --brand-hover: #4366D4;
    --brand-dark: #3B5FD9;
    --heading: #30303C;
    --body: #52525D;
    --body-light: #6E6E7A;
    --bg: #FFFFFF;
    --bg-light: #F8F9FC;
    --bg-warm: #FFF8F0;
    --border: #E8EAF0;
    --green: #16A34A;
    --green-light: #F0FDF4;
    --amber: #D97706;
    --amber-light: #FFFBEB;
    --hf: 'Poppins', sans-serif;
    --bf: 'Roboto', sans-serif;
}

/* Blog body override (Reevan template sets different base) */
.blog-page { font-family: var(--bf); font-size: 18px; line-height: 1.7; color: var(--body); -webkit-font-smoothing: antialiased; }
.blog-page a { text-decoration: none; color: var(--brand); transition: color 0.2s; }
.blog-page a:hover { color: var(--brand-hover); }

/* ===== BREADCRUMB ===== */
.breadcrumb-bar { background: var(--bg-light); border-bottom: 1px solid var(--border); padding: 14px 0; margin-top: 85px; }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; font-size: 14px; color: var(--body-light); font-family: var(--bf); }
.breadcrumb-inner a { color: var(--brand); font-weight: 500; }
.breadcrumb-inner span { margin: 0 8px; color: var(--border); }

/* ===== POST HERO ===== */
.post-hero { max-width: 1200px; margin: 0 auto; padding: 40px 24px 0; display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; }
.post-category-pill { display: inline-block; padding: 4px 14px; background: var(--brand-light); color: var(--brand); font-size: 13px; font-weight: 600; border-radius: 100px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; }
.post-title { font-family: var(--hf); font-size: 38px; font-weight: 700; line-height: 1.2; color: var(--heading); margin-bottom: 20px; }
.post-excerpt { font-size: 17px; line-height: 1.7; color: var(--body-light); margin-bottom: 24px; }
.post-meta-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; border-top: 1px solid var(--border); }
.post-author-row { display: flex; align-items: center; gap: 16px; }
.post-author-row img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.author-info { font-size: 14px; }
.author-name { font-weight: 600; color: var(--heading); }
.author-date { color: var(--body-light); }
.post-hero-img-wrap { border-radius: 12px; overflow: hidden; max-height: 420px; }
.post-hero-img { width: 100%; height: 100%; max-height: 420px; display: block; object-fit: cover; background: var(--bg-light); }

/* ===== GET AI INSIGHT (in post hero, right of author) ===== */
.ai-insight { display: flex; align-items: center; gap: 8px; }
.ai-insight-label { font-size: 12px; font-weight: 600; color: var(--body-light); text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.ai-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--border); color: var(--body-light); transition: all 0.2s; }
.ai-icon:hover { border-color: var(--brand); background: var(--brand-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(84,121,238,0.15); }
.ai-icon img { width: 20px; height: 20px; border-radius: 0; margin: 0; }

/* ===== MAIN LAYOUT: CONTENT + TOC ===== */
.blog-layout { max-width: 1200px; margin: 0 auto; padding: 40px 24px 0; display: grid; grid-template-columns: 1fr 280px; gap: 48px; }

/* ===== TABLE OF CONTENTS (sticky) ===== */
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
.toc h4 { font-family: var(--hf); font-size: 15px; font-weight: 600; color: var(--heading); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--brand); }
.toc ul { list-style: none; padding: 0; margin: 0; }
.toc li { margin-bottom: 4px; }
.toc a { display: block; padding: 6px 12px; font-size: 14px; color: var(--body-light); border-left: 2px solid transparent; border-radius: 0 6px 6px 0; transition: all 0.2s; line-height: 1.4; }
.toc a:hover, .toc a.active { color: var(--brand); background: var(--brand-light); border-left-color: var(--brand); }
.toc .toc-h3 { padding-left: 24px; font-size: 13px; }

/* ===== BLOG CONTENT ===== */
.blog-main { padding-bottom: 0; }

/* TL;DR Box */
.tldr-box { background: var(--brand-light); border: 1px solid rgba(84,121,238,0.2); border-radius: 12px; padding: 28px 32px; margin-bottom: 40px; }
.tldr-box h3 { font-family: var(--hf); color: var(--brand); margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.tldr-box p { font-size: 16px; color: var(--heading); line-height: 1.7; margin: 0; }

/* Content styles */
.post-content h2 { font-family: var(--hf); font-size: 26px; font-weight: 600; color: var(--heading); margin: 48px 0 16px; line-height: 1.3; scroll-margin-top: 100px; }
.post-content h3 { font-family: var(--hf); font-size: 20px; font-weight: 600; color: var(--heading); margin: 32px 0 12px; line-height: 1.3; scroll-margin-top: 100px; }
.post-content p { margin-bottom: 18px; font-family: var(--bf); font-size: 18px; line-height: 1.7; color: var(--body); }
.post-content ul, .post-content ol { margin: 16px 0 24px 24px; line-height: 1.8; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 8px; color: var(--body); }
.post-content strong { color: var(--heading); font-weight: 600; }
.post-content a { text-decoration: underline; text-underline-offset: 3px; color: var(--brand); }
.post-content a:hover { color: var(--brand-hover); }
.post-content blockquote { border-left: 4px solid var(--brand); background: var(--bg-light); padding: 20px 24px; margin: 24px 0; border-radius: 0 8px 8px 0; font-style: italic; color: var(--body-light); }
.post-content img { border-radius: 8px; margin: 24px 0; max-width: 100%; height: auto; }

/* Tables */
.post-content table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 16px; }
.post-content th { background: var(--brand); color: #fff; padding: 12px 16px; text-align: left; font-weight: 600; font-family: var(--hf); font-size: 14px; }
.post-content th:first-child { border-radius: 8px 0 0 0; }
.post-content th:last-child { border-radius: 0 8px 0 0; }
.post-content td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.post-content tr:nth-child(even) { background: var(--bg-light); }

/* Code */
.post-content pre { background: #1E1E2E; color: #CDD6F4; padding: 24px; border-radius: 10px; overflow-x: auto; margin: 24px 0; font-size: 14px; line-height: 1.6; }
.post-content code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 14px; }
.post-content p code { background: var(--bg-light); padding: 2px 8px; border-radius: 4px; color: var(--brand); font-size: 15px; }

/* Callout Boxes */
.callout-tip { background: var(--green-light); border-left: 4px solid var(--green); padding: 20px 24px; border-radius: 0 10px 10px 0; margin: 24px 0; }
.callout-tip strong { color: var(--green); }
.callout-warning { background: var(--amber-light); border-left: 4px solid var(--amber); padding: 20px 24px; border-radius: 0 10px 10px 0; margin: 24px 0; }
.callout-warning strong { color: var(--amber); }

/* Key Takeaways */
.key-takeaways { background: var(--brand-light); border: 1px solid rgba(84,121,238,0.2); border-radius: 12px; padding: 28px 32px; margin: 36px 0; }
.key-takeaways h3 { font-family: var(--hf); color: var(--brand); margin: 0 0 16px; font-size: 18px; }
.key-takeaways ul { margin-left: 20px; list-style: disc; }
.key-takeaways li { margin-bottom: 8px; color: var(--heading); }

/* ===== INLINE CTA BANNER ===== */
.inline-cta { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); border-radius: 16px; padding: 36px 40px; margin: 40px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.inline-cta-text h3 { font-family: var(--hf); font-size: 20px; font-weight: 600; color: #fff; margin-bottom: 8px; }
.inline-cta-text p { font-size: 15px; color: rgba(255,255,255,0.8); margin: 0; }
.inline-cta a { display: inline-block; padding: 12px 32px; background: #fff; color: var(--brand); border-radius: 100px; font-weight: 600; font-size: 14px; white-space: nowrap; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.inline-cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); color: var(--brand); }

/* ===== FAQ SECTION ===== */
.faq-section { margin: 56px 0 40px; }
.faq-section > h2 { font-family: var(--hf); font-size: 28px; font-weight: 700; color: var(--heading); margin-bottom: 24px; scroll-margin-top: 100px; }
.faq-item { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.faq-item:hover { box-shadow: 0 4px 16px rgba(84,121,238,0.08); }
.faq-question { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; cursor: pointer; font-family: var(--hf); font-size: 16px; font-weight: 600; color: var(--heading); background: var(--bg); transition: background 0.2s; }
.faq-question:hover { background: var(--bg-light); }
.faq-question i { color: var(--brand); font-size: 14px; transition: transform 0.3s; }
.faq-item.open .faq-question i { transform: rotate(180deg); }
.faq-answer { padding: 0 24px; max-height: 0; overflow: hidden; transition: max-height 0.3s ease, padding 0.3s ease; }
.faq-item.open .faq-answer { max-height: 500px; padding: 0 24px 20px; }
.faq-answer p { font-size: 16px; line-height: 1.7; color: var(--body); margin: 0; }

/* ===== TAGS (last item inside blog-layout grid) ===== */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 0; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.post-tags a { padding: 6px 16px; background: var(--bg-light); border-radius: 100px; font-size: 13px; color: var(--body-light); font-weight: 500; transition: all 0.2s; text-decoration: none; }
.post-tags a:hover { background: var(--brand-light); color: var(--brand); }

/* ===== FULL-WIDTH SECTION (below the blog-layout grid) ===== */
.blog-full-width { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== BOTTOM CTA ===== */
.bottom-cta { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%); border-radius: 20px; padding: 52px 48px; margin: 48px 0; text-align: center; color: #fff; }
.bottom-cta h3 { font-family: var(--hf); font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.bottom-cta p { color: rgba(255,255,255,0.85); margin-bottom: 28px; font-size: 17px; max-width: 560px; margin-left: auto; margin-right: auto; }
.bottom-cta a { display: inline-block; padding: 14px 40px; background: #fff; color: var(--brand); border-radius: 100px; font-weight: 600; font-size: 16px; transition: transform 0.2s, box-shadow 0.2s; text-decoration: none; }
.bottom-cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.15); color: var(--brand); }

/* ===== RELATED POSTS (4-column) ===== */
.related-section { max-width: 1200px; margin: 0 auto; padding: 0 24px 80px; }
.related-section h2 { font-family: var(--hf); font-size: 28px; font-weight: 700; color: var(--heading); margin-bottom: 28px; text-align: center; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.related-card { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; background: var(--bg); }
.related-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(84,121,238,0.1); }
.related-card-img { width: 100%; height: 200px; object-fit: cover; background: var(--brand-light); }
.related-card-body { padding: 20px; }
.related-card-meta { display: flex; align-items: center; gap: 16px; font-size: 13px; color: var(--body-light); margin-bottom: 10px; }
.related-card-meta i { margin-right: 4px; }
.related-card-cat { font-size: 11px; font-weight: 600; color: var(--brand); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.related-card-title { font-family: var(--hf); font-size: 16px; font-weight: 700; line-height: 1.4; color: var(--heading); margin-bottom: 0; }
.related-card-title a { color: inherit; text-decoration: none; }
.related-card-title a:hover { color: var(--brand); }
.related-card-date { font-size: 13px; color: var(--body-light); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .post-hero { grid-template-columns: 1fr; }
    .post-hero-img-wrap { max-height: 300px; }
    .post-hero-img { max-height: 300px; }
    .blog-layout { grid-template-columns: 1fr; }
    .toc { position: static; max-height: none; border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin-bottom: 32px; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .post-title { font-size: 28px; }
    .post-content h2 { font-size: 22px; }
    .post-meta-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
    .inline-cta { flex-direction: column; text-align: center; padding: 28px 24px; }
    .bottom-cta { padding: 36px 24px; }
    .related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .post-title { font-size: 24px; }
    .ai-insight { gap: 6px; }
    .ai-icon { width: 32px; height: 32px; }
    .ai-icon img { width: 16px; height: 16px; }
}

/* ===== BLOG LISTING CARD TWEAKS ===== */
.rpl-contt { padding: 10px 24px 32px 28px; }
.rpl-contt .blog-quick-inf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    margin-bottom: 14px;
}
.rpl-contt .blog-quick-inf span + span { margin-left: 0; }
.rpl-contt h4 { margin-bottom: 14px; }
.blog-card-category {
    display: inline-block;
    margin-bottom: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--brand);
}
