/* Hero Section - Full Screen */
.news-hero {
  position: relative;
  height: 90vh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
}
.news-hero .overlay {
  position: absolute;
  top:0; left:0; width:100%; height:100%;
  background: rgba(0,0,0,0.5);
}
.news-hero .hero-content {
  position: relative;
  padding-bottom: 0;
  transform: translateY(0);
}
.news-hero h1 {
  font-size:3rem;
  margin-bottom:10px;
}
.news-hero p {
  font-size:1.2rem;
}

/* News Section */
.news-section {
  background: url('../images/news_back.jpg') center/cover no-repeat;
  padding: 60px 20px 30px;
  position: relative;
}
.news-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 247, 246, 0.7);
    z-index: 1;
}

/* Latest News heading centered */
.news-section h2 {
    text-align: center;
    color: #141452;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

/* News Grid Layout */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 55px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* News Card Size and Spacing */
.news-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s;
  overflow: hidden;
  width: 100%;
  max-width: 350px;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.news-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-card h5 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #141452;
}

.news-content-text {
  max-height: 0; 
  overflow: hidden;
  opacity: 0;
  margin-top: 0; 
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, margin-top 0.5s ease-in-out;
}

.news-content-text.expanded {
  max-height: 500px; 
  opacity: 1;
  margin-top: 15px; 
}

.btn-readmore {
  align-self: flex-start;
  background: #1f8f82;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.3s;
}

.btn-readmore:hover {
  background: #166e63;
}

.news-date {
  font-size: 0.9rem;
  color: #888;
  margin-top: auto;
}

/* Filters */
.filters {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
  z-index: 2;
}

.form-select,
.form-control {
  width: 250px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 576px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .filters {
    flex-direction: column;
    align-items: center;
  }
}
