/* Root Variables for Thematic Color Scheme */
:root {
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-nav: #334155;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --accent-gold: #f59e0b; /* Byzantine Gold */
    --accent-red: #ef4444;  /* Balkan Red */
    --accent-blue: #3b82f6; /* Modern Europe Blue */
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; text-transform: uppercase; letter-spacing: 2px; text-align: center; }
h2 { 
    font-size: 1.8rem; 
    border-bottom: 2px solid var(--accent-gold); 
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    display: inline-block;
}
h3 { font-size: 1.3rem; color: var(--accent-gold); }

p { margin-bottom: 1rem; color: var(--text-muted); }

/* Header */
header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--bg-nav);
}

header p {
    font-size: 1.2rem;
    color: var(--accent-gold);
}

/* Navigation - Sticky & Mobile Friendly */
.main-nav {
    background-color: var(--bg-nav);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

#menu-toggle {
    display: none; /* Hidden on desktop */
    width: 100%;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    text-align: left;
    font-weight: bold;
}

#nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#nav-list li {
    border-right: 1px solid #475569;
}

#nav-list li:last-child {
    border-right: none;
}

#nav-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

#nav-list a:hover, #nav-list a.active {
    background-color: var(--accent-gold);
    color: var(--bg-dark);
}

/* Main Content Layout */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-section {
    margin-bottom: 3rem;
    animation: fadeIn 0.6s ease-in-out;
}

/* Cards for Grouping Information */
.card {
    background-color: var(--bg-card);
    border: 1px solid #334155;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-blue);
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 2rem 0;
    margin-top: 1rem;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--bg-nav);
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    border-radius: 50%;
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 0 3px var(--bg-nav);
    z-index: 1;
}

.timeline-date {
    font-weight: bold;
    color: var(--accent-red);
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
}

.timeline-content {
    background-color: var(--bg-card);
    padding: 0.8rem;
    border-radius: var(--border-radius);
    border-left: 3px solid var(--accent-blue);
}

/* Footer */
footer {
    background-color: var(--bg-nav);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-top: 1px solid var(--bg-card);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }

    /* Toggle Menu Logic */
    #menu-toggle {
        display: block;
        text-align: center;
    }

    #nav-list {
        display: none; /* Hidden by default on mobile */
        flex-direction: column;
        width: 100%;
    }

    #nav-list.show {
        display: flex;
    }

    #nav-list li {
        border-right: none;
        border-bottom: 1px solid #475569;
    }

    main { padding: 1rem; }

    .timeline-container::before { left: 10px; }
    .timeline-item { padding-left: 40px; }
    .timeline-item::before { left: 1px; }
}
