/* ============================================================
   pages/blog-post.css — Blog Post Page
   UNIQUE layouts only — shared components in core.css
   ============================================================ */

/* Hero image banner */
.bp-hero {
  position: relative;
  width: 100%;
  max-height: 520px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.bp-hero-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

.bp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 40%, rgba(0,0,0,0.45) 100%);
  pointer-events: none;
}

.bp-hero-category {
  position: absolute;
  bottom: 24px;
  left: max(24px, calc((100% - 1080px) / 2 + 24px));
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  z-index: 2;
  transition: background 0.15s;
}

.bp-hero-category:hover {
  background: var(--color-primary-dark);
  color: #fff;
  text-decoration: none;
}

/* Article wrapper */
.bp-article {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Content grid: article body + TOC sidebar */
.bp-content-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  align-items: start;
}

/* TOC sidebar (UNIQUE) */
.bp-toc {
  position: relative;
}

.bp-toc-card {
  position: sticky;
  top: 90px;
  background: #fff;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.bp-toc-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.bp-toc-list {
  display: flex;
  flex-direction: column;
}

.bp-toc-list a {
  display: block;
  font-size: 13px;
  line-height: 1.4;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 8px 12px;
  border-left: 3px solid transparent;
  border-radius: 0 6px 6px 0;
  transition: all 0.2s;
}

.bp-toc-list a:hover {
  color: var(--color-primary);
  background: rgba(172, 50, 138, 0.04);
}

.bp-toc-list a.active {
  color: #fff;
  background: var(--color-primary);
  border-left-color: var(--color-primary-dark);
  font-weight: 600;
}

.bp-toc-progress {
  margin-top: 16px;
  height: 4px;
  background: var(--color-bg-alt);
  border-radius: 4px;
  overflow: hidden;
}

.bp-toc-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-teal));
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* Article header */
.bp-header {
  padding-top: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border-light);
  margin-bottom: 40px;
  max-width: var(--content-width);
}

/* Breadcrumbs (blog-post variant) */
.bp-breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.bp-breadcrumbs a {
  color: var(--color-text-muted);
  text-decoration: none;
}

.bp-breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.bp-breadcrumbs-sep {
  color: var(--color-border);
  font-size: 12px;
}

.bp-breadcrumbs-current {
  color: var(--color-text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Category pill (when no hero) */
.bp-category-pill {
  display: inline-block;
  background: rgba(172, 50, 138, 0.1);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  margin-bottom: 16px;
}

.bp-category-pill:hover {
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}

/* Cartola (kicker) */
.bp-cartola {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

/* Title */
.bp-title {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  margin-bottom: 0;
  letter-spacing: -0.3px;
}

/* Excerpt */
.bp-excerpt {
  font-size: 19px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-top: 16px;
  margin-bottom: 0;
}

/* Meta bar */
.bp-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 24px;
}

.bp-meta-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bp-meta-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.bp-meta-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  display: block;
  line-height: 1.3;
}

.bp-meta-details {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.bp-meta-sep {
  font-size: 10px;
}

/* Article body overrides */
.bp-body {
  font-size: 18px;
  line-height: 1.8;
  color: var(--color-text);
  max-width: var(--content-width);
  margin: 0 auto;
  min-width: 0;
}

.bp-body p {
  margin-bottom: 1.5em;
}

.bp-article-body > p:first-of-type {
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 500;
  border-left: 4px solid var(--color-primary);
  padding-left: 1.5rem;
  margin-bottom: 2.5rem;
  color: var(--color-text);
}

.bp-article-body h2::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-teal));
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.bp-body h2 {
  font-size: 26px;
  margin: 2.5em 0 0.75em;
  letter-spacing: -0.2px;
}

.bp-body h3 {
  font-size: 22px;
  margin: 2em 0 0.5em;
}

.bp-body h4 {
  font-size: 18px;
  margin: 1.5em 0 0.5em;
}

.bp-body ul,
.bp-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.5em;
}

.bp-body li {
  margin-bottom: 0.5em;
}

.bp-body blockquote {
  position: relative;
  background: rgba(172, 50, 138, 0.06);
  border-left: 5px solid var(--color-primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 2rem 2.5rem;
  margin: 2.5rem 0;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-primary-dark);
}

.bp-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.2rem;
  left: 0.8rem;
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 0.25;
  font-family: Georgia, serif;
  line-height: 1;
}

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

.bp-body img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.bp-body iframe {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: none;
  border-radius: var(--radius);
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}

.bp-body a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.bp-body a:hover {
  color: var(--color-primary-dark);
}

.bp-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 15px;
}

.bp-body th,
.bp-body td {
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  text-align: left;
}

.bp-body th {
  background: var(--color-bg-alt);
  font-weight: 600;
}

/* Tags */
.bp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--color-border-light);
  max-width: var(--content-width);
}

.bp-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.bp-tag:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  text-decoration: none;
}

/* Author bio */
.bp-author {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  padding: 28px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  max-width: var(--content-width);
}

.bp-author-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}

.bp-author-info {
  flex: 1;
}

.bp-author-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.bp-author-name {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.bp-author-bio {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
}

.bp-author-link {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-primary);
  text-decoration: none;
}

.bp-author-link:hover {
  text-decoration: underline;
}

/* Newsletter inline dark card */
.bp-newsletter-inline-wrap {
  max-width: 1080px;
  margin: 48px auto 0;
  padding: 0 24px;
}

.bp-newsletter-inline {
  position: relative;
  background: #1a1625;
  border-radius: 16px;
  padding: 48px 40px;
  text-align: center;
  overflow: hidden;
}

.bp-newsletter-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(172, 50, 138, 0.3), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.bp-newsletter-inline h3 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  position: relative;
}

.bp-newsletter-inline p {
  color: #b0aab8;
  font-size: 16px;
  margin-bottom: 24px;
  position: relative;
}

.bp-newsletter-form {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.bp-newsletter-form input {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 15px;
  min-width: 200px;
  outline: none;
  transition: border-color 0.2s;
}

.bp-newsletter-form input::placeholder {
  color: #8a8494;
}

.bp-newsletter-form input:focus {
  border-color: var(--color-primary);
}

.bp-newsletter-form .btn {
  white-space: nowrap;
}

/* Mentoria banner */
.bp-mentoria-banner-wrap {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 0 24px;
}

.bp-mentoria-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: 12px;
  padding: 24px 32px;
  color: #fff;
}

.bp-mentoria-banner p {
  font-size: 16px;
  margin: 0;
  line-height: 1.5;
}

.bp-mentoria-banner strong {
  font-weight: 700;
}

.bp-mentoria-banner .btn {
  flex-shrink: 0;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  border: none;
}

.bp-mentoria-banner .btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

/* Related posts */
.bp-related {
  margin-top: 64px;
  padding: 64px 0;
  background: var(--color-bg-alt);
}

.bp-related-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--color-text);
}

.bp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.bp-related-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: block;
}

.bp-related-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 24px rgba(172, 50, 138, 0.10);
  transform: translateY(-3px);
  text-decoration: none;
}

.bp-related-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--color-bg-alt);
}

.bp-related-card-img--empty {
  background: linear-gradient(135deg, var(--color-bg-alt) 0%, #f3eef8 100%);
}

.bp-related-card-body {
  padding: 20px;
}

.bp-related-card-cat {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.bp-related-card-body h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--color-text);
  margin-bottom: 8px;
}

.bp-related-card:hover h3 {
  color: var(--color-primary);
}

.bp-related-card-body time {
  font-size: 13px;
  color: var(--color-text-muted);
}


/* ── Responsive: Blog Post ── */

@media (max-width: 960px) {
  .bp-content-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bp-toc {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .bp-hero-img {
    height: 280px;
  }

  .bp-hero {
    max-height: 280px;
  }

  .bp-hero-category {
    bottom: 16px;
    left: 16px;
    font-size: 11px;
    padding: 5px 12px;
  }

  .bp-article {
    padding: 0 20px;
  }

  .bp-body {
    font-size: 16px;
    line-height: 1.75;
  }

  .bp-body h2 {
    font-size: 22px;
    margin: 2em 0 0.6em;
  }

  .bp-body h3 {
    font-size: 19px;
    margin: 1.8em 0 0.5em;
  }

  .bp-body ul, .bp-body ol {
    padding-left: 1.25em;
  }

  .bp-body li {
    margin-bottom: 0.6em;
    line-height: 1.7;
  }

  .bp-header {
    padding-top: 24px;
    padding-bottom: 24px;
    margin-bottom: 28px;
  }

  .bp-breadcrumbs {
    margin-bottom: 16px;
    flex-wrap: wrap;
  }

  .bp-breadcrumbs-current {
    max-width: 200px;
  }

  .bp-article-body {
    padding: 0;
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .bp-title {
    font-size: 1.5rem;
    line-height: 1.25;
  }

  .bp-excerpt {
    font-size: 17px;
  }

  .bp-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .bp-meta-details {
    flex-wrap: wrap;
    gap: 4px;
  }

  .bp-body {
    font-size: 17px;
    line-height: 1.75;
  }

  .bp-body h2 {
    font-size: 22px;
  }

  .bp-body h3 {
    font-size: 19px;
  }

  .bp-body img,
  .bp-body iframe {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 8px;
  }

  .bp-body blockquote {
    padding: 1.5rem 1.5rem;
    margin: 1.5em 0;
    font-size: 1.05rem;
  }

  .bp-article-body > p:first-of-type {
    font-size: 1.1rem;
    padding-left: 1rem;
  }

  .bp-tags {
    margin-top: 32px;
    padding-top: 24px;
  }

  .bp-author {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    margin-top: 32px;
  }

  .bp-newsletter-inline-wrap {
    padding: 0 16px;
    margin-top: 32px;
  }

  .bp-newsletter-inline {
    padding: 32px 24px;
  }

  .bp-newsletter-inline h3 {
    font-size: 20px;
  }

  .bp-newsletter-form {
    flex-direction: column;
  }

  .bp-newsletter-form input,
  .bp-newsletter-form button {
    min-width: 0;
    width: 100%;
  }

  .bp-mentoria-banner-wrap {
    padding: 0 16px;
    margin-top: 24px;
  }

  .bp-mentoria-banner {
    flex-direction: column;
    text-align: center;
    padding: 24px;
    gap: 16px;
  }

  .bp-related {
    margin-top: 40px;
    padding: 40px 0;
  }

  .bp-related-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .bp-related-card-img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .bp-hero-img {
    height: 220px;
  }

  .bp-hero {
    max-height: 220px;
  }

  .bp-title {
    font-size: 1.3rem;
  }

  .bp-excerpt {
    font-size: 16px;
  }

  .bp-body {
    font-size: 16px;
  }

  .bp-body img,
  .bp-body iframe {
    border-radius: 6px;
  }

  .bp-related-card-img {
    height: 160px;
  }
}
