/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

html {
  overflow-x: hidden;
}
/* Title */
.title-section {
  padding-top: calc(var(--header-height) + 5vh);
  width: 100%;
}

.title_header {
  color: #36384E;
  font-family: "Poppins", sans-serif;
  font-size: clamp(1.25rem, 5vw, 1.5rem);
  font-weight: 600;
  padding: 2.5rem 0;
  text-align: center;
  align-items: center;
  opacity: 0;
  transform: translateY(1rem);
}

.title_header.animate {
  animation: fadeInUp 0.6s ease forwards;
}

.highlight-header {
  background-color: var(--primary-green);
  width: clamp(150px, 10vw, 250px);
  height: 8px;
  border-radius: 5px;
  margin: -2rem auto 2.5rem;
  opacity: 0;
}

.highlight-header.animate {
  animation: fadeIn 0.8s ease forwards 0.2s;
}

.bg-elipse {
  position: absolute;
  z-index: -2;
  content: '';

  background-image: radial-gradient(circle at 50% 50%, #00796B 0%, #A2FFE8 100%);

  top: 22%;
  left: 50%; 
  transform: translate(-50%, -50%);
  width: 856px;
  height: 856px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(150px);
  opacity: 0.26;

  overflow: hidden;
}

/*=============== SEARCH SECTION ===============*/
.section {
  padding: 30px 101px 50px;
}

.news-page .container {
  max-width: 1250px;
  margin-left: auto;
  margin-right: auto;
}

.search-bar-container {
  width: 100%;
  text-align: center;
}

.search-bar-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
  width: 70%;
}

.search-icon {
  z-index: 2;
  position: absolute;
  left: 1rem;
  color: #aaa;
  pointer-events: none;
  opacity: 0;
}

.search-bar {
  font-family: "Poppins", sans-serif;
  width: 100%;
  padding: 1rem 1rem;
  padding-left: 3rem;
  border: none;
  border-radius: 50px;
  outline: none;
  opacity: 0;
}

.search-bar:focus {
  border-color: var(--primary-green);
  box-shadow: 0 0 0 2px rgba(0, 162, 138, 0.2);
}

.search-bar.animate, .search-icon.animate {
  animation: fadeIn 0.8s ease forwards 0.2s;
}

/*=============== NEWS CARDS SECTION ===============*/
.news-content {
  margin-top: 100px;
  display: block;
  align-items: center;
  justify-content: center;
}

.news-card-container {
  place-items: center;
  display: grid;
  grid-template-columns: repeat(4, 1fr); 
  padding-top: 60px;
  gap: 32px; /* Space between cards */
  width: 100%; /* Ensure it uses full available width */
}

.news-card {
  position: relative;
  width: 90%;
  height: 100%;
  border-radius: 20px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  background: #FAFFFE;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  opacity: 1;
  transform: translateY(1.5rem);

  padding: 15px;
}

.news-card.animate {
  animation: fadeInUp 0.6s ease forwards;
  animation-delay: calc(0.1s * var(--card-index));
}

@media (hover: hover) {
  .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  }
}

.news-card-img-container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-card-img-container img {
  aspect-ratio: 6/4;
  width: 100%;
  height: auto;

  border-radius: 10px;

  object-fit: cover;
  display: block;
  flex-shrink: 0;
}

.news-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary-green);
  margin: 10px 0;
  flex-shrink: 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;   
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;

  text-align: justify;
}

.news-card p {
  font-size: 1rem;
  color: var(--gray);
  margin: 10px 0;
  line-height: 1.5;
  text-align: justify;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.news-card span {
  font-size: 1rem;
  color: var(--gray);
  margin: 10px 0;
  line-height: 1.5;
}


  
/* Pagination Styles */
.pagination {
  display: flex;
  justify-content: center;
  padding-bottom: 5rem;
}

.pagination a {
  color: #004d40;
  padding: 8px 16px;
  text-decoration: none;
  border: 1px solid #ddd;
  margin: 0 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.pagination a.active {
  background-color: #004d40;
  color: white;
  border: 1px solid #004d40;
}

.pagination a:hover:not(.active) {
  background-color: #ddd;
}

.pagination a.disabled {
  color: #ccc;
  cursor: not-allowed;
}

/*=============== CONTACT US ===============*/
.contact_us {
  width: 100%;
  background: linear-gradient(to bottom, #00796B, #05897A);
  color: var(--white-color);
  padding: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact_content {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.contact_content h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.contact_content h2 {
  font-size: 1.2rem;
  margin: 30px 50px;
  font-weight: 300;
}

.contact_content h3 {
  font-size: 1.2rem;
  margin: 10px 0;
  font-weight: 300;
}

.contact_content h3 strong {
  font-weight: 700;
}

.divider {
  width: 1000px;
  height: 1px;
  background: var(--white-color);
  border: none;
  margin: 40px auto;
}

.social_icons {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.social_icons a {
  color: var(--white-color);
  font-size: 2rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

@media (hover: hover) {
  .social_icons a:hover {
    color: var(--gray);
    transform: scale(1.1);
  }
}

.footer_nav {
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.footer_nav a {
  color: var(--white-color);
  text-decoration: none;
  margin: 0 5px;
  transition: color 0.3s ease;
}

@media (hover: hover) {
  .footer_nav a:hover {
    color: var(--gray);
  }
}

.copyright {
  font-size: 0.8rem;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .partners_and_collaborators {
    padding: 20px 0;
    margin-bottom: 80px;
  }

  .partners_and_collaborators .title_header {
    margin-top: 2rem;
    padding: 1.5rem 0;
  }

  .partners_and_collaborators .highlight-header {
    width: clamp(100px, 25vw, 150px);
    margin: -1.5rem auto 1.5rem;
  }

  .logo-track img {
    height: 40px;
    margin: 0 10px;
  }

  .contact_us {
    padding: 40px 0;
    height: clamp(550px, 90vh, 600px);
  }

  .contact_content h1 {
    font-size: 1.5rem;
  }

  .contact_content h2 {
    font-size: 1rem;
    margin: 20px 30px;
  }

  .contact_content h3 {
    font-size: 1rem;
  }

  .divider {
    width: 100%;
  }

  .social_icons {
    gap: 20px;
  }

  .social_icons a {
    font-size: 1.3rem;
  }

  .footer_nav {
    font-size: 0.8rem;
  }

  .copyright {
    font-size: 0.7rem;
  }
}

/*=============== MEDIA QUERIES ===============*/
@media screen and (max-width: 1000px) {
  
}

@media screen and (max-width: 1250px) {
  
}

@media screen and (max-width: 1024px) {
  
}

@media (max-width: 767px) {  /* Changed from min-width: 768px to max-width: 767px */
  
}

@media screen and (max-width: 480px) {
  .search-bar-container {
    width: 160%;
    justify-self: center;
  }
  .search-bar-wrapper {
    width: 100%;
  }
  .news-card-container {
    justify-content: center;
  }
  .bg-elipse {
    width: 100vw;
  }
  
  .news-card-container {
    justify-self: center;
    width: 180%;
    padding-top: 40px;
    grid-template-columns: repeat(1, 1fr);
  }
}
