/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES (Premium Editorial Theme)
   ========================================================================== */
:root {
    /* Color Palette */
    --primary-green: #1B7F4A;
    --accent-emerald: #2FAE8F;
    --accent-gold: #F5C542;
    --bg-light: #FFFFFF;
    --bg-gray: #F5F7F8;
    --text-dark: #111827;
    --text-muted: #4B5563;
    --border-color: #E5E7EB;
    
    /* Before-After Colors */
    --red-alert: #EF4444;
    --red-bg: #FEF2F2;
    --green-bg: #F0FDF4;

    /* Typography */
    --font-heading: 'Be Vietnam Pro', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    
    /* Layout */
    --content-width: 780px;
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Settings */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.85;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   SCROLL PROGRESS & STICKY TABLE OF CONTENTS (TOC)
   ========================================================================== */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(27, 127, 74, 0.1);
    z-index: 1000;
}

#scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(to right, var(--accent-emerald), var(--primary-green));
    transition: width 0.1s ease-out;
}

/* Sticky TOC on Left (Desktop) */
.sticky-toc {
    position: fixed;
    top: 250px;
    left: 4%;
    width: 180px;
    z-index: 100;
    display: none; /* Hidden by default, shown on desktops */
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
}

.toc-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.sticky-toc ul {
    list-style-type: none;
}

.sticky-toc li {
    margin-bottom: 12px;
}

.toc-link {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    transition: var(--transition-smooth);
    position: relative;
}

.toc-link:hover {
    color: var(--primary-green);
    transform: translateX(4px);
}

.toc-num {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    margin-right: 5px;
    color: var(--accent-emerald);
    opacity: 0.7;
}

/* Active Class injected by JS */
.toc-link.active {
    color: var(--primary-green);
    font-weight: 700;
}

.toc-link.active::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-green);
}

/* ==========================================================================
   MAGAZINE COVER HEADER (No hero banner background image)
   ========================================================================== */
.magazine-cover {
    position: relative;
    padding: 120px 24px 80px 24px;
    background-color: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-bottom: 1px solid var(--bg-gray);
    overflow: hidden;
}

.cover-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.cover-pattern svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.magazine-tag {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--primary-green);
    border: 1.5px solid var(--primary-green);
    padding: 6px 16px;
    margin-bottom: 30px;
    border-radius: 4px;
    background-color: rgba(27, 127, 74, 0.03);
}

.main-title {
    font-family: var(--font-heading);
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

.title-sub {
    display: block;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent-emerald);
    margin-bottom: 20px;
}

.title-focus {
    display: block;
    font-size: 90px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 15px 0;
    text-shadow: 0px 4px 10px rgba(27, 127, 74, 0.08);
}

.title-connect {
    display: block;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.title-highlight {
    display: block;
    font-size: 54px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    background: linear-gradient(135deg, var(--primary-green) 30%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.deck {
    font-size: 19px;
    line-height: 1.75;
    color: var(--text-muted);
    margin: 0 auto 20px auto;
    max-width: 800px;
    font-weight: 400;
    text-align: justify;
}

.deck-sub {
    font-size: 18px;
    color: var(--text-muted);
    opacity: 0.9;
    margin-bottom: 40px;
}

.meta-info {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    max-width: 500px;
    margin: 0 auto;
}

.meta-info strong {
    color: var(--text-dark);
}

.divider {
    color: var(--border-color);
}

/* ==========================================================================
   IMAGES & CONTAINERS (Parallax & In-between styles)
   ========================================================================== */
.opening-image-container {
    width: 100vw;
    max-width: 100vw;
    height: auto;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    overflow: hidden;
    margin-bottom: 80px;
}

.opening-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.lead-image-container {
    width: 100vw;
    max-width: 100vw;
    margin: 60px 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.section-lead-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.in-between-image-container {
    width: 100vw;
    max-width: 100vw;
    margin: 70px 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.in-between-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ==========================================================================
   SECTION HEADER PREMIUM TITLES
   ========================================================================== */
.section-header-premium {
    position: relative;
    margin-bottom: 45px;
    padding-top: 20px;
}

.section-number-bg {
    font-family: var(--font-heading);
    font-size: 100px;
    font-weight: 900;
    color: rgba(47, 174, 143, 0.07);
    position: absolute;
    top: -45px;
    left: -15px;
    z-index: 1;
    line-height: 1;
    user-select: none;
    pointer-events: none;
}

.section-subtitle {
    display: block;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--accent-emerald);
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.section-title-text {
    font-family: var(--font-heading);
    font-size: 34px;
    font-weight: 800;
    color: var(--primary-green);
    position: relative;
    z-index: 2;
    line-height: 1.35;
}

.section-title-text::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--accent-gold);
    margin-top: 12px;
}


/* ==========================================================================
   MAIN ARTICLE CONTENT
   ========================================================================== */
.content-wrapper {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 10;
}

.article-section {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

.article-section:last-of-type {
    border-bottom: none;
}

.section-badge {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    letter-spacing: -0.01em;
}

.badge-num {
    font-size: 18px;
    background-color: rgba(47, 174, 143, 0.1);
    color: var(--accent-emerald);
    padding: 2px 10px;
    border-radius: 4px;
    margin-right: 15px;
    font-weight: 700;
    letter-spacing: 0;
}

.text-block p {
    margin-bottom: 28px;
    text-align: justify;
    color: #2D3748;
}

.text-block p:last-child {
    margin-bottom: 0;
}

/* Dropcap for section starts */
.text-block p:first-of-type::first-letter {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 900;
    float: left;
    line-height: 1;
    margin-right: 10px;
    color: var(--primary-green);
}

/* ==========================================================================
   INFOGRAPHICS GENERAL CONTAINER
   ========================================================================== */
.infographic-container {
    background-color: var(--bg-gray);
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 60px max(24px, calc((100vw - 1200px) / 2 + 24px));
    margin: 80px 0;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.01), 0 4px 20px rgba(0,0,0,0.02);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

@media (max-width: 1200px) {
    .infographic-container {
        padding: 50px 24px;
    }
}

.info-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 8px;
}

.info-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 40px;
}

/* ==========================================================================
   INFOGRAPHIC 1 (BEFORE vs AFTER)
   ========================================================================== */
.info-1-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 50px;
}

.info-card {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 30px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    flex: 1;
}

.before-card {
    border-top: 4px solid var(--red-alert);
    background-color: var(--red-bg);
}

.after-card {
    border-top: 4px solid var(--accent-emerald);
    background-color: var(--green-bg);
}

.card-status {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
}

.status-before {
    color: var(--red-alert);
}

.status-after {
    color: var(--accent-emerald);
}

.flow-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.flow-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 320px;
    padding: 10px 15px;
    background-color: var(--bg-light);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.03);
}

.flow-list li.arrow-down {
    justify-content: center;
    box-shadow: none;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-muted);
    padding: 0;
    margin: -4px 0;
    font-weight: bold;
}

.flow-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.flow-icon svg {
    width: 20px;
    height: 20px;
}

.red-icon {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--red-alert);
}

.green-icon {
    background-color: rgba(47, 174, 143, 0.1);
    color: var(--accent-emerald);
}

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

.text-highlight-red {
    color: var(--red-alert);
}

.text-highlight-green {
    color: var(--primary-green);
}

.info-transition-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 40px;
}

.info-transition-arrow svg {
    width: 40px;
    height: 40px;
    transform: rotate(90deg);
}

.stats-badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    justify-content: center;
}

.stat-badge-circle, .stat-badge-circle-accent {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 20px 10px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 130px;
    transition: var(--transition-smooth);
}

.stat-badge-circle-accent {
    background-color: var(--green-bg);
    border-color: rgba(47, 174, 143, 0.3);
}

.stat-badge-circle:hover, .stat-badge-circle-accent:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.stat-num-wrapper {
    font-family: var(--font-heading);
    font-weight: 900;
    line-height: 1.1;
    color: var(--primary-green);
    margin-bottom: 5px;
    font-size: 26px;
}

.stat-badge-circle-accent .stat-num-wrapper {
    color: var(--primary-green);
}

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

.stat-label {
    font-size: 18px;
    line-height: 1.35;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 160px;
}

/* ==========================================================================
   INFOGRAPHIC 2 (HORIZONTAL TIMELINE)
   ========================================================================== */
.timeline-scroll-container {
    width: 100%;
    overflow-x: auto;
    padding: 20px 0;
    margin-bottom: 40px;
    -webkit-overflow-scrolling: touch;
}

.timeline-horizontal {
    display: flex;
    align-items: center;
    padding: 10px;
    min-width: 1500px; /* Force overflow on small screens for scrollability */
    justify-content: space-between;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 180px;
    background-color: var(--bg-light);
    padding: 20px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
    transition: var(--transition-smooth);
}

.timeline-step:hover {
    transform: translateY(-5px);
    border-color: var(--accent-emerald);
}

.step-icon {
    width: 46px;
    height: 46px;
    background-color: rgba(47, 174, 143, 0.1);
    color: var(--accent-emerald);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

.step-icon svg {
    width: 22px;
    height: 22px;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

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

.step-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.line-svg {
    width: 100%;
}

.anim-line {
    stroke-dasharray: 6 6;
    animation: dash 30s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -1000;
    }
}

/* Digital tech footer badge */
.digital-tech-badge {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.badge-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-align: center;
}

.tech-icons-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.tech-icon-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: var(--bg-gray);
    border-radius: 30px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.tech-icon-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    transition: var(--transition-smooth);
}

.tech-icon-item:hover {
    color: var(--primary-green);
    background-color: var(--green-bg);
    border-color: rgba(47, 174, 143, 0.3);
    transform: scale(1.05);
}

.tech-icon-item:hover svg {
    color: var(--primary-green);
}

/* ==========================================================================
   INFOGRAPHIC 3 (CENTRAL ECOSYSTEM & 75% PROGRESS)
   ========================================================================== */
.info-3-layout {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Central Diagram style */
.ecosystem-diagram-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 500px;
    margin: 0 auto;
    background-color: var(--bg-light);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    overflow: hidden;
}

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

.network-svg-bg svg {
    width: 100%;
    height: 100%;
}

.net-line {
    stroke-dasharray: 4 4;
}

.eco-node {
    position: absolute;
    z-index: 2;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 15px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.eco-node:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 25px rgba(47,174,143,0.15);
    border-color: var(--accent-emerald);
}

/* Node Center specifically */
.node-center {
    width: 140px;
    height: 140px;
    top: 180px;
    left: 230px;
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    color: var(--bg-light);
    box-shadow: 0 8px 25px rgba(27, 127, 74, 0.3);
}

.node-center:hover {
    color: var(--bg-light);
    border-color: var(--primary-green);
    box-shadow: 0 12px 30px rgba(27,127,74,0.4);
    transform: scale(1.05) translate(0, 0);
}

.center-content {
    text-align: center;
}

.center-label {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.center-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
    margin: 2px 0;
}

.center-desc {
    font-size: 18px;
    opacity: 0.9;
}

/* Surrounding Nodes layout rules */
.node-outer {
    width: 180px;
    height: auto;
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.node-outer .node-icon {
    color: var(--accent-emerald);
    margin-bottom: 0;
    flex-shrink: 0;
}

.node-outer .node-icon svg {
    width: 20px;
    height: 20px;
}

.node-outer .node-label {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
    max-width: 130px;
    text-align: left;
}

/* Progress circle design */
.highlight-progress-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-box {
    background-color: var(--bg-light);
    border-radius: 12px;
    padding: 30px 24px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 480px;
    width: 100%;
}

.radial-progress-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.radial-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.radial-bg-circle {
    fill: none;
    stroke: var(--bg-gray);
    stroke-width: 8;
}

.radial-fg-circle {
    fill: none;
    stroke: var(--primary-green);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.radial-percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--primary-green);
    line-height: 1;
}

.pct-num {
    font-size: 28px;
}

.pct-symbol {
    font-size: 18px;
    margin-left: 1px;
}

.progress-label {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text-dark);
}

.progress-label strong {
    color: var(--primary-green);
}

/* ==========================================================================
   MAGAZINE STYLE ENDING SECTION & FOOTER
   ========================================================================== */
.magazine-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 100px 24px 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-container {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.ending-quote {
    font-family: var(--font-heading);
    font-size: 24px;
    line-height: 1.75;
    color: var(--primary-green);
    font-style: italic;
    font-weight: 600;
    max-width: 760px;
    margin: 0 auto 50px auto;
    position: relative;
    text-align: center;
}

.ending-quote::before {
    content: "“";
    font-size: 90px;
    font-family: Georgia, serif;
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(47, 174, 143, 0.12);
    line-height: 1;
    z-index: -1;
}

.footer-divider {
    width: 80px;
    height: 2px;
    background-color: var(--accent-gold);
    margin: 0 auto 40px auto;
}

.footer-icons-collage {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.footer-icons-collage svg {
    width: 100%;
    height: auto;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.copyright {
    font-size: 18px;
    color: var(--text-muted);
    opacity: 0.8;
}

/* ==========================================================================
   SCROLL EFFECT TRANSITIONS (Scrollytelling animations)
   ========================================================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Specific transform handling for full-bleed breakout containers to prevent overriding translateX(-50%) */
.opening-image-container.fade-in,
.lead-image-container.fade-in,
.in-between-image-container.fade-in,
.infographic-container.fade-in {
    opacity: 0;
    transform: translate(-50%, 30px);
}

.opening-image-container.fade-in.visible,
.lead-image-container.fade-in.visible,
.in-between-image-container.fade-in.visible,
.infographic-container.fade-in.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Adaptive breakpoints)
   ========================================================================== */

/* Up to Tablet Devices */
@media (max-width: 768px) {
    body {
        font-size: 18px;
    }
    
    .magazine-cover {
        padding: 80px 16px 50px 16px;
    }
    
    .main-title {
        margin-bottom: 25px;
    }
    
    .title-sub {
        font-size: 18px;
        letter-spacing: 0.15em;
        margin-bottom: 12px;
    }
    
    .title-focus {
        font-size: 54px;
        margin: 10px 0;
    }
    
    .title-connect {
        font-size: 18px;
        letter-spacing: 0.12em;
        margin-bottom: 10px;
    }
    
    .title-highlight {
        font-size: 32px;
    }
    
    .deck {
        font-size: 18px;
        line-height: 1.65;
    }
    
    .deck-sub {
        font-size: 18px;
        margin-bottom: 30px;
    }
    
    .opening-image-container {
        height: 35vh;
        margin-bottom: 50px;
    }
    
    .article-section {
        padding: 40px 0;
    }
    
    .section-badge {
        font-size: 22px;
    }
    
    .badge-num {
        font-size: 18px;
        padding: 1px 8px;
        margin-right: 10px;
    }
    
    .text-block p {
        margin-bottom: 20px;
    }
    
    /* Infographics adaptation */
    .infographic-container {
        padding: 30px 16px;
        margin: 40px 0;
    }
    
    .info-title {
        font-size: 19px;
    }
    
    .info-subtitle {
        margin-bottom: 25px;
    }

    .flow-list li {
        max-width: 100%;
    }

    .stats-badge-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-badge-circle, .stat-badge-circle-accent {
        min-height: auto;
        padding: 20px 15px;
        border-radius: 12px;
        flex-direction: row;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .stat-num-wrapper {
        font-size: 24px;
        margin-bottom: 0;
        flex-shrink: 0;
        width: 100px;
        text-align: left;
    }
    
    .stat-label {
        font-size: 18px;
        max-width: none;
        text-align: left;
    }
    
    .stat-unit {
        font-size: 18px;
    }
    
    /* Ecosystem diagram adaptation: stack outer nodes vertically on mobile */
    .ecosystem-diagram-container {
        max-width: 100%;
        height: auto;
        padding: 30px 15px;
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .network-svg-bg {
        display: none;
    }
    
    .eco-node {
        position: static !important;
        width: 100% !important;
        max-width: 340px;
        height: auto !important;
        border-radius: 12px !important;
        padding: 15px 20px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.03) !important;
        transform: none !important;
    }

    .node-center {
        background-color: var(--primary-green) !important;
        border-color: var(--primary-green) !important;
        color: var(--bg-light) !important;
        order: -1;
        justify-content: center !important;
        padding: 20px !important;
    }

    .center-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .center-label, .center-desc {
        font-size: 18px !important;
    }

    .center-title {
        font-size: 28px !important;
        margin: 5px 0 !important;
    }
    
    .eco-node.node-outer {
        width: 100% !important;
    }
    
    .eco-node.node-outer .node-label {
        font-size: 18px !important;
        max-width: none !important;
        text-align: left !important;
    }

    .eco-node.node-outer .node-icon {
        margin-bottom: 0 !important;
    }
    
    .progress-box {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 24px;
    }
    
    .progress-label {
        font-size: 18px;
    }
    
    .ending-quote {
        font-size: 18px;
        line-height: 1.6;
    }
}

/* Medium Devices (Tablets, up to desktop) */
@media (min-width: 769px) {
    .magazine-cover {
        padding: 140px 48px 100px 48px;
    }
    
    .main-title {
        font-size: 50px;
    }

    .opening-image-container {
        height: 55vh;
    }
    
    .info-1-layout {
        flex-direction: row;
        align-items: stretch;
    }
    
    .info-transition-arrow svg {
        transform: rotate(0deg);
    }
    
    .info-3-layout {
        flex-direction: row;
        align-items: center;
    }
    
    .ecosystem-diagram-container {
        margin: 0;
        flex: 1;
    }
    
    .highlight-progress-container {
        width: 320px;
        flex-shrink: 0;
    }
    
    .progress-box {
        flex-direction: column;
        padding: 30px 20px;
    }
}

/* Removed Large Screens Sticky TOC offsets to allow full center reading space */
@media (min-width: 1280px) {
    .content-wrapper {
        margin: 0 auto;
    }
    
    .magazine-cover .cover-content {
        margin: 0 auto;
    }
    
    .opening-image-container {
        margin: 0 auto 80px auto;
        width: 100%;
    }
    
    .magazine-footer .footer-container {
        margin: 0 auto;
    }
}
