/* ===== NEWS PAGE STYLING ===== */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  background: #f9f9fb;
  color: #333;
}

/* Container */
.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Page Title */
.news-container h1 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
  color: #222;
}

/* ===== FEATURED HERO ===== */
.featured {
  width: 100%;
  margin-bottom: 3rem;
}

.featured-inner {
  position: relative;
  width: 100%;
  height: 280px; /* fixed height */
  border-radius: 12px;
  overflow: hidden;
}

.featured-inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;   /* crop properly */
  object-position: center;
}

.featured-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45); /* overlay for readability */
}

.featured-inner .hero-text {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 1rem;
}

.featured-inner .hero-text h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.featured-inner .hero-text p {
  font-size: 1rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid #ccc;
  background: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 30px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background: #f0f0f0;
}

.filter-btn.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

/* ===== GRID LAYOUT ===== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

/* ===== NEWS CARD ===== */
.news-card {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.news-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-card .card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-card h3 {
  font-size: 1.2rem;
  margin: 0 0 0.6rem;
  color: #2c3e50;
  line-height: 1.3;
}

.news-card .meta {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.8rem;
}

.news-card p {
  flex: 1;
  font-size: 0.9rem;
  color: #555;
}

.news-card a.card-link {
  display: inline-block;
  margin-top: 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  text-decoration: none;
  transition: color 0.2s;
}

.news-card a.card-link:hover {
  color: #16a085;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pagination a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fff;
  text-decoration: none;
  color: #333;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: #eee;
}

.pagination a.active {
  background: #2c3e50;
  color: #fff;
  border-color: #2c3e50;
}

.pagination a.disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .featured-inner {
    height: 200px;
  }

  .featured-inner .hero-text h1 {
    font-size: 1.6rem;
  }

  .news-card img {
    height: 150px;
  }

  .news-container h1 {
    font-size: 2rem;
  }
}
