* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: #eef2f7;
  color: #333;
  transition: 0.3s;
}

.container {
  width: 95%;
  max-width: 1400px;
  margin: auto;
}

header {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  border-radius: 20px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.logo {
  font-size: 28px;
  font-weight: bold;
}

nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

input,
select,
button {
  padding: 12px 18px;
  border: none;
  border-radius: 30px;
  outline: none;
  font-size: 14px;
}

input,
select {
  min-width: 180px;
}

button {
  cursor: pointer;
  background: white;
  color: #203a43;
  font-weight: bold;
  transition: 0.3s;
}

button:hover {
  transform: scale(1.05);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
  padding-bottom: 30px;
}

.news-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
  transition: 0.3s;
}

.news-card:hover {
  transform: translateY(-10px);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #ddd;
}

.news-content {
  padding: 18px;
}

.news-content h3 {
  font-size: 18px;
  margin-bottom: 10px;
  line-height: 1.4;
}

.news-content p {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
}

.news-content a {
  text-decoration: none;
  color: #2c5364;
  font-weight: bold;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding-bottom: 40px;
}

.loading {
  text-align: center;
  font-size: 18px;
  padding: 20px;
  display: none;
}

.dark-mode {
  background: #121212;
  color: white;
}

.dark-mode .news-card {
  background: #1e1e1e;
  color: white;
}

.dark-mode .news-content p {
  color: #ccc;
}

.dark-mode button {
  background: #333;
  color: white;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  nav {
    justify-content: center;
    width: 100%;
  }

  input,
  select,
  button {
    width: 100%;
  }

  .logo {
    margin-bottom: 15px;
  }
}

@media (max-width: 480px) {
  .news-card img {
    height: 180px;
  }

  .news-content h3 {
    font-size: 16px;
  }
}
