/* ==========================================================================
   EMAGAZINE BÁO KINH TẾ CAO CẤP: HTX HIỀN THI
   Typography: Encode Sans (Headlines, Sapo, Titles) & Plus Jakarta Sans (Body)
   ========================================================================== */

/* Design Tokens & CSS Variables */
:root {
    --bg-main: #FAF9F6;
    --bg-surface: #FFFFFF;
    --bg-surface-alt: #F4F6F4;
    --bg-surface-soft: #F8FAFC;
    
    --text-primary: #111827;
    --text-secondary: #2B3445;
    --text-muted: #4B5563;
    --text-light: #6B7280;
    
    --brand-green-dark: #0D5C3A;
    --brand-green-primary: #15803D;
    --brand-green-light: #E8F5E9;
    --brand-green-border: #86EFAC;
    
    --brand-gold: #D97706;
    --brand-gold-light: #FEF3C7;
    
    --brand-blue: #0284C7;
    --brand-blue-light: #E0F2FE;
    
    --border-color: #E5E7EB;
    --border-dark: #D1D5DB;
    
    --font-heading: 'Encode Sans', sans-serif;
    --font-sapo: 'Encode Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(13, 92, 58, 0.08);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Reset & Base Setup */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 18px; /* Tối thiểu 18px */
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.editorial-body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 21px; /* Chuẩn 21px hiển thị desktop */
    line-height: 1.85;
    letter-spacing: -0.01em;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* Container Structure */
.emagazine-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 50px 32px 100px 32px;
}

/* ==========================================================================
   HEADER / HERO SECTION (CĂN GIỮA, KHÔNG KHUNG, FONT ENCODE SANS)
   ========================================================================== */
.centered-hero {
    text-align: center;
    margin-bottom: 75px;
}

/* BADGE CHÀO MỪNG ĐẠI HỘI */
.hero-congress-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #0A4D30 0%, #15803D 100%);
    border: 1px solid rgba(253, 224, 71, 0.4);
    padding: 8px 24px;
    border-radius: 30px;
    margin-bottom: 32px;
    box-shadow: 0 4px 16px rgba(13, 92, 58, 0.18);
    position: relative;
}

.hero-congress-badge .hero-tag {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #FEF3C7;
    text-transform: uppercase;
    line-height: 1.3;
}

.badge-star-icon {
    color: #FBBF24;
    font-size: 18px;
    display: inline-block;
}

/* TITLE: Căn giữa, Font Encode Sans, 2 tầng uy lực */
.hero-headline {
    font-family: var(--font-heading);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    max-width: 1080px;
    margin: 0 auto 28px auto;
    text-align: center;
}

.headline-part-top {
    font-size: clamp(30px, 3.8vw, 48px);
    font-weight: 700;
    color: #334155;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    line-height: 1.2;
}

.headline-part-bottom {
    font-size: clamp(34px, 4.6vw, 58px);
    font-weight: 900;
    color: var(--brand-green-dark);
    letter-spacing: -0.02em;
    text-transform: uppercase;
    line-height: 1.15;
}

/* ORNAMENT DIVIDER */
.hero-ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    max-width: 480px;
    margin: 0 auto 32px auto;
}

.ornament-line {
    flex: 1;
    height: 1.5px;
    background: linear-gradient(to right, transparent, #D97706, transparent);
}

.ornament-leaf {
    color: #D97706;
    font-size: 18px;
}

/* SAPO: Căn giữa, Font Encode Sans, Không cần khung */
.hero-sapo-wrap {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    max-width: 980px;
    margin: 0 auto 48px auto;
    text-align: center;
}

.hero-sapo-text {
    font-family: var(--font-sapo);
    font-size: clamp(21px, 2.3vw, 25px);
    line-height: 1.78;
    font-weight: 500;
    color: #1E293B;
    text-align: center;
}

/* Editorial Figures & Images */
.editorial-figure {
    margin: 45px 0 55px 0;
    text-align: left;
}

.hero-frame-enhanced {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 16px 40px -10px rgba(13, 92, 58, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
    background: #000;
}

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

.hero-frame-enhanced:hover .editorial-img {
    transform: scale(1.018);
}

/* QUICK METRICS RIBBON (GẮN TRỰC TIẾP TRÊN/DƯỚI COVER VISUAL) */
.hero-metrics-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(13, 92, 58, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
}

.hero-metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
}

.ribbon-val {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: #FEF3C7;
    line-height: 1.1;
}

.ribbon-lbl {
    font-size: 18px;
    font-weight: 500;
    color: #E2E8F0;
    letter-spacing: 0.02em;
}

.ribbon-separator {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
}

.hero-caption-centered {
    justify-content: center;
    text-align: center;
    margin-top: 18px;
}

/* LEAD PARAGRAPHS WITH 2-COLUMN GRID & DROP CAP */
.hero-lead-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin: 50px auto 30px auto;
    text-align: justify;
}

.lead-card-col {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 30px 28px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.editorial-dropcap {
    float: left;
    font-family: var(--font-heading);
    font-size: 64px;
    line-height: 0.8;
    font-weight: 900;
    color: var(--brand-green-dark);
    padding-right: 12px;
    padding-top: 4px;
}

.figure-caption {
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-top: 16px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.caption-badge {
    background: var(--brand-green-dark);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

/* Editorial Prose Text Blocks (100% Nội dung gốc) */
.editorial-prose {
    max-width: 980px;
    margin: 0 auto 40px auto;
    text-align: left;
}

.body-paragraph {
    font-size: 21px;
    line-height: 1.88;
    color: var(--text-secondary);
    margin-bottom: 26px;
    text-align: justify;
}

.lead-p {
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 450;
}

/* Dividers */
.editorial-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 70px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider-diamond {
    width: 10px;
    height: 10px;
    background: var(--brand-green-dark);
    transform: rotate(45deg);
}

/* ==========================================================================
   ARTICLE SECTIONS
   ========================================================================== */
.part-section {
    margin-bottom: 80px;
}

.section-badge-wrap {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}

.section-number {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-green-dark);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.section-decor-bar {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--brand-green-dark), transparent);
}

.section-headline {
    font-family: var(--font-heading);
    font-size: clamp(30px, 3.8vw, 44px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 36px;
}

/* ==========================================================================
   INFOGRAPHICS (CHỌN LỌC, TINH GỌN, MINH HỌA ĐẮT GIÁ)
   ========================================================================== */
.infographic-container {
    background: #FFFFFF;
    border: 2px solid var(--brand-green-dark);
    border-radius: var(--radius-xl);
    padding: 40px 36px;
    margin: 55px 0;
    box-shadow: var(--shadow-md);
}

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

.info-header-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #FFFFFF;
    background: var(--brand-green-dark);
    padding: 4px 16px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.infographic-title {
    font-family: var(--font-heading);
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.infographic-subtitle {
    font-size: 19px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Timeline Compact Bar */
.timeline-compact-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 36px;
    gap: 10px;
}

.timeline-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--brand-green-dark);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.highlight-step-item .step-circle {
    background: var(--brand-gold);
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
}

.step-sub {
    font-size: 18px;
    color: var(--text-muted);
}

.timeline-step-arrow {
    font-size: 20px;
    font-weight: bold;
    color: var(--brand-green-dark);
}

/* 10 Metrics Grid (Gọn gàng, số liệu lớn) */
.metrics-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.metric-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.metric-card:hover {
    border-color: var(--brand-green-dark);
    transform: translateY(-2px);
}

.highlight-card-metric {
    background: #F0FDF4;
    border: 2px solid var(--brand-green-dark);
}

.gold-card-metric {
    background: #FEF3C7;
    border: 2px solid var(--brand-gold);
}

.metric-num {
    font-family: var(--font-heading);
    font-size: 38px;
    font-weight: 900;
    color: var(--brand-green-dark);
    line-height: 1.1;
    margin-bottom: 4px;
}

.gold-card-metric .metric-num {
    color: var(--brand-gold);
}

.metric-unit {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.metric-title {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.35;
}

/* Devices Chips Row */
.devices-chips-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.chip-label {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-green-dark);
    margin-right: 6px;
}

.tech-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
}

.tech-chip svg {
    width: 20px;
    height: 20px;
    color: var(--brand-green-dark);
    flex-shrink: 0;
}

/* ==========================================================================
   INFOGRAPHIC 2: ECOSYSTEM & MARKETS & KPIS
   ========================================================================== */
.ecosystem-flow-compact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    margin-bottom: 24px;
    gap: 8px;
}

.flow-step-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    box-shadow: var(--shadow-sm);
}

.flow-num {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-green-dark);
}

.flow-text {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.highlight-step-box {
    background: #F0FDF4;
    border: 2px solid var(--brand-green-dark);
}

.gold-step-box {
    background: #FEF3C7;
    border: 2px solid var(--brand-gold);
}

.flow-step-arrow {
    font-size: 18px;
    font-weight: bold;
    color: var(--brand-green-dark);
}

/* Standards Tags */
.standards-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 36px;
}

.std-badge {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 18px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.highlight-std {
    background: #F0FDF4;
    border: 2px solid var(--brand-green-dark);
    color: var(--brand-green-dark);
}

/* Dual Grid: Markets & KPI */
.data-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.data-card {
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 28px 24px;
}

.card-subheading {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.market-bar-group {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.market-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.region-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.region-val {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-green-dark);
}

.bar-track {
    width: 100%;
    height: 12px;
    background: #E2E8F0;
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.fill-hcm { background: #0D5C3A; }
.fill-other { background: #0284C7; }
.fill-nambo { background: #D97706; }

.kpi-linear-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kpi-item {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.highlight-kpi-item {
    background: #F0FDF4;
    border: 2px solid var(--brand-green-dark);
    color: var(--brand-green-dark);
}

.kpi-bullet {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand-green-dark);
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ==========================================================================
   FUTURE 2026 - 2031 & QUOTE
   ========================================================================== */
.future-orientation-section {
    margin-top: 60px;
}

.modules-grid-5 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 36px 0 60px 0;
}

.module-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px 20px;
    box-shadow: var(--shadow-sm);
}

.highlight-module {
    background: #F0FDF4;
    border: 2px solid var(--brand-green-dark);
}

.module-idx {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: var(--brand-green-dark);
    display: block;
    margin-bottom: 6px;
}

.module-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 8px;
}

.module-desc {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Quote Typography */
.editorial-quote-container {
    background: #FFFFFF;
    border: 2px solid var(--brand-green-dark);
    border-radius: var(--radius-xl);
    padding: 50px 40px;
    text-align: center;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
}

.quote-mark-icon {
    font-family: Georgia, serif;
    font-size: 80px;
    line-height: 0.7;
    color: var(--brand-green-dark);
    opacity: 0.25;
    margin-bottom: 10px;
}

.editorial-quote-text {
    font-family: var(--font-heading);
    font-size: clamp(22px, 2.8vw, 32px);
    font-weight: 800;
    color: var(--brand-green-dark);
    line-height: 1.45;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    max-width: 900px;
    margin: 0 auto 24px auto;
}

.quote-closer-context {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.quote-conclusion {
    font-size: 20px;
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 0;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.editorial-footer {
    border-top: 2px solid var(--text-primary);
    margin-top: 90px;
    padding-top: 36px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-meta-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.brand-title {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    color: var(--brand-green-dark);
    letter-spacing: 0.04em;
}

.brand-sub {
    font-size: 18px;
    color: var(--text-muted);
}

.footer-source-note {
    font-size: 18px;
    color: var(--text-light);
    max-width: 450px;
    text-align: right;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-lead-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .timeline-compact-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-step-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
    
    .data-dual-grid {
        grid-template-columns: 1fr;
    }
    
    .ecosystem-flow-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .flow-step-arrow {
        transform: rotate(90deg);
        text-align: center;
    }
}

@media (max-width: 768px) {
    html { font-size: 18px; }
    body.editorial-body { font-size: 18px; }
    .body-paragraph, .lead-p { font-size: 18px; }
    .hero-sapo-text { font-size: 20px; }
    .hero-congress-badge { padding: 8px 16px; }
    .hero-congress-badge .hero-tag { font-size: 18px; text-align: center; }
    
    .hero-metrics-ribbon {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding: 16px 12px;
    }
    .ribbon-separator { display: none; }
    .ribbon-val { font-size: 22px; }
    
    .infographic-container, .editorial-quote-container { padding: 24px 18px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
    .footer-source-note { text-align: left; }
}
