/* --- Basic Reset & Global Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: #007bff;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Header --- */
.site-header {
    background-color: #ffffff;
    padding: 1rem 0;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav ul li {
    margin-left: 20px;
}

.main-nav ul li a {
    font-weight: bold;
    color: #555;
    padding: 5px;
}

.main-nav ul li a:hover {
    color: #007bff;
    text-decoration: none;
}

/* --- Main Content Layout --- */
.page-content {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.main-content {
    flex: 3; /* Takes up 3/4 of the space */
}

.sidebar {
    flex: 1; /* Takes up 1/4 of the space */
}

/* --- Blog Post Styling --- */
.post {
    background-color: #ffffff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.post-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.post-title a {
    color: #333;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-image {
    border-radius: 8px;
    margin-bottom: 1rem;
}

.post p {
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    font-weight: bold;
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: #0056b3;
    text-decoration: none;
}

/* --- Sidebar Widget Styling --- */
.widget {
    background-color: #ffffff;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
}

.widget-title {
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #f4f4f4;
    padding-bottom: 0.5rem;
}

.widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- Footer --- */
.site-footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .page-content {
        flex-direction: column;
    }

    .post-title {
        font-size: 1.5rem;
    }
}

/* --- Pagination --- */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .pagination ul {
        list-style: none;
        display: flex;
        gap: 8px; /* Space between pagination buttons */
    }

    .pagination li a {
        display: block;
        padding: 10px 18px;
        color: #007bff;
        background-color: #ffffff;
        border: 1px solid #ddd;
        border-radius: 5px;
        transition: background-color 0.3s, color 0.3s;
    }

        .pagination li a:hover {
            background-color: #f4f4f4;
            text-decoration: none;
        }

    .pagination li.active a {
        background-color: #007bff;
        color: #ffffff;
        border-color: #007bff;
        cursor: default;
    }

        .pagination li.active a:hover {
            background-color: #0056b3;
        }