/* Global Reset */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    position: relative;
    font-family: Arial, sans-serif;
    /* Added a default font for better readability */
}

/* Container Class for Max Width */
.object-with {
    max-width: 1200px;
    margin: auto;
}

/* Navigation Styles */
nav {
    background-color: #2d4c50;
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.3);
    padding: 8px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.3rem 0;
}

.navbar .logo {
    color: #fff;
    text-decoration: none;
    letter-spacing: 2px;
    font-size: 2.2rem;
}

#search-input {
    max-width: 400px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    color: #333;
}

#search-button {
    padding: 10px 20px;
    background-color: #138065;
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 10px;
}

/* Blog Section Styles */
#blog-container {
    padding: 3rem 1.5rem;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: wrap;
}

/* Blog Card Styles */
.blog-card {
    width: 200px;
    border: 1px solid #2d4c50;
    border-radius: 10px;
    cursor: pointer;
    padding: 1rem;
    margin: 10px;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Ensure the content is spread out */
}

.blog-card:hover {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.blog-card h2 {
    color: #141414;
    font-size: 1.7rem;
    font-weight: 500;
    margin-bottom: 0.7rem;
    /* Added space below the title */
}

.blog-card p {
    font-size: 1.2rem;
    padding-top: 0.7rem;
    margin-bottom: 1rem;
    /* Ensure there's space at the bottom */
}

/* Media Queries */

/* For Small Screens (Mobile) */
@media (max-width: 500px) {
    nav {
        padding: 0 20px;
    }

    .navbar .logo {
        font-size: 1.8rem;
    }

    #search-input {
        width: 100%;
        padding: 10px 15px;
    }

    #search-button {
        padding: 10px 15px;
        width: 100%;
    }

    .blog-card {
        width: 100%;
        /* Full-width cards on mobile */
        margin-bottom: 20px;
        /* Added space between cards */
    }

    .blog-card img {
        height: 150px;
        /* Reduced image height for smaller screens */
    }

    .blog-card h2 {
        font-size: 1.5rem;
        /* Adjusted font size for better readability */
    }

    .blog-card p {
        font-size: 1rem;
        /* Adjusted paragraph font size for mobile */
    }
}

/* For Medium Screens (Tablet and Up) */
@media (min-width: 768px) {
    .blog-card {
        width: 30%;
        /* 3 columns on medium screens */
    }
}