/* Individual Blog Post Styles */

:root {
  --bg-off-white: #f8f8f8;
  --bg-dark: #0a1628;
  --text-dark: #111;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  background: #fff;
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
}

/* ── Accent Bar ── */
.bp-accent-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--primary-blue), #3a7ae8);
  width: 100%;
}

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--cta-accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* ── Post Header ── */
.bp-header {
  background: var(--bg-dark);
  padding: clamp(3.5rem, 7vw, 6rem) clamp(1.25rem, 5vw, 6rem) clamp(3rem, 6vw, 5rem);
  text-align: center;
}

.bp-header__inner {
  max-width: 860px;
  margin: 0 auto;
}

.bp-header__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.bp-header__category {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light-red);
}

.bp-header__divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.2);
}

.bp-header__date,
.bp-header__read-time {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.bp-header__title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.5rem;
}

.bp-header__desc {
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.65);
  max-width: 40rem;
  margin: 0 auto;
}

/* ── Hero Image ── */
.bp-hero-image-wrap {
  background: var(--bg-off-white);
  padding: 0 clamp(1.25rem, 5vw, 6rem);
}

.bp-hero-image-wrap__inner {
  max-width: 1000px;
  margin: 0 auto;
  transform: translateY(-2.5rem);
}

.bp-hero-image {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.bp-hero-image--placeholder {
  width: 100%;
  aspect-ratio: 21 / 9;
  background: linear-gradient(135deg, var(--primary-blue) 0%, #1a5fd1 60%, #2e70e8 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.bp-hero-image--placeholder svg {
  width: 64px;
  height: 64px;
  opacity: 0.2;
  fill: #fff;
}

/* ── Article Layout ── */
.bp-layout {
  padding: clamp(1rem, 3vw, 2rem) clamp(1.25rem, 5vw, 6rem) clamp(4rem, 7vw, 6rem);
}

.bp-layout__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 4rem;
  align-items: start;
}

/* ── Article Body ── */
.bp-article {
  min-width: 0;
}

.bp-article h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  margin-top: 2.75rem;
  margin-bottom: 1rem;
}

.bp-article h3 {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.bp-article p {
  font-size: 1rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1.25rem;
}

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

.bp-article ul,
.bp-article ol {
  margin: 1rem 0 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.bp-article li {
  font-size: 1rem;
  line-height: 1.7;
  color: #444;
}

.bp-article strong {
  font-weight: 800;
  color: var(--text-dark);
}

.bp-article a {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bp-article a:hover {
  color: #00337a;
}

/* ── Section Divider ── */
.bp-article hr {
  border: none;
  height: 2px;
  background: #f0f0f0;
  margin: 2.5rem 0;
}

/* ── Callout Box ── */
.bp-callout {
  background: rgba(0, 71, 171, 0.05);
  border-left: 4px solid var(--primary-blue);
  border-radius: 0 12px 12px 0;
  padding: 1.5rem 1.75rem;
  margin: 2rem 0;
}

.bp-callout p {
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin: 0;
}

.bp-callout strong {
  color: var(--primary-blue);
}

/* ── Key Takeaway ── */
.bp-takeaway {
  background: var(--primary-blue);
  border-radius: 14px;
  padding: 2rem 2.25rem;
  margin: 2.5rem 0;
}

.bp-takeaway__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light-red);
  margin-bottom: 0.75rem;
}

.bp-takeaway p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin: 0;
}

/* ── Checklist ── */
.bp-checklist {
  list-style: none;
  margin: 1rem 0 1.5rem 0 !important;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bp-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #444;
}

.bp-checklist li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  background: var(--primary-blue);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: center;
}

/* ── Sidebar ── */
.bp-sidebar {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Table of Contents */
.bp-toc {
  background: var(--bg-off-white);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
}

.bp-toc__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light-red);
  margin-bottom: 1rem;
}

.bp-toc__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bp-toc__list a {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: #555;
  text-decoration: none;
  display: block;
  padding: 0.3rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.75rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.bp-toc__list a:hover {
  color: var(--primary-blue);
  border-left-color: var(--primary-blue);
}

/* Sidebar CTA */
.bp-sidebar-cta {
  background: var(--primary-blue);
  border-radius: 14px;
  padding: 1.75rem;
  text-align: center;
}

.bp-sidebar-cta__eyebrow {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light-red);
  margin-bottom: 0.75rem;
}

.bp-sidebar-cta__title {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}

.bp-sidebar-cta__desc {
  font-size: 0.85rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 1.25rem;
}

.bp-sidebar-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--cta-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 100%;
}

.bp-sidebar-cta__btn:hover {
  background: #c82308;
  transform: translateY(-1px);
}

/* Author Box */
.bp-author {
  background: var(--bg-off-white);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.bp-author__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #fff;
}

.bp-author__name {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.bp-author__role {
  font-size: 0.78rem;
  color: #999;
  font-weight: 600;
}

/* ── Tags ── */
.bp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
}

.bp-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.45rem 1.1rem;
  border: 2px solid #ddd;
  border-radius: 999px;
  color: #666;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.bp-tag:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

/* ── Back to Blog ── */
.bp-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary-blue);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: gap 0.2s ease;
}

.bp-back svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.bp-back:hover {
  gap: 0.75rem;
}

.bp-back:hover svg {
  transform: translateX(-3px);
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .bp-layout__inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .bp-sidebar {
    position: static;
  }

  /* Show TOC and author inline on mobile */
  .bp-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }

  .bp-sidebar-cta {
    grid-column: 1 / -1;
  }
}

@media (max-width: 600px) {
  .bp-hero-image-wrap__inner {
    transform: translateY(-1.5rem);
  }

  .bp-hero-image,
  .bp-hero-image--placeholder {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .bp-sidebar {
    grid-template-columns: 1fr;
  }

  .bp-callout {
    padding: 1.25rem 1.5rem;
  }

  .bp-takeaway {
    padding: 1.5rem 1.5rem;
  }
}
