/* ======================================
   NEWS PAGE STYLES
   ====================================== */


/* Filter Buttons */
.filter-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  background: white;
  border: 2px solid #e5e7eb;
  color: #6b7280;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: #2E8B57;
  color: #2E8B57;
  background: #f0fdf4;
}

.filter-btn.active {
  background: #2E8B57;
  border-color: #2E8B57;
  color: white;
}

.filter-btn i {
  font-size: 1rem;
}

/* News Article Card */
.news-article {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: scale(1);
}

.news-article:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Hidden state for filtering */
.news-article.hidden {
  display: none;
}

/* Fade animation */
.news-article.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.news-article.fade-in {
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Featured Article */
.featured-article {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.featured-article:hover {
  transform: none;
}

.featured-image {
  height: 400px;
}

/* Article Image Container */
.article-image-container {
  position: relative;
  width: 100%;
  padding-top: 66.67%; /* 3:2 Aspect Ratio */
  overflow: hidden;
  background: #f3f4f6;
}

.article-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-article:hover .article-image {
  transform: scale(1.1);
}

/* Article Badge */
.article-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.badge-events {
  background: rgba(236, 72, 153, 0.9);
  color: white;
}

.badge-workshops {
  background: rgba(59, 130, 246, 0.9);
  color: white;
}

.badge-seasonal {
  background: rgba(245, 158, 11, 0.9);
  color: white;
}

.badge-news {
  background: #545454e6;
  color: rgb(0, 0, 0);
}

/* Article Content */
.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}

.article-meta span {
  display: flex;
  align-items: center;
}

.article-meta i {
  color: #2E8B57;
  font-size: 1rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.news-article:hover .article-title {
  color: #2E8B57;
}

.article-excerpt {
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Article Tags */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.tag:hover {
  background: #2E8B57;
  color: white;
  transform: translateY(-2px);
}

/* Article Button */
.article-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: transparent;
  color: #444444;
  font-weight: 600;
  border: 2px solid #2E8B57;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-size: 0.9rem;
}

.article-btn:hover {
  background: #2E8B57;
  color: white;
  transform: translateX(4px);
}

.article-btn i {
  transition: transform 0.3s ease;
}

.article-btn:hover i {
  transform: translateX(4px);
}

/* News Modal */
#newsModal {
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

#newsModal.hidden {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#newsModal > div {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal Header */
.modal-news-header {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.modal-news-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-news-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.modal-news-badge {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: none;
  color: rgb(0, 0, 0);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 20;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Modal Body */
.modal-news-body {
  padding: 2rem;
}

.modal-news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f3f4f6;
}

.modal-news-meta span {
  display: flex;
  align-items: center;
  color: #6b7280;
  font-size: 0.95rem;
}

.modal-news-meta i {
  color: #2E8B57;
  margin-right: 0.5rem;
  font-size: 1.125rem;
}

.modal-news-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.modal-news-content {
  color: #4b5563;
  line-height: 1.8;
  font-size: 1.05rem;
}

.modal-news-content p {
  margin-bottom: 1.25rem;
}

.modal-news-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.modal-news-content ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.modal-news-content li {
  padding-left: 1.75rem;
  position: relative;
  margin-bottom: 0.75rem;
}

.modal-news-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2E8B57;
  font-weight: 600;
}

.modal-news-highlight {
  background: #f0fdf4;
  border-left: 4px solid #2E8B57;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 8px;
}

.modal-news-highlight p {
  margin: 0;
  font-style: italic;
  color: #374151;
}

/* Modal Footer */
.modal-news-footer {
  padding: 1.5rem 2rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-share-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  background: white;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.modal-share-btn:hover {
  background: #2E8B57;
  color: white;
  border-color: #2E8B57;
}

/* Load More Button Animation */
#load-more-btn {
  position: relative;
  overflow: hidden;
}

#load-more-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(46, 139, 87, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

#load-more-btn:hover::before {
  width: 300px;
  height: 300px;
}

/* Search Input Enhancement */
#news-search {
  transition: all 0.3s ease;
}

#news-search:focus {
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .featured-image {
    height: 300px;
  }

  .modal-news-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .filter-btn {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
  }

  .featured-article {
    padding: 1.5rem;
  }

  .featured-image {
    height: 250px;
  }

  .article-content {
    padding: 1.25rem;
  }

  .modal-news-header {
    height: 300px;
  }

  .modal-news-body {
    padding: 1.5rem;
  }

  .modal-news-title {
    font-size: 1.5rem;
  }

  .modal-news-content {
    font-size: 1rem;
  }

  .modal-news-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .article-badge {
    font-size: 0.65rem;
    padding: 0.375rem 0.75rem;
  }

  .article-title {
    font-size: 1.125rem;
  }

  .article-excerpt {
    font-size: 0.875rem;
  }

  .modal-news-header {
    height: 250px;
  }
}

/* Scroll Animations */
.news-article.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.news-article.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading State */
.news-article.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.empty-state i {
  font-size: 4rem;
  color: #d1d5db;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Accessibility */
.article-btn:focus,
.filter-btn:focus,
.modal-close-btn:focus {
  outline: 2px solid #2E8B57;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .filter-btn,
  #news-search,
  #load-more-btn,
  .modal-close-btn,
  .modal-news-footer {
    display: none !important;
  }

  .news-article {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* Custom Scrollbar for Modal */
#newsModal > div::-webkit-scrollbar {
  width: 10px;
}

#newsModal > div::-webkit-scrollbar-track {
  background: #f3f4f6;
}

#newsModal > div::-webkit-scrollbar-thumb {
  background: #2E8B57;
  border-radius: 5px;
}

#newsModal > div::-webkit-scrollbar-thumb:hover {
  background: #236b43;
}

/* Hover Effect Enhancement */
.news-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 0 0 2px #2E8B57;
  z-index: 1;
}

.news-article:hover::before {
  opacity: 0.2;
}
.hero-gerbera {
  position: absolute;
  bottom: 0;
  max-height: 400px;
  height: 100%;
  object-fit: contain;
}

.hero-gerbera.left { left: 0; }
.hero-gerbera.right { right: 0; }

@media (max-width: 1200px) {
  .hero-gerbera { display: none; }
}


/* Stagger Animation for Grid Items */
.news-article:nth-child(1) { animation-delay: 0s; }
.news-article:nth-child(2) { animation-delay: 0.1s; }
.news-article:nth-child(3) { animation-delay: 0.2s; }
.news-article:nth-child(4) { animation-delay: 0.3s; }
.news-article:nth-child(5) { animation-delay: 0.4s; }
.news-article:nth-child(6) { animation-delay: 0.5s; }