/* News Section Specific Enhancements */

/* Custom CSS Variables for Rust Branding */
:root {
  --rust-orange: #DE3F00;
  --rust-red: #CE422B;
  --rust-dark-red: #B8391F;
}

/* News page specific styling */
.news-container {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  min-height: 100vh;
}

/* Enhanced news item styling */
.news-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  transition: all 0.2s ease-in-out;
  margin: 0.5rem;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
}

.news-item:hover {
  border-color: var(--rust-orange);
  box-shadow: 0 10px 25px rgba(222, 63, 0, 0.1);
  transform: translateY(-2px);
}

/* Custom Rust-themed gradients */
.bg-gradient-rust {
  background: linear-gradient(135deg, var(--rust-orange), var(--rust-red));
}

.bg-gradient-rust-hover:hover {
  background: linear-gradient(135deg, var(--rust-red), var(--rust-dark-red));
}

/* Custom badge styles */
.badge-crab-news {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.badge-foundation {
  background: linear-gradient(135deg, #f97316, #ea580c);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.badge-rust {
  background: linear-gradient(135deg, var(--rust-orange), var(--rust-red));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

.badge-new {
  background: #dcfce7;
  color: #166534;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}

/* News avatar fallback */
.news-avatar-fallback {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rust-orange), var(--rust-red));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  margin-right: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* News content layout */
.news-content {
  flex-grow: 1;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
  line-height: 1.25;
}

.news-meta {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.news-source {
  font-weight: 500;
}

.news-date {
  margin-left: 0.5rem;
  color: #9ca3af;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* External link icon */
.external-link-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  flex-shrink: 0;
  margin-left: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .news-item {
    flex-direction: column;
    text-align: center;
  }
  
  .news-avatar-fallback {
    margin: 0 auto 1rem auto;
  }
  
  .external-link-icon {
    margin: 1rem auto 0 auto;
  }
  
  .news-content {
    width: 100%;
  }
  
  .news-tags {
    justify-content: center;
  }
}

/* Animation improvements */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.4s ease-out;
}

/* Staggered animation for news items */
.job-list-item:nth-child(1) { animation-delay: 0.1s; }
.job-list-item:nth-child(2) { animation-delay: 0.2s; }
.job-list-item:nth-child(3) { animation-delay: 0.3s; }
.job-list-item:nth-child(4) { animation-delay: 0.4s; }
.job-list-item:nth-child(5) { animation-delay: 0.5s; }
.job-list-item:nth-child(6) { animation-delay: 0.6s; }

/* Page header styling */
.news-header {
  text-align: center;
  margin-top: 5rem;
  margin-bottom: 2rem;
}

.news-header h1 {
  font-size: 2.5rem;
  font-family: 'Courier New', monospace;
  color: #111827;
  background: linear-gradient(135deg, var(--rust-orange), var(--rust-red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section border styling */
.news-section {
  border-top: 2px solid var(--rust-orange);
  background: white;
  border-radius: 1rem 1rem 0 0;
  margin-top: 1rem;
  box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
}

/* Footer fixes for news page */
.news-footer {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid #e5e7eb;
  margin-top: 2rem;
}

/* Focus states for accessibility */
.news-item:focus-within {
  outline: 2px solid var(--rust-orange);
  outline-offset: 2px;
}

/* Print styles for news */
@media print {
  .news-item {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
  }
  
  .badge-crab-news,
  .badge-foundation,
  .badge-rust,
  .badge-new {
    background: #e5e7eb !important;
    color: #374151 !important;
  }
}