/* Global box-sizing reset */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;       /* Primary theme color */
    --secondary-color: #2c3e50;     /* Secondary theme color */
    --background-color: #ecf0f1;    /* Background color */
    --text-color: #34495e;          /* Main text color */
    --highlight-color: #e74c3c;     /* Highlight color */
}

/* Body styling */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
}

/* Container styling */
.container {
    display: flex;
    width: 98%;
    margin: auto;
    overflow: hidden;
    padding: 0;
}

/* Sidebar styling */
.sidebar {
    width: 150px; /* Adjusted width */
    background-color: var(--background-color);
    padding: 20px 5px;
    border-right: 1px solid var(--secondary-color);
    position: fixed;
    top: 60px;
    bottom: 0;
    overflow-y: auto;
}

/* Restored styles for sidebar links and text */
.sidebar-link {
    color: var(--secondary-color);
    font-size: 0.9em;
    margin-bottom: 10px;
    padding-left: 5px;
    font-weight: bold;
    text-decoration: none;
    display: block;
}

.sidebar-link:hover {
    color: var(--primary-color);
}

.archive-link {
    margin-top: 20px;
}

.month-item {
    cursor: pointer;
    padding: 5px;
    font-size: 0.8em;
    color: var(--text-color);
}

.month-item:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.month-item.active {
    background-color: rgba(52, 152, 219, 0.2);
    font-weight: bold;
    color: var(--primary-color);
}

/* Main content area */
.main {
    flex: 1;
    margin-left: 150px; /* Adjusted to match sidebar width */
    display: block; /* Ensure block display */
}

/* Content container */
#content-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

/* Post styling */
.post {
    background: #fff;
    border-radius: 5px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 
                0 1px 2px rgba(0,0,0,0.24);
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.post:hover {
    box-shadow: 0 14px 28px rgba(0,0,0,0.25), 
                0 10px 10px rgba(0,0,0,0.22);
}

.post h2, .post h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.post h2 a, .post h3 a {
    color: var(--primary-color);
    text-decoration: none;
}

.post h2 a:hover, .post h3 a:hover {
    color: #0066cc;
}

.post-meta {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 0.8em;
    display: inline-block;
    margin-bottom: 10px;
}

/* Summary styling */
.summary h3 {
    color: var(--primary-color);
    border-bottom: 1px solid #ccc;
    padding-bottom: 1px;
    margin-top: 15px;
    margin-bottom: 1px;
    font-size: 1.1em;
}

.summary p {
    margin-top: 0;
    margin-bottom: 10px;
}

.summary ol {
    padding-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 0.9em;
    line-height: 1.3;
}

.summary ol li {
    margin-bottom: 3px;
}

/* Header styling */
header {
    background: var(--secondary-color);
    color: #ffffff;
    padding: 10px 0;
    border-bottom: var(--primary-color) 2px solid;
}

header a {
    color: #f0f0f0;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow: hidden;
}

header li {
    float: left;
    display: inline;
    padding: 0 10px;
}

header #branding {
    float: left;
}

header #branding h1 {
    margin: 0;
    font-size: 1.5em;
}

header nav {
    float: right;
    margin-top: 10px;
}

header .highlight, header .current a {
    color: var(--primary-color);
    font-weight: bold;
}

header a:hover {
    color: var(--highlight-color);
    transition: 0.3s;
}

/* Date header */
.date-header {
    background-color: #f0f0f0;
    padding: 10px;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 5px;
    font-size: 1.2em;
    color: #333;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

.date-group {
    margin-bottom: 20px;
}

/* Footer styling */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8em;
    z-index: 1000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Links styling */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images */
.content-image, img.youtube-thumbnail {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1em 0;
    cursor: pointer;
}

.content-image:hover, img.youtube-thumbnail:hover {
    opacity: 0.9;
}

/* Loading indicator */
#loading {
    text-align: center;
    padding: 20px;
}

/* Responsive adjustments */
@media(max-width: 768px) {
    header #branding,
    header nav,
    header nav li {
        float: none;
        text-align: center;
        width: 100%;
    }

    .container {
        width: 100%;
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0; /* Remove margin-left on mobile */
        width: 100%;
    }

    .post, .date-header {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    #content-container {
        width: 100%;
        max-width: none;
    }

    #mobile-month-select {
        width: 100%;
        margin-bottom: 20px;
        padding: 10px;
        font-size: 16px;
        border: 1px solid var(--secondary-color);
        border-radius: 5px;
        background-color: #fff;
    }

    .post h3 a {
        font-size: 1.1em; /* Adjust font size if needed */
    }
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 5px;
    }

    .footer-links {
        margin-top: 0;
    }

    .footer-links a {
        margin: 0 5px;
    }
}

