/* Live News Feed & Engagement Widgets Styles */

/* ═══ STICKY TOP NEWS BAR ═══ */
.news-top-bar {
  position: sticky;
  top: 56px; /* Positioned below the main header */
  z-index: 9998;
  background: #065f46;
  color: white;
  padding: 8px 16px;
  font-size: 13px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  border-bottom: 2px solid #059669;
}

/* Ensure the main header is also sticky and above the news bar */
header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
}

@media (max-width: 768px) {
  .news-top-bar {
    top: 52px; /* Adjusted for mobile header height */
  }
}

.news-bar-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.2);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #a7f3d0;
}

.news-pulse {
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
  animation: newsPulse 2s infinite;
}

@keyframes newsPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.news-scroll-btn {
  background: #fbbf24;
  color: #92400e;
  border: none;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 11px;
  text-transform: uppercase;
}

.news-scroll-btn:hover {
  background: white;
  transform: scale(1.05);
}

/* ═══ NEWS FEED WIDGET ═══ */
.news-feed-widget {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
  animation: slideInUp 0.5s ease-out;
}

.news-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #a7f3d0;
}

.news-icon {
  font-size: 24px;
}

.news-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #047857;
  flex: 1;
}

.news-badge {
  display: inline-block;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #10b981;
  transition: all 0.3s ease;
  animation: fadeInLeft 0.5s ease-out forwards;
  opacity: 0;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.news-item:hover {
  background: #f0fdf4;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}

.news-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.news-content {
  flex: 1;
  min-width: 0;
}

.news-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 6px;
  transition: color 0.3s ease;
}

.news-title:hover {
  color: #10b981;
  text-decoration: underline;
}

.news-summary {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-read-more {
  margin-left: auto;
  color: #059669;
  font-weight: 600;
  text-decoration: none;
}

.news-read-more:hover {
  text-decoration: underline;
}

.news-meta {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
}

.news-source {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 500;
}

.news-time {
  font-style: italic;
}

.news-footer {
  text-align: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #d1fae5;
  font-size: 12px;
  color: #6b7280;
}

.news-loading {
  text-align: center;
  padding: 20px;
  color: #10b981;
  font-weight: 500;
  animation: pulse 1.5s infinite;
}

/* ═══ NEXT STEPS / RELATED TOOLS ═══ */
.next-steps-widget {
  background: linear-gradient(135deg, #fef3c7 0%, #fef9e7 100%);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.08);
}

.next-steps-widget h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.next-steps-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.next-step-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  text-decoration: none;
  color: #92400e;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.next-step-btn:hover {
  background: #fef3c7;
  border-color: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(217, 119, 6, 0.15);
}

.next-step-btn::before {
  content: '→';
  font-weight: bold;
}

/* ═══ TRENDING STATE CONVERSIONS ═══ */
.trending-widget {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

.trending-widget h3 {
  margin: 0 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e40af;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trending-widget h3::before {
  content: '🔥';
  font-size: 18px;
}

.trending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
  border-left: 3px solid #3b82f6;
  transition: all 0.3s ease;
  cursor: pointer;
}

.trending-item:hover {
  background: #dbeafe;
  transform: translateX(4px);
}

.trending-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.trending-text {
  flex: 1;
  font-size: 14px;
  color: #1e40af;
  font-weight: 500;
}

.trending-arrow {
  color: #3b82f6;
  font-weight: bold;
}

/* ═══ ANIMATIONS ═══ */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
  .news-feed-widget,
  .next-steps-widget,
  .trending-widget {
    margin: 16px 0;
    padding: 12px;
  }

  .next-steps-list {
    grid-template-columns: 1fr;
  }

  .news-header h3 {
    font-size: 14px;
  }

  .news-title {
    font-size: 13px;
  }
}
