/* Blog specific styles */
.blog-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.blog-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    gap: 20px; /* Add gap between recent posts and sidebar */
}

.recent-posts {
    flex: 3;
    padding: 20px;
    margin-bottom: 20px; /* Add margin-bottom for spacing */
}

.sidebar {
    flex: 1;
    padding: 20px;
    border: 2px solid #E6F8B2;
    border-radius: 15px;
    margin-top: 20px; /* Add margin-top for spacing */
}

.featured-post {
    width: 100%;
    background-color: #E6F8B2;
    color: #000000;
    border-radius: 15px;
    margin-bottom: 20px;
    padding: 20px; /* Add padding for internal spacing */
}

body.light-mode .featured-post {
    background-color: #000000;
    color: #ffffff;
}

.post {
    border: 2px solid #E6F8B2;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.post-cover {
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
}

.post-cover img {
    width: 100%;
    height: auto;
    max-height: 300px; /* Adjust the max height */
    object-fit: cover; /* Ensure the image covers the area without distortion */
}

.post-title {
    font-size: 2em;
    margin: 0 0 10px;
}

.post-date {
    font-size: 0.9em;
    color: #999;
    margin-bottom: 10px;
}

.post-excerpt {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.read-more {
    color: #E6F8B2;
    text-decoration: none;
    font-weight: bold;
}

.read-more:hover {
    text-decoration: underline;
}

body.light-mode .post {
    border-color: #000000;
}

body.light-mode .read-more {
    color: #000000;
}

.sidebar {
    border: 2px solid #E6F8B2;
    border-radius: 15px;
}

body.light-mode .sidebar {
    border-color: #000000;
}

.sidebar h2 {
    font-size: 2em;
    margin-bottom: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    color: inherit;
    text-decoration: none;
    font-size: 1.2em;
}

.sidebar ul li a:hover {
    text-decoration: underline;
}

/* Tablet styles */
@media (max-width: 900px) {
    .blog-content {
        flex-direction: column;
        align-items: center; /* Center align for better visual appeal */
    }

    .sidebar {
        margin-left: 0;
        margin-top: 20px;
    }

    .featured-post, .recent-posts, .sidebar {
        padding: 30px;
    }

    .post-title {
        font-size: 1.8em;
    }

    .post-excerpt {
        font-size: 1.1em;
    }

    .sidebar ul li a {
        font-size: 1.1em;
    }
}

/* Mobile styles */
@media (max-width: 600px) {
    .featured-post, .recent-posts, .sidebar {
        padding: 20px;
    }

    .featured-post, .recent-posts, .sidebar {
        margin: 10px;
    }

    .sidebar {
        flex: 1 1 100%;
        order: 1;
    }

    .recent-posts {
        flex: 1 1 100%;
        order: 2;
    }

    .post-title {
        font-size: 1.6em;
    }

    .post-excerpt {
        font-size: 1em;
    }

    .sidebar ul li a {
        font-size: 1em;
    }
}
