/* ===================================================
   0. CORE & RESET
   ================================================== */
:root {
    --color-bg: #fcfbf9;
    --color-text: #2b2b2b;
    --color-accent: #b08d55;
    --color-dark: #111111;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Manrope', sans-serif;
    --cursor-size: 20px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    cursor: none; 
}

/* Custom Cursor */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 999999;
    pointer-events: none;
}
.cursor-dot { width: 5px; height: 5px; background-color: var(--color-accent); }
.cursor-outline {
    width: var(--cursor-size);
    height: var(--cursor-size);
    border: 1px solid rgba(176, 141, 85, 0.5);
    transition: width 0.2s, height 0.2s, background-color 0.2s;
}
body:hover .cursor-outline.hovered {
    width: 50px; height: 50px; background-color: rgba(176, 141, 85, 0.1); border-color: var(--color-accent);
}

/* ===================================================
   1. CINEMATIC INTRO
   ================================================== */
#cinematic-intro {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background-color: #000; z-index: 100000;
    display: flex; justify-content: center; align-items: center;
    color: #fff; transition: opacity 1s ease, visibility 1s ease;
}
#cinematic-intro.fade-out { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-bg {
    position: absolute; inset: 0; background: url('image/11111.png') center/cover;
    opacity: 0.2; filter: grayscale(100%) blur(5px);
}
.intro-content { position: relative; z-index: 2; text-align: center; }
.intro-icon { font-size: 2rem; color: var(--color-accent); margin-bottom: 20px; animation: fadeInUp 1s forwards; opacity: 0; }
.intro-title { text-transform: uppercase; font-weight: 700; margin-bottom: 20px; }
.intro-title .line-1 { display: block; font-size: 1.5rem; color: #aaa; animation: fadeInUp 1s 0.3s forwards; opacity: 0; transform: translateY(20px); }
.intro-title .line-2 { display: block; font-size: 3rem; color: var(--color-accent); animation: fadeInUp 1s 0.6s forwards; opacity: 0; transform: translateY(20px); }
.intro-divider { width: 0; height: 1px; background: #555; margin: 20px auto; animation: expandWidth 1s 1s forwards; }
.intro-loader-wrap { width: 200px; height: 2px; background: rgba(255,255,255,0.1); margin: 30px auto 0; overflow: hidden; }
.intro-progress-bar { width: 0; height: 100%; background: var(--color-accent); transition: width 0.1s linear; }

@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
@keyframes expandWidth { to { width: 100px; } }

/* ===================================================
   2. HERO SECTION (3D MEMORY)
   ================================================== */
.hero-section {
    position: relative; height: 100vh; min-height: 600px;
    background: #050505;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
}
#webgl-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; }
.hero-overlay {
    position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #000 90%);
    z-index: 2; pointer-events: none;
}
.hero-content { 
    position: relative; 
    z-index: 3; 
    max-width: 1000px; 
    padding: 0 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hero-title-large {
    font-family: var(--font-serif); font-size: 5rem; font-weight: 700; line-height: 1.1;
    margin-bottom: 30px; text-shadow: 0 10px 40px rgba(0,0,0,0.8);
    text-align: center; width: 100%;
}
.hero-kicker { text-transform: uppercase; letter-spacing: 4px; color: var(--color-accent); margin-bottom: 20px; display: block; font-size: 0.9rem; text-align: center; }
.hero-stat .value { font-family: var(--font-serif); font-size: 3.5rem; color: var(--color-accent); line-height: 1; display: block;}
.hero-stat .label { text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; color: #777; }

/* ===================================================
   3. SECTIONS & CARDS
   ================================================== */
.section-padding { padding: 80px 0; }
.history-section { padding: 80px 0; background-color: #f9f7f2; }
.history-title, .celebrities-title { font-family: var(--font-serif); font-size: 2.5rem; color: var(--color-dark); margin-bottom: 1rem; }

.celebrities-section { padding: 60px 0; background: #fcfbf9; }
.celebrities-card {
    background: #fff; border-radius: 8px; padding: 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transform-style: preserve-3d; transform: perspective(1000px);
    cursor: pointer; overflow: hidden; height: 100%;
    transition: transform 0.3s ease;
    display: flex; flex-direction: column;
}

.card-img-wrap {
    overflow: hidden;
    height: 200px; 
    position: relative;
    background: #f0f0f0;
}

.card-img-wrap img {
    width: 100%; height: 100%; 
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
    filter: grayscale(100%);
}

.celebrities-card:hover .card-img-wrap img {
    transform: scale(1.1); filter: grayscale(0%);
}

.celebrities-caption {
    position: absolute; bottom: 10px; right: 10px;
    background: var(--color-accent); color: #fff;
    padding: 3px 8px; font-size: 0.6rem; text-transform: uppercase; letter-spacing: 1px;
    border-radius: 4px; z-index: 2;
}

.person-name {
    text-align: left; padding: 15px;
    font-family: var(--font-serif); font-size: 1.1rem;
    margin: 0; background: #fff; position: relative; z-index: 2;
    flex-grow: 1;
}

.history-image {
    height: 400px;
    border-radius: 12px; overflow: hidden;
}
.history-image img { width: 100%; height: 100%; object-fit: cover; }

/* ===================================================
   4. UI & MAP & FOOTER
   ================================================== */
.main-nav { background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); padding: 10px 0; transition: 0.3s; }
.main-nav.scrolled { box-shadow: 0 5px 20px rgba(0,0,0,0.05); }

#fullscreen-map-interface {
    position: fixed; inset: 0; z-index: 10000; background: #fff;
    display: flex; flex-direction: column;
    visibility: hidden; opacity: 0; transform: scale(0.95); transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
#fullscreen-map-interface.active { visibility: visible; opacity: 1; transform: scale(1); }
.fs-map-header { height: 60px; background: var(--color-dark); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; z-index: 10002; }
#fs-leaflet-map { flex: 1; background: #e5e5e5; z-index: 1; }

.fs-sidebar {
    position: absolute; top: 80px; left: 20px; width: 320px; max-height: calc(100% - 100px);
    background: rgba(255,255,255,0.98); backdrop-filter: blur(10px); border-radius: 12px;
    overflow-y: auto; padding: 15px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 11000;
    border: 1px solid rgba(0,0,0,0.1);
}

.location-item { padding: 8px; border-bottom: 1px solid #eee; cursor: pointer; transition: 0.2s; display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }
.location-item:hover { background: #f5f5f5; }
.sidebar-thumb { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-accent); flex-shrink: 0; }
.location-info { display: flex; flex-direction: column; }
.location-info strong { font-size: 0.9rem; color: var(--color-text); }
.location-info small { font-size: 0.75rem; color: #777; }

/* EDITOR PANEL */
#map-editor-panel {
    display: none; position: absolute; bottom: 20px; right: 20px; width: 350px;
    background: rgba(0,0,0,0.9); color: #0f0; padding: 15px;
    border-radius: 8px; z-index: 12000; font-family: monospace; font-size: 12px;
}
#map-editor-panel.active { display: block; }
#map-editor-panel textarea { width: 100%; height: 200px; background: #222; color: #0f0; border: none; resize: none; }

.fs-btn-group { display: flex; gap: 10px; }
.fs-icon-btn {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); color: #fff;
    width: 36px; height: 36px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s;
}
.fs-icon-btn:hover, .fs-icon-btn.active { background: var(--color-accent); border-color: var(--color-accent); color: #000; }

/* === LEAFLET CLEANUP === */
.leaflet-prefix,
.leaflet-control-attribution a[href^="https://leafletjs.com"] {
    display: none !important;
}

.footer { background: #111; color: #888; padding: 60px 0; font-size: 0.9rem; }
.footer h5 { color: #fff; font-family: var(--font-serif); margin-bottom: 15px; }

/* ===================================================
   5. MODALS
   ================================================== */
.memorial-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 2000;
    display: none; align-items: center; justify-content: center;
}
.memorial-overlay.open { display: flex; animation: fadeIn 0.4s; }

.modal-dialog { max-width: 95%; margin: 1.75rem auto; }
@media (min-width: 992px) { .modal-dialog { max-width: 70% !important; } }

.modal-content { border-radius: 0; border: none; overflow: hidden; }
.person-content { display: flex; flex-direction: row; align-items: flex-start; }
.person-image { width: 40%; min-height: 600px; background: #f0f0f0; }
.person-image img { width: 100%; height: 100%; object-fit: cover; }
.person-details { width: 60%; padding: 50px; }

.memorial-dialog { background: #fff; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.memorial-close { position: absolute; top: 20px; right: 20px; font-size: 2rem; border: none; background: none; cursor: pointer; z-index: 10; }
.Memorial-info-block { padding: 40px; text-align: center; }
.Memorial-title { font-size: 2.5rem; margin-bottom: 20px; font-family: var(--font-serif); }
.main-image img { width: 100%; max-height: 500px; object-fit: cover; margin-bottom: 20px; }

@media (max-width: 992px) {
    .person-content { flex-direction: column; }
    .person-image { width: 100%; min-height: 300px; height: 300px; }
    .person-details { width: 100%; padding: 30px; }
    .hero-title-large { font-size: 3rem; }
}

@media (max-width: 768px) {
    .fs-sidebar { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; max-height: 35vh; z-index: 11000; }
    .card-img-wrap { height: 220px; }
    .cursor-dot, .cursor-outline { display: none; }
}