/* News Page Styles */
.news-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 102, 54, 0.05), transparent);
  transition: left 0.5s ease;
  z-index: 1;
  pointer-events: none;
}

.news-card:hover::before {
  left: 100%;
}

.news-card img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card:hover img {
  transform: scale(1.05);
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Category filter buttons */
.category-filter {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.bg-white.category-filter:hover {
  background-color: var(--primary);
  color: white;
}
.category-filter::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.category-filter:hover::before {
  width: 200px;
  height: 200px;
}

.category-filter.active {
  background-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(0, 102, 54, 0.3);
}

/* Search input styling */
#search-news {
  transition: all 0.3s ease;
}

#search-news:focus {
  box-shadow: 0 0 0 3px rgba(0, 102, 54, 0.1);
  transform: translateY(-1px);
}

/* Pagination styling */
.pagination-btn {
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* No results animation */
#no-results {
  animation: fadeInUp 0.5s ease;
}

/* Card image overlay effect */
.news-card .relative {
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-card .h-64 {
    height: 200px;
  }
  
  .news-card .h-56 {
    height: 180px;
  }
  
  .category-filter {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .pagination-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  .news-card .p-6 {
    padding: 1rem;
  }
  
  .news-card h3 {
    font-size: 1rem;
  }
  
  .category-filter {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
}

/* Loading animation for images */
.news-card img {
  background-color: #f3f4f6;
  animation: pulse 1.5s ease-in-out infinite;
}

.news-card img[src] {
  animation: none;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Featured section styling */
#featured-news-grid .news-card {
  border-bottom: 3px solid transparent;
  transition: border-color 0.3s ease;
}

#featured-news-grid .news-card:hover {
  border-bottom-color: var(--secondary);
}

/* Category badge hover effect */
.news-card .absolute .px-3 {
  transition: transform 0.3s ease;
}

.news-card:hover .absolute .px-3 {
  transform: scale(1.05);
}

/* Read more link animation */
.group:hover .group-hover\:translate-x-1 {
  transform: translateX(0.25rem);
}

/* Print styles */
@media print {
  .category-filter,
  #search-news,
  .pagination-btn,
  .cta-section {
    display: none;
  }
  
  .news-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}