.news-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}
.news-section h2{
      text-align: center;
      font-size: 26px;
      margin-bottom: 20px;
      color:blue;
}

.news-container {
  position: relative;
  width: 100%;
  height: 250px; /* Default height */
  overflow: hidden;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
}

.news-content {
  position: absolute;
  left: 20%;
  bottom: 0;
  animation: newsScroll 10s linear infinite;
  padding: 0 16px;
}

.news-content p {
  margin: 10px 0;
  padding: 0;
  font-size: 16px;
  color: #1919f0;
  line-height: 1.5;
}

.news-content p button {
 padding: 6px 12px;
 background-color: rgb(210, 8, 8);
 color: white;
 border: none;
 border-radius: 3px;
 

}

@keyframes newsScroll {
  0% {
    bottom: -100%; /* Start from bottom outside the container */
  }
  100% {
    bottom: 100%; /* Move up through the container */
  }
}

/* Tablet view adjustments */
@media screen and (max-width: 768px) {
  .news-container {
    height: 200px; /* Reduce height for tablets */
  }
  .news-content{
    left: 10%;
  }
  .news-content p {
    font-size: 14px; /* Slightly smaller font size */
    margin: 8px 0;
  }
}

/* Mobile view adjustments */
@media screen and (max-width: 480px) {
  .news-container {
    height: 150px; /* Reduce height for mobiles */
  }

  .news-content {
    padding: 0 8px;
    left: 5%;
  }

  .news-content p {
    font-size: 12px; /* Smaller font size for mobiles */
    margin: 6px 0;
  }
}
