/* =========================================================
   Single blog post
   Loaded only on single posts. Global styles (reset, colours,
   nav, footer, .fade-up) come from style.css.
   ========================================================= */

:root { --content-width: 720px; }

.breadcrumb { background: var(--light); border-bottom: 1px solid var(--border); padding: 0.75rem 2rem; margin-top: 68px; }
.breadcrumb-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--mid); flex-wrap: wrap; }
.breadcrumb a { color: var(--mid); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { color: var(--border); }
.breadcrumb-current { color: var(--text-soft); font-weight: 500; }
.article-hero { background: var(--navy); padding: 5rem 2rem 4rem; position: relative; overflow: hidden; }
.article-hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 70% 70% at 70% 40%, rgba(200,169,110,0.09) 0%, transparent 65%); }
.article-hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px); background-size: 55px 55px; }
.article-hero-inner { max-width: var(--content-width); margin: 0 auto; position: relative; z-index: 2; }
.article-cat-badge { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; background: rgba(239,68,68,0.15); color: #f87171; padding: 0.3rem 0.8rem; border-radius: 20px; margin-bottom: 1.5rem; }
.article-hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; color: var(--white); line-height: 1.2; letter-spacing: -0.02em; margin-bottom: 1.2rem; }
.article-hero-sub { font-size: 1.05rem; color: rgba(255,255,255,0.55); line-height: 1.7; margin-bottom: 2rem; }
.article-meta-bar { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.08); }
.meta-author { display: flex; align-items: center; gap: 0.6rem; }
.meta-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; color: var(--navy); }
.meta-author-name { font-size: 0.85rem; font-weight: 600; color: var(--white); }
.meta-author-role { font-size: 0.72rem; color: rgba(255,255,255,0.35); }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.2); }
.meta-item { font-size: 0.8rem; color: rgba(255,255,255,0.4); }
.progress-bar { position: fixed; top: 68px; left: 0; right: 0; height: 3px; background: var(--border); z-index: 998; }
.progress-fill { height: 100%; background: var(--accent); width: 0%; transition: width 0.1s linear; }
.article-layout { max-width: 1200px; margin: 0 auto; padding: 4rem 2rem 6rem; display: grid; grid-template-columns: 1fr 300px; gap: 5rem; align-items: start; }
.article-content { max-width: var(--content-width); }
.toc-box { background: var(--accent-pale); border: 1px solid var(--accent-light); border-radius: var(--radius-lg); padding: 1.6rem 1.8rem; margin-bottom: 2.5rem; }
.toc-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mid); margin-bottom: 1rem; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; counter-reset: toc; }
.toc-list li { counter-increment: toc; }
.toc-list a { font-size: 0.875rem; font-weight: 500; color: var(--text-soft); text-decoration: none; display: flex; align-items: baseline; gap: 0.6rem; transition: color 0.2s; }
.toc-list a::before { content: counter(toc, decimal-leading-zero); font-size: 0.7rem; font-weight: 700; color: var(--accent); flex-shrink: 0; }
.toc-list a:hover { color: var(--navy); }
.prose { font-size: 1rem; line-height: 1.8; color: var(--text); }
.prose p { margin-bottom: 1.5rem; }
.prose h2 { font-family: 'Playfair Display', serif; font-size: 1.75rem; font-weight: 700; color: var(--navy); margin: 3rem 0 1rem; line-height: 1.25; letter-spacing: -0.01em; padding-top: 1rem; border-top: 1px solid var(--border); }
.prose h3 { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-weight: 700; color: var(--navy); margin: 2rem 0 0.75rem; line-height: 1.3; }
.prose ul, .prose ol { margin: 0 0 1.5rem 1.5rem; }
.prose li { margin-bottom: 0.5rem; font-size: 1rem; line-height: 1.7; }
.prose strong { font-weight: 600; color: var(--navy); }
.prose em { font-style: italic; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; transition: color 0.2s; }
.prose a:hover { color: var(--navy); }
.callout { background: var(--accent-pale); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.5rem; margin: 2rem 0; }
.callout-label { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.callout p { margin: 0; font-size: 0.95rem; color: var(--text-soft); line-height: 1.65; }
.stat-highlight { background: var(--navy); border-radius: var(--radius-lg); padding: 2rem; margin: 2.5rem 0; display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; text-align: center; }
.sh-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--accent); }
.sh-label { font-size: 0.78rem; color: rgba(255,255,255,0.45); margin-top: 0.25rem; line-height: 1.4; }
.step-block { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.8rem; margin: 1.5rem 0; position: relative; }
.step-block::before { content: attr(data-step); position: absolute; top: -14px; left: 1.5rem; background: var(--navy); color: var(--accent); font-family: 'Playfair Display', serif; font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.8rem; border-radius: 20px; letter-spacing: 0.05em; }
.step-block h4 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 0.6rem; margin-top: 0.3rem; }
.step-block p { font-size: 0.9rem; color: var(--text-soft); margin: 0; line-height: 1.65; }
.prose-table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.88rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.prose-table thead { background: var(--navy); }
.prose-table th { padding: 0.85rem 1.2rem; text-align: left; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.prose-table td { padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
.prose-table tr:last-child td { border-bottom: none; }
.prose-table tr:nth-child(even) td { background: var(--light); }
.td-good { color: #059669; font-weight: 600; }
.td-bad { color: #dc2626; font-weight: 600; }
.pull-quote { border-left: 3px solid var(--accent); padding: 0.75rem 0 0.75rem 1.5rem; margin: 2.5rem 0; }
.pull-quote p { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-style: italic; color: var(--navy); line-height: 1.5; margin: 0; }
.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.article-tag { font-size: 0.78rem; font-weight: 500; padding: 0.35rem 0.8rem; border-radius: 20px; border: 1.5px solid var(--border); color: var(--text-soft); text-decoration: none; transition: var(--transition); }
.article-tag:hover { border-color: var(--accent); color: var(--navy); background: var(--accent-pale); }
.share-strip { display: flex; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1.4rem 1.6rem; background: var(--light); border-radius: var(--radius-lg); border: 1px solid var(--border); flex-wrap: wrap; }
.share-label { font-size: 0.8rem; font-weight: 600; color: var(--text-soft); }
.share-btns { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.share-btn { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; font-weight: 600; padding: 0.45rem 0.85rem; border-radius: 8px; border: 1.5px solid var(--border); color: var(--text-soft); cursor: pointer; transition: var(--transition); background: var(--white); font-family: inherit; }
.share-btn:hover { border-color: var(--accent); color: var(--navy); }
.related-section { margin-top: 4rem; padding-top: 3rem; border-top: 1px solid var(--border); }
.related-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--navy); margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.related-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; text-decoration: none; color: inherit; transition: var(--transition); display: block; }
.related-card:hover { border-color: var(--accent-light); box-shadow: 0 6px 24px rgba(15,25,35,0.07); transform: translateY(-2px); }
.related-cat { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.5rem; }
.related-card h4 { font-size: 0.9rem; font-weight: 600; color: var(--navy); line-height: 1.4; margin-bottom: 0.4rem; transition: color 0.2s; }
.related-card:hover h4 { color: var(--accent); }
.related-read { font-size: 0.75rem; color: var(--mid); }
.sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; background: var(--white); }
.sidebar-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); margin-bottom: 1rem; }
.toc-sidebar-list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.toc-sidebar-list a { font-size: 0.82rem; color: var(--text-soft); text-decoration: none; padding: 0.4rem 0.6rem; border-radius: 6px; display: block; transition: var(--transition); border-left: 2px solid transparent; }
.toc-sidebar-list a:hover, .toc-sidebar-list a.active { background: var(--accent-pale); color: var(--navy); border-left-color: var(--accent); }
.sidebar-cta { background: var(--navy); border: none; }
.sidebar-cta .sidebar-label { color: rgba(255,255,255,0.35); }
.sidebar-cta h3 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--white); margin-bottom: 0.5rem; line-height: 1.3; }
.sidebar-cta p { font-size: 0.82rem; color: rgba(255,255,255,0.45); line-height: 1.6; margin-bottom: 1.2rem; }
.sidebar-cta-btn { display: block; background: var(--accent); color: var(--navy); text-align: center; padding: 0.75rem 1rem; border-radius: 8px; font-weight: 600; font-size: 0.88rem; text-decoration: none; transition: var(--transition); }
.sidebar-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.cta-banner-wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem 5rem; }
.cta-banner { background: var(--navy); border-radius: var(--radius-lg); padding: 3.5rem 4rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(200,169,110,0.06); }
.cta-banner-eyebrow { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.6rem; }
.cta-banner h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--white); font-weight: 700; line-height: 1.25; }
.cta-banner p { font-size: 0.88rem; color: rgba(255,255,255,0.45); margin-top: 0.5rem; max-width: 400px; }
.btn-accent { background: var(--accent); color: var(--navy); padding: 0.9rem 2rem; border-radius: 8px; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; transition: transform 0.2s, box-shadow 0.2s; display: inline-block; }
.btn-accent:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,169,110,0.3); }
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; gap: 3rem; }
  .sidebar { position: static; }
  .toc-sidebar, .sidebar-toc-wrap { display: none; }
}
@media (max-width: 768px) {
  .stat-highlight { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 2.5rem 1.5rem; }
  .article-layout { padding: 2.5rem 1.25rem 4rem; }
  .cta-banner-wrap { padding: 0 1.25rem 4rem; }
}
@media (max-width: 480px) {
  .stat-highlight { grid-template-columns: 1fr; }
  .share-strip { flex-direction: column; align-items: flex-start; }
}


/* ---------- WordPress additions ---------- */
a.article-cat-badge { text-decoration: none; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 90px; }

/* Featured image as the hero background */
.article-hero-media { position: absolute; inset: 0; z-index: 0; }
.article-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.article-hero-overlay { position: absolute; inset: 0; z-index: 1; background:
  linear-gradient(180deg, rgba(15,25,35,0.80) 0%, rgba(15,25,35,0.86) 55%, rgba(15,25,35,0.95) 100%); }
.article-hero.has-featured-image .article-hero-bg,
.article-hero.has-featured-image .article-hero-grid { z-index: 1; }
.article-hero.has-featured-image .article-hero-sub { color: rgba(255,255,255,0.75); }

/* Images, captions and embeds from the editor */
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose figure { margin: 2rem 0; }
.prose figcaption, .prose .wp-element-caption { font-size: 0.8rem; color: var(--mid); margin-top: 0.6rem; text-align: center; }
.prose iframe, .prose video { max-width: 100%; }
.prose .wp-block-embed__wrapper iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.prose h4 { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 1.75rem 0 0.6rem; }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose code { background: var(--light); padding: 0.1rem 0.35rem; border-radius: 4px; font-size: 0.9em; }
.prose pre { background: var(--navy); color: #e6edf3; padding: 1.2rem 1.4rem; border-radius: var(--radius); overflow-x: auto; margin: 2rem 0; font-size: 0.85rem; }
.prose pre code { background: none; padding: 0; color: inherit; }

/* Standard editor blocks styled like the design */
.prose blockquote, .prose .wp-block-quote { border-left: 3px solid var(--accent); padding: 0.75rem 0 0.75rem 1.5rem; margin: 2.5rem 0; }
.prose blockquote p { font-family: 'Playfair Display', serif; font-size: 1.25rem; font-style: italic; color: var(--navy); line-height: 1.5; margin: 0; }
.prose blockquote cite { display: block; margin-top: 0.6rem; font-size: 0.8rem; font-style: normal; color: var(--mid); }
.prose .wp-block-table { margin: 2rem 0; overflow-x: auto; }
.prose table:not(.prose-table) { width: 100%; border-collapse: collapse; font-size: 0.88rem; border: 1px solid var(--border); }
.prose table:not(.prose-table) thead { background: var(--navy); }
.prose table:not(.prose-table) th { padding: 0.85rem 1.2rem; text-align: left; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); }
.prose table:not(.prose-table) td { padding: 0.85rem 1.2rem; border-bottom: 1px solid var(--border); color: var(--text-soft); vertical-align: top; }
.prose table:not(.prose-table) tr:nth-child(even) td { background: var(--light); }

.article-tags-label { font-size: 0.78rem; font-weight: 600; color: var(--mid); margin-right: 0.25rem; align-self: center; }

.article-info { display: flex; flex-direction: column; gap: 0.75rem; }
.article-info-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.82rem; }
.article-info-row span:first-child { color: var(--mid); }
.article-info-row span:last-child { font-weight: 500; color: var(--text); text-align: right; }

.back-to-blog { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; font-weight: 600; color: var(--text-soft); text-decoration: none; padding: 1rem 1.4rem; border: 1.5px solid var(--border); border-radius: var(--radius); transition: var(--transition); }
.back-to-blog:hover { border-color: var(--accent); color: var(--navy); }

.post-pages { margin-top: 2rem; font-weight: 600; }
