/* ==========================================================================
   J Young Clinic - Medical Article & Clinical Guide Stylesheet
   UI/UX Pro Max Standard: Medical Luxury, Trust & Conversion
   Typography: Prompt (Headings) + Sarabun (Clinical Body)
   Strictly Zero Emojis | WCAG AAA Accessible Contrast
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Article Container & Base Reading Typography
   -------------------------------------------------------------------------- */
.article-page {
  background-color: #ffffff;
  color: var(--text-main, #1e1518);
  font-family: var(--font-body, "Sarabun", sans-serif);
}

.article-shell {
  max-width: 880px;
  margin-inline: auto;
  padding: 40px 24px 80px;
}

@media (max-width: 640px) {
  .article-shell {
    padding: 24px 16px 64px;
  }
}

/* --------------------------------------------------------------------------
   2. Breadcrumbs
   -------------------------------------------------------------------------- */
.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84375rem;
  color: #64748b;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.breadcrumb-nav a {
  color: #475569;
  text-decoration: none;
  transition: color var(--duration-fast, 0.2s) ease;
}

.breadcrumb-nav a:hover {
  color: var(--color-primary, #ee3760);
}

.breadcrumb-separator {
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
}

.breadcrumb-current {
  color: var(--color-primary-text, #c9214b);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   3. Article Header & Preserved H1
   -------------------------------------------------------------------------- */
.article-header {
  margin-bottom: 36px;
}

.article-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(238, 55, 96, 0.08);
  color: var(--color-primary-text, #c9214b);
  border: 1px solid rgba(238, 55, 96, 0.2);
  padding: 5px 14px;
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
}

.article-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.article-header h1 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main, #1e1518);
  margin: 0 0 18px 0;
  letter-spacing: -0.01em;
}

.article-lede {
  font-size: 1.1875rem;
  line-height: 1.8;
  color: #334155;
  margin-bottom: 28px;
}

/* --------------------------------------------------------------------------
   4. Medical Advisory Team Attribution Card (E-E-A-T)
   -------------------------------------------------------------------------- */
.doctor-attribution-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--color-primary, #ee3760);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 36px;
}

.doctor-avatar-crest {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--color-primary, #ee3760);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-weight: 700;
  font-size: 1.125rem;
}

.doctor-attribution-info h3 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
}

.doctor-attribution-info p {
  font-size: 0.84375rem;
  color: #64748b;
  margin: 0;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   5. Images & Clinical Figures
   -------------------------------------------------------------------------- */
.article-figure {
  margin: 36px 0;
  border-radius: 16px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.article-figure img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.article-figure figcaption {
  padding: 12px 18px;
  font-size: 0.875rem;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #edf2f7;
  text-align: center;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   6. Article Headings & Body Copy
   -------------------------------------------------------------------------- */
.article-content h2 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: clamp(1.4375rem, 2.5vw, 1.875rem);
  font-weight: 700;
  color: var(--text-main, #1e1518);
  margin: 48px 0 20px 0;
  line-height: 1.35;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.article-content h3 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  margin: 32px 0 14px 0;
  line-height: 1.4;
}

.article-content p {
  font-size: 1.0625rem;
  line-height: 1.82;
  color: #334155;
  margin-bottom: 22px;
}

.article-content strong {
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   7. Clinical Protocol Guidance Box (Emergency / Pre-Post Care)
   -------------------------------------------------------------------------- */
.clinical-alert-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-left: 4px solid #ea580c;
  border-radius: 14px;
  padding: 24px;
  margin: 36px 0;
}

.clinical-alert-box.alert--rose {
  background: #fff1f2;
  border-color: #fecdd3;
  border-left-color: var(--color-primary, #ee3760);
}

.clinical-alert-box h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 1.25rem;
  color: #9f1239;
}

.clinical-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.clinical-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.96875rem;
  line-height: 1.7;
  color: #334155;
}

.clinical-checklist li svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary, #ee3760);
  flex-shrink: 0;
  margin-top: 5px;
}

/* --------------------------------------------------------------------------
   8. Hair Cycle Phase Grid
   -------------------------------------------------------------------------- */
.hair-cycle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 28px 0 36px;
}

@media (max-width: 768px) {
  .hair-cycle-grid {
    grid-template-columns: 1fr;
  }
}

.cycle-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px;
}

.cycle-card-badge {
  display: inline-block;
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 9999px;
  background: rgba(238, 55, 96, 0.1);
  color: var(--color-primary-text, #c9214b);
  margin-bottom: 10px;
}

.cycle-card h4 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 1rem;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.cycle-card p {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   9. Comparison Table (Responsive & Styled)
   -------------------------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 32px 0;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.table-scroll-hint {
  display: none;
  font-size: 0.78125rem;
  color: #64748b;
  text-align: right;
  padding: 8px 14px 0;
}

@media (max-width: 768px) {
  .table-scroll-hint {
    display: block;
  }
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  text-align: left;
}

.comparison-table th {
  background: #1e293b;
  color: #ffffff;
  padding: 14px 16px;
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  border-bottom: 2px solid #334155;
}

.comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.90625rem;
  line-height: 1.6;
  color: #334155;
  vertical-align: top;
}

.comparison-table tr:nth-child(even) td {
  background: #f8fafc;
}

.table-badge {
  display: inline-block;
  font-size: 0.71875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-top: 4px;
}

.badge-clinic {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}

.badge-warning {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}

/* --------------------------------------------------------------------------
   10. Popular Treatment Areas Grid
   -------------------------------------------------------------------------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin: 32px 0 40px;
}

@media (max-width: 640px) {
  .areas-grid {
    grid-template-columns: 1fr;
  }
}

.area-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  transition: transform var(--duration-fast, 0.2s) ease, box-shadow var(--duration-fast, 0.2s) ease;
}

.area-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.area-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.area-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(238, 55, 96, 0.08);
  color: var(--color-primary, #ee3760);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.area-card-icon svg {
  width: 18px;
  height: 18px;
}

.area-card-header h3 {
  font-size: 1.0625rem;
  margin: 0;
  color: #0f172a;
}

.area-card p {
  font-size: 0.90625rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   11. 5-Step Treatment Protocol Steps
   -------------------------------------------------------------------------- */
.protocol-steps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 28px 0 40px;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-primary, #ee3760);
  color: #ffffff;
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-family: var(--font-heading, "Prompt", sans-serif);
  font-size: 1.0625rem;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.step-content p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. Tonight's Routine Card
   -------------------------------------------------------------------------- */
.tonight-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin: 40px 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
}

.tonight-card h2 {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  padding-bottom: 14px;
  margin-top: 0;
  margin-bottom: 16px;
}

.tonight-card p {
  color: #cbd5e1;
  font-size: 1.0625rem;
  margin-bottom: 20px;
}

.tonight-card .clinical-checklist li {
  color: #f1f5f9;
}

.tonight-card .clinical-checklist li svg {
  color: #fde047; /* Bright Medical Gold */
}

.tonight-card strong {
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   13. Consultative CTA Banners (#4c4c4c - Exact Home Standard)
   -------------------------------------------------------------------------- */
.article-consult-wrapper {
  margin: 48px 0;
}

/* --------------------------------------------------------------------------
   14. References Section
   -------------------------------------------------------------------------- */
.references-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 24px 28px;
  margin: 44px 0 20px;
}

.references-card h3 {
  font-size: 1.0625rem;
  color: #1e293b;
  margin-top: 0;
  margin-bottom: 14px;
}

.references-list {
  padding-left: 20px;
  margin: 0;
  font-size: 0.84375rem;
  color: #64748b;
  line-height: 1.7;
}

.references-list li {
  margin-bottom: 8px;
}
