/* ==========================================================================
   EMAGAZINE BÁO CHÍ HIỆN ĐẠI - PHONG CÁCH BÁO CHÍ DỮ LIỆU (DATA JOURNALISM)
   Chủ đề: Phụ nữ làm chủ HTX tại Quảng Trị
   Tiêu chuẩn kỹ thuật:
   - Cỡ chữ toàn trang tối thiểu 16px (Desktop 18px, Mobile 16px)
   - Cỡ chữ trong Infographic tối thiểu 18px
   - Không Menu / Không TOC / Không Header thanh tiến trình
   - Scroll-trigger, Counter, Parallax vừa phải, Line/Chart SVG animation
   - 100% Responsive Desktop, Tablet, Mobile
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400&family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Space+Grotesk:wght@600;700;800&display=swap');

:root {
  /* Color Palette Báo chí cao cấp */
  --bg-body: #fcfbf8;
  --bg-card: #ffffff;
  --bg-subtle: #f8fafc;
  --bg-dark: #0a1828;
  --bg-dark-card: #112236;

  --text-main: #1e293b;
  --text-heading: #081524;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-on-dark: #f8fafc;

  /* Accent Colors */
  --teal-primary: #0d9488;
  --teal-dark: #0f766e;
  --teal-light: #ccfbf1;
  --teal-surface: #f0fdfa;

  --amber-primary: #d97706;
  --amber-dark: #b45309;
  --amber-light: #fef3c7;
  --amber-surface: #fffbeb;

  --navy-primary: #1d4ed8;
  --navy-dark: #1e3a8a;
  --navy-surface: #eff6ff;

  --emerald-primary: #059669;
  --emerald-surface: #ecfdf5;

  --border-light: #e2e8f0;
  --border-focus: #cbd5e1;

  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -10px rgba(15, 23, 42, 0.12);

  /* Typography Scale (Đảm bảo font text >= 16px, Infographic >= 18px) */
  --font-serif: 'Merriweather', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  --fs-body: 19px;
  --lh-body: 1.85;

  --fs-h1: clamp(34px, 4.5vw, 56px);
  --fs-h2: clamp(26px, 3.2vw, 38px);
  --fs-h3: 24px;
  --fs-sapo: clamp(20px, 2.2vw, 24px);

  /* Infographic font sizes */
  --fs-info-sm: 18px;
  --fs-info-base: 20px;
  --fs-info-lg: 24px;
  --fs-info-xl: 32px;
  --fs-info-stat: clamp(36px, 5vw, 60px);

  --container-read: 780px;
  --container-wide: 1200px;
}

/* ==========================================================================
   BASE RESETS & DEFAULTS
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: hidden;
}

/* ==========================================================================
   COVER / HERO SECTION
   ========================================================================== */
.hero-cover {
  position: relative;
  min-height: 94vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 60px 24px 80px;
  color: #ffffff;
  overflow: hidden;
}

.hero-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(10, 24, 40, 0.25) 0%,
    rgba(10, 24, 40, 0.55) 45%,
    rgba(10, 24, 40, 0.94) 100%
  );
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--container-wide);
  margin: 0 auto;
  width: 100%;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 148, 136, 0.35);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(204, 251, 241, 0.3);
  color: #a7f3d0;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h1);
  line-height: 1.25;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  max-width: 1050px;
  margin-bottom: 28px;
}

.hero-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 20px;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-meta-item svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  opacity: 0.8;
}

/* ==========================================================================
   ARTICLE LAYOUT CONTAINER
   ========================================================================== */
.article-wrapper {
  max-width: 100%;
  margin: 0 auto;
}

/* Đoạn đọc văn bản văn xuôi (chuẩn độ rộng báo chí quốc tế 760px - 780px) */
.story-text-container {
  max-width: var(--container-read);
  margin: 0 auto;
  padding: 0 24px;
}

/* Khối Infographic mở rộng thoáng đãng (1150px - 1200px) */
.story-wide-container {
  max-width: var(--container-wide);
  margin: 48px auto;
  padding: 0 24px;
}

/* ==========================================================================
   SAPO / INTRO SECTION
   ========================================================================== */
.sapo-section {
  padding: 60px 0 30px;
  background: linear-gradient(180deg, #f8fafc 0%, var(--bg-body) 100%);
  border-bottom: 1px solid var(--border-light);
}

.sapo-box {
  position: relative;
  border-left: 4px solid var(--teal-primary);
  padding: 12px 0 12px 28px;
  margin-bottom: 32px;
}

.sapo-text {
  font-size: var(--fs-sapo);
  line-height: 1.7;
  color: #0f172a;
  font-weight: 600;
  font-family: var(--font-sans);
}

.sapo-secondary-p {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-muted);
  margin-top: 20px;
}

/* ==========================================================================
   SECTION STYLING
   ========================================================================== */
.article-part {
  padding: 70px 0 40px;
  position: relative;
}

.article-part::after {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: var(--border-light);
  margin: 70px auto 0;
}

.article-part:last-of-type::after {
  display: none;
}

/* Header của mỗi phần (3 phần mạch lạc) */
.part-header {
  margin-bottom: 40px;
}

.part-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.part-number {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  background: var(--teal-primary);
  padding: 4px 14px;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.part-2-theme .part-number {
  background: var(--amber-primary);
}

.part-3-theme .part-number {
  background: var(--navy-primary);
}

.part-title {
  font-family: var(--font-serif);
  font-size: var(--fs-h2);
  line-height: 1.35;
  color: var(--text-heading);
  font-weight: 800;
}

/* Đoạn văn thông thường */
.prose-p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text-main);
  margin-bottom: 24px;
  text-align: justify;
}

/* Chữ cái đầu hoa to (Drop Cap) */
.drop-cap::first-letter {
  font-family: var(--font-serif);
  float: left;
  font-size: 72px;
  line-height: 0.85;
  font-weight: 900;
  margin-right: 14px;
  margin-top: 4px;
  color: var(--teal-primary);
}

.part-2-theme .drop-cap::first-letter {
  color: var(--amber-primary);
}

.part-3-theme .drop-cap::first-letter {
  color: var(--navy-primary);
}

/* Editorial Pullquote / Callout Box */
.editorial-callout {
  margin: 36px 0;
  padding: 28px 32px;
  background: #ffffff;
  border-radius: 16px;
  border-left: 5px solid var(--teal-primary);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.part-2-theme .editorial-callout {
  border-left-color: var(--amber-primary);
  background: #fffdf9;
}

.part-3-theme .editorial-callout {
  border-left-color: var(--navy-primary);
  background: #fcfdff;
}

.editorial-callout p {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-heading);
  font-weight: 600;
  font-style: italic;
  font-family: var(--font-serif);
}

/* ==========================================================================
   EDITORIAL IMAGE CARDS (Tối giản, không text, ít người)
   ========================================================================== */
.editorial-photo-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin: 48px 0;
}

.editorial-photo-card img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}

.editorial-photo-card:hover img {
  transform: scale(1.02);
}

.editorial-photo-caption {
  padding: 14px 20px;
  background: #ffffff;
  font-size: 16px;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   INFOGRAPHIC DESIGN SYSTEM: THUẦN DỮ LIỆU, SVG, CỠ CHỮ >= 18PX
   ========================================================================== */
.infographic-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.infographic-card:hover {
  box-shadow: var(--shadow-lg);
}

.infographic-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 24px;
  margin-bottom: 32px;
}

.infographic-title-wrap {
  flex: 1;
  min-width: 300px;
}

.infographic-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.tag-teal {
  background: var(--teal-surface);
  color: var(--teal-dark);
  border: 1px solid var(--teal-light);
}

.tag-amber {
  background: var(--amber-surface);
  color: var(--amber-dark);
  border: 1px solid var(--amber-light);
}

.tag-navy {
  background: var(--navy-surface);
  color: var(--navy-dark);
  border: 1px solid #bfdbfe;
}

.infographic-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.35;
}

.infographic-desc {
  font-size: var(--fs-info-sm); /* >= 18px */
  color: var(--text-muted);
  margin-top: 6px;
}

/* ==========================================================================
   INFOGRAPHIC 1: CHUỖI GIÁ TRỊ & NĂNG LỰC ĐẦU TƯ (HTX VƯƠNG ĐOÀN)
   ========================================================================== */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.stat-metric-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, background 0.25s ease;
}

.stat-metric-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
}

.stat-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--teal-surface);
  color: var(--teal-primary);
}

.stat-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.stat-number-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: var(--fs-info-stat);
  font-weight: 800;
  color: var(--teal-dark);
  line-height: 1;
}

.stat-number-row .stat-unit {
  font-size: 20px; /* >= 18px */
  font-weight: 700;
  color: var(--text-muted);
}

.stat-label {
  font-size: var(--fs-info-sm); /* 18px */
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 10px;
}

.stat-subtext {
  font-size: var(--fs-info-sm); /* 18px */
  color: var(--text-muted);
  margin-top: 4px;
}

/* SVG Chart Wrapper */
.svg-chart-container {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 24px 16px;
  margin-bottom: 28px;
}

.svg-chart-container svg {
  display: block;
  width: 100%;
  height: auto;
  min-width: 680px;
}

/* ==========================================================================
   INFOGRAPHIC 2: ĐỔI MỚI THỊ TRƯỜNG & THƯƠNG HIỆU
   ========================================================================== */
.market-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.compare-card {
  padding: 28px;
  border-radius: 18px;
  border: 2px solid;
  position: relative;
}

.compare-card.old-way {
  border-color: #fca5a5;
  background: #fef2f2;
}

.compare-card.new-way {
  border-color: #6ee7b7;
  background: #ecfdf5;
}

.compare-title {
  font-size: var(--fs-info-base); /* 20px */
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.old-way .compare-title {
  color: #b91c1c;
}

.new-way .compare-title {
  color: #047857;
}

.compare-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.compare-list li {
  font-size: var(--fs-info-sm); /* 18px */
  line-height: 1.55;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compare-list li svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* Export Countries Bar */
.export-countries-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--amber-surface);
  border: 1px solid var(--amber-light);
  border-radius: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.export-label {
  font-size: var(--fs-info-base); /* 20px */
  font-weight: 800;
  color: var(--amber-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.country-chip {
  background: #ffffff;
  border: 1px solid var(--amber-primary);
  color: #78350f;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: var(--fs-info-sm); /* 18px */
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   INFOGRAPHIC 3: DỮ LIỆU LAO ĐỘNG & BẢN ĐỒ QUẢN TRỊ QUẢNG TRỊ
   ========================================================================== */
.labor-metrics-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 36px;
}

.labor-box {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.labor-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--navy-primary);
}

.labor-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.labor-box-title {
  font-size: var(--fs-info-base); /* 20px */
  font-weight: 800;
  color: var(--text-heading);
}

.labor-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border-light);
  font-size: var(--fs-info-sm); /* 18px */
}

.labor-stat-row:last-child {
  border-bottom: none;
}

.labor-stat-row strong {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--navy-dark);
}

/* Data Province Funnel Box */
.provincial-stat-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 20px;
  padding: 36px;
  margin-top: 32px;
  box-shadow: var(--shadow-md);
}

.provincial-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 32px;
}

.provincial-header h4 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
}

.provincial-header p {
  font-size: var(--fs-info-sm); /* 18px */
  color: #94a3b8;
  margin-top: 6px;
}

.funnel-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.funnel-step-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  backdrop-filter: blur(8px);
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
}

.funnel-step-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.12);
}

.funnel-num {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 800;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 8px;
}

.funnel-pct {
  display: inline-block;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  font-size: 16px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.funnel-text {
  font-size: var(--fs-info-sm); /* 18px */
  color: #e2e8f0;
  line-height: 1.45;
  font-weight: 500;
}

/* ==========================================================================
   CONCLUSION & BYLINE
   ========================================================================== */
.article-footer {
  max-width: var(--container-read);
  margin: 60px auto 100px;
  padding: 0 24px;
}

.byline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  margin-top: 36px;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.author-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--teal-surface);
  color: var(--teal-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  border: 2px solid var(--teal-primary);
}

.author-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
}

.author-role {
  font-size: 16px;
  color: var(--text-muted);
}

.article-notice-badge {
  font-size: 16px;
  font-weight: 700;
  color: var(--teal-primary);
  background: var(--teal-surface);
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--teal-light);
}

/* ==========================================================================
   ANIMATIONS & SCROLL-TRIGGER REVEALS
   ========================================================================== */
.scroll-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay helpers */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* SVG animated path lines */
.chart-line-anim {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 2s ease-in-out;
}

.is-visible .chart-line-anim {
  stroke-dashoffset: 0;
}

/* Parallax element */
.parallax-layer {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Desktop, Tablet, Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
  :root {
    --fs-body: 18px;
  }

  .stat-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .funnel-steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .market-compare-grid,
  .labor-metrics-split {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    min-height: 80vh;
    padding: 40px 20px 60px;
  }
}

@media (max-width: 768px) {
  :root {
    --fs-body: 17px;
    --lh-body: 1.8;
  }

  .story-text-container,
  .story-wide-container,
  .article-footer {
    padding: 0 16px;
  }

  .infographic-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .editorial-photo-card img {
    height: 320px;
  }

  .hero-title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .part-title {
    font-size: 24px;
  }

  .funnel-steps-grid {
    grid-template-columns: 1fr;
  }

  .prose-p {
    text-align: left;
  }

  .byline-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  :root {
    --fs-body: 16px; /* Cỡ chữ tối thiểu toàn trang */
  }

  .sapo-text {
    font-size: 19px;
  }

  .editorial-photo-card img {
    height: 240px;
  }
}
