/* =============================================================
   blog.css — Blog Listing & Blog Details page styles
   Prefix: blog-
   Inherits design tokens from css/style.css (:root vars) and reuses
   existing shared components (.container-xl, .section-title,
   .section-subtitle, .btn-primary-brand, .insight-card family).
   Only NEW blog-specific layout/typography lives here.
   ============================================================= */

/* ── Breadcrumb Bar (same visual pattern as pd-breadcrumb-bar) ─── */
.blog-breadcrumb-bar {
  background: #fff;
  border-bottom: 1px solid var(--rf-border);
  padding: 10px 0;
}
.blog-breadcrumb-bar .breadcrumb {
  font-size: 12px;
  margin: 0;
  flex-wrap: wrap;
}
.blog-breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
  content: '›';
  color: var(--rf-text-light);
}
.blog-breadcrumb-bar .breadcrumb-item a {
  color: var(--rf-text-muted);
  text-decoration: none;
}
.blog-breadcrumb-bar .breadcrumb-item a:hover { color: var(--rf-blue); }
.blog-breadcrumb-bar .breadcrumb-item.active {
  color: var(--rf-text);
  font-weight: 500;
}
@media (max-width: 767px) {
  .blog-breadcrumb-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .blog-breadcrumb-bar::-webkit-scrollbar { display: none; }
  .blog-breadcrumb-bar .breadcrumb { flex-wrap: nowrap; width: max-content; min-width: 100%; }
  .blog-breadcrumb-bar .breadcrumb-item { white-space: nowrap; }
}

/* ── Page Intro (Blog Listing) ───────────────────────────────── */
.blog-intro {
  background: #fff;
  padding: 32px 0 8px;
}
.blog-intro-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--rf-navy);
  letter-spacing: -0.3px;
  margin-bottom: 10px;
}
.blog-intro-text {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--rf-text-muted);
  max-width: 760px;
  margin-bottom: 0;
}

/* ── Blog Listing + Sidebar Layout ───────────────────────────────
   Category filter pills were removed per design review — replaced by
   the Categories/Top City Blogs sidebar (see BLOG SIDEBAR block below).
   .blog-layout holds the two columns; .blog-main wraps the Featured
   Article + Latest Articles blocks that used to be their own full-width
   <section>s (kept as plain wrapper divs now that a sidebar sits beside
   them, background moved up onto .blog-content-section). ─────────── */
.blog-content-section { background: var(--rf-bg-light); padding: 20px 0 44px; }
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 32px;
}
.blog-main { min-width: 0; }
.blog-featured-block { margin-bottom: 40px; }

@media (max-width: 991px) {
  .blog-layout { grid-template-columns: 1fr; gap: 28px; }
}

/* ── Sidebar (shared component: Categories + Top City Blogs) ────
   Duplicated verbatim in blog-details.html per this project's existing
   no-shared-include convention (see feedback-code-style). ─────────── */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
.blog-sidebar-card {
  background: #fff;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-lg);
  box-shadow: var(--rf-shadow-sm);
  padding: 20px 22px 8px;
}
.blog-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--rf-navy);
  margin: 0 0 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rf-border);
}
.blog-sidebar-list { list-style: none; margin: 0; padding: 0; }
.blog-sidebar-list li { border-bottom: 1px solid var(--rf-border); }
.blog-sidebar-list li:last-child { border-bottom: none; }
.blog-sidebar-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 1px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--rf-text-muted);
  text-decoration: none;
  transition: color var(--rf-t);
}
.blog-sidebar-list a:hover { color: var(--rf-blue); }
.blog-sidebar-list a i { font-size: 11px; color: var(--rf-text-light); flex-shrink: 0; }
.blog-sidebar-list a:hover i { color: var(--rf-blue); }

@media (max-width: 991px) {
  .blog-sidebar { flex-direction: row; flex-wrap: wrap; }
  .blog-sidebar-card { flex: 1 1 260px; }
}
@media (max-width: 575px) {
  .blog-sidebar { flex-direction: column; }
}

/* ── Featured Article ────────────────────────────────────────── */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 1px solid var(--rf-border);
  border-radius: var(--rf-r-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--rf-shadow-sm);
}
.blog-featured-img-wrap {
  position: relative;
  display: block;
  min-width: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--rf-bg-light);
}
.blog-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.42s ease;
}
.blog-featured:hover .blog-featured-img { transform: scale(1.04); }
.blog-featured-content {
  min-width: 0;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.blog-featured-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--rf-blue);
}
.blog-featured-title {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--rf-navy);
  margin: 0;
}
.blog-featured-title a { color: inherit; text-decoration: none; }
.blog-featured-title a:hover { color: var(--rf-blue); }
.blog-featured-excerpt {
  font-size: 14px;
  line-height: 1.7;
  color: var(--rf-text-muted);
  margin: 0;
}
.blog-featured-meta {
  font-size: 12.5px;
  color: var(--rf-text-light);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
}
.blog-featured-cta { align-self: flex-start; }

@media (max-width: 767px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-featured-img-wrap { aspect-ratio: 16 / 10; }
  .blog-featured-content { padding: 22px 20px 26px; }
  .blog-featured-title { font-size: 21px; }
}

/* ── Latest Articles Grid ────────────────────────────────────── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 24px;
}
.blog-grid .insight-card { min-width: 0; }
.blog-grid .insight-card > a { display: block; }

@media (max-width: 991px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 575px) {
  .blog-grid { grid-template-columns: 1fr; gap: 16px; }
}

/* Extra cards revealed via "Load More" — hidden until toggled */
.blog-grid .insight-card[data-extra="true"] { display: none; }
.blog-grid.blog-grid--expanded .insight-card[data-extra="true"] { display: flex; }

.blog-loadmore-wrap { text-align: center; margin-top: 32px; }

@media (max-width: 767px) {
  .blog-content-section { padding: 16px 0 36px; }
}

/* ==============================================================
   BLOG DETAILS PAGE
   ============================================================== */

/* Article content + sidebar share the same .blog-layout/.blog-sidebar
   grid defined above (BLOG SIDEBAR block) — .blog-main here wraps the
   header/hero/body/related stack, .blog-detail-section supplies the
   page background that .blog-article-header/-hero-wrap/-body-section
   used to carry individually before the sidebar column existed. */
.blog-detail-section { background: #fff; padding: 24px 0 48px; }

.blog-article-header { padding: 0; }
.blog-article-category {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #fff;
  background: var(--rf-green);
  padding: 5px 12px;
  border-radius: 5px;
  margin-bottom: 14px;
}
.blog-article-title {
  font-size: 34px;
  font-weight: 700;
  line-height: 1.28;
  color: var(--rf-navy);
  letter-spacing: -0.3px;
  max-width: 900px;
  margin-bottom: 18px;
}
.blog-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rf-border);
  margin-bottom: 24px;
}
.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--rf-text-muted);
}
.blog-meta-item i { font-size: 14px; color: var(--rf-blue); }
.blog-meta-item strong { color: var(--rf-text); font-weight: 600; }

@media (max-width: 767px) {
  .blog-article-title { font-size: 24px; }
  .blog-article-meta { gap: 12px 16px; }
}

/* ── Featured Image ──────────────────────────────────────────── */
.blog-article-hero-wrap {
  padding-bottom: 32px;
}
.blog-article-hero {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  border-radius: var(--rf-r-lg);
  display: block;
}
@media (max-width: 767px) {
  .blog-article-hero { aspect-ratio: 16 / 11; border-radius: var(--rf-r-md); }
}

/* ── Article Body ─────────────────────────────────────────────── */
.blog-article-body-section { padding: 0 0 8px; }
.blog-article-body {
  max-width: 780px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--rf-text);
}
.blog-article-body p { margin-bottom: 18px; }
.blog-article-body h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--rf-navy);
  margin: 36px 0 14px;
  letter-spacing: -0.2px;
}
.blog-article-body h3 {
  font-size: 17.5px;
  font-weight: 600;
  color: var(--rf-navy);
  margin: 24px 0 10px;
}
.blog-article-body ul,
.blog-article-body ol {
  margin: 0 0 20px;
  padding-left: 22px;
}
.blog-article-body ul { list-style: disc !important; }
.blog-article-body ol { list-style: decimal !important; }
.blog-article-body li { list-style: inherit !important; margin-bottom: 8px; color: var(--rf-text); }
.blog-article-body strong { color: var(--rf-navy); }

.blog-key-info {
  background: var(--rf-blue-soft);
  border-left: 3px solid var(--rf-blue);
  border-radius: var(--rf-r-md);
  padding: 18px 22px;
  margin: 24px 0 28px;
}
.blog-key-info-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--rf-blue-dark);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.blog-key-info ul { margin: 0; padding-left: 20px; }
.blog-key-info li {
  font-size: 13.5px;
  color: var(--rf-text);
  margin-bottom: 6px;
}

.blog-checklist { margin: 0 0 20px; padding-left: 0; }
.blog-checklist li {
  list-style: none !important;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  margin-bottom: 10px;
}
.blog-checklist .blog-check-ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #DCFCE7;
  color: var(--rf-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 11px;
}

@media (max-width: 767px) {
  .blog-article-body { font-size: 14.5px; }
  .blog-article-body h2 { font-size: 19px; }
  .blog-article-body h3 { font-size: 16px; }
}

/* ── Related Articles Carousel ───────────────────────────────────
   Nested inside .blog-main (narrower than the old full-bleed section),
   so the previous light-grey block background became a top border
   separator instead. Scroll track + arrows reuse the same pattern as
   property-detail.html's #pdSimilarScroll (.carousel-nav-btn/-prev/-next
   are defined once in css/style.css and shared site-wide — see
   initSimilarProjectsCarousel-style boundary logic in js/blog.js). */
.blog-related-section {
  border-top: 1px solid var(--rf-border);
  padding-top: 32px;
  margin-top: 40px;
}
@media (max-width: 767px) {
  .blog-related-section { padding-top: 24px; margin-top: 28px; }
}
.blog-related-scroll-wrap { position: relative; margin-top: 20px; }
.blog-related-scroll {
  display: flex;
  align-items: stretch;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.blog-related-scroll::-webkit-scrollbar { display: none; }
.blog-related-scroll .insight-card { flex: 0 0 260px; min-width: 0; }

@media (max-width: 767px) {
  .blog-related-scroll { gap: 14px; }
  .blog-related-scroll .insight-card { flex: 0 0 78vw; max-width: 300px; }
}

/* ── Extra category badge colours (extends .insight-badge family) ── */
.insight-badge--invest { background: rgba(99,102,241,0.88); color: #fff; }
.insight-badge--living { background: rgba(13,148,136,0.88); color: #fff; }
