/* General Styles */
/* Import fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,300;0,600;1,300;1,600&display=swap');

body {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 300;
    color: #333;
    line-height: 1.6;
    margin: 0;
    margin-top: 50px; /* Account for updated site header height */
    padding: 0;
    background-color: #f9f9f9;
}

h1, h2, h3, h4 {
    font-family: 'Noto Sans', sans-serif;
    color: #2C3E50;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    margin-bottom: 1.2em;
    font-size: 18px;
}

a {
    color: #2980B9;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header and Title Block */
#title-block-header {
    padding: 15px;
    margin-bottom: 0px;
    font-size: 18px;
    text-align: center;
}

#title-block-header h1 {
    font-family: 'Noto Sans', sans-serif;
    font-size: 2.2em; /* Reduced from 2.8em */
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #2C3E50;
}

/* Table of Contents */
#TOC {
    border-top: 2px solid #3498db;
    padding: 15px;
    border-left: 5px solid #3498db;
    margin-bottom: 30px;
    font-size: 18px;
}

#TOC ul {
    list-style-type: none;
    padding-left: 0;
}

#TOC ul ul {
    padding-left: 20px;  /* Indent subsections */
}

#TOC a {
    color: #2980B9;
    font-weight: 500;
}

#TOC a:hover {
    color: #1ABC9C;
}

/* Main Content */
hr {
    border: 0;
    border-top: 2px solid #3498db;  /* Blue line */
    margin: 2em 0;
}

h2 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

ul, ol {
    margin-bottom: 1.5em;
    padding-left: 2em;
}

li {
    margin-bottom: 0.5em;
}

code, .math {
    background-color: #f3f3f3;
    padding: 5px 10px;
    border-radius: 5px;
    color: #c0392b;
    font-family: 'Courier New', monospace;
}

/* Code Blocks */
pre {
    background-color: #2C3E50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    font-size: 0.95em;
    overflow-x: auto;
    line-height: 1.4;
}

/* Math Equations */
.math, .math.display {
    font-size: 1.1em;
    color: #333; /* Match body text color */
    display: block;
    margin: 1em 0;
}

.math.inline {
    display: inline;
    font-size: 1em;
    color: #333;  /* Inline equations should also match body color */
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        margin: 10px;
        padding: 20px 15px; /* Reduced padding on mobile */
        border-radius: 0; /* Remove border radius on mobile for full width */
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.8em;
    }

    h3 {
        font-size: 1.4em;
    }

    p {
        font-size: 16px;
    }

    #TOC {
        font-size: 16px;
    }

    #title-block-header h1 {
        font-size: 1.8em; /* Further reduced for mobile */
    }
}

/* Container for the layout */
.container {
    max-width: 900px; /* Reduced from 1200px for better readability */
    width: 100%;
    margin: 0 auto;
    padding: 30px 30px; /* Standardized horizontal padding to match main site */
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-top: 20px; /* Add space below navigation */
}

/* Remove sidebar styles - using single column layout */

/* Main Content */
.content {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    background-color: transparent; /* Remove white background since container has it */
}

/* Right Sidebar (Optional) */
.sidebar.right {
    width: 20%;
    background-color: #f4f4f4;
    padding: 20px;
    box-sizing: border-box;
}

/* Navigation Menu */
.sidebar ul {
    list-style-type: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 1em;
}

.sidebar ul li a {
    color: #2980B9;
    text-decoration: none;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* Main Site Navigation Links */
.main-site-link {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.main-site-link a {
    display: block;
    color: #2980B9;
    text-decoration: none;
    margin-bottom: 10px;
    padding: 8px 0;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.main-site-link a:hover {
    color: #1a5a8a;
    text-decoration: none;
    background-color: #e8f4fd;
    padding-left: 10px;
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    .sidebar, .content {
        width: 100%;
    }
}
