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

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}

/* Full Page Loader */
.full-loader {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: #0f2027;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
}

.full-loader .spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.full-loader p {
    font-size: 1.2rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Small Loader for Events */
#loader {
    display: none;
    border: 6px solid #f3f3f3;
    border-top: 6px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 50px auto;
}

/* Header */
.header {
    width: 100%;
    background: linear-gradient(90deg, #0f2027, #2c5364);
    color: #ffffff;
    padding: 15px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-title {
    flex: 0 0 auto;
    min-width: 250px;
}

.site-title h1 {
    font-size: 1.8rem;
}

.site-title p {
    margin-top: 4px;
    font-size: 0.95rem;
    color: #ccc;
}

/* Navigation */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 20px;
    flex: 1 1 auto;
}

.nav-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    color: #f1c40f;
}

.nav-link.active {
    color: #f1c40f;
}

/* Hamburger */
.hamburger {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .site-nav {
        display: none;
        flex-direction: column;
        background: #1e1e2f;
        position: absolute;
        right: 20px;
        top: 70px;
        border-radius: 8px;
        padding: 15px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }

    .site-nav.open {
        display: flex;
    }

    .hamburger {
        display: block;
        margin-left: 10px;
    }
}

/* Timeline Page Layout */
.container {
    flex: 1;
    display: flex;
    flex-direction: row;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #1e1e2f;
    color: #cfcfd9;
    overflow-y: auto;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.3);
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li {
    background-color: #2a2a40;
    padding: 14px 18px;
    border-radius: 8px;
    margin: 6px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    transition: background-color 0.3s ease;
}

.sidebar li:hover {
    background-color: #3a3a5a;
}

.sidebar li.active {
    background-color: #4a4a6a;
    font-weight: bold;
}

.material-icons {
    font-size: 18px;
    color: #aaa;
    transition: transform 0.3s;
}

.expanded > .material-icons {
    transform: rotate(90deg);
}

/* Nested Sidebar */
.sidebar > ul > li {
    margin-left: 12px;
}
.sidebar > ul > li > ul > li {
    margin-left: 24px;
}
.sidebar > ul > li > ul > li > ul > li {
    margin-left: 36px;
}

/* Main Content */
.main-content {
    flex: 1;
    background-color: #fafafa;
    overflow-y: auto;
    padding: 30px;
}

#breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #555;
}

/* Event Cards */
.event-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 24px;
    margin-bottom: 24px;
    transition: box-shadow 0.3s ease;
}

.event-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.event-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: bold;
    color: #222;
}

.event-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 16px;
}

.event-tags {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    background-color: #e0e0e0;
    color: #555;
    padding: 6px 12px;
    border-radius: 20px;
    margin-right: 8px;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.tag:hover {
    background-color: #d5d5d5;
}

/* About Page */
.about-main {
    flex: 1;
    padding: 50px 30px;
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.about-section h2 {
    margin-bottom: 20px;
    font-size: 2rem;
    color: #222;
}

.about-section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
}

/* Footer */
.footer {
    width: 100%;
    background-color: #f1f1f1;
    text-align: center;
    padding: 15px 0;
    font-size: 0.9rem;
    color: #555;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 60px;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.3s;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
}

#modal-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: #222;
}

#modal-date {
    font-size: 1rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

#modal-description {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.6;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tag {
    background-color: #e0e0e0;
    color: #555;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.modal-source {
    font-size: 1rem;
    color: #1976d2;
    text-decoration: none;
}

.modal-source:hover {
    text-decoration: underline;
}
