/* Basic Reset */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #000000;
}

/* Header and Navigation */
.main-header {
    background-color: #f8f8f8;
    padding: 10px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    min-height: 60px;
}

.site-title {
    font-size: 1.5em;
    font-weight: bold;
    color: #000000;
}

.site-title a {
    color: #000000;
    text-decoration: none;
}

.site-title a:hover {
    color: #333333;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-start;
}


header nav ul li {
    position: relative;
    display: inline-block;
}

header nav ul li a {
    color: #000000;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    display: block;
}

header nav ul li a:hover {
    color: #333333;
}

/* * FINAL FIX: Style for the active navigation link. 
 * This targets the anchor tag with the active class to ensure ONLY the underline applies 
 * and resets any conflicting MkDocs transformations (like different color or all-caps).
 */
header nav ul li a.current,
header nav ul li a.active,
header nav ul li .current-page-text { 
    text-decoration: underline !important; 
    color: #000000 !important; 
    font-weight: bold !important;
    text-transform: none !important; 
}


/* Dropdown specific styles */
.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #f8f8f8;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style: none;
    padding: 0;
    margin-top: 0;
    border-radius: 4px;
}

.dropdown-menu li {
    margin: 0;
    width: 100%;
}

.dropdown-menu li a {
    color: #000000;
    padding: 12px 16px 12px 26px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: normal;
}

.dropdown-menu li a:hover {
    background-color: #e9e9e9;
    color: #000000;
}

.has-dropdown:hover .dropdown-menu {
    display: block;
}


/* Main Content Area */
main {
    max-width: 900px;
    margin: 20px auto;
    padding: 0 20px;
    background-color: #ffffff;
    box-shadow: none;
    min-height: 50vh;
}

/* Footer Styles */
.main-footer {
    background-color: #f8f8f8;
    color: #000000;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 40px;
    font-size: 0.9em;
}

.main-footer p {
    margin: 5px 0;
}

.main-footer a {
    color: #000000;
    text-decoration: underline;
}

.main-footer a:hover {
    color: #333333;
}


/* Markdown Specific Styling (Mimicking VS Code) */
h1, h2, h3, h4, h5, h6 {
    color: #000000;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: none;
}

h1 { font-size: 2em; }
h2 { font-size: 1.75em; }
h3 { font-size: 1.5em; }
h4 { font-size: 1.25em; }
h5 { font-size: 1em; }
h6 { font-size: 0.8em; }

p {
    margin-bottom: 1em;
}

a {
    color: #000000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    background-color: #f0f0f0;
    color: #c2001c;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
    font-size: 0.9em;
}

pre {
    background-color: #e8e8e8;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

pre code {
    background-color: transparent;
    color: #333333;
    padding: 0;
    font-size: 1em;
}

blockquote {
    border-left: 4px solid #cccccc;
    margin: 0;
    padding: 0 1em;
    color: #555555;
}

ul, ol {
    margin-left: 20px;
    margin-bottom: 1em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}

table th, table td {
    border: 1px solid #333333;
    padding: 8px;
    text-align: left;
}

table th {
    background-color: #f0f0f0;
    color: #000000;
}

img {
    max-width: 100%;
    height: auto;
}

/* Responsive Navigation Styles */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: #000;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #000;
    left: 0;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
        position: absolute;
        top: 10px;
        right: 20px;
    }

    header .main-nav { 
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: #f8f8f8;
        flex-direction: column;
        align-items: center;
    }

    header .main-nav.active { 
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        text-align: center;
        display: none;
    }

    header .main-nav.active ul { 
        display: flex;
    }

    .main-nav ul li {
        width: 100%;
    }

    .main-nav ul li a {
        padding: 15px 0;
    }

    .dropdown-menu li a {
        padding: 15px 15px 15px 30px;
    }

    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background: #e0e0e0;
        width: 100%;
    }

    .has-dropdown.active .dropdown-menu {
        display: block;
    }
}