/* ============================================================
 * RSS News Aggregator Styles
 * Matches existing policy timeline section style
 * ============================================================ */

.rss-feed-section {
  background: var(--bg, #F7F9FC);
}

.rss-feed-section .container {
  max-width: 900px;
}

.rss-news-card {
  margin-top: 32px;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid var(--border, #E5E9EF);
  border-radius: 16px;
}

.rss-news-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border, #E5E9EF);
}

.rss-news-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy, #0A2540);
  margin: 0;
}

.rss-news-header-title svg {
  color: var(--aussie-blue, #1D6FB8);
  flex-shrink: 0;
}

.rss-news-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--green, #2E7D5B);
  background: rgba(46, 125, 91, 0.1);
  padding: 3px 8px;
  border-radius: 10px;
}

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

.rss-news-item {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
  border: 1px solid transparent;
}

.rss-news-item:hover {
  background: var(--bg, #F7F9FC);
  border-color: var(--border, #E5E9EF);
  transform: translateX(2px);
}

.rss-news-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.rss-news-source {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--source-color, #1D6FB8);
  background: color-mix(in srgb, var(--source-color, #1D6FB8) 10%, transparent);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* For browsers that don't support color-mix */
@supports not (background: color-mix(in srgb, red, white)) {
  .rss-news-source {
    background: rgba(29, 111, 184, 0.08);
  }
}

.rss-news-date {
  font-size: 12px;
  color: var(--text-muted, #8B98A8);
  font-variant-numeric: tabular-nums;
}

.rss-news-title-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy, #0A2540);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-right: 24px;
}

.rss-news-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted, #8B98A8);
  opacity: 0;
  transition: all 0.2s ease;
}

.rss-news-item:hover .rss-news-arrow {
  opacity: 1;
  right: 12px;
}

/* Category-specific accent on left border */
.rss-news-item.rss-cat-migration {
  border-left: 3px solid var(--aussie-blue, #1D6FB8);
}

.rss-news-item.rss-cat-exam {
  border-left: 3px solid var(--gold, #E8A838);
}

/* Skeleton loading */
.rss-loading {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rss-skeleton-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border, #E5E9EF);
}

.rss-skeleton-source {
  width: 60px;
  height: 16px;
  border-radius: 4px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: rssShimmer 1.5s infinite;
}

.rss-skeleton-title {
  width: 85%;
  height: 18px;
  border-radius: 4px;
  margin-bottom: 6px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: rssShimmer 1.5s infinite;
  animation-delay: 0.1s;
}

.rss-skeleton-date {
  width: 80px;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7eb 50%, #f0f2f5 75%);
  background-size: 200% 100%;
  animation: rssShimmer 1.5s infinite;
  animation-delay: 0.2s;
}

@keyframes rssShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Footer */
.rss-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border, #E5E9EF);
  gap: 12px;
}

.rss-footer-note {
  font-size: 11.5px;
  color: var(--text-muted, #8B98A8);
  font-style: italic;
}

.rss-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--aussie-blue, #1D6FB8);
  background: transparent;
  border: 1px solid var(--border, #E5E9EF);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  white-space: nowrap;
}

.rss-refresh-btn:hover {
  background: rgba(29, 111, 184, 0.05);
  border-color: var(--aussie-blue, #1D6FB8);
}

.rss-refresh-btn:active {
  transform: scale(0.95);
}

.rss-empty {
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #8B98A8);
}

/* Responsive */
@media (max-width: 768px) {
  .rss-news-card {
    padding: 18px 16px;
    margin-top: 24px;
    border-radius: 12px;
  }

  .rss-news-title {
    font-size: 15px;
  }

  .rss-news-title {
    font-size: 13.5px;
    padding-right: 20px;
  }

  .rss-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .rss-news-card {
    padding: 16px 14px;
  }

  .rss-news-header {
    flex-wrap: wrap;
    gap: 6px;
  }

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