/* ============================================================
   BLOG STYLES — shared by blog index + every /blog/[slug]/index.html
   Header kept from RM site style (featured image below title).
   Body/widgets/cards pulled from the dashboard blog template.
   No sidebar. No table of contents.
   ============================================================ */

/* ============================================================
   POST HERO (RM style — image below title)
   ============================================================ */
.post-hero {
  padding: calc(var(--nav-height) + 60px) 0 0;
  background: var(--bg);
}
.post-hero-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--orange);
  background: rgba(248,157,36,0.12);
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 20px;
}
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 20px;
  max-width: 820px;
}
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.post-hero-meta .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-dim);
}
.post-hero-meta a { color: var(--text-muted); text-decoration: none; }
.post-hero-meta a:hover { color: var(--orange); }
.post-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-img);
  overflow: hidden;
}
.post-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ============================================================
   ARTICLE LAYOUT — 2 column grid (article body + sidebar)
   ============================================================ */
.post-article {
  padding: 48px 0 80px;
  background: var(--bg);
}
.post-content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}
.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
@media (min-width: 901px) {
  .post-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    max-height: calc(100vh - var(--nav-height) - 40px);
    overflow-y: auto;
    overflow-x: visible;
    scrollbar-width: thin;
    padding-right: 4px;
  }
  .post-sidebar::-webkit-scrollbar { width: 5px; }
  .post-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
}
@media (max-width: 900px) {
  .post-content-grid {
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
  .post-sidebar { display: contents; }
  .toc { order: 1; margin-bottom: 0; }
  .post-body { order: 2; }
  .sidebar-cta-card { order: 3; margin-bottom: 0; }
  .sidebar-related { order: 4; }
}

/* ============================================================
   ARTICLE BODY (dashboard style)
   ============================================================ */
.post-body {
  font-family: var(--font-body);
  color: var(--text-body, var(--text-muted));
  line-height: 1.85;
  font-size: 1rem;
  min-width: 0;
  overflow-wrap: break-word;
}
.post-body > p { margin-bottom: 18px; }
.post-body > p:first-of-type {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 28px;
}
.post-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin: 40px 0 16px;
  scroll-margin-top: 90px;
}
.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin: 32px 0 12px;
  scroll-margin-top: 90px;
}
.post-body a:not(.btn):not(.blog-card-link):not(.related-post):not(.post-tag) {
  color: var(--orange);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.post-body a:not(.btn):not(.blog-card-link):not(.related-post):not(.post-tag):hover {
  color: var(--orange-dark, var(--text));
}
.post-body strong { color: var(--text); font-weight: 600; }
.post-body em { color: var(--text); }

/* Orange square bullets (dashboard style) */
.post-body ul,
.post-body ol {
  margin: 0 0 18px 24px;
  padding: 0;
}
.post-body li {
  margin-bottom: 8px;
  position: relative;
}
.post-body ul li {
  list-style: none;
  padding-left: 20px;
}
.post-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 2px;
}
.post-body ol { list-style: decimal; }

/* Blockquote / callout */
.post-body blockquote,
.post-body .callout-box {
  background: var(--bg-elevated, rgba(255,255,255,0.03));
  border-left: 4px solid var(--orange);
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-style: normal;
}
.post-body blockquote p:last-child { margin-bottom: 0; }

/* Inline CTA box (teal accent — sits inside articles) */
.post-inline-cta,
.post-body .article-cta-box {
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-left: 4px solid var(--teal);
  padding: 24px 28px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
}
.post-inline-cta h4,
.post-body .article-cta-box h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.3;
}
.post-inline-cta p,
.post-body .article-cta-box p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.post-inline-cta .btn,
.post-body .article-cta-box .btn { margin-top: 4px; }

/* Inline images */
.post-body img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 24px 0;
  display: block;
}
.post-body figcaption {
  text-align: center;
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: -16px;
  margin-bottom: 24px;
}
.post-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ============================================================
   WIDGET BLOCKS (pulled from dashboard blog-post template)
   Writers / CMS can drop these into post body.
   ============================================================ */

/* FAQ / Accordion */
.faq-block { margin: 28px 0; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}
.faq-q {
  padding: 14px 18px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  background: var(--bg-card, rgba(255,255,255,0.03));
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.faq-q::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--orange);
  transition: transform 0.2s ease;
}
.faq-item.open .faq-q::after { content: '−'; }
.faq-a {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.faq-item.open .faq-a {
  max-height: 600px;
  padding: 14px 18px;
}

/* Columns */
.columns-block { display: grid; gap: 24px; margin: 28px 0; }
.columns-block.cols-2 { grid-template-columns: 1fr 1fr; }
.columns-block.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 600px) {
  .columns-block.cols-2,
  .columns-block.cols-3 { grid-template-columns: 1fr; }
}

/* Gallery */
.gallery-block { display: grid; gap: 8px; margin: 28px 0; }
.gallery-block.gallery-cols-2 { grid-template-columns: 1fr 1fr; }
.gallery-block.gallery-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery-block.gallery-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
.gallery-block img {
  width: 100%;
  border-radius: var(--radius);
  cursor: pointer;
  margin: 0;
}
@media (max-width: 600px) {
  .gallery-block { grid-template-columns: 1fr 1fr !important; }
}

/* Testimonial */
.testimonial-block {
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin: 28px 0;
  text-align: center;
}
.testimonial-stars { color: var(--orange); font-size: 1.2rem; margin-bottom: 12px; }
.testimonial-quote {
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}
.testimonial-author { color: var(--text-muted); font-size: 0.9rem; }

/* Pull Quote */
.pull-quote-block {
  border-left: 4px solid var(--orange);
  border-right: 4px solid var(--orange);
  padding: 28px 32px;
  margin: 32px 0;
  text-align: center;
}
.pull-quote-text {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}
.pull-quote-cite { font-size: 0.85rem; color: var(--text-muted); font-style: normal; }

/* Alert / Notice */
.alert-box {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 24px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.alert-info { background: rgba(73,157,153,0.1); border-left: 4px solid var(--teal); color: var(--teal); }
.alert-warning { background: rgba(241,196,15,0.1); border-left: 4px solid #f1c40f; color: #f1c40f; }
.alert-success { background: rgba(46,204,113,0.1); border-left: 4px solid #2ecc71; color: #2ecc71; }
.alert-error { background: rgba(231,76,60,0.1); border-left: 4px solid #e74c3c; color: #e74c3c; }

/* Numbered Steps */
.steps-block { margin: 28px 0; }
.step-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.step-num {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.step-content h3 { margin: 0 0 4px; font-size: 1.1rem; }
.step-content p { margin: 0; color: var(--text-muted); }

/* Star Rating */
.star-rating-block { margin: 20px 0; }
.star-rating-block .stars { color: var(--orange); font-size: 1.3rem; }
.star-rating-block .star-label { margin-left: 8px; color: var(--text-muted); font-size: 0.9rem; }

/* Icon List */
.icon-list-block { margin: 24px 0; }
.icon-list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 6px 0;
}
.icon-symbol { font-size: 1rem; min-width: 20px; }
.icon-check { color: var(--teal); }
.icon-x { color: #e74c3c; }
.icon-arrow { color: var(--orange); }
.icon-star { color: var(--orange); }
.icon-heart { color: #e74c3c; }

/* Stats / Counter */
.stats-block {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 32px 0;
}
.stat-item { text-align: center; min-width: 120px; }
.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--orange);
  line-height: 1.2;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* Timeline */
.timeline-block {
  margin: 32px 0;
  padding-left: 20px;
  border-left: 2px solid var(--orange);
}
.timeline-event { position: relative; padding: 0 0 28px 20px; }
.timeline-dot {
  position: absolute;
  left: -27px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: var(--orange);
  border-radius: 50%;
  border: 2px solid var(--bg);
}
.timeline-date {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.timeline-desc { color: var(--text-muted); font-size: 0.95rem; }

/* Map */
.map-block {
  margin: 28px 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.map-block iframe {
  width: 100%;
  border: none;
  border-radius: var(--radius);
}

/* Table */
.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 24px 0;
  font-size: 0.95rem;
}
.post-body th,
.post-body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.post-body th {
  background: var(--bg-card, rgba(255,255,255,0.03));
  font-weight: 600;
  color: var(--text);
}
.post-body td { color: var(--text-muted); }

/* Code */
.post-body pre {
  background: #0d0d0d;
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
}
.post-body pre code {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 0.85rem;
  color: var(--text-body, var(--text-muted));
}

/* CTA Block (colored card variants) */
.cta-block {
  text-align: center;
  padding: 32px 28px;
  border-radius: var(--radius);
  margin: 32px 0;
}
.cta-block.cta-accent { background: rgba(248,157,36,0.1); border: 1px solid rgba(248,157,36,0.25); }
.cta-block.cta-teal { background: rgba(73,157,153,0.1); border: 1px solid rgba(73,157,153,0.25); }
.cta-block.cta-dark { background: var(--bg-card, rgba(255,255,255,0.03)); border: 1px solid var(--border); }
.cta-block h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 0 0 10px; }
.cta-block p { color: var(--text-muted); margin-bottom: 18px; }
.cta-block a {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.cta-block.cta-accent a { background: var(--orange); color: #111; }
.cta-block.cta-teal a { background: var(--teal); color: #fff; }
.cta-block.cta-dark a { background: var(--text); color: var(--bg); }
.cta-block a:hover { opacity: 0.85; }

/* ============================================================
   SIDEBAR (TOC + CTA + Related Articles)
   ============================================================ */
.toc {
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 28px;
}
.toc-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-list li {
  margin: 0;
  padding: 0;
}
.toc-list li::before { display: none; }
.toc-list li a {
  display: block;
  padding: 6px 0 6px 12px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.toc-list li a:hover,
.toc-list li a.active {
  color: var(--orange);
  border-left-color: var(--orange);
}
.toc-list li.toc-sub a {
  padding-left: 28px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.toc-list li.toc-sub a:hover { color: var(--orange); }

.sidebar-cta-card {
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 28px;
}
.sidebar-cta-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.25;
}
.sidebar-cta-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 0 0 18px;
}
.sidebar-cta-card .btn { width: 100%; }
.sidebar-phone {
  display: block;
  margin-top: 14px;
  color: var(--orange);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.sidebar-phone:hover { opacity: 0.85; }

.sidebar-related {
  background: transparent;
  padding: 0;
}
.sidebar-related h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.related-post {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.related-post:last-child { border-bottom: 0; }
.related-post:hover .related-title { color: var(--orange); }
.related-thumb {
  width: 72px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.related-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.related-cat {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  font-weight: 700;
}
.related-title {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
  transition: color 0.2s ease;
}

/* ============================================================
   POST FOOTER — tags + author
   ============================================================ */
.post-footer {
  padding-top: 40px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.post-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: rgba(255,255,255,0.02);
  text-decoration: none;
}
.post-tag:hover { border-color: var(--orange); color: var(--orange); }
.post-author-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--bg-card, rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 48px;
}
.post-author-card img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.post-author-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.post-author-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   RELATED POSTS
   ============================================================ */
.post-related {
  padding: 64px 0 100px;
  background: var(--bg-teal-section);
}
.post-related h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  margin-bottom: 40px;
}
.post-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .post-related-grid { grid-template-columns: 1fr; gap: 20px; max-width: 500px; }
}

/* ============================================================
   BLOG CARD (shared: blog index grid + related-posts grid)
   Pulled from dashboard blog-index style: flat card, image top, clean body.
   ============================================================ */
.blog-card {
  background: var(--bg-card, rgba(255,255,255,0.03));
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.blog-card-img-wrap {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-teal-section);
  flex-shrink: 0;
}
.blog-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.blog-card > a:first-child { display: block; }
.blog-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}
.blog-card-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.blog-card-cat {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--orange);
  font-weight: 700;
  margin-bottom: 8px;
}
.blog-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 10px;
}
.blog-card-title a { color: inherit; text-decoration: none; }
.blog-card-title a:hover { color: var(--orange); }
.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.blog-card-meta {
  font-size: 0.8rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.blog-card-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-dim);
}
.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--orange);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  margin-top: 14px;
  transition: gap 0.2s ease;
}
.blog-card-link:hover { gap: 10px; }
.blog-card-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }

/* ============================================================
   BREADCRUMB (shared with site breadcrumb style)
   ============================================================ */
.breadcrumb-bar {
  background: var(--bg);
  padding-top: var(--nav-height);
}
section + .breadcrumb-bar { padding-top: 0; }
.breadcrumb-bar + .post-hero { padding-top: 40px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-dim);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .current {
  color: var(--text-dim);
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
