/*-----------News----------*/
.body-news {
    background-image: url("/images/Banners/BlogPost.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Desktop default */
    color: #d3d3d3;
    min-height: 100vh; /* Full page coverage */
}
.news-grid {
    display: grid;
    place-items: center;
}
.news-text {
    color: #d3d3d3;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    padding: 40px 20px;
}
.news-text h1 {
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 60px;
    margin-bottom: 20px;
    color: #fff;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1f1f1f, #101010);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    max-width: 1200px;
    width: calc(100% - 30px);
}

/* Search Bar */
.search-bar {
    flex: 1;
    max-width: 400px;
}
#search-input {
    background-color: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #d3d3d3;
    padding: 10px;
    width: 100%;
    transition: border-color 0.3s ease;
}
#search-input:focus {
    border-color: #4e1253;
    outline: none;
    box-shadow: 0 0 5px rgba(122, 26, 98, 0.5);
}
#search-input::placeholder {
    color: #888;
}

/* Filter Dropdown */
.filter-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.filter-dropdown .btn-dark {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 20px;
    color: #d3d3d3;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.filter-dropdown .btn-dark:hover {
    background-color: #291c63;
    color: #fff;
    transform: translateY(-2px);
}
.filter-dropdown .dropdown-menu {
    background-color: #1a1a1a;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.filter-dropdown .dropdown-item {
    color: #d3d3d3;
    padding: 10px 20px;
    transition: background-color 0.2s ease;
}
.filter-dropdown .dropdown-item:hover {
    background-color: #291c63;
    color: #fff;
}

/* News Container */
#news-container {
    transition: opacity 0.3s ease;
}

/* Blog Post Card */
.blog-post {
    background: linear-gradient(135deg, #1f1f1f, #101010);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}
.blog-post .thumbnail-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    overflow: hidden;
}
.blog-post .thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.blog-post:hover .thumbnail {
    transform: scale(1.05);
}
.blog-post .content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.blog-post .post-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 10px 0;
    font-family: 'Arial', sans-serif;
}
.blog-post .publication-date {
    font-size: 0.9rem;
    color: #ff7f7f;
    margin-bottom: 10px;
}
.blog-post .publication-date::before {
    content: "Published on: ";
    color: #d3d3d3;
}
.blog-post .post-description {
    font-size: 1rem;
    color: #d3d3d3;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
}
.blog-post .btn-primary {
    background-color: #291c63;
    border-color: #0c133d;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
    align-self: flex-start;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.blog-post .btn-primary:hover {
    background-color: #009900;
    border-color: #009900;
    transform: translateY(-2px);
}

/* No Results Message */
.no-results {
    color: #d3d3d3;
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}
.pagination .btn-dark {
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    padding: 10px 20px;
    margin: 0 10px;
    color: #d3d3d3;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.pagination .btn-dark:hover:not(:disabled) {
    background-color: #291c63;
    color: #fff;
    transform: translateY(-2px);
}
.pagination .btn-dark:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#page-info {
    font-size: 1rem;
    color: #d3d3d3;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .news-text h1 {
        font-size: 2.5rem;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        margin: 0 10px 15px;
    }

    .search-bar {
        max-width: 100%;
        margin-bottom: 10px;
    }

    .filter-dropdown {
        margin-left: 0;
    }

    .filter-dropdown .btn-dark {
        width: 100%;
        text-align: left;
    }

    .blog-post .post-title {
        font-size: 1.2rem;
    }

    .blog-post .post-description {
        font-size: 0.9rem;
    }

    .blog-post .btn-primary {
        padding: 6px 12px;
        font-size: 0.9rem;
    }

    .pagination .btn-dark {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    #page-info {
        font-size: 0.9rem;
    }

    .row-cols-md-4 > .col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .no-results {
        font-size: 1rem;
        padding: 20px;
    }
}
@media (min-width: 769px) and (max-width: 992px) {
    .row-cols-md-4 > .col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}