/* ─────────────────────────────────────────────
   Blog — Listing & Single Post Styles
───────────────────────────────────────────── */

/* ─── Blog hero (dark header, listing + archive + single) ── */
.baat-blog-hero {
  background: #0B1120;
  padding: 80px 40px 56px;
  position: relative;
  overflow: hidden;
}
.baat-blog-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,.07);
}
.baat-blog-hero__inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.baat-blog-hero__back {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.4) !important;
  text-decoration: none !important;
  margin-bottom: 20px;
  transition: color .15s;
}
.baat-blog-hero__back:hover { color: rgba(255,255,255,.75) !important; }
.baat-blog-hero__label {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #5b9fff;
  margin-bottom: 14px;
}
.baat-blog-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 14px;
}
.baat-blog-hero__sub {
  font-size: 17px; line-height: 1.6;
  color: rgba(255,255,255,.55);
  margin: 0;
  max-width: 540px;
  margin: 0 auto;
}

/* ─── Single post compact hero ── */
.baat-single-hero {
  background: #0B1120;
  padding: 72px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.baat-single-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}
.baat-single-hero__cat {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: #5b9fff !important;
  background: rgba(0,87,255,.15);
  padding: 3px 10px; border-radius: 100px;
  text-decoration: none !important;
  margin-bottom: 16px;
  transition: opacity .15s;
}
.baat-single-hero__cat:hover { opacity: .8; }
.baat-single-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.03em;
  color: #fff;
  margin: 0 0 16px;
}
.baat-single-hero__meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,.4);
}
.baat-single-hero__dot { opacity: .4; }

/* ─── Blog Listing inner container ── */
.baat-blog-listing__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Blog Listing Page ──────────────────────── */
.baat-blog-listing {
  padding: 64px 0;
  background: var(--surface-page);
}

.baat-blog-listing__header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* Tag filter row */
.baat-tag-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.baat-tag-filter__btn {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-700);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.baat-tag-filter__btn:hover,
.baat-tag-filter__btn.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Post grid */
.baat-post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 900px) {
  .baat-post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .baat-post-grid { grid-template-columns: 1fr; }
}

/* ─── Post Card ─────────────────────────────── */
.baat-post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.baat-post-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.baat-post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--brand-light);
}

.baat-post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.baat-post-card:hover .baat-post-card__thumb img {
  transform: scale(1.03);
}

/* Placeholder when no thumbnail */
.baat-post-card__thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-mid);
}

.baat-post-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.baat-post-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.baat-post-card__cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: var(--brand-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  text-decoration: none;
}
.baat-post-card__cat:hover { text-decoration: none; opacity: 0.85; }

.baat-post-card__date,
.baat-post-card__reading-time {
  font-size: 12px;
  color: var(--text-400);
}

.baat-post-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-900);
  margin-bottom: 10px;
  flex: 1;
}

.baat-post-card__title a {
  color: inherit;
  text-decoration: none;
}
.baat-post-card__title a:hover { color: var(--brand); }

.baat-post-card__excerpt {
  font-size: 14px;
  color: var(--text-500);
  line-height: 1.6;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.baat-post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.baat-post-card__author {
  display: flex;
  align-items: center;
  gap: 8px;
}

.baat-post-card__author-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.baat-post-card__author-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-700);
}

.baat-post-card__read-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}
.baat-post-card__read-link:hover { text-decoration: underline; }

/* ─── Single Post ────────────────────────────── */
.baat-single-post {
  padding: 56px 0;
}

.baat-single-post__layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}

@media (max-width: 960px) {
  .baat-single-post__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Post header */
.baat-post-header {
  margin-bottom: 40px;
}

.baat-post-header__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.baat-post-header__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.baat-post-header__author {
  display: none;
}

.baat-post-header__author-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.baat-post-header__author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-900);
  line-height: 1.2;
}

.baat-post-header__author-role {
  font-size: 12px;
  color: var(--text-400);
  margin-top: 2px;
}

/* Hero image */
.baat-post-hero-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-card);
  margin-bottom: 40px;
}

/* Article body typography */
.baat-post-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-700);
}

.baat-post-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--text-900);
  padding-bottom: 12px;
  position: relative;
}
.baat-post-content h2::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 44px; height: 2px;
  background: var(--brand);
  border-radius: 2px;
}

.baat-post-content > h2:first-child { margin-top: 0; }

.baat-post-content h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-500);
  letter-spacing: .01em;
}

.baat-post-content p { margin-bottom: 1.25rem; }

.baat-post-content a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.baat-post-content ul,
.baat-post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.baat-post-content li { margin-bottom: 0.5rem; }

.baat-post-content blockquote {
  border-left: 3px solid var(--brand);
  padding-left: 20px;
  margin-left: 0;
  font-style: italic;
  color: var(--text-500);
}

.baat-post-content img {
  border-radius: var(--radius-md);
  width: 100%;
  height: auto;
}

.baat-post-figure {
  margin: 2.5rem 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
.baat-post-figure img {
  display: block;
  border-radius: 0;
  width: 100%;
  height: auto;
}
.baat-post-figure figcaption {
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--text-500);
  background: var(--surface-subtle);
  text-align: center;
  line-height: 1.5;
}

/* FAQ block — use .post-faq prefix to avoid collision with homepage .baat-faq */
.post-faq {
  margin: 2rem 0;
  background: #fff;
}
.post-faq__item {
  border-bottom: 1px solid #E5E7EB;
  padding: 1.25rem 0;
}
.post-faq__item:first-child { border-top: 1px solid #E5E7EB; }
.post-faq__q {
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: #111827 !important;
  margin: 0 0 0.5rem !important;
  letter-spacing: 0 !important;
  padding: 0 !important;
}
.post-faq__q::after { display: none !important; }
.post-faq__a {
  font-size: 0.95rem;
  color: #6B7280;
  margin: 0 !important;
  line-height: 1.7;
}

.baat-post-content code {
  background: var(--surface-subtle);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Menlo', 'Consolas', monospace;
}

.baat-post-content pre {
  background: var(--surface-subtle);
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.baat-post-content pre code {
  background: none;
  padding: 0;
}

/* Post sidebar */
.baat-post-sidebar { position: sticky; top: 80px; }

.baat-post-sidebar__section {
  background: var(--surface-muted);
  border-radius: var(--radius-card);
  padding: 20px;
  margin-bottom: 20px;
}

.baat-post-sidebar__title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-400);
  margin-bottom: 14px;
}

.baat-post-sidebar__toc {
  list-style: none;
  padding: 0;
  margin: 0;
}

.baat-post-sidebar__toc li {
  margin-bottom: 8px;
}

.baat-post-sidebar__toc a {
  font-size: 13px;
  color: var(--text-700);
  text-decoration: none;
  display: block;
  padding: 2px 0;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: color 0.15s, border-color 0.15s;
}

.baat-post-sidebar__toc a:hover,
.baat-post-sidebar__toc a.active {
  color: var(--brand);
  border-left-color: var(--brand);
}

/* Related posts */
.baat-related-post {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.baat-related-post__thumb {
  width: 60px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--brand-light);
  overflow: hidden;
  flex-shrink: 0;
}

.baat-related-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.baat-related-post__title a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-700);
  text-decoration: none;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.baat-related-post__title a:hover { color: var(--brand); }

/* Post tags */
.baat-post-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.baat-post-tag {
  font-size: 12px;
  color: var(--text-500);
  background: var(--surface-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.15s;
}
.baat-post-tag:hover {
  background: var(--brand-light);
  color: var(--brand);
  border-color: var(--brand-light);
}

/* CTA inside single post */
.baat-post-cta {
  background: var(--brand-light);
  border: 1px solid rgba(0,87,255,.15);
  border-radius: var(--radius-card);
  padding: 36px 28px;
  margin: 48px 0;
  text-align: center;
}

.baat-post-cta h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-900);
  margin-bottom: 8px;
}

.baat-post-cta p {
  font-size: 14px;
  color: var(--text-500);
  margin-bottom: 20px;
}

.baat-post-cta a {
  display: inline-block;
  background: var(--brand);
  color: #fff !important;
  font-size: 14px; font-weight: 600;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: background .15s, transform .15s;
}
.baat-post-cta a:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* ─── Single post wrap + layout ─────────────────── */
.baat-single-post {
  background: var(--surface-page);
  padding: 56px 0 80px;
}

.baat-single-post__wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Related posts section ─────────────────────── */
.baat-related-posts {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.baat-related-posts__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-900);
}

.baat-post-grid--related {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
  .baat-post-grid--related { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .baat-post-grid--related { grid-template-columns: 1fr; }
}

/* ─── Sidebar CTA card ──────────────────────────── */
.baat-sidebar-cta {
  background: var(--brand-light) !important;
  border: 1px solid rgba(0,87,255,.12) !important;
  text-align: center;
}

.baat-sidebar-cta__icon {
  width: 44px; height: 44px;
  background: rgba(0,87,255,.12);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brand);
  margin: 0 auto 12px;
}

.baat-sidebar-cta__text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-500);
  margin-bottom: 16px;
}

.baat-sidebar-cta__btn {
  display: block;
  background: var(--brand);
  color: #fff !important;
  font-size: 13px; font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: background .15s;
}
.baat-sidebar-cta__btn:hover { background: var(--brand-dark); }

/* ─── TOC h3 indent ─────────────────────────────── */
.baat-toc__h3 > a { padding-left: 22px !important; font-size: 12px !important; }

/* ─── Pagination ────────────────────────────────── */
.baat-blog-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;
}

.baat-blog-pagination .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.baat-blog-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  color: var(--text-700) !important;
  border: 1px solid var(--border);
  background: #fff;
  text-decoration: none !important;
  transition: all .15s;
}

.baat-blog-pagination .page-numbers.current,
.baat-blog-pagination .page-numbers:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff !important;
}

.baat-blog-pagination .page-numbers.prev,
.baat-blog-pagination .page-numbers.next {
  width: auto; padding: 0 14px;
}

/* ─── Empty state ───────────────────────────────── */
.baat-blog-empty {
  text-align: center;
  padding: 64px 0;
  color: var(--text-400);
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 860px) {
  .baat-blog-hero { padding: 72px 28px 48px; }
  .baat-single-hero { padding: 64px 0 40px; }
  .baat-single-hero__inner { padding: 0 28px; }
  .baat-single-post__wrap { padding: 0 28px; }
  .baat-blog-listing__inner { padding: 0 28px; }
}

@media (max-width: 600px) {
  .baat-blog-hero { padding: 64px 20px 40px; }
  .baat-single-hero { padding: 56px 0 32px; }
  .baat-single-hero__inner { padding: 0 20px; }
  .baat-single-post__wrap { padding: 0 20px; }
  .baat-blog-listing__inner { padding: 0 20px; }
}
