body {
    font-family: Arial, sans-serif;
}

.news-container {
    width: 100%;
    margin: 0 auto;
    background-color: #416ca3;
}

.news-title h1 {
    font-family: 'Roboto Slab', sans-serif;
    font-size: 40px;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    margin-bottom: 10px;
}

/* Slider styles */
.news-slider {
    overflow: hidden; /* Hide the overflowed content */
}

.news-slider-wrapper {
    display: flex;
    justify-content: center; /* Center the flex items */
    transition: transform 0.3s ease-out; /* Smooth transition for sliding */
}

.news-item {
    flex: 0 0 25%; /* Adjust width to 30% of the flex container */
    margin: 10px; /* Adjust margin for spacing */
    display: flex;
    flex-direction: column;
    /* Distribute space */
    border-radius: 10px; /* Rounded corners for cards */
    overflow: hidden; /* Ensures the image doesn't overflow the card */
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* Subtle shadow for depth */
    transition: all 0.3s ease-in-out; /* Smooth transition for shadow and transform */
}

.news-item:hover {
    transform: translateY(-5px); /* Slightly raise the card on hover */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2); /* Larger shadow on hover */
}

.news-item-image {
    position: relative; /* Existing style to position the image absolutely within this container */
    width: 100%; /* Ensures the image container fits the width of its parent */
    height: 250px; /* Fixed height for consistency */
    overflow: hidden; /* Clips the image to the container bounds */
    background: no-repeat center center; /* Keeps existing center alignment of background images if used */
    background-size: cover; /* Ensures background images cover the container */
}

.news-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the area */
}

.news-item-content {
    padding: 7px;
}

.news-item h2 {
    font-size: 22px; /* Reduced font size for title */
    color: #416ca3;
    margin: 5px 0; /* Reduced margin for less spacing between title and body */
    margin-left: 5px;
    font-family: 'Ubuntu', sans-serif;
}

.news-item p {
    font-size: 14px; /* Reduced font size for body text */
    color: black;
    font-family: 'Ubuntu', sans-serif;
    margin: 5px 0; /* Reduced margin for compact text */
}

/* Slider Controls */
.news-slider-controls {
    text-align: center;
    padding: 20px 0;
}

.news-slider-controls button {
    background: none;
    border: none;
    color: #fff; /* Adjust color to fit your design */
    cursor: pointer;
    font-size: 24px; /* Adjust size as needed */
}

.news-slider-controls button:hover {
    color: #ccc; /* Lighten color on hover */
}

.read-more-btn {
    padding: 10px 15px;
    background-color: #58a1ce; /* Matching PTAA theme colors */
    color: #fff;
    text-align: center;
    display: inline-block;
    border: none;
    border-radius: 5px;
    margin-top: 15px;
    text-decoration: none; /* Remove underline from links */
    transition: background-color 0.3s ease-in-out; /* Smooth transition for background color */
}

.read-more-btn:hover {
    background-color: #416ca3; /* Darker shade on hover for interaction feedback */
    color: #ffffff;
    text-decoration: none; /* Keep text decoration none on hover */
}

.view-district-news {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    text-decoration: none;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.view-district-news i {
    margin-left: 5px;
}

.view-district-news:hover,
.view-district-news:focus {
    text-decoration: underline;
}

.article-image {
    max-width: 100%; /* Ensures the image is never wider than its container */
    height: auto; /* Keeps the image's aspect ratio intact */
    display: block; /* Prevents inline spacing issues */
    margin: 0 auto; /* Centers the image within its container */
    border-radius: 4px; /* Optional: Rounds the corners of the image */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Adds a subtle shadow for some depth */
}

@media (max-width: 1100px) {
    .news-slider-wrapper {
        flex-direction: row; /* Keep the direction row to handle slider logic */
        justify-content: center; /* Center aligns the items */
    }

    .news-item {
        flex: 0 0 auto; /* Adjust width to auto for stacking */
        width: 90%; /* Set width to 90% of the container for a better view on mobile */
        margin: 10px auto; /* Center align each news item */
    }
}
