:root {
    --bg-color: #2b2b2b;
    --text-color: #f0f0f0;
    --accent-color: #ffffff;
    --nav-bg: #3a3a3a;
}

/* Base Styles */
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
}

h1, h2, h3 {
    margin-top: 0;
}

.section {
    padding: 40px 20px;
    max-width: 800px;
    margin: 0 auto;
    overflow: auto; /* ensure floated children don't overlap footer */
}

/* Sidebar Navigation */
.sidebar {
    width: 220px;
    background-color: var(--nav-bg);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    transform: translateX(0);
}

#sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    background-color: var(--accent-color);
    border: none;
    color: #000;
    font-size: 1.5rem;
    padding: 6px 10px;
    border-radius: 4px;
    z-index: 1100;
    cursor: pointer;
}

body.sidebar-open #sidebar-toggle {
    left: 230px;
    transition: left 0.3s ease;
}

#contents-search {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
    box-sizing: border-box;
}

.logo {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 20px;
    border: 1px solid var(--accent-color);
    padding: 6px 10px;
    display: inline-block;
    border-radius: 4px;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links > li {
    margin-bottom: 10px;
    position: relative;
}


.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    display: block;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid var(--text-color);
    transition: background-color 0.3s, border-color 0.3s;
}

.nav-links a:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

.nav-links a:active {
    background-color: #555;
}

.nav-links a:focus {
    outline: 2px solid var(--accent-color);
}

.nav-links a:visited {
    color: var(--text-color);
}
.dropdown-content {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    left: 100%;
    top: 0;
    min-width: 150px;
    background-color: var(--nav-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dropdown-content li {
    padding: 8px;
    color: var(--text-color);
}

.nav-links li:hover > .dropdown-content,
.nav-links li.open > .dropdown-content {
    display: block;
}

.content {
    margin-left: 0;
    flex: 1;
    transition: margin-left 0.3s ease;
}

body.sidebar-open .content {
    margin-left: 240px;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #333, #000);
    color: var(--text-color);
    text-align: center;
    padding: 80px 20px;
}

.hero.small {
    padding: 40px 20px;
}

.hero-content h1 {
    font-size: 2rem;
}

.hero-content p {
    font-size: 1.2rem;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--nav-bg);
    border-top: 1px solid #333;
    clear: both;
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 700px) {
    body {
        flex-direction: column;
    }

    body.sidebar-open .content {
        margin-left: 0;
    }
}


.back-button {
    display: inline-block;
    margin: 20px 0;
    padding: 8px 12px;
    background-color: var(--accent-color);
    color: #000;
    text-decoration: none;
    border-radius: 4px;
}

.list-buttons {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-buttons li {
    margin-bottom: 10px;
}

.list-buttons a {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--nav-bg);
    transition: background-color 0.3s, border-color 0.3s;
}

.list-buttons a:hover {
    background-color: var(--accent-color);
    color: #000;
}

.list-buttons a:active {
    background-color: #555;
}

.item-desc {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: #ccc;
}

.description {
    margin-bottom: 20px;
    font-size: 1rem;
    color: #ddd;
}
