/* Component: cd-article (cards reuse shared post-card styles) */

.cd-article {
  background: #fff;
}

.cd-article__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 60px clamp(20px, 4.17vw, 60px);
}

.cd-article__content {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.cd-article__date {
  font-weight: 700;
  font-size: 20px;
  line-height: 33px;
  letter-spacing: 0.2px;
}

.cd-article__hero img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

/* Table of contents */
.cd-toc {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 34px;
  background: var(--color-header-bg);
  border: 2px solid var(--color-gold);
}

.cd-toc__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
  line-height: 28px;
  color: var(--color-gold);
}

.cd-toc__list {
  display: flex;
  flex-direction: column;
  gap: 15.5px;
}

.cd-toc__list a {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
}

.cd-toc__list a::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  background: var(--color-gold);
}

.cd-toc__list a:hover {
  text-decoration: underline;
}

/* Body */
.cd-body {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.cd-sec {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.cd-h2,
.cd-h3,
.cd-h4,
.cd-h5 {
  font-weight: 700;
  line-height: 32px;
  color: #000;
}

.cd-h2 {
  padding-bottom: 12px;
  border-bottom: 2px solid #d2b77b;
  font-size: 32px;
}

.cd-h3,
.cd-h5 {
  padding-left: 20px;
  border-left: 4px solid var(--color-gold);
  font-size: 24px;
}

.cd-h4 {
  font-size: 20px;
}

.cd-text {
  display: flex;
  flex-direction: column;
  gap: 24px;
  font-size: 16px;
  line-height: 32px;
  overflow-wrap: anywhere;
}

/* CTA + author */
.cd-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 42px 34px;
  background: var(--color-header-bg);
  border: 2px solid var(--color-gold);
  border-radius: 2px;
  text-align: center;
}

.cd-cta__title {
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  letter-spacing: -0.6px;
  color: var(--color-ink);
}

.cd-cta__text {
  max-width: 430px;
  padding-bottom: 12px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.35px;
  color: var(--color-muted);
}

.cd-cta__btn {
  padding: 14px 48px;
  border-radius: 4px;
  background: var(--color-gold);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  font-weight: 700;
  font-size: 18px;
  line-height: 20px;
  color: #fff;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.cd-cta__btn:hover {
  opacity: 0.88;
}

.cd-author {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 34px;
  background: var(--color-header-bg);
  border: 2px solid var(--color-gold);
}

.cd-author__photo {
  flex: none;
  width: 96px;
  height: 96px;
  object-fit: cover;
}

.cd-author__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  max-width: 416px;
}

.cd-author__label {
  font-family: 'Space Grotesk', var(--font-base);
  font-weight: 700;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.cd-author__text {
  font-size: 16px;
  line-height: 32px;
}

/* Previous / Next */
.cd-pager {
  display: flex;
  gap: 60px;
}

.cd-pager__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 32px;
  border-radius: 60px;
  font-family: 'Lexend', var(--font-base);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  color: #000;
  transition: background-color 0.2s ease;
}

.cd-pager__link:hover {
  background: var(--color-cream);
}

.cd-pager__link--prev img {
  transform: rotate(180deg);
}

.cd-pager__link[aria-disabled='true'] {
  opacity: 0.35;
  pointer-events: none;
}

/* Related articles */
.cd-related {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
}

.cd-related__title {
  font-weight: 700;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 1.8px;
  color: #000;
}

.cd-related__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
  align-items: start;
}

.cd-related .post-card {
  position: relative;
}

.cd-related .post-card__media {
  height: 183px;
}

.cd-related .post-card__body {
  justify-content: center;
}

.cd-related .post-card__title {
  font-size: 18px;
  letter-spacing: 0.9px;
}

.cd-related .post-card__title a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.cd-related .post-card:hover .post-card__title {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .cd-article__inner {
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .cd-article__date {
    font-size: 16px;
  }

  .cd-article__hero img {
    height: auto;
    aspect-ratio: 12 / 5;
    min-height: 180px;
  }

  .cd-toc {
    padding: 20px 16px;
  }

  .cd-h2 {
    font-size: 24px;
    line-height: 1.4;
  }

  .cd-h3,
  .cd-h5 {
    padding-left: 14px;
    font-size: 20px;
    line-height: 1.4;
  }

  .cd-h4 {
    font-size: 18px;
  }

  .cd-text {
    line-height: 1.9;
  }

  .cd-cta {
    padding: 32px 20px;
  }

  .cd-cta__title {
    font-size: 20px;
    line-height: 1.4;
  }

  .cd-author {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }

  .cd-pager {
    gap: 12px;
  }

  .cd-pager__link {
    padding: 14px 20px;
  }

  .cd-related__title {
    font-size: 26px;
  }

  .cd-related__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}
