.newsroom {
  max-width: 90vw;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.newsroom h1 {
  color: rgb(22, 158, 113);
  margin-bottom: 20px;
  font-size: 4rem;
}

.carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.card {
  background: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 calc(33.33% - 10px); /* Ensure three cards fit side-by-side */
  margin: 0 5px;
  text-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
}

.image-wrapper {
  width: 100%;
  height: 35vh;
  overflow: hidden; /* Ensures excess content doesn't affect layout */
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images fill the wrapper proportionally */
}

.card p {
  padding: 10px 5px 5px 5px;
  font-size: 16px;
  color: #333;
  flex: 1;
}

.card button {
  display: block;
  margin: 5px auto 15px auto;
  padding: 10px 20px;
  background: rgb(8, 233, 158);
  color: #0a2906;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-size: 16px;
}

.card button a {
  text-decoration: none;
  color: #0a2906;
}

.card button:hover {
  background: #0cbe80;
}

.carousel-buttons {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.carousel-buttons button {
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  margin: 0 10px;
}

.carousel-buttons button:hover {
  background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 1024px) {
  .card {
    flex: 0 0 calc(50% - 10px); /* Two cards per row for tablets */
  }

  .card button {
    padding: 9px 16px;
    font-size: 14px;
  }

  .carousel-buttons button {
    padding: 8px 16px;
  }
}

@media (max-width: 850px) {
  .newsroom h1 {
    font-size: 3rem;
  }
}

@media (max-width: 768px) {
  .newsroom h1 {
    font-size: 3.5rem; /* Adjust heading font size */
  }

  .card {
    flex: 0 0 calc(100% - 10px); 
  }

  .image-wrapper {
    height: 50vh; 
  }

  .card p {
    font-size: 1.1rem; /* Adjust paragraph font size */
  }

  .card button {
    padding: 8px 14px;
    font-size: 12px;
  }
}

@media (max-width: 480px) { 
  .image-wrapper {
    height: 30vh; 
  }

  .newsroom h1 {
    font-size: 2.5rem;
    line-height: 1;
  }
}