/* ============================================================
   WOODLEY COLLISION — BLOG ARTICLE (single post)
   Reuses the dark .blog-card (blog.css), the breadcrumb, and
   header/footer. Adds: the article header, prose typography,
   the sticky sidebar CTA, and the "Related Articles" header.
   ============================================================ */

/* ---- Article header (title + meta + hero image) ---- */
.article-head {
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-top: var(--sp-16);
  padding-bottom: var(--sp-32);
  display: flex;
  flex-direction: column;
  gap: var(--sp-24);
}
.article-head__text {
  display: flex;
  flex-direction: column;
  gap: var(--sp-20);
}
.article-head__title {
  font-size: clamp(2.5rem, 1.6rem + 2.8vw, 3.875rem);   /* 40 -> 62px */
  font-weight: 600;
  line-height: 1.06;
  color: var(--gray-900);
  max-width: 1100px;
}
.article-head__meta {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-snug);
  color: #555;
}
.article-head__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #555;
  flex-shrink: 0;
}
.article-head__media {
  height: 460px;
  border-radius: 32px;
  overflow: hidden;
  background: var(--gray-100);
}
.article-head__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Body: prose + sidebar ---- */
.article-body {
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: 120px;
  display: flex;
  gap: 44px;
  align-items: flex-start;
}
.article-prose {
  flex: 0 1 820px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-32);
}

/* Prose section: H3 heading + paragraphs/lists */
.article-section { display: flex; flex-direction: column; gap: var(--sp-12); }
.article-section__title {
  font-size: var(--fs-h3);     /* 24px */
  font-weight: 600;
  line-height: 1.17;
  color: var(--gray-900);
}
.article-section__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
  font-size: var(--fs-body);   /* 16px */
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-700);
}
.article-section__body p { margin: 0; }
.article-section__body ul {
  margin: 0;
  padding-left: var(--sp-24);
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.article-section__body li { line-height: 1.5; }

/* ---- Raw WP content (the_content) ----
   Posts written in the editor output bare h2/h3/p/ul/table tags,
   not the .article-section classes — give them the same voice. */
.article-prose h2 {
  font-size: clamp(1.5rem, 1.25rem + 0.9vw, 1.875rem);   /* 24 -> 30px */
  font-weight: 600;
  line-height: 1.2;
  color: var(--gray-900);
}
.article-prose h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--gray-900);
}
.article-prose > p {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.65;
  color: #383838;
}
.article-prose > ul,
.article-prose > ol {
  margin: 0;
  padding-left: var(--sp-24);
  color: #383838;
}
.article-prose > ul { list-style: disc; }
.article-prose > ol { list-style: decimal; }
.article-prose > ul li,
.article-prose > ol li {
  font-size: var(--fs-body);
  line-height: 1.6;
}
.article-prose > ul li + li,
.article-prose > ol li + li { margin-top: var(--sp-8); }
.article-prose > ul li::marker,
.article-prose > ol li::marker { color: var(--color-red); }
.article-prose a:not(.btn):not(.article-share__btn) {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-prose a:not(.btn):not(.article-share__btn):hover { color: var(--color-red-dark); }
.article-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.article-prose th,
.article-prose td {
  padding: var(--sp-12) var(--sp-16);
  border: 1px solid var(--gray-100);
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
}
.article-prose th {
  background: var(--surface-muted);
  font-weight: 600;
  color: var(--gray-900);
}
.article-prose td { color: #383838; }
.article-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}
.article-prose blockquote {
  margin: 0;
  padding: var(--sp-12) var(--sp-20);
  border-left: 3px solid var(--color-red);
  background: var(--surface-muted);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #555;
}

/* Share row */
.article-share {
  display: flex;
  align-items: center;
  gap: var(--sp-16);
}
.article-share__label {
  font-size: var(--fs-body);
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--gray-800);
}
.article-share__links { display: flex; gap: var(--sp-12); }
.article-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-round);
  border: 1px solid var(--gray-200);
  color: var(--gray-900);
  background: var(--white);
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.article-share__btn:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(225, 26, 23, 0.30);
}
.article-share__btn svg { width: 20px; height: 20px; }

/* ---- Sidebar CTA card ---- */
.article-aside {
  flex: 0 0 376px;
  position: sticky;
  /* Clear the sticky site header while pinned. */
  top: calc(var(--header-h) + var(--sp-24));
  display: flex;
  flex-direction: column;
  gap: var(--sp-32);
  padding: var(--sp-24);
  background: var(--white);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.01);
}
.article-aside__head { display: flex; flex-direction: column; gap: var(--sp-12); }
.article-aside__title {
  font-size: var(--fs-h3-s);   /* 20px */
  font-weight: 600;
  line-height: var(--lh-snug);
  color: var(--gray-900);
}
.article-aside__text {
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: var(--lh-snug);
  color: var(--gray-900);
}
.article-aside__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-16);
}
.article-aside__buttons { display: flex; flex-direction: column; gap: var(--sp-8); width: 100%; }
.article-aside__buttons .btn { width: 100%; justify-content: space-between; }

/* ---- Related Articles ---- */
.related {
  max-width: var(--container-outer);
  margin-inline: auto;
  padding-inline: var(--gutter);
  padding-bottom: 120px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-36);
}
.related__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-24);
}
.related__title {
  font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.25rem);   /* 28 -> 36px */
  font-weight: 600;
  line-height: 1.22;
  color: var(--gray-900);
}
.related__cta { flex-shrink: 0; }
.related__cta--mobile { display: none; }
.related__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-24);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  /* sidebar drops below the article */
  .article-body { flex-direction: column; gap: var(--sp-32); }
  .article-prose { flex: 1 1 auto; }
  .article-aside { position: static; flex: 1 1 auto; width: 100%; max-width: 560px; }
  .related__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .article-head { padding-bottom: var(--sp-32); }
  .article-head__title { font-size: clamp(2.125rem, 1.75rem + 1.6vw, 2.25rem); line-height: 1.1; }
  .article-head__media { height: 380px; border-radius: 24px; }

  .article-section__title { font-size: 1.25rem; line-height: 1.2; }   /* 20px */

  .article-body { padding-bottom: 60px; }
  .related { padding-bottom: 60px; gap: var(--sp-32); }

  /* heading-only top, button moves to the bottom */
  .related__head { align-items: stretch; }
  .related__title { font-size: 1.75rem; }   /* 28px */
  .related__cta { display: none; }
  .related__cta--mobile { display: block; }
  .related__cta--mobile .btn { width: 100%; justify-content: space-between; }
  .related__grid { grid-template-columns: 1fr; gap: var(--sp-16); }
}
