/* =========================================================================
   NEWS PANEL STYLES - Recent News & Activities Slide-out Panel
   ========================================================================= */

/* Backdrop */
#recentNewsBackdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 9998;
}

#recentNewsBackdrop.active {
  opacity: 1;
  visibility: visible;
}

/* News Panel */
#recentNewsPanel {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  max-width: 90vw;
  height: 100vh;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 252, 0.95) 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2);
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#recentNewsPanel.active {
  right: 0;
}

/* Panel Header */
#recentNewsHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

#recentNewsHeader::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(244, 164, 0, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(50%, -50%);
}

#recentNewsHeader h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

#recentNewsClose {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

#recentNewsClose:hover {
  background: rgba(244, 164, 0, 0.3);
  border-color: var(--accent-gold);
  transform: rotate(90deg) scale(1.1);
}

/* News List */
.news-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  scroll-behavior: smooth;
}

.news-list::-webkit-scrollbar {
  width: 8px;
}

.news-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 4px;
}

.news-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary-green), var(--accent-gold));
  border-radius: 4px;
}

.news-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-green-light), var(--accent-gold));
}

/* News Empty State */
.news-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-700);
  font-size: 1rem;
}

.news-empty i {
  font-size: 3rem;
  color: var(--primary-green);
  opacity: 0.3;
  margin-bottom: 16px;
  display: block;
}

/* News Card */
.news-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(250, 252, 255, 0.9) 100%);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  border-left: 4px solid var(--primary-green);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06),
              0 2px 8px rgba(27, 94, 32, 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-green), var(--accent-gold));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.news-card:hover {
  transform: translateX(-8px);
  box-shadow: 0 8px 32px rgba(27, 94, 32, 0.15),
              0 4px 16px rgba(244, 164, 0, 0.1);
  border-left-color: var(--accent-gold);
}

.news-card:hover::before {
  opacity: 1;
}

.news-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.news-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary-green), var(--primary-green-light));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
}

.news-card-content {
  flex: 1;
}

.news-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--primary-green-dark);
  margin: 0 0 8px;
  line-height: 1.4;
}

.news-description {
  font-size: 0.9rem;
  color: var(--gray-700);
  line-height: 1.6;
  margin: 0 0 12px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: #666;
}

.news-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.news-meta-item i {
  color: var(--accent-gold);
  font-size: 0.9rem;
}

.news-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(27, 94, 32, 0.1), rgba(212, 175, 55, 0.1));
  color: var(--primary-green);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(27, 94, 32, 0.2);
  margin-top: 8px;
}

/* Category-specific icon backgrounds */
.news-icon.event {
  background: linear-gradient(135deg, #1e88e5, #1976d2);
}

.news-icon.announcement {
  background: linear-gradient(135deg, #ff9800, #f57c00);
}

.news-icon.achievement {
  background: linear-gradient(135deg, #d4af37, #ffc107);
}

.news-icon.academic {
  background: linear-gradient(135deg, #8e24aa, #7b1fa2);
}

/* Responsive */
@media (max-width: 768px) {
  #recentNewsPanel {
    width: 100vw;
    right: -100vw;
  }
  
  #recentNewsHeader h3 {
    font-size: 1.2rem;
  }
  
  .news-card {
    padding: 16px;
  }
  
  .news-list {
    padding: 16px;
  }
}

/* Animation for news cards */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.news-card {
  animation: slideInRight 0.4s ease backwards;
}

.news-card:nth-child(1) { animation-delay: 0.1s; }
.news-card:nth-child(2) { animation-delay: 0.15s; }
.news-card:nth-child(3) { animation-delay: 0.2s; }
.news-card:nth-child(4) { animation-delay: 0.25s; }
.news-card:nth-child(5) { animation-delay: 0.3s; }
