/* ============================================================
   Regenerative Performance - Blog Template Styles
   Extends: design-system.css

   All colors, fonts, spacing reference design system variables.
   Scoped under .blog-* prefix to avoid collisions.
   ============================================================ */

/* ---- Reading Progress Bar (CSS-only via scroll-driven animation; degrades to no bar on legacy browsers) ---- */

.blog-reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--rp-orange), var(--rp-purple));
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: calc(var(--z-sticky) + 10);
  animation: blog-progress linear both;
  animation-timeline: scroll(root);
}

/* ---- Blog Hero ---- */
.blog-hero {
  position: relative;
  padding: var(--space-5xl) 0 var(--space-4xl);
  background: linear-gradient(
    135deg,
    var(--rp-blue, #27475E) 0%,
    #1a2a3a 40%,
    #2d4a5e 70%,
    var(--rp-blue, #27475E) 100%
  );
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(220, 150, 45, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(220, 150, 45, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.blog-hero .container {
  position: relative;
  z-index: 2;
}

.blog-hero h1 {
  color: var(--rp-white);
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-lg);
  max-width: 800px;
}

/* ---- Breadcrumb ---- */
.blog-breadcrumb {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.blog-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.blog-breadcrumb a:hover {
  color: var(--rp-orange);
}

.blog-breadcrumb .breadcrumb-sep {
  color: rgba(255, 255, 255, 0.4);
  font-size: var(--text-xs);
}

/* ---- Blog Meta ---- */
.blog-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  flex-wrap: wrap;
}

.blog-meta .meta-sep {
  width: 4px;
  height: 4px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* ---- Two-Column Layout (TOC + Article) ---- */
.blog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-3xl);
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-5xl);
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---- Table of Contents ---- */
.blog-toc {
  position: sticky;
  top: 100px;
  align-self: start;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: var(--space-md);
}

.blog-toc-title {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rp-orange);
  margin-bottom: var(--space-md);
}

.blog-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc li {
  margin-bottom: var(--space-xs);
}

.blog-toc a {
  display: block;
  font-size: var(--text-sm);
  color: var(--rp-gray);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-left: 2px solid transparent;
  transition: all var(--duration-fast) var(--ease-default);
  line-height: 1.4;
}

.blog-toc a:hover {
  color: var(--rp-blue);
  border-left-color: var(--rp-blue-tint-25);
}

.blog-toc a.active {
  color: var(--rp-blue);
  border-left-color: var(--rp-orange);
  font-weight: 600;
  background: var(--rp-orange-10);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* ---- Article Body ---- */
.blog-article {
  max-width: var(--container-narrow);
  font-size: var(--text-md);
  line-height: 1.75;
  color: var(--rp-gray);
}

.blog-article h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--rp-blue);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
  line-height: var(--leading-tight);
  scroll-margin-top: 100px;
}

.blog-article h3 {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--rp-blue);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
  line-height: var(--leading-tight);
}

.blog-article p {
  margin-bottom: var(--space-lg);
}

.blog-article ul,
.blog-article ol {
  margin-bottom: var(--space-lg);
  padding-left: var(--space-xl);
}

.blog-article li {
  margin-bottom: var(--space-sm);
}

.blog-article strong {
  color: var(--rp-dark);
  font-weight: 600;
}

/* ---- Intro Blockquote ---- */

/* ---- Key Facts Box ---- */
.blog-key-facts {
  background: var(--rp-light);
  border-left: 4px solid var(--rp-orange);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-xl) var(--space-2xl);
  margin: var(--space-2xl) 0 var(--space-3xl) 0;
}

.blog-key-facts h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--rp-blue);
  margin-bottom: var(--space-md);
  margin-top: 0;
}

.blog-key-facts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-key-facts li {
  position: relative;
  padding-left: var(--space-xl);
  margin-bottom: var(--space-sm);
  font-size: var(--text-base);
  line-height: 1.7;
}

.blog-key-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--rp-orange);
}

/* ---- Full Width Image ---- */

/* ---- Inline Image ---- */
.blog-image-inline {
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0 var(--space-lg) var(--space-xl);
  max-width: 380px;
  float: right;
  box-shadow: var(--shadow-md);
}

/* ---- Comparison Section ---- */
.blog-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

.blog-comparison-card {
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  border: 2px solid var(--rp-gray-tint-10);
}

.blog-comparison-card.highlight {
  border-color: var(--rp-orange);
  background: var(--rp-orange-10);
}

.blog-comparison-card h4 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--rp-blue);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.blog-comparison-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-comparison-card li {
  padding: var(--space-xs) 0;
  font-size: var(--text-base);
  line-height: 1.6;
  position: relative;
  padding-left: var(--space-lg);
}

.blog-comparison-card li::before {
  position: absolute;
  left: 0;
  font-size: var(--text-sm);
}

.blog-comparison-card.highlight li::before {
  content: '+';
  color: var(--rp-success);
  font-weight: 700;
}

.blog-comparison-card:not(.highlight) li::before {
  content: '-';
  color: var(--rp-error);
  font-weight: 700;
}

/* ---- Inline CTA ---- */
.blog-cta-inline {
  background: var(--rp-blue);
  color: var(--rp-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin: var(--space-3xl) 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  clear: both;
}

.blog-cta-inline h3 {
  color: var(--rp-white);
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

.blog-cta-inline p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
  font-size: var(--text-base);
}

.blog-cta-inline .cta-body {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.blog-cta-inline .cta-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.blog-cta-inline .btn-outline {
  border: 3px solid var(--rp-orange);
  color: var(--rp-white);
  background: transparent;
  text-decoration: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* ---- Process Steps ---- */
.blog-process-steps {
  counter-reset: blog-step;
  margin: var(--space-2xl) 0;
}

.blog-process-step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: var(--space-xl);
  align-items: start;
  margin-bottom: var(--space-2xl);
  counter-increment: blog-step;
}

.blog-step-number {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--rp-orange);
  color: var(--rp-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  flex-shrink: 0;
}

.blog-step-content h3 {
  margin-top: var(--space-xs);
}

.blog-step-image {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  margin-top: var(--space-md);
  box-shadow: var(--shadow-sm);
}

/* ---- FAQ Accordion ---- */
.blog-faq {
  margin: var(--space-3xl) 0;
}

.blog-faq h2 {
  margin-bottom: var(--space-xl);
}

.blog-faq details {
  border-bottom: 1px solid var(--rp-gray-tint-10);
}

.blog-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--rp-blue);
  cursor: pointer;
  list-style: none;
  transition: color var(--duration-fast) var(--ease-default);
}

.blog-faq summary::-webkit-details-marker {
  display: none;
}

.blog-faq summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--rp-blue);
  border-bottom: 2px solid var(--rp-blue);
  transform: rotate(-45deg);
  transition: transform var(--duration-normal) var(--ease-default);
  flex-shrink: 0;
  margin-left: var(--space-md);
}

.blog-faq details[open] summary::after {
  transform: rotate(45deg);
}

.blog-faq summary:hover {
  color: var(--rp-orange);
}

.blog-faq .faq-answer {
  padding-bottom: var(--space-lg);
  color: var(--rp-gray);
  line-height: 1.7;
  font-size: var(--text-base);
  overflow: visible;
  max-height: none;
}

.blog-faq details[open] .faq-answer {
  display: block;
  overflow: visible;
  max-height: none;
}

/* ---- Author Bio ---- */
.blog-author-bio {
  display: flex;
  gap: var(--space-xl);
  align-items: flex-start;
  padding: var(--space-2xl);
  background: var(--rp-light);
  border-radius: var(--radius-lg);
  margin: var(--space-3xl) 0;
}

.blog-author-bio img {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: center 20%;
  flex-shrink: 0;
  border: 3px solid var(--rp-orange);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.blog-author-bio h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--rp-blue);
  margin-bottom: var(--space-sm);
  margin-top: 0;
}

.blog-author-bio p {
  font-size: var(--text-base);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.blog-author-bio p:last-child {
  margin-bottom: 0;
}

/* ---- References ---- */
.blog-references {
  margin-top: var(--space-3xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--rp-gray-tint-10);
}

.blog-references h2 {
  font-size: var(--text-lg);
  margin-top: 0;
  margin-bottom: var(--space-md);
}

/* ---- Related Content ---- */
.blog-related {
  margin: var(--space-3xl) 0;
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--rp-gray-tint-10);
}

.blog-related h2 {
  margin-top: 0;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.blog-related-card {
  background: var(--rp-white);
  border: 1px solid var(--rp-gray-tint-10);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-decoration: none;
  transition: transform var(--duration-normal) var(--ease-default),
              box-shadow var(--duration-normal) var(--ease-default),
              border-color var(--duration-normal) var(--ease-default);
  display: block;
}

.blog-related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--rp-orange-tint-25);
}

.blog-related-card .card-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rp-orange);
  margin-bottom: var(--space-xs);
}

.blog-related-card h4 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--rp-blue);
  line-height: 1.4;
  margin-bottom: var(--space-sm);
}

.blog-related-card p {
  font-size: var(--text-sm);
  color: var(--rp-gray);
  line-height: 1.6;
}

.blog-related-grid {
  align-items: stretch;
}

.blog-related-card {
  display: flex;
  flex-direction: column;
}

.blog-related-card p {
  flex-grow: 1;
}

/* ---- Outcome Stats ---- */

/* ---- Images: visible by default; CSS-only fade-in via animation on first paint ---- */
.blog-article img {
  opacity: 1;
  animation: blog-img-fade-in 0.6s ease both;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-toc {
    position: static;
    max-height: none;
    padding: var(--space-lg);
    background: var(--rp-light);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
  }

  
}

@media (max-width: 768px) {
  .blog-hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .blog-hero h1 {
    font-size: var(--text-2xl);
  }

  .blog-meta {
    font-size: var(--text-xs);
  }

  .blog-article {
    font-size: var(--text-base);
  }

  .blog-article h2 {
    font-size: var(--text-xl);
  }

  .blog-article h3 {
    font-size: var(--text-lg);
  }

  

  .blog-image-inline {
    float: none;
    max-width: 100%;
    margin: var(--space-lg) 0;
  }

  .blog-comparison {
    grid-template-columns: 1fr;
  }

  .blog-cta-inline {
    padding: var(--space-xl) var(--space-lg);
  }

  .blog-process-step {
    grid-template-columns: 44px 1fr;
  }

  .blog-step-number {
    width: 44px;
    height: 44px;
    font-size: var(--text-lg);
  }

  .blog-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-xl);
  }

  .blog-related-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .blog-hero h1 {
    font-size: var(--text-xl);
  }

  .blog-key-facts {
    padding: var(--space-lg);
  }

  

  .blog-cta-inline .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-cta-inline .cta-buttons .btn {
    text-align: center;
  }

  .blog-process-step {
    grid-template-columns: 1fr;
  }

  .blog-step-number {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
  }
}

/* ---- Ensure article list bullets show ---- */
.blog-article > ul {
  list-style: disc;
}

/* ---- Provider Name No-Wrap ---- */

/* ---- Ghost button on dark CTA containers (ported from phase1-v2 .cta-banner .btn-ghost) ---- */

/* ---- Print Styles ---- */
@media print {
  .blog-reading-progress,
  .blog-toc,
  .blog-cta-inline {
    display: none !important;
  }

  .blog-layout {
    grid-template-columns: 1fr;
  }

  .blog-article {
    max-width: 100%;
  }

  .blog-hero {
    background-image: none !important;
    background: var(--rp-blue) !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ===== APPENDED 2026-04-26: nav.css + mobile override ===== */

/* MOBILE NAV OVERRIDE: blog runs without JS, so the hamburger + slide-out menu
   cannot function. Force the live-site desktop nav to stay visible across all
   viewport sizes; allow it to wrap. Hide all hamburger/mobile-only nav chrome.
   This block must come BEFORE the appended nav.css so the !important rules win
   the cascade against the original media queries. */

@media(max-width:768px){
  .nav-sticky{flex-wrap:wrap;padding:0.6rem 1rem;min-height:auto}
  .nav-desktop-links{order:3;width:100%;justify-content:center;gap:0.75rem;font-size:0.85rem}
  .nav-actions{margin-left:auto}
  .nav-item--has-dropdown .nav-dropdown{position:static;opacity:1;visibility:visible;transform:none;box-shadow:none;background:transparent;padding:0;display:none}
  .nav-item--has-dropdown:hover .nav-dropdown,
  .nav-item--has-dropdown:focus-within .nav-dropdown{display:block}
}

/* Keyboard accessibility: nav.css keys dropdown reveal off :hover. Add
   :focus-within so keyboard tab users can also open the dropdown. */

/* ----- nav.css copied verbatim from phase1-v2/css/nav.css ----- */

@media(max-width:1024px){.nav-desktop-links{display:none}.nav-actions{display:none}.nav-mobile-actions{display:flex}.nav-hamburger{display:flex}.nav-logo img{height:36px}.nav-sticky{padding:0 var(--space-md);min-height:72px}}@media(min-width:1025px){.nav-mobile-menu{display:none}.nav-mobile-overlay{display:none}.nav-hamburger{display:none}.nav-mobile-actions{display:none}}
