/* assets/css/style.css */

:root {
    --bg-dark: #0a0a0c;
    --bg-panel: #16161a;
    --text-main: #e0e0e0;
    --text-muted: #949495;
    --accent-gold: #d4af37;
    --accent-tech: #00e5ff;
    --accent-terracotta: #c15438;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: 'Georgia', serif; /* Gives a classic, epic fantasy feel */
    font-weight: normal;
}

a {
    color: var(--accent-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-tech);
}

/* --- Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    padding: 20px 50px;
    background-color: rgba(10, 10, 12, 0.95);
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .logo {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-main);
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}
/* --- Navigation Dropdown Styles --- */
nav ul li.dropdown {
    position: relative;
    display: inline-block;
}

nav ul li.dropdown .dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0a0a0c;
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.9);
    z-index: 1000;
    border: 1px solid #333;
    border-radius: 4px;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: #d1d1d1;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    border-bottom: 1px solid #222;
    transition: background 0.3s ease, color 0.3s ease;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #1a1a1f;
    color: var(--accent-gold);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Hero Section --- */
.hero {
    padding: 100px 50px;
    text-align: center;
    background: linear-gradient(to bottom, #111, var(--bg-dark));
    border-bottom: 2px solid var(--accent-gold);
}

.hero h1 {
    font-size: 3rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.hero p.sub-headline {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px auto;
    color: var(--text-muted);
}

.btn-primary {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--accent-gold);
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 4px;
    margin-bottom: 15px;
}

.btn-primary:hover {
    background-color: #fff;
    color: #000;
}

/* --- Content Sections --- */
.section {
    padding: 80px 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    color: var(--text-main);
}

/* --- The Chronicles (3 Column Grid) --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.card {
    background-color: var(--bg-panel);
    padding: 30px;
    border-radius: 8px;
    border-top: 3px solid var(--accent-terracotta);
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Added transition */
}

.card:last-child {
    border-top: 3px solid var(--accent-tech); /* The futuristic era gets the tech color */
}

/* Added Hover State for Cards */
.card:hover {
    transform: translateY(-5px); /* Lifts the card up slightly */
    box-shadow: 0 10px 20px rgba(0,0,0,0.8); /* Deepens the shadow */
    background-color: #1f1f25; /* Lightens the background slightly for a highlight */
}

/* --- Glossary Terms Highlight --- */
.glossary-term {
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

/* Added Hover State for Glossary */
.glossary-term:hover {
    transform: translateX(5px); /* Slides slightly to the right */
    background-color: #1a1a24; /* Highlights the background */
    border-left-color: var(--accent-gold); /* Changes the border color to gold */
}

/* --- Footer --- */
footer {
    background-color: var(--bg-panel);
    padding: 50px;
    text-align: center;
    border-top: 1px solid #333;
}

/* --- Cinematic Leaflet Popups --- */
.leaflet-popup-content-wrapper {
    background-color: #0a0a0c;
    color: #d1d1d1;
    border: 1px solid var(--accent-gold);
    border-radius: 4px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.8);
}

.leaflet-popup-tip {
    background-color: #0a0a0c;
    border-bottom: 1px solid var(--accent-gold);
    border-right: 1px solid var(--accent-gold);
}

.leaflet-popup-content {
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 20px;
}

/* Assuming your map_init.js outputs an <h3> for the title */
.leaflet-popup-content h3 {
    color: var(--accent-gold);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-family: sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.leaflet-popup-close-button {
    color: var(--accent-tech) !important;
    font-size: 20px !important;
    padding: 5px !important;
}

.leaflet-popup-close-button:hover {
    color: var(--accent-terracotta) !important;
    background-color: transparent !important;
}