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

:root {
    /* Color Palette */
    --color-green: #1F7A4D;
    --color-green-light: #E8F5E9;
    --color-blue: #0B5EA8;
    --color-blue-light: #EBF8FF;
    --color-orange: #E96125;
    --color-orange-light: #FFF5F5;
    --color-gold: #D4AF37;
    --color-bg-light: #FAF8F5;
    --color-white: #FFFFFF;
    --color-text-dark: #1A202C;
    --color-text-muted: #4A5568;
    --color-text-light: #718096;

    /* Typography */
    --font-headline: 'Be Vietnam Pro', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-numbers: 'Bebas Neue', sans-serif;

    /* Transitions */
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-quick: all 0.3s ease;
}

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

/* Scroll progress bar */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

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

/* Header */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: var(--transition-quick);
}

.header-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: var(--color-green);
}

.category {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-blue);
    letter-spacing: 1px;
    border-left: 2px solid var(--color-gold);
    padding-left: 10px;
}

/* HERO BANNER - Fullscreen Parallax */
.hero-section {
    position: relative;
    width: 100%;
    height: 160vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Cần chiều cao lớn hơn để parallax không lộ lề */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(11, 94, 168, 0.3) 0%,
            rgba(31, 122, 77, 0.4) 50%,
            rgba(26, 32, 44, 0.85) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1100px;
    text-align: center;
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-shield-icon-container {
    margin-bottom: 25px;
    filter: drop-shadow(0 4px 15px rgba(212, 175, 55, 0.3));
    animation: pulseGlow 3s infinite ease-in-out;
}

.hero-shield-svg {
    width: 90px;
    height: 90px;
}

.hero-title {
    font-family: var(--font-headline);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -1px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.hero-title .word-layer {
    display: block;
}

.text-green {
    color: #48BB78;
}

.text-gold {
    color: var(--color-gold);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 400;
    max-width: 750px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

/* Scroll down indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.8;
}

.scroll-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    font-family: var(--font-headline);
}

.mouse-icon {
    width: 26px;
    height: 40px;
    border: 2px stroke var(--color-white);
    border-radius: 20px;
    position: relative;
    border: 2px solid var(--color-white);
}

.mouse-wheel {
    width: 6px;
    height: 6px;
    background-color: var(--color-gold);
    border-radius: 50%;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollMouse 2s infinite ease-in-out;
}

/* Section container */
.section-container {
    padding: 100px 0;
    position: relative;
    width: 100%;
}

.bg-light {
    background-color: var(--color-white);
}

/* Content wrapper */
.content-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Text layout - Grid bất đối xứng kiểu báo chí */
.text-content-layout {
    max-width: 800px;
    margin: 0 auto;
}

.paragraph-block {
    margin-bottom: 40px;
}

.paragraph-block p {
    margin-bottom: 25px;
    color: var(--color-text-dark);
    font-size: 1.15rem;
}

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

/* Dropcap */
.dropcap-paragraph {
    position: relative;
}

.dropcap {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 4.8rem;
    float: left;
    line-height: 0.8;
    margin-top: 8px;
    margin-right: 12px;
    color: var(--color-green);
    text-shadow: 2px 2px 0px rgba(11, 94, 168, 0.1);
}

/* Highlighting subheadings */
.subheadline-highlight {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--color-blue);
    margin-top: 50px;
    margin-bottom: 25px;
    border-left: 4px solid var(--color-gold);
    padding-left: 15px;
}

/* Wide image container - Parallax effects */
.wide-image-container {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.parallax-image-container {
    position: relative;
    overflow: hidden;
}

.parallax-img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1.05);
    transition: transform 0.8s ease-out;
    will-change: transform;
}

.image-caption {
    font-size: 0.9rem;
    color: var(--color-text-light);
    text-align: center;
    padding: 15px 20px;
    background-color: var(--color-bg-light);
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    font-style: italic;
}

.part-header-image {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    margin-bottom: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.part-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(0);
    transition: transform 0.1s ease-out;
    will-change: transform;
    z-index: 1;
}

.part-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(26, 32, 44, 0.7) 100%);
    z-index: 2;
}

.part-header-text {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--color-white);
    width: 90%;
    max-width: 900px;
}

.part-number {
    font-family: var(--font-numbers);
    font-size: 1.5rem;
    letter-spacing: 4px;
    color: var(--color-gold);
    display: block;
    margin-bottom: 15px;
}

.part-title {
    font-family: var(--font-headline);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* INFOGRAPHICS WRAPPERS */
.infographic-wrapper {
    background-color: var(--color-white);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    padding: 40px;
    margin: 80px auto;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.infographic-header {
    text-align: center;
    margin-bottom: 40px;
}

.infographic-title {
    font-family: var(--font-headline);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--color-green);
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.infographic-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.svg-container {
    width: 100%;
    position: relative;
    overflow-x: auto;
}

.emagazine-svg {
    display: block;
    width: 100%;
    height: auto;
    min-width: 1000px;
    /* Đảm bảo infographic không bị bóp méo quá nhiều trên mobile */
}

/* Custom interactive hover effects on SVG elements */
.pulse-node,
.timeline-step,
.net-node,
.center-node {
    transform-origin: center;
    transform-box: fill-box;
}

.pulse-node {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.pulse-node:hover {
    transform: scale(1.05);
    filter: brightness(1.05) drop-shadow(0 4px 12px rgba(233, 97, 37, 0.2));
}

.timeline-step {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.timeline-step:hover {
    transform: scale(1.05);
}

.timeline-step .node-circle {
    transition: var(--transition-quick);
}

.timeline-step:hover .node-circle {
    stroke: var(--color-blue);
    r: 28px;
    filter: drop-shadow(0 4px 10px rgba(11, 94, 168, 0.2));
}

.timeline-step:hover .node-dot {
    fill: var(--color-blue);
}

.net-node {
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.net-node:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.net-node rect,
.net-node circle {
    transition: fill 0.3s ease, stroke-width 0.3s ease, stroke 0.3s ease;
}

.net-node:hover rect,
.net-node:hover circle {
    fill: #EBF8FF;
    stroke-width: 4px;
}

.center-node {
    transition: transform 0.5s ease;
}

.center-node:hover {
    transform: scale(1.05);
}

/* SVG Line Drawing Path animations */
.animated-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-path.draw-active {
    stroke-dashoffset: 0;
}

/* Pulse keyframes for node glow */
@keyframes pulseGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.3));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 4px 20px rgba(212, 175, 55, 0.6));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 10px rgba(212, 175, 55, 0.3));
    }
}

/* ANIMATION ON SCROLL */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1), transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Footer Article - Chữ ký tác giả */
.article-footer {
    padding: 60px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-top: 80px;
}

.footer-wrapper {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.author-block {
    display: flex;
    flex-direction: column;
}

.author-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
}

.author-name {
    font-family: var(--font-headline);
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--color-green);
    margin-top: 5px;
}

.share-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.share-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-light);
    margin-bottom: 10px;
}

.share-icons {
    display: flex;
    gap: 15px;
}

.share-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-blue);
    cursor: pointer;
    transition: var(--transition-quick);
    border: 1px solid var(--color-blue);
    padding: 6px 16px;
    border-radius: 20px;
}

.share-btn:hover {
    background-color: var(--color-blue);
    color: var(--color-white);
}

/* Main Footer */
.main-footer {
    background-color: #1A202C;
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 4px solid var(--color-green);
}

.main-footer p {
    margin-bottom: 8px;
}

.main-footer p:last-child {
    margin-bottom: 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Keyframes animations */
@keyframes scrollMouse {
    0% {
        top: 8px;
        opacity: 1;
    }

    50% {
        top: 24px;
        opacity: 0;
    }

    100% {
        top: 8px;
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    body {
        font-size: 17px;
    }

    .infographic-wrapper {
        padding: 25px 15px;
    }

    .emagazine-svg {
        min-width: 1000px;
        /* Giữ nguyên min-width để cho phép scroll ngang mượt mà */
    }
}

@media (max-width: 768px) {
    .section-container {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .part-header-image {
        height: 350px;
    }

    .footer-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }

    .share-block {
        align-items: flex-start;
    }
}