/*
 * page-blog.css — Restoration Hub FL
 * All blog post pages (/blog/*)
 * Depends on global.css for CSS variables, reset, nav, and footer.
 * Reuses .btn-hero-call, .faq-list/.faq-item/.faq-question/.faq-answer,
 * .related-posts/.related-post-card, .law-callout, .inline-cta,
 * .cost-table-wrap/.cost-table, .page-meta, .sidebar-disclosure,
 * .sidebar-card/.sidebar-card-list, and .breadcrumb from page-city.css.
 * Do not redefine those components here.
 *
 * New components defined here:
 *  - Article hero (.article-hero, .article-hero-inner, .article-hero-meta, .article-hero-tag)
 *  - Article body layout (.article-body, .article-main, .article-sidebar)
 *  - Prose column (.article-prose)
 *  - Table of contents (.article-toc)
 *  - Author / reviewed-by block (.article-byline)
 *  - Article callout boxes (.article-callout, variants: --tip, --warning, --stat)
 *  - Pull quote (.article-pullquote)
 *  - Section divider (.article-section)
 *  - Sticky sidebar CTA (.blog-sidebar-cta)
 *  - Bottom CTA (.article-bottom-cta, .article-bottom-cta-inner)
 *  - Mobile reading strip (.article-mobile-cta)
 *  - Article photo strip (.article-photo)
 */

/* ─────────────────────────────────────────────
   ARTICLE HERO
   Dark full-width header — adapts the city-hero
   pattern to editorial context.
───────────────────────────────────────────── */

.article-hero {
  background: var(--bg-dark);
  padding: calc(var(--nav-h) + 3rem) 1.25rem 3rem;
  position: relative;
  overflow: hidden;
}

.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 50%, rgba(15, 110, 86, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 10% 80%, rgba(29, 158, 117, 0.10) 0%, transparent 60%);
  pointer-events: none;
}

.article-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Breadcrumb in hero — inherits .breadcrumb from page-city.css */
.article-hero .breadcrumb {
  margin-bottom: 1.25rem;
}

.article-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: rgba(29, 158, 117, 0.18);
  border: 1px solid rgba(29, 158, 117, 0.35);
  color: var(--teal-mid);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1.125rem;
}

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.18;
  color: #fff;
  margin: 0 0 1.125rem;
  max-width: 820px;
}

.article-hero-sub {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 700px;
  margin: 0 0 2rem;
}

.article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.article-hero-meta-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
}

.article-hero-meta-item svg {
  color: var(--teal-mid);
  flex-shrink: 0;
}

.article-hero-meta-item strong {
  color: rgba(255,255,255,0.8);
  font-weight: 500;
}

/* ─────────────────────────────────────────────
   ARTICLE BODY LAYOUT
   Two-column: 720px prose + 280px sticky sidebar.
   Mirrors .city-body/.city-main/.city-sidebar.
───────────────────────────────────────────── */

.article-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.article-main {
  min-width: 0;
}

.article-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ─────────────────────────────────────────────
   PROSE COLUMN
   Max 720px, generous leading, careful typographic
   hierarchy for long-form editorial content.
───────────────────────────────────────────── */

.article-prose {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text);
}

.article-prose p {
  margin: 0 0 1.375rem;
}

.article-prose p:last-child {
  margin-bottom: 0;
}

.article-prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.625rem);
  font-weight: 400;
  line-height: 1.22;
  color: var(--text);
  margin: 2.75rem 0 1rem;
  padding-top: 0.25rem;
}

.article-prose h2:first-child {
  margin-top: 0;
}

.article-prose h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin: 2rem 0 0.625rem;
}

.article-prose h4 {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-mid);
  text-transform: uppercase;
  margin: 1.75rem 0 0.5rem;
}

.article-prose a {
  color: var(--blue-link);
  text-decoration: underline;
  text-decoration-color: rgba(24, 95, 165, 0.3);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.15s;
}

.article-prose a:hover {
  text-decoration-color: var(--blue-link);
}

.article-prose strong {
  font-weight: 600;
  color: var(--text);
}

.article-prose em {
  font-style: italic;
}

/* Prose figures and images */
.article-prose figure {
  margin: 2rem 0;
}

.article-prose figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.article-prose figcaption {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 0.625rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-mid);
}

/* ─────────────────────────────────────────────
   ARTICLE SECTIONS
   Named sections within the article — provides
   scroll targets and visual breathing room.
───────────────────────────────────────────── */

.article-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.article-section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
}

/* ─────────────────────────────────────────────
   TABLE OF CONTENTS
   Optional sticky nav for longer posts.
   Placed above the prose, links to h2 anchors.
───────────────────────────────────────────── */

.article-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.375rem;
  margin-bottom: 2.5rem;
}

.article-toc-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.875rem;
}

.article-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc-counter;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.article-toc li {
  counter-increment: toc-counter;
  display: flex;
  align-items: baseline;
  gap: 0.625rem;
}

.article-toc li::before {
  content: counter(toc-counter, decimal-leading-zero);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--teal-mid);
  flex-shrink: 0;
  min-width: 1.5rem;
}

.article-toc a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.15s;
}

.article-toc a:hover {
  color: var(--teal);
}

/* ─────────────────────────────────────────────
   AUTHOR / REVIEWED-BY BLOCK
───────────────────────────────────────────── */

.article-byline {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--teal-pale);
  border: 1px solid rgba(15, 110, 86, 0.12);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.375rem;
  margin-bottom: 2.5rem;
}

.article-byline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--teal);
}

.article-byline-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.article-byline-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
}

.article-byline-name {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.article-byline-note {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-mid);
  margin-top: 0.25rem;
}

/* ─────────────────────────────────────────────
   CALLOUT BOXES
   Three variants: tip (teal), warning (amber), stat (dark).
   Used inline in article prose for key facts,
   legal guardrails, and notable data points.
───────────────────────────────────────────── */

.article-callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 1.375rem;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  border-left: 3px solid;
}

.article-callout--tip {
  background: var(--teal-pale);
  border-color: var(--teal);
}

.article-callout--warning {
  background: #FFF9EC;
  border-color: #D97706;
}

.article-callout--stat {
  background: var(--bg-dark);
  border-color: var(--teal-mid);
}

.article-callout-icon {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.article-callout--tip .article-callout-icon { color: var(--teal); }
.article-callout--warning .article-callout-icon { color: #D97706; }
.article-callout--stat .article-callout-icon { color: var(--teal-mid); }

.article-callout-body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.article-callout-body strong {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
}

.article-callout--tip .article-callout-body strong { color: var(--teal); }
.article-callout--warning .article-callout-body strong { color: #92400E; }
.article-callout--stat .article-callout-body strong { color: #fff; }

.article-callout-body p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.62;
  margin: 0;
}

.article-callout--tip .article-callout-body p { color: var(--text-mid); }
.article-callout--warning .article-callout-body p { color: #78350F; }
.article-callout--stat .article-callout-body p { color: rgba(255,255,255,0.72); }

.article-callout-body a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─────────────────────────────────────────────
   PULL QUOTE
   For notable statements worth visual emphasis.
───────────────────────────────────────────── */

.article-pullquote {
  margin: 2.25rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--teal);
  background: var(--teal-pale);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.article-pullquote p {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--text);
  margin: 0;
  font-style: italic;
}

.article-pullquote cite {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-style: normal;
  font-weight: 600;
  color: var(--teal);
  margin-top: 0.75rem;
}

/* ─────────────────────────────────────────────
   ARTICLE INLINE CTA
   Inherits .inline-cta from page-city.css.
   Blog variant adds extra context text styling.
───────────────────────────────────────────── */

.article-prose .inline-cta {
  margin: 2.5rem 0;
}

/* ─────────────────────────────────────────────
   ARTICLE PHOTO (single inline image)
   Mirrors .img-block from page-city.css but
   with blog-specific caption treatment.
───────────────────────────────────────────── */

.article-photo {
  margin: 2rem 0;
}

.article-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
}

.article-photo figcaption {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 0.625rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-mid);
}

/* ─────────────────────────────────────────────
   STAT ROW — reused in blog posts
   Same as .city-stats in page-city.css.
   Defined here so blog posts can use it
   without depending on page-city.css.
───────────────────────────────────────────── */

.article-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0 0 2.5rem;
}

.article-stat {
  background: var(--bg-surface);
  padding: 1.25rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.article-stat-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 400;
  color: var(--teal);
  line-height: 1;
}

.article-stat-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-mid);
}

/* ─────────────────────────────────────────────
   BLOG SIDEBAR CTA
   Sticky sidebar call block — mirrors
   .sidebar-cta from page-city.css but
   with blog-appropriate framing.
───────────────────────────────────────────── */

.blog-sidebar-cta {
  background: var(--bg-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.blog-sidebar-cta-inner {
  padding: 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.blog-sidebar-response {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.blog-sidebar-response-stat {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--teal-mid);
  line-height: 1;
  flex-shrink: 0;
}

.blog-sidebar-response-label {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.4;
}

.blog-sidebar-response-label strong {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
}

.blog-sidebar-cta-inner h3 {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 400;
  color: #fff;
  margin: 0;
  line-height: 1.25;
}

.blog-sidebar-cta-inner p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.62);
  margin: 0;
}

.blog-sidebar-cta-inner .btn-hero-call {
  width: 100%;
  justify-content: center;
}

.blog-sidebar-cta-note {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
  margin: 0;
}

/* ─────────────────────────────────────────────
   SIDEBAR CARDS — inherits .sidebar-card and
   .sidebar-card-list from page-city.css.
   Blog-specific link list for related posts.
───────────────────────────────────────────── */

.blog-sidebar-posts {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.blog-sidebar-posts-title {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.875rem 1.125rem 0.5rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.blog-sidebar-posts-list {
  list-style: none;
  margin: 0;
  padding: 0.375rem 0;
}

.blog-sidebar-posts-list li {
  border-bottom: 1px solid var(--border);
}

.blog-sidebar-posts-list li:last-child {
  border-bottom: none;
}

.blog-sidebar-posts-list a {
  display: block;
  padding: 0.6875rem 1.125rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--text-mid);
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}

.blog-sidebar-posts-list a:hover {
  color: var(--teal);
  background: var(--teal-pale);
}

/* ─────────────────────────────────────────────
   ARTICLE BOTTOM CTA
   Full-width section below the article body.
   Mirrors .city-bottom-cta from page-city.css.
───────────────────────────────────────────── */

.article-bottom-cta {
  background: var(--bg-dark);
  padding: 3.5rem 1.25rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.article-bottom-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, rgba(15, 110, 86, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.article-bottom-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.125rem;
}

.article-bottom-cta-inner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 400;
  color: #fff;
  margin: 0;
  line-height: 1.22;
}

.article-bottom-cta-inner p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.65);
  margin: 0;
  max-width: 520px;
}

.article-bottom-cta-disclosure {
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.3);
  max-width: 500px;
  text-align: center;
  margin: 0;
}

.article-bottom-cta-disclosure a {
  color: rgba(255,255,255,0.45);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ─────────────────────────────────────────────
   MOBILE READING CTA STRIP
   Sticky bottom bar on mobile — mirrors
   .mobile-cta-strip from page-city.css.
   Separate class so it can carry different copy.
───────────────────────────────────────────── */

.article-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.875rem 1.125rem;
  z-index: 900;
}

.article-mobile-cta-inner {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.article-mobile-cta-text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  flex: 1;
  min-width: 0;
}

.article-mobile-cta-text strong {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-mobile-cta-text span {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}

.article-mobile-cta .btn-hero-call {
  flex-shrink: 0;
  font-size: 0.875rem;
  padding: 0.625rem 1.125rem;
}

/* ─────────────────────────────────────────────
   PAGE META — inherits .page-meta from
   page-city.css. No redefinition needed.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   FAQ — inherits .faq-list, .faq-item,
   .faq-question, .faq-answer from page-city.css.
   Blog FAQ sits inside .article-prose flow.
───────────────────────────────────────────── */

.article-prose .faq-list {
  margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────
   RELATED POSTS — inherits .related-posts and
   .related-post-card from page-city.css.
   Blog variant placed inside .article-main.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   COST TABLE — inherits .cost-table-wrap and
   .cost-table from page-city.css.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   LAW CALLOUT — inherits .law-callout from
   page-city.css. Used in blog posts for
   Florida statute references.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   INLINE CTA — inherits .inline-cta from
   page-city.css.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   DISCLOSURE — inherits .sidebar-disclosure
   from page-city.css.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   BREADCRUMB — inherits .breadcrumb and .sep
   from page-city.css.
───────────────────────────────────────────── */

/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */

@media (max-width: 900px) {
  .article-body {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.125rem 3rem;
  }

  .article-sidebar {
    position: static;
    order: -1; /* sidebar appears above content on mobile? No — push below */
    order: 2;
  }

  .article-stats {
    grid-template-columns: 1fr;
    gap: 1px;
  }

  .article-toc {
    margin-bottom: 2rem;
  }

  .article-mobile-cta {
    display: block;
  }

  /* Add bottom padding to prevent mobile CTA from overlapping content */
  .article-body {
    padding-bottom: 5rem;
  }

  .article-bottom-cta {
    padding: 2.5rem 1.125rem;
  }
}

@media (max-width: 600px) {
  .article-hero {
    padding: calc(var(--nav-h) + 2rem) 1rem 2rem;
  }

  .article-hero h1 {
    font-size: 1.6rem;
  }

  .article-hero-meta {
    gap: 0.75rem 1.25rem;
  }

  .article-prose {
    font-size: 1rem;
  }

  .article-prose h2 {
    font-size: 1.25rem;
    margin-top: 2.25rem;
  }

  .article-callout {
    flex-direction: column;
    gap: 0.625rem;
    padding: 1rem 1.125rem;
  }

  .article-byline {
    flex-direction: column;
    gap: 0.75rem;
  }

  .article-pullquote {
    padding: 1.125rem 1.25rem;
  }

  .blog-sidebar-cta-inner {
    padding: 1.125rem;
  }
}

@media (min-width: 901px) {
  .article-mobile-cta {
    display: none !important;
  }
}
