
.news-and-updates {
    padding: 80px 20px;
    text-align: center;
}

.news-and-updates h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-family: 'IBM Plex Sans', sans-serif;
}

.news-and-updates p {
    max-width: 700px;
    margin: 0 auto 60px auto;
    font-size: 1rem;
    line-height: 1.6;
    color: #282828;
    font-family: 'Source Sans Pro', sans-serif;
}

.news-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    justify-content: center;
    justify-items: center;
    max-width: 951px; 
    margin: 0 auto;
}

@media (max-width: 992px) {
    .news-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-container {
        grid-template-columns: 1fr;
    }
}

.news-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    width: 305px;
    height: auto;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid #e0e0e0;
    color: #282828;
}

.news-card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.06);
}

.news-image-wrapper {
    position: relative;
    width: 100%;
    height: 260px;
    max-height: 260px;
    overflow: hidden;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.news-date {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.72rem; 
    color: #FFFFFF !important;
    background: linear-gradient(135deg, #9D55CE, #9D55CE); 
    padding: 5px 10px; 
    border-radius: 0 0 20px 0;
    text-align: center;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 2;
    font-family: 'Source Sans Pro', sans-serif;
}

.news-card:hover .news-date {
    background: linear-gradient(135deg, #9D55CE, #B277F2);
    transform: scale(1.05);
}

.news-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.3px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 12px;
    font-family: 'IBM Plex Sans', sans-serif;
    z-index: 1;
}

.news-card-linked:hover .news-image-overlay {
    opacity: 1;
}

.news-card-linked:hover .news-image {
    transform: scale(1.05);
    filter: brightness(0.8);
}

.news-content {
    padding: 6px 12px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    flex-grow: 1;
    gap: 3px;
}

.news-title {
    font-size: 1.1rem;
    margin: 4px 0 0 0;
    text-align: left;
    font-weight: 700;
    line-height: 1.22;
    min-height: 28px;
    color: #282828;
    font-family: 'Source Sans Pro', sans-serif;
}

.news-card:hover .news-title {
    color: #0074E0;
}

.news-description {
    font-size: 0.86rem;
    color: #282828;
    text-align: left !important;
    line-height: 1.3;
    letter-spacing: normal;
    word-spacing: normal;
    margin: 2px 0 0 0;
    font-family: 'Source Sans Pro', sans-serif;
}

.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination button {
    margin: 0 6px;
    padding: 0;
    width: 45px;
    height: 45px;
    border: 2px solid #e0e0e0;
    background-color: #fff;
    color: #666;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-family: 'Source Sans Pro', sans-serif;
}

.pagination button:hover {
    border-color: #0073e6;
    color: #0073e6;
}

.pagination button.active {
    background-color: #0073e6;
    border-color: #0073e6;
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination button:disabled:hover {
    transform: none;
    box-shadow: none;
    border-color: #e0e0e0;
    color: #666;
}

.submit-news-section {
    text-align: center;
    margin: 80px auto 40px auto;
    max-width: 700px;
    padding: 0 20px;
}

.submit-news-text {
    font-size: 1rem;
    line-height: 1.6;
    color: #282828;
    margin-bottom: 20px;
    font-family: 'Source Sans Pro', sans-serif;
}

.submit-news-btn {
   display: inline-block;
    padding: 10px 20px;
    border: 1px solid #007bff;
    border-radius: 25px; 
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
    font-family: 'Source Sans Pro', sans-serif;
}

.submit-news-btn:hover {
    background-color: #007bff;
    color: white;
    transform: translateY(-3px);
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    color: #aaa;
    cursor: pointer;
    transition: color 0.3s ease;
    font-weight: bold;
    line-height: 1;
    font-family: 'Source Sans Pro', sans-serif;
}

.close-btn:hover {
    color: #9D55CE;
}

.modal-content h2 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.8rem;
    text-align: center;
    font-family: 'IBM Plex Sans', sans-serif;
}

#newsForm label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    text-align: left;
    font-family: 'Source Sans Pro', sans-serif;
}

#newsForm input,
#newsForm textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: 'Source Sans Pro', sans-serif;
}

#newsForm input:focus,
#newsForm textarea:focus {
    border-color: #9D55CE;
    outline: none;
}

.submit-btn {
    background: #0073e6;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    font-family: 'Source Sans Pro', sans-serif;
}

.submit-btn:hover {
    background: #0073e6;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

@media (max-width: 992px) {
    .news-and-updates h1 {
        font-size: 2rem;
    }
    
    .pagination button {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .news-and-updates {
        padding: 60px 15px;
    }
    
    .news-and-updates h1 {
        font-size: 1.8rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 25px 20px;
    }
    
    .modal-content h2 {
        font-size: 1.5rem;
    }
    
    .submit-news-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .news-card {
        height: auto;
        min-height: 420px;
    }
    
    .news-image-wrapper {
        height: 220px;
    }
    
    .news-title {
        font-size: 1.2rem;
        min-height: auto;
    }
    
    .news-description {
        font-size: 0.9rem;
    }
    
    .pagination button {
        width: 38px;
        height: 38px;
        margin: 0 4px;
    }
    
    .submit-news-section {
        margin: 40px auto 30px auto;
    }
    
    .submit-news-text {
        font-size: 0.95rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px 15px;
    }
    
    #newsForm input,
    #newsForm textarea {
        font-size: 0.95rem;
        padding: 10px;
    }
}

@media (max-width: 400px) {
    .news-and-updates h1 {
        font-size: 1.5rem;
    }
    
    .news-image-wrapper {
        height: 200px;
    }
    
    .pagination button {
        width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
}
