* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #000;
}

nav {
  position: fixed;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #34333399;
  top: 5px;
  height: 70px;
  width: 100%;
  padding: 0 20px;
  z-index: 1000; /* Ensures the nav bar stays on top */
}

nav .nav-left {
  display: flex;
  align-items: center;
}

nav .nav-left .logo img {
  height: 50px; /* Adjust the height as needed */
}

nav .nav-center {
  display: flex;
  align-items: center;
}

nav .nav-center a {
  position: relative;
  display: inline-block;
  font-size: 1em;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  padding: 0 15px;
  z-index: 1;
  transition: color 0.3s ease;
}

nav .nav-center a:hover {
  color: #ff3333;
}

nav .nav-right {
  display: flex;
  align-items: center;
}

nav .search-bar {
  padding: 8px 15px;
  border-radius: 20px;
  border: none;
  outline: none;
  font-size: 1em;
  transition: width 0.4s ease;
}

nav .search-bar:focus {
  width: 200px;
}

nav .search-button {
  padding: 8px 15px;
  margin-left: 10px;
  border: none;
  border-radius: 20px;
  background: #ff3333;
  color: #fff;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease;
}

nav .search-button:hover {
  background: #e62e2e;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  z-index: 1001;
}

.hamburger .bar {
  height: 4px;
  width: 25px;
  background-color: #fff;
  margin: 4px 0;
  transition: 0.4s;
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: #34333399;
    transition: max-height 0.3s ease;
    overflow: hidden;
    max-height: 0;
  }

  .nav-center a {
    padding: 10px;
    text-align: center;
    margin: 5px 0; /* Adds space between the items */
  }

  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-center.active {
    display: flex;
    max-height: 500px; /* Allows the dropdown to be fully visible */
  }
}

.card_container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 100px;
}

.card {
  width: 270px;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  margin: 20px;
}

.card img {
  width: 100%;
  height: auto;
}

.card_content {
  padding: 16px;
}

.card_content h3 {
  font-size: 28px;
  margin-bottom: 8px;
}

.card_content p {
  color: #666;
  font-size: 15px;
  line-height: 1.3;
}

.card_content .btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #ff3333;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 16px;
  color: #fff;
}

/* Additional styles for news cards */
.card1 {
  width: 270px;
  background-color: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
  margin: 20px;
}

.card1 img {
  width: 100%;
  height: auto;
}

.card_content {
  padding: 16px;
}

.card_content h3 {
  font-size: 1.5em;
  margin-bottom: 8px;
}

.card_content p {
  color: #666;
  font-size: 1em;
  line-height: 1.3;
}

.card_content .btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #ff3333;
  text-decoration: none;
  border-radius: 8px;
  margin-top: 16px;
  color: #fff;
}
.card_content .source,
.card_content .date {
  color: #999;
  font-size: 0.9em;
  margin-top: 10px;
}

.card_content .source span,
.card_content .date span {
  color: #666;
}
