/* --- BIẾN MÀU SẮC & CẤU HÌNH CHUNG --- */
:root {
    --bg-base: #0b1325;
    --bg-card: #152036;
    --bg-border: #1e2c48;
    --bg-dark: #050a14;
    --gold: #d4af37;
    --gold-light: #f3e5ab;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --font-serif: 'Playfair Display', serif;
    --font-body: 'Lora', serif;
    --font-sans: 'Inter', sans-serif;
    --transition-slow: 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    margin-top: 45px;
    -webkit-font-smoothing: antialiased;
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background-color: rgba(11, 19, 37, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: zoom-out;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

/* --- HEADER SOHA --- */
.sp-sticky-header {
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    width: 100%; 
    height: 45px !important;
    background-color: #000 !important; 
    display: flex !important; 
    align-items: center !important; 
    justify-content: space-between !important;
    z-index: 99999 !important; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.5) !important; 
    font-family: Arial, sans-serif !important;
}

.header-group {
    display: flex;
    align-items: center;
    height: 100%;
}

.sp-back-btn {
    display: flex; align-items: center; justify-content: center; 
    width: 45px; height: 45px;
    background-color: #007f74; color: white; cursor: pointer;
    transition: all 0.3s ease;
}
.sp-back-btn:hover { background-color: #00665d; }
.sp-back-btn svg, .fb-custom-btn svg { width: 20px; height: 20px; fill: currentColor; }
.sp-logo { margin-left: 15px; display: flex; align-items: center; }
.sp-logo img { height: 24px; width: auto; }

.center-logo {
    position: absolute; left: 50%; transform: translateX(-50%); 
    pointer-events: none; user-select: none;
}
.center-logo img, .mobile-emag-logo { height: 26px; width: auto; }
.mobile-emag-logo { display: none; margin-right: 15px; }

.fb-custom-btn {
    display: flex; align-items: center; gap: 6px; color: white; 
    font-size: 13px; font-weight: bold; cursor: pointer; opacity: 0.9;
    margin-right: 15px; transition: all 0.3s ease; text-decoration: none;
}
.fb-custom-btn:hover { opacity: 1; text-decoration: underline; }
.fb-custom-btn svg { width: 14px; height: 14px; }

@media (max-width: 768px) { 
    .center-logo, .fb-custom-btn { display: none !important; } 
    .mobile-emag-logo { display: block !important; }
}

/* --- PROGRESS BAR --- */
#progress-bar {
    position: fixed; top: 45px; left: 0; height: 4px;
    background: linear-gradient(90deg, var(--gold), #fff6d9);
    width: 0%; z-index: 99998; transition: width 0.1s;
}

/* --- COVER --- */
.main-cover {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
}

.cover-container {
    width: 100%;
    max-width: 1920px;
    position: relative;
}

.cover-container img {
    width: 100%;
    height: auto;
    display: block;
}

.cover-gradient {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    height: 8rem; /* mobile */
    background: linear-gradient(to top, var(--bg-base), rgba(11, 19, 37, 0.7), transparent);
    pointer-events: none;
}
@media (min-width: 768px) {
    .cover-gradient { height: 14rem; }
}

/* --- SAPO SECTION --- */
.sapo-section {
    background-color: var(--bg-base);
    padding: 2rem 1.5rem 1rem;
    position: relative;
    z-index: 10;
}

.sapo-container {
    max-width: 64rem;
    margin: 0 auto;
    text-align: center;
}

.sapo-text {
    font-size: 1.5rem;
    color: var(--gold);
    font-family: var(--font-serif);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.scroll-indicator {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: bounce 1s infinite;
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}
.scroll-icon { width: 1.5rem; height: 1.5rem; color: var(--gold); }

@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0,0,0.2,1); }
}

/* --- MAIN CONTENT & TYPOGRAPHY --- */
.main-content {
    position: relative;
    z-index: 10;
    background-color: var(--bg-base);
    padding-bottom: 2rem;
}

.article-body {
    max-width: 48rem; /* ~3xl */
    margin: 0 auto;
    padding: 0 1.5rem;
    font-size: 1.15rem;
    line-height: 2.1;
    font-weight: 300;
}
@media (min-width: 640px) {
    .article-body { padding: 0; font-size: 1.25rem; }
}

.article-body p {
    margin-bottom: 2.25rem;
    text-align: justify;
}

/* Section Titles */
.section-title {
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    text-align: center;
}
.section-title h2 {
    font-family: var(--font-serif);
    font-size: 1.875rem;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.3;
    text-shadow: 0 4px 8px rgba(0,0,0,0.6);
}
@media (min-width: 768px) {
    .section-title h2 { font-size: 2.75rem; }
}
.title-underline {
    width: 5rem;
    height: 4px;
    background-color: var(--gold);
    margin: 2rem auto 0;
}

/* Drop Cap */
.drop-cap::first-letter {
    float: left;
    font-size: 5.5rem;
    line-height: 0.8;
    padding: 0.2rem 0.75rem 0 0;
    color: var(--gold);
    font-family: var(--font-serif);
    font-weight: 700;
}

/* Highlight Text */
.highlight-point {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold-light);
    display: block;
    margin-bottom: 0.5rem;
}
.text-white { color: white; font-weight: bold; }

/* --- IMAGES & FIGURES --- */
figure {
    width: 100%;
    max-width: 1440px; /* Default for big albums */
    margin: 3rem auto;
    padding: 0 1rem;
}
@media (min-width: 1024px) {
    figure { padding: 0 2rem; }
}

.single-image, .image-album.layout-grid-4 { max-width: 980px; }
.single-image figcaption, .image-album figcaption, .map-slider-container figcaption {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--font-serif);
    margin-top: 1rem;
    font-size: 0.9rem;
}
@media (min-width: 640px) { figcaption { font-size: 1rem; } }

.img-wrap {
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid var(--bg-border);
    background: black;
    position: relative;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
    cursor: zoom-in;
}
.img-wrap img:hover { opacity: 0.9; }

/* Grid Layouts */
.album-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .album-grid { grid-template-columns: 1fr 1fr; gap: 1rem; }
}
.img-wrap.full-width {
    grid-column: 1 / -1;
    max-height: 75vh;
}
.img-wrap:not(.full-width) {
    aspect-ratio: 4/3;
}
@media (min-width: 640px) { .img-wrap:not(.full-width) { aspect-ratio: 16/9; } }

/* Grid 4 Items */
.grid-4-items {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}
@media (min-width: 768px) {
    .grid-4-items { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

/* Full Width Images (Outside content) */
.full-width-image-container {
    width: 100%;
    margin: 2.5rem 0;
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    position: relative;
}
.full-width-image-container img {
    width: 100%;
    max-width: 1920px;
    height: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top: 1px solid var(--bg-border);
    border-bottom: 1px solid var(--bg-border);
}
.large-graphic img { max-height: 90vh; object-fit: contain; }

/* --- QUOTE BLOCK --- */
.quote-block {
    margin: 3rem auto;
    padding: 2.5rem 1.5rem;
    max-width: 980px;
    position: relative;
    text-align: center;
}
@media (min-width: 640px) { .quote-block { padding: 2.5rem 4rem; } }

.quote-bg {
    position: absolute; inset: 0;
    background-color: rgba(21, 32, 54, 0.6); /* bgCard */
    border-radius: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transform: skewX(-2deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 0 1rem;
}
@media (min-width: 640px) { .quote-bg { margin: 0; } }

.quote-content {
    position: relative; z-index: 10;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--gold-light);
    font-style: italic;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin: 0;
}
@media (min-width: 640px) { .quote-content { font-size: 1.875rem; } }

.quote-mark {
    position: absolute;
    font-family: var(--font-serif);
    font-size: 6rem;
    color: var(--gold);
    opacity: 0.1;
    line-height: 1;
}
@media (min-width: 640px) { .quote-mark { font-size: 8rem; } }
.quote-mark.top { top: 0; left: 2rem; }
.quote-mark.bottom { bottom: 0; right: 2rem; transform: rotate(180deg); }

/* --- SLIDER BẢN ĐỒ --- */
.map-slider-container {
    width: 100%;
    margin: 3rem 0;
    background-color: var(--bg-base);
    padding: 2.5rem 0;
    border-top: 1px solid var(--bg-border);
    border-bottom: 1px solid var(--bg-border);
    position: relative;
}

.slider-wrapper {
    max-width: 1920px;
    margin: 0 auto;
    position: relative;
    group: hover; /* Fake concept, handled in CSS */
}

.slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}
.slider-track::-webkit-scrollbar { display: none; }

.slider-track img {
    flex-shrink: 0;
    width: 100%;
    height: 60vh;
    scroll-snap-align: center;
    object-fit: contain;
    cursor: zoom-in;
}
@media (min-width: 768px) { .slider-track img { height: 85vh; } }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.7);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 20;
    opacity: 0.8;
    transition: all 0.3s;
    display: flex;
    align-items: center; justify-content: center;
}
.nav-btn:hover { background-color: var(--gold); color: black; opacity: 1; }
.nav-btn.left { left: 0.5rem; }
.nav-btn.right { right: 0.5rem; }
.nav-btn svg { width: 1.5rem; height: 1.5rem; stroke: currentColor; fill: none; }
@media (min-width: 768px) {
    .nav-btn { opacity: 0; }
    .slider-wrapper:hover .nav-btn { opacity: 1; }
    .nav-btn.left { left: 2rem; }
    .nav-btn.right { right: 2rem; }
    .nav-btn svg { width: 2rem; height: 2rem; }
}

/* --- INTERACTIVE MAP --- */
.map-section {
    position: relative;
    width: 100%;
    max-width: 1920px;
    height: 75vh;
    margin: 3rem auto;
    border-top: 1px solid var(--bg-border);
    border-bottom: 1px solid var(--bg-border);
    background-color: #f3f4f6;
    overflow: hidden;
    font-family: var(--font-sans);
}
@media (min-width: 768px) { .map-section { height: 85vh; } }

#map { width: 100%; height: 100%; z-index: 1; }

.ui-layer { position: absolute; top: 0; pointer-events: none; z-index: 1000; }

.map-header { left: 0; width: 100%; padding: 1rem; }
@media (min-width: 768px) { .map-header { padding: 1.5rem; } }

.map-title-box {
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    max-width: 24rem;
    pointer-events: auto;
    color: #1f2937;
}

.map-title-box h1 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.2; }
@media (min-width: 768px) { .map-title-box h1 { font-size: 1.5rem; } }

.legend { display: flex; align-items: center; gap: 0.75rem; margin-top: 1rem; }
.dot { width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid white; box-shadow: 0 0 5px rgba(239,68,68,0.8); }
.dot.red { background-color: #ef4444; }
.legend span { font-size: 0.875rem; font-weight: 500; }
.note { margin-top: 1rem; font-size: 0.75rem; color: #9ca3af; font-style: italic; }

/* Map Markers */
.hotspot-main {
    width: 24px; height: 24px;
    background-color: #ef4444;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    animation: pulse-red 2s infinite;
    cursor: pointer;
}
@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Map Panel */
.info-panel {
    right: 0; height: 100%; width: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}
@media (min-width: 768px) {
    .info-panel { width: 24rem; justify-content: flex-end; padding: 1.5rem; }
}
.panel-hidden { transform: translateX(120%); opacity: 0; }

.panel-content {
    background: white; width: 100%; max-height: 90vh;
    border-radius: 1.5rem; shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow-y: auto; pointer-events: auto; position: relative;
    display: flex; flex-direction: column;
}

.close-panel-btn {
    position: absolute; top: 1rem; right: 1rem; z-index: 10;
    background: rgba(255,255,255,0.8); border: none; padding: 0.5rem;
    border-radius: 50%; cursor: pointer; color: #1f2937;
}
.close-panel-btn:hover { background: #f3f4f6; }
.close-panel-btn svg { width: 1.25rem; height: 1.25rem; }

.panel-image-area { position: relative; height: 14rem; width: 100%; flex-shrink: 0; background: #e5e7eb; }
.panel-image-area img { width: 100%; height: 100%; object-fit: cover; border-top-left-radius: 1.5rem; border-top-right-radius: 1.5rem; }
.panel-overlay { position: absolute; bottom: 0; left: 0; width: 100%; height: 50%; background: linear-gradient(to top, rgba(0,0,0,0.6), transparent); }
.panel-badge {
    position: absolute; bottom: 1rem; left: 1rem;
    background-color: rgba(239,68,68,0.9); color: white;
    padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 700;
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);
}

.panel-text-area { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; gap: 1rem; color: #374151; }
.panel-text-area h2 { font-size: 1.5rem; font-weight: 700; color: #111827; line-height: 1.2; }
.panel-loc-row { display: flex; items-center; gap: 0.5rem; color: #6b7280; font-size: 0.875rem; margin-top: 0.5rem; }
.panel-loc-row svg { width: 1rem; height: 1rem; }
.divider { width: 100%; height: 1px; background-color: #f3f4f6; }
#panel-desc { font-size: 0.875rem; line-height: 1.6; }

/* --- FOOTER --- */
.main-footer {
    padding: 2.5rem 1.5rem;
    background-color: var(--bg-base);
    border-top: 1px solid var(--bg-border);
    margin-top: 1rem;
    width: 100%;
    display: flex; justify-content: center;
}
@media (min-width: 768px) { .main-footer { width: 50%; margin-left: auto; margin-right: auto; } }

.footer-content { text-align: center; }
.footer-content h3 {
    font-size: 1.25rem; color: var(--gold);
    text-transform: uppercase; letter-spacing: 0.2em;
    font-family: var(--font-serif); font-weight: 700; margin-bottom: 1rem;
}
@media (min-width: 640px) { .footer-content h3 { font-size: 1.5rem; } }
.footer-info p {
    font-size: 0.875rem; color: var(--text-muted);
    font-weight: 300; text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}

/* --- ANIMATIONS --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}