#blog {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #f9f9f9;
    padding: 30px 0;
}

.blog-header {
    max-width: 800px;
    margin-bottom: 30px;
}

.blog-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #003366;
}

.blog-header p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 20px;
}


.blog-posts {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.post {
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: row;
    transition: box-shadow 0.3s ease;
    margin-right: 20px;
}

.post:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.post img {
    width: 30%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 20px;
    border: 1px solid rgb(48, 48, 56);
}

.post-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    font-style: italic;
}

.post-content {
    padding: 15px;
    width: 60%;
}

.post-content h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: #003366;
}

.post-content p {
    font-size: 1em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

.post-meta span {
    display: block;
}

.post a {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
}

.post a:hover {
    text-decoration: underline;
}

.post {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.post.visible {
    opacity: 1;
    transform: translateY(0);
}

#search-input {
    width: 100%;
    max-width: 500px;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    line-height: 1.5;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, 0.25);
    outline: none;
}

#search-input::placeholder {
    color: #999;
    font-style: italic;
}

.search-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 8px;
    max-width: 600px;
    margin: 20px auto;
}

/* =========================
   BLOG RESPONSIVE - CENTERED
========================= */
@media (max-width: 1024px) {

    #blog {
        width: 100%;
        padding: 20px 10px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .blog-header {
        text-align: center;
        max-width: 800px;
        margin-bottom: 25px;
    }

    .blog-header h2 {
        font-size: 2em;
    }

    .blog-header p {
        font-size: 1em;
        max-width: 90%;
        margin: 0 auto;
    }

    .blog-posts {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        width: 100%;
    }

    .post {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 90%;
        max-width: 700px;
        text-align: center;
        background-color: #ffffff;
        border-radius: 8px;
        border: 1px solid #ddd;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: box-shadow 0.3s ease, transform 0.3s ease;
    }

    .post:hover {
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    }

    .post img {
        width: 100%;
        max-height: 400px;
        object-fit: cover;
        border-radius: 0;
        margin-bottom: 15px;
    }

    .post-date {
        position: relative;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.6);
        color: #fff;
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 0.9em;
        margin-bottom: 10px;
    }

    .post-content {
        width: 90%;
        max-width: 600px;
        padding: 15px;
        text-align: center;
    }

    .post-content h3 {
        font-size: 1.5em;
        margin-bottom: 10px;
        color: #003366;
    }

    .post-content p {
        font-size: 1em;
        line-height: 1.6;
        color: #333;
        margin-bottom: 15px;
    }

    .post-meta {
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 0.9em;
        color: #666;
        margin-bottom: 15px;
    }

    .post-meta span {
        display: block;
        margin-bottom: 5px;
    }

    .post a {
        display: inline-block;
        margin-top: 10px;
        text-decoration: none;
        color: #007bff;
        font-weight: bold;
    }

    .post a:hover {
        text-decoration: underline;
    }

    #search-input {
        width: 90%;
        max-width: 500px;
        padding: 12px 20px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 1em;
        margin: 10px auto;
        display: block;
    }

    .search-container {
        width: 100%;
        max-width: 600px;
        margin: 20px auto;
        padding: 10px;
        background-color: #f1f1f1;
        border-radius: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* Mobile screens <480px */
@media (max-width: 480px) {
    .post-content h3 {
        font-size: 1.3em;
    }

    .post-content p {
        font-size: 0.95em;
    }

    #search-input {
        font-size: 0.9em;
    }
}