/* Custom CSS for Premium Longform E-Magazine */

/* Variables & Design System */
:root {
    --primary-color: #1F5E3B; /* Xanh lá đậm */
    --secondary-color: #6E824A; /* Xanh olive */
    --accent-color: #C5A880; /* Vàng đồng */
    --bg-paper: #FDFBF7; /* Kem nhạt báo giấy */
    --bg-white: #FFFFFF;
    --text-main: #2B2B2B; /* Xám đen dễ đọc */
    --text-muted: #555555;
    --text-light: #888888;
    --border-light: #EAEAEA;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-paper);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-paper);
}
::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Global Grid Layouts */
.container {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.infographic-wrapper {
    max-width: 1040px;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

/* Progress bar đọc bài */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Site Header */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 24px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.magazine-logo {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.2em;
    color: var(--bg-paper);
}

.publish-date {
    font-family: var(--font-sans);
    font-size: 12px;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
}

/* HERO SECTION - TOÀN MÀN HÌNH */
.hero-section {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-white);
    overflow: hidden;
}

.hero-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: translateY(0);
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(31,94,59,0.75) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    text-align: center;
    padding: 0 24px;
}

.hero-tag {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.15;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 30px;
}

.hero-divider {
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 0 auto 30px auto;
}

.hero-sapo {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.6;
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 11px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
}

.scroll-indicator span {
    margin-bottom: 8px;
}

.mouse-icon {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    position: relative;
}

.mouse-icon .wheel {
    width: 4px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 1.6s infinite;
}

@keyframes scroll-wheel {
    0% { top: 6px; opacity: 1; }
    50% { top: 16px; opacity: 0; }
    100% { top: 6px; opacity: 1; }
}

/* INTRO & DROPCAP */
.section-intro {
    padding-top: 6rem;
    padding-bottom: 4rem;
}

.lead-paragraph {
    font-size: 21px;
    line-height: 1.7;
    color: #333333;
}

.dropcap::first-letter {
    font-family: var(--font-heading);
    font-size: 80px;
    font-weight: 700;
    float: left;
    margin-top: 8px;
    margin-right: 12px;
    line-height: 0.85;
    color: var(--primary-color);
}

/* INFOGRAPHIC 0: STATS GRID */
.stats-infographic-container {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.infographic-title {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
}

.infographic-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
    margin: 10px auto 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    background-color: var(--bg-paper);
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(31, 94, 59, 0.05);
}

.stat-icon-wrapper {
    color: var(--primary-color);
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.stat-svg-icon {
    width: 28px;
    height: 28px;
}

.stat-number-wrapper {
    font-family: var(--font-sans);
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 6px;
}

.stat-unit {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* SECTION TITLES & HEADERS */
.section-title-wrapper {
    margin-top: 6rem;
    margin-bottom: 4rem;
    padding: 4rem 0;
    color: var(--bg-white);
    position: relative;
}

.full-width-title {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.dark-green-bg {
    background-color: var(--primary-color);
}

.olive-bg {
    background-color: var(--secondary-color);
}

.light-gray-bg {
    background-color: #EAEAEA;
}

.section-number {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--accent-color);
    display: block;
    margin-bottom: 15px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
}

.text-dark {
    color: var(--text-main);
}

.section-title.text-dark + .section-number {
    color: var(--primary-color);
}

/* TEXT CONTENT & PARAGRAPHS */
.text-content {
    margin-bottom: 4rem;
}

.text-content p {
    font-size: 19px;
    color: var(--text-main);
    margin-bottom: 2.2rem;
    text-align: justify;
}

/* PULL QUOTES */
.container-quote {
    max-width: 900px;
    margin-top: 5rem;
    margin-bottom: 5rem;
}

.pull-quote {
    position: relative;
    padding: 3rem 4rem;
    background-color: var(--bg-white);
    border-left: 5px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.01);
    border-radius: 0 12px 12px 0;
}

.quote-icon {
    font-family: var(--font-heading);
    font-size: 120px;
    color: rgba(197, 168, 128, 0.15);
    position: absolute;
    top: -10px;
    left: 20px;
    line-height: 1;
}

.pull-quote p {
    font-family: var(--font-heading);
    font-size: 24px;
    font-style: italic;
    color: var(--primary-color);
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.large-quote {
    border-left: none;
    border-top: 3px solid var(--accent-color);
    border-bottom: 3px solid var(--accent-color);
    border-radius: 0;
    text-align: center;
    padding: 4rem 2rem;
}

.large-quote .quote-icon {
    left: 50%;
    transform: translateX(-50%);
    top: -30px;
}

.large-quote p {
    font-size: 28px;
    color: var(--text-main);
}

/* FULL WIDTH IMAGES */
.full-width-photo-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 6rem;
    margin-bottom: 6rem;
    overflow: hidden;
}

.full-width-img {
    width: 100%;
    height: auto;
    max-height: 75vh;
    object-fit: cover;
    display: block;
    transition: transform 1.2s ease;
}

.full-width-photo-container:hover .full-width-img {
    transform: scale(1.03);
}

.photo-caption {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 1.2rem 24px;
    background-color: var(--bg-paper);
    border-top: 1px solid var(--border-light);
}

/* INFOGRAPHIC 1: FLOW CHART */
.infographic-caption {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.flow-svg-container {
    width: 100%;
    overflow-x: auto;
    background-color: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.flow-svg {
    width: 100%;
    min-width: 800px;
    height: auto;
}

.node-circle {
    transition: var(--transition-smooth);
}

.flow-node:hover .node-circle {
    fill: #1F5E3B;
    stroke: var(--accent-color);
}

.flow-node:hover text {
    fill: var(--primary-color);
    font-weight: 700;
}

.flow-node {
    cursor: pointer;
}

.flow-connection-progress {
    transition: stroke-dashoffset 2s ease-out;
}

/* INFOGRAPHIC 2: TIMELINE */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-light);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 20px 40px;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.timeline-item.active {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-content {
    background-color: var(--bg-white);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
    border: 1px solid var(--border-light);
    position: relative;
    transition: var(--transition-smooth);
}

.timeline-content:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 25px rgba(110, 130, 74, 0.08);
}

.timeline-year {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-desc {
    font-size: 15px;
    color: var(--text-main);
    line-height: 1.6;
}

.timeline-icon {
    position: absolute;
    top: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bg-paper);
    border: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    z-index: 10;
    transform: translateY(-50%);
}

.timeline-item.left .timeline-icon {
    right: -62px;
}

.timeline-item.right .timeline-icon {
    left: -62px;
}

/* CALLOUT BOX: THƯƠNG HIỆU SỐ */
.container-callout {
    margin-top: 5rem;
    margin-bottom: 5rem;
}

.callout-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.02);
    position: relative;
    border-top: 4px solid var(--primary-color);
}

.callout-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.callout-icon-wrapper {
    color: var(--primary-color);
    margin-right: 15px;
}

.callout-card-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
}

.callout-body p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.callout-body p:last-child {
    margin-bottom: 0;
}

.callout-footer-icons {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid var(--border-light);
    padding-top: 2rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
    gap: 20px;
}

.c-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.c-svg {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    margin-bottom: 8px;
    transition: var(--transition-smooth);
}

.c-icon-item:hover .c-svg {
    color: var(--primary-color);
    transform: scale(1.15);
}

/* INFOGRAPHIC 3: ECOSYSTEM */
.ecosystem-svg-container {
    background-color: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    display: flex;
    justify-content: center;
}

.ecosystem-svg {
    width: 100%;
    max-width: 800px;
    height: auto;
}

.eco-node {
    transition: var(--transition-smooth);
}

.branch-node rect {
    transition: var(--transition-smooth);
}

.branch-node:hover rect {
    fill: var(--primary-color);
    stroke: var(--accent-color);
}

.branch-node:hover text {
    fill: var(--bg-white);
}

.center-node {
    cursor: pointer;
}

.center-node:hover circle {
    fill: var(--secondary-color);
}

/* CHECKLIST INFO CARD */
.container-checklist {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.checklist-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 3rem 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
}

.checklist-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    list-style: none;
}

.checklist-item {
    display: flex;
    align-items: center;
    background-color: var(--bg-paper);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
    transition: var(--transition-smooth);
}

.checklist-item:hover {
    transform: translateX(5px);
    border-left-color: var(--primary-color);
}

.check-icon {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 18px;
    color: var(--primary-color);
    margin-right: 15px;
}

.check-text {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

/* CONCLUSION PHOTO & OVERLAY */
.conclusion-photo-container {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 6rem;
    height: 70vh;
    overflow: hidden;
}

.conclusion-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.conclusion-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(31,94,59,0.9) 0%, rgba(0,0,0,0.3) 100%);
    display: flex;
    align-items: flex-end;
    padding-bottom: 6rem;
    color: var(--bg-white);
}

.conclusion-photo-text {
    max-width: 900px;
}

.conclusion-photo-text h3 {
    font-family: var(--font-sans);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.conclusion-photo-text p {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
}

/* FOOTER */
.article-footer {
    background-color: #111111;
    color: #999999;
    padding: 5rem 0;
    font-family: var(--font-sans);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #222222;
    padding-top: 3rem;
}

.author-info {
    font-size: 15px;
}

.author-label {
    color: #666666;
    margin-right: 8px;
}

.author-name {
    color: var(--bg-paper);
    font-weight: 700;
    font-size: 18px;
    font-family: var(--font-heading);
}

.magazine-copyright {
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* LAZY LOAD & SCROLL FADE IN EFFECTS */
.fade-in-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE DESIGN */
@media (max-width: 991px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .timeline-line {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 0;
        text-align: left !important;
    }
    
    .timeline-item.left, .timeline-item.right {
        left: 0;
    }
    
    .timeline-icon {
        left: 8px !important;
        right: auto !important;
    }
    
    .checklist-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .section-title-wrapper {
        padding: 2.5rem 0;
        margin-top: 4rem;
        margin-bottom: 2.5rem;
    }

    .text-content p {
        font-size: 17px;
        margin-bottom: 1.6rem;
    }

    .full-width-photo-container {
        margin-top: 4rem;
        margin-bottom: 4rem;
    }

    .container-quote {
        margin-top: 3.5rem;
        margin-bottom: 3.5rem;
    }

    .pull-quote {
        padding: 2rem 1.5rem;
    }

    .pull-quote p {
        font-size: 20px;
    }

    .large-quote p {
        font-size: 22px;
    }

    /* Sơ đồ ecosystem cho phép cuộn ngang trên mobile để dễ đọc chữ */
    .ecosystem-svg-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
        padding: 2rem 1rem;
    }

    .ecosystem-svg {
        min-width: 650px;
        height: auto;
    }

    .flow-svg-container {
        padding: 2rem 1rem;
    }
}

@media (max-width: 575px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 60px 0;
        display: flex;
        align-items: center;
    }
    
    .hero-content {
        padding: 0 16px;
    }

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

    .hero-sapo {
        font-size: 1rem;
        line-height: 1.55;
    }

    .mouse-icon {
        display: none; /* Ẩn icon chuột trên mobile */
    }
    
    .section-intro {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    /* Giữ Stats Box dạng 2 cột để cân đối thay vì kéo dài 1 cột */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 1rem 0.5rem;
    }

    .stat-number-wrapper {
        font-size: 24px;
    }

    .stat-text {
        font-size: 16px;
    }

    .stat-label {
        font-size: 10px;
    }
    
    .conclusion-photo-container {
        height: 50vh;
        margin-top: 4rem;
    }

    .conclusion-overlay {
        padding-bottom: 3rem;
    }
}
