/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Basic Styles */
body {
    font-family: 'Mukta', sans-serif;
    background-color: #f0f4f8;
    color: #333;
    line-height: 1.6;
}

/* Core Section Style */
.news-section {
    padding: 40px 20px;
    max-width: 1300px;
    margin: 0 auto;
}

.news-header {
    text-align: center;
    margin-bottom: 40px;
}

.news-header h1 {
    font-size: 2.5rem;
    color: #1a202c;
    font-weight: 800;
    margin-bottom: 20px;
}

/* Search Bar Styles */
.search-container {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-family: 'Mukta', sans-serif;
    border: 2px solid #cbd5e0;
    border-radius: 30px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #3182ce;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.2);
}

/* News Grid Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* News Card Item Style */
.news-item {
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f4f8;
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(49, 130, 206, 0.15);
    border-color: #cbd5e0;
}

/* Feature Image Style */
.news-image-container {
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
    overflow: hidden;
    background-color: #edf2f7;
}

/* Attractive Badge overlay */
.news-image-container::before {
    content: 'नयाँ योजना';
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.4);
    letter-spacing: 0.5px;
}

/* Gradient shadow over image */
.news-image-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
    z-index: 1;
}

.news-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-image {
    transform: scale(1.1);
}

/* Content inside the Card */
.news-content {
    padding: 25px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to bottom, #ffffff, #fdfdfe);
}

.news-title-link {
    text-decoration: none;
    color: #1a202c;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.5;
    transition: color 0.3s ease;
    margin-bottom: 20px;
    /* Truncate long titles to keep cards aligned */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-title-link:hover {
    color: #2b6cb0;
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: white;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.3);
    transition: all 0.3s ease;
}

.read-more-btn::after {
    content: '→';
    margin-left: 8px;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.read-more-btn:hover {
    background: linear-gradient(135deg, #2b6cb0, #2c5282);
    box-shadow: 0 6px 15px rgba(49, 130, 206, 0.4);
    transform: translateY(-2px);
}

.read-more-btn:hover::after {
    transform: translateX(5px);
}

.read-more-btn:active {
    transform: translateY(0) scale(0.97);
}

/* No Results Message */
.no-results {
    text-align: center;
    grid-column: 1 / -1;
    padding: 40px;
    font-size: 1.2rem;
    color: #718096;
    display: none;
}

/* Responsiveness */
@media (max-width: 768px) {
    .news-header h1 {
        font-size: 2rem;
    }
    .news-content {
        padding: 15px;
    }
}