/* ==========================================================================
   Aprotime Article Detail Page Styles
   - Matches Figma canvas specifications (1440px canvas, responsive to mobile)
   - Consistent typography: DM Sans, Outfit, Geist, Inter
   - Exact hex colors: #CE0000, #3F3F3F, #FAFAFA, #FFF0F0, #F3F4F6, #FFFFFF
   ========================================================================== */

.article-detail-page-wrapper {
  margin: 0;
  padding: 0;
  background-color: #FFFFFF;
  color: var(--color-text-main, #3F3F3F);
  font-family: var(--font-family-base, 'DM Sans', -apple-system, sans-serif);
  -webkit-font-smoothing: antialiased;
}

.article-detail-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ==========================================================================
   Back Navigation Bar (96px height in Figma)
   ========================================================================== */
.article-back-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem 1rem; /* 40px top */
  box-sizing: border-box;
}

.article-back-container {
  width: 100%;
  max-width: 64rem; /* 1024px */
}

.btn-back-articles {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* 8px */
  text-decoration: none;
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 1rem; /* 16px */
  line-height: 1.5rem; /* 24px */
  color: rgba(63, 63, 63, 0.6);
  transition: color 0.15s ease, transform 0.15s ease;
}

.btn-back-articles:hover {
  color: #CE0000;
  transform: translateX(-3px);
}

.btn-back-articles .back-arrow {
  font-size: 1.125rem;
  line-height: 1;
}

/* ==========================================================================
   Main Article Card Container (1024px max-width, #FAFAFA, radius 24px)
   ========================================================================== */
.article-body-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 1.5rem;
  box-sizing: border-box;
}

.article-content-card {
  width: 100%;
  max-width: 64rem; /* 1024px (976px inner + 48px margin) */
  background: #FAFAFA;
  border-radius: 1.5rem; /* 24px */
  padding: 3.5rem; /* 56px */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.article-inner-wrapper {
  width: 100%;
  max-width: 48rem; /* 768px */
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Category Pill (#FFF0F0, #CE0000, radius 33554400px) */
.article-category-badge {
  background: #FFF0F0;
  border-radius: 9999px;
  padding: 0.375rem 0.75rem; /* 6px 12px */
  display: inline-flex;
  align-items: center;
}

.article-category-badge span {
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 500;
  font-size: 0.75rem; /* 12px */
  line-height: 1rem; /* 16px */
  letter-spacing: 0.0375rem; /* 0.6px */
  text-transform: uppercase;
  color: #CE0000;
}

/* Meta: Date and Read Time */
.article-meta-row {
  margin-top: 1.25rem; /* 20px */
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-size: 0.875rem; /* 14px */
  line-height: 1.25rem; /* 20px */
  color: rgba(63, 63, 63, 0.45);
}

/* Main Article Title (40px, 65px line-height, -1.5px letter-spacing, #3F3F3F) */
.article-main-title {
  margin: 0.75rem 0 0; /* 12px */
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 2.5rem; /* 40px */
  line-height: 4.0625rem; /* 65px */
  letter-spacing: -0.09375rem; /* -1.5px */
  color: #3F3F3F;
}

/* Hero Article Image (768px x 390px, radius 16px) */
.article-hero-media {
  margin-top: 2.25rem; /* 36px */
  width: 100%;
  height: 24.375rem; /* 390px */
  border-radius: 1rem; /* 16px */
  overflow: hidden;
  background-color: #E5E7EB;
}

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

/* Intro Lead Paragraph (17px, 31px line-height, #3F3F3F / 86%) */
.article-lead-text {
  margin: 2.5rem 0 0; /* 40px */
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-size: 1.0625rem; /* 17px */
  line-height: 1.9375rem; /* 31px */
  color: rgba(63, 63, 63, 0.86);
}

/* Article Sections (Numbered Headings & Body Paragraphs) */
.article-section-block {
  margin-top: 2rem; /* 32px */
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.article-section-heading {
  margin: 0;
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 500;
  font-size: 1.3125rem; /* 21px */
  line-height: 1.75rem; /* 28px */
  color: #3F3F3F;
}

.article-section-p {
  margin: 0.75rem 0 0; /* 12px */
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 0.9375rem; /* 15px */
  line-height: 1.6875rem; /* 27px */
  color: rgba(63, 63, 63, 0.72);
}

/* Lists, sub-headings (FAQ questions) and inline links inside article sections */
.article-section-list {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.article-section-list li {
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 0.9375rem;
  line-height: 1.6875rem;
  color: rgba(63, 63, 63, 0.72);
}

.article-section-list li strong,
.article-section-p strong {
  font-weight: 600;
  color: #3F3F3F;
}

.article-section-subheading {
  margin: 1.25rem 0 0;
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5rem;
  color: #3F3F3F;
}

.article-section-subheading + .article-section-p {
  margin-top: 0.375rem;
}

.article-lead-text a,
.article-section-p a,
.article-section-list li a {
  color: #CE0000;
  font-weight: 500;
  text-decoration: none;
}

.article-lead-text a:hover,
.article-section-p a:hover,
.article-section-list li a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Section 3: Continue Reading / Read our next article
   ========================================================================== */
.article-related-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem; /* 64px 24px */
  box-sizing: border-box;
}

.article-related-container {
  width: 100%;
  max-width: 69rem; /* 1104px */
  display: flex;
  flex-direction: column;
}

.related-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem; /* 32px */
}

.related-header-left {
  display: flex;
  flex-direction: column;
}

.related-eyebrow {
  font-size: 0.75rem; /* 12px */
  line-height: 1rem; /* 16px */
  letter-spacing: 0.135rem; /* 2.16px */
  text-transform: uppercase;
  color: #CE0000;
  font-weight: 600;
}

.related-title {
  margin: 0.5rem 0 0; /* 8px */
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 1.875rem; /* 30px */
  line-height: 2.25rem; /* 36px */
  letter-spacing: -0.046875rem; /* -0.75px */
  color: #3F3F3F;
}

.related-view-all-link {
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-size: 1rem; /* 16px */
  line-height: 1.5rem; /* 24px */
  color: #CE0000;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.related-view-all-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Related 3-column Grid (352px x 322px cards) */
.related-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; /* 24px */
  width: 100%;
}

.related-card {
  background: #FFFFFF;
  border: 1px solid #F3F4F6;
  border-radius: 1rem; /* 16px */
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.related-card:hover {
  transform: translateY(-3px);
  border-color: rgba(206, 0, 0, 0.2);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}

.related-card-img-wrap {
  width: 100%;
  height: 11rem; /* 176px */
  background-color: #F3F4F6;
  overflow: hidden;
}

.related-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card:hover .related-card-img {
  transform: scale(1.04);
}

.related-card-body {
  padding: 1.25rem; /* 20px */
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.related-card-category {
  font-size: 0.6875rem; /* 11px */
  line-height: 1rem; /* 16px */
  letter-spacing: 0.034rem; /* 0.55px */
  text-transform: uppercase;
  color: #CE0000;
  font-weight: 600;
  margin-bottom: 0.5rem; /* 8px */
}

.related-card-title {
  margin: 0;
  font-family: var(--font-family-base, 'DM Sans', sans-serif);
  font-weight: 400;
  font-size: 1rem; /* 16px */
  line-height: 1.375rem; /* 22px */
  color: #3F3F3F;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.related-card:hover .related-card-title {
  color: #CE0000;
}

.related-card-meta {
  margin-top: 0.75rem; /* 12px */
  font-size: 0.75rem; /* 12px */
  line-height: 1rem; /* 16px */
  color: rgba(63, 63, 63, 0.45);
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  .related-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .article-back-section {
    padding: 1.75rem 1rem 0.75rem;
  }

  .article-body-section {
    padding: 0 1rem;
  }

  .article-content-card {
    padding: 2rem 1.25rem;
    border-radius: 1.25rem;
  }

  .article-main-title {
    font-size: 1.625rem;
    line-height: 2.25rem;
    letter-spacing: -0.04rem;
    word-break: break-word;
  }

  .article-hero-media {
    height: 13.5rem;
    margin-top: 1.5rem;
    border-radius: 0.75rem;
  }

  .article-lead-text {
    font-size: 0.9375rem;
    line-height: 1.625rem;
    margin-top: 1.5rem;
  }

  .article-section-block {
    margin-top: 1.5rem;
  }

  .article-section-heading {
    font-size: 1.125rem;
    line-height: 1.5rem;
  }

  .article-section-p {
    font-size: 0.875rem;
    line-height: 1.5rem;
  }

  .article-section-list li {
    font-size: 0.875rem;
    line-height: 1.5rem;
  }

  .article-related-section {
    padding: 3rem 1rem 3.5rem;
  }

  .related-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .related-cards-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}
