/* CSS Variables - Business Luxury Theme */
:root {
    --bg-color: #050b14; /* Deep Navy / Dark Space */
    --bg-surface: rgba(15, 23, 42, 0.6);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-gold: #d4af37; /* Metallic Gold */
    --accent-gold-dim: rgba(212, 175, 55, 0.2);
    --font-title: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
}

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

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

/* Reading Progress Bar */
#progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 9999;
}

#progress-bar {
    height: 100%;
    background: var(--accent-gold);
    width: 0%;
    box-shadow: 0 0 10px var(--accent-gold);
    transition: width 0.1s ease;
}

/* Hiệu ứng Golden Bokeh (Cinematic Particle Effect) */
#bokeh-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, rgba(5, 11, 20, 0) 0%, var(--bg-color) 100%);
}

.bokeh-particle {
    position: absolute;
    color: var(--accent-gold);
    font-family: var(--font-title);
    user-select: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatUp linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(110vh) scale(0.8) rotate(0deg);
        opacity: 0;
    }
    20% {
        opacity: var(--max-opacity);
    }
    80% {
        opacity: var(--max-opacity);
    }
    100% {
        transform: translateY(-20vh) scale(1.2) rotate(180deg);
        opacity: 0;
    }
}

/* Hero Section (Cover) */
.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    z-index: 2;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.reuters.com/resizer/v2/T6QOUEQF4JMPLND77SGKT2GXK4.jpg?auth=5a357b9c3d36bc4baba0cb7ee2c81144f94ca5befd4dfa4d509b95428452bcd5');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Elegant Vignette & Darkening */
    filter: brightness(0.4) saturate(1.2) contrast(1.1);
    z-index: -2;
    transform: scale(1.05); 
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, var(--bg-color) 0%, transparent 100%);
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    padding: 0 30px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeInHero 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.3s;
}

@keyframes fadeInHero {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-title);
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 30px;
    text-shadow: 0 10px 30px rgba(0,0,0,0.8);
    letter-spacing: -0.5px;
    background: linear-gradient(180deg, #ffffff 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sapo {
    font-family: var(--font-sans);
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.7;
    color: #cbd5e1;
    max-width: 760px;
    margin: 0 auto;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
}

.scroll-indicator::after {
    content: '';
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent-gold), transparent);
    animation: scrollLine 2s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    50.1% { transform: scaleY(1); transform-origin: bottom; opacity: 1; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

/* Article Content Structure */
.article-body {
    position: relative;
    z-index: 2;
    padding-top: 60px;
    padding-bottom: 120px;
}

.container {
    max-width: 860px; /* Mở rộng container để chữ bọc quanh ảnh đẹp hơn */
    margin: 0 auto;
    padding: 0 25px;
}

/* Clearfix cho container chứa ảnh float */
.container::after {
    content: "";
    display: table;
    clear: both;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hiệu ứng trượt ngang cho ảnh */
.reveal.slide-left {
    transform: translateX(-300px); /* Tăng khoảng cách để tạo cảm giác trượt từ xa vào */
}

.reveal.slide-right {
    transform: translateX(300px);
}

.reveal.active.slide-left,
.reveal.active.slide-right {
    transform: translateX(0);
}

/* Typography & Elements */
p {
    margin-bottom: 30px;
    text-align: justify;
    color: var(--text-main);
}

.dropcap::first-letter {
    float: left;
    font-family: var(--font-title);
    font-size: 5.5rem;
    line-height: 0.7;
    padding-right: 20px;
    padding-top: 15px;
    color: var(--accent-gold);
    text-shadow: 0 5px 15px var(--accent-gold-dim);
}

/* Glassmorphism Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent-gold);
    padding: 40px;
    margin: 60px 0;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #f8fafc;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border-radius: 4px;
}

.highlight-box::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: var(--font-title);
    font-size: 6rem;
    color: var(--accent-gold-dim);
    line-height: 1;
    z-index: -1;
}

/* Subheadings with Animated Underline */
.subheading {
    font-family: var(--font-title);
    font-size: 2.2rem;
    color: var(--accent-gold);
    margin-top: 70px;
    margin-bottom: 30px;
    font-weight: 600;
    position: relative;
    display: inline-block;
}

.subheading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s;
}

.reveal.active .subheading::after {
    width: 100%;
}

/* Images with Zoom-out Parallax Effect */
.image-wrapper {
    margin: 70px 0;
    width: 100%;
    overflow: hidden; /* Chứa hiệu ứng zoom */
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.image-wrapper.full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    border-radius: 0;
}

/* Ảnh kích thước chuẩn, trượt so le từ 2 bên */
.image-wrapper.slide-left,
.image-wrapper.slide-right {
    width: 100%; /* Thu nhỏ lại bằng với khung chữ */
    margin-top: 50px;
    margin-bottom: 50px;
    border-radius: 8px; /* Bo góc lại cho mềm mại */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5); /* Đổ bóng nhẹ */
}

.image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transform: scale(1); /* Bỏ hiệu ứng zoom ban đầu để không góc nào của ảnh bị khuất */
    transition: transform 2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-wrapper.reveal.active img {
    transform: scale(1);
}

.source {
    text-align: right;
    font-style: italic;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

/* Chart Styles */
.chart-wrapper {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 30px;
    margin: 50px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.chart-header h3 {
    font-family: var(--font-title);
    color: var(--text-main);
    font-size: 1.6rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.chart-header p {
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
    margin-top: 0;
}

.chart-source-text {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .hero-sapo {
        font-size: 1.1rem;
    }
    body {
        font-size: 17px;
    }
    .highlight-box {
        padding: 30px 20px;
        font-size: 1.1rem;
    }
    .dropcap::first-letter {
        font-size: 4rem;
    }
    .subheading {
        font-size: 1.8rem;
    }
    /* Điều chỉnh trên mobile */
    .image-wrapper.slide-left,
    .image-wrapper.slide-right {
        width: 100%;
        margin-left: 0;
        margin-top: 40px;
        margin-bottom: 40px;
    }
    .reveal.slide-left,
    .reveal.slide-right {
        transform: translateY(50px); /* Về lại hiệu ứng trượt dọc trên điện thoại cho đỡ lỗi tràn màn hình */
    }
    .reveal.active.slide-left,
    .reveal.active.slide-right {
        transform: translateY(0);
    }
}