body {
  font-family: Arial, sans-serif;
  background-color: #f7f7f7;
  color: #333;
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 20px;
}

header {
  text-align: center;
  margin-bottom: 20px;
  padding: 10px 0;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 2em;
  color: #333;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

nav button,
nav input {
  padding: 8px 16px;
  margin: 5px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

nav input {
  width: 200px;
  background-color: #fff;
  color: #000;
  padding-left: 36px; /* to make space for the icon */
  border: 1px solid #ccc; /* add border */
  position: relative;
}

nav input::placeholder {
  color: #000;
}

nav .search-container {
  position: relative;
}

nav .search-container input {
  padding-left: 36px; /* to make space for the icon */
}

nav .search-container .material-icons {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #000;
  font-size: 20px;
  pointer-events: none; /* ensure the icon doesn't block input interactions */
}

nav button {
  background-color: #007BFF;
  color: #fff;
}

nav button:hover {
  background-color: #0056b3;
}

/* Remove hover effect for the search input */
nav input:hover {
  background-color: #fff;
  border-color: #ccc;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.news-item {
  background-color: #fff;
  padding: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-item h2 {
  font-size: 1.25em;
  color: #333;
  margin: 0 0 10px;
}

.news-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.news-item p {
  font-size: 0.9em;
  color: #555;
}

.news-details {
  display: none;
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.news-details h2 {
  margin-top: 0;
  color: #333;
}

.news-details img {
  width: 100%;
  height: auto;
  border-radius: 5px;
  margin-bottom: 15px;
}

.news-details p {
  color: #555;
  font-size: 1em;
  line-height: 1.6;
}

.news-details a {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #007BFF;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
}

.news-details a:hover {
  background-color: #0056b3;
}

@media (max-width: 768px) {
  .news-list {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  nav input {
    width: 100%;
  }
}

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

  header h1 {
    font-size: 1.5em;
  }

  nav {
    flex-direction: column;
  }
}
