/* General Section Styles */
section {
    padding: 8rem 2rem;
    text-align: center;
    margin: 0 auto;
}

/* Match navbar height to home page */
nav {
    grid-template-rows: auto 0px;
}

#search-section {
    padding: 2rem;
    text-align: center;
}

#blogSearch {
    padding: 0.5rem;
    width: 100%;
    max-width: 400px;
    font-size: 1rem;
}

/* Flex container for content wrappers */
.content-wrapper,
.content-wrapper2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 0 auto 10%; /* Margin auto for centering, 10% bottom margin */
    text-align: center;
    flex-direction: row; /* Default row direction */
}

/* Headings inside the content wrappers */
.content-wrapper h2,
.content-wrapper2 h2 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: rgb(34, 33, 81); /* Keep heading color consistent */
}

/* Paragraphs inside the content wrappers */
.content-wrapper p,
.content-wrapper2 p {
    font-size: 1.5rem;
    text-align: center;
}

/* Flex configuration for image and text sections */
.image-content,
.text-content {
    flex: 1;
}

/* Image Styles */
section img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Specific adjustments for .content-wrapper (image on left, text on right) */
.content-wrapper {
    flex-direction: row-reverse; /* Reverse for image on right, text on left */
    margin-left: 10%;
    margin-right: 5%;
}

/* Specific adjustments for .content-wrapper2 (image on right, text on left) */
.content-wrapper2 {
    flex-direction: row; /* Default flex direction */
    margin-left: 5%;
    margin-right: 10%;
}

/* Text content margins for left and right alignment */
.content-wrapper .text-content {
    margin-left: 10%;
}

.content-wrapper2 .text-content {
    margin-right: 10%;
}

/* Headline Section Styles */
#about-headline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem;
    padding-bottom: 0rem;
    margin: 5rem auto;
    margin-bottom: 0rem;
    max-width: 800px; /* Keep content width reasonable */
}

#about-headline h1 {
    color: rgb(34, 33, 81);
    font-size: 3rem;
    margin-bottom: 2rem;
}

#about-headline p {
    font-size: 1.5rem;
    line-height: 1.6;
    max-width: 800px;
}

#blog-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px;
}

.mainBlogs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2rem;
}

.blog-post {
    flex: 1 1 300px;
    max-width: 300px;
    padding: 1.5rem;
    text-align: left;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.blog-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-content h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

.blog-content p {
    color: #666;
    margin: 10px 0;
    text-align: center;
}

.blog-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    align-self: center;
}

.blog-content a:hover {
    text-decoration: underline;
}

.blog-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-right: 0;
    margin-bottom: 1rem;
}


/* Responsive Design Adjustments */

/* For screens below 1000px */
@media screen and (max-width: 1000px) {
    .content-wrapper,
    .content-wrapper2 {
        flex-direction: column; /* Stack content vertically */
        margin: 0; /* Reset margins */
        width: 100%;
        text-align: center;
    }

    .content-wrapper .text-content,
    .content-wrapper2 .text-content {
        margin-left: 0;
        margin-right: 0;
    }

    .image-content,
    .text-content {
        flex-basis: 100%; /* Make image and text full width */
    }
}

/* For screens below 800px */
@media screen and (max-width: 800px) {
    section {
        padding: 4rem 1rem; /* Adjust padding for smaller screens */
    }

    #about-headline h1 {
        font-size: 2.5rem; /* Smaller headline on mobile */
    }

    #about-headline p {
        font-size: 1.2rem;
    }
}

