/* ============================================================
   Universal Noticias — Additional Modern Styles
   Complements style.css — Gradient: #e14f24 → #fb7f2a / #05cc9b
   ============================================================ */

/* ===== BADGE COLORS BY CATEGORY ===== */
.badge-nacionales {
  background: #fef2f0;
  color: #e14f24;
}

.badge-internacionales {
  background: #f0fdf4;
  color: #05cc9b;
}

.badge-deportes {
  background: #fefce8;
  color: #ca8a04;
}

.badge-tecnología {
  background: #ecfdf5;
  color: #05cc9b;
}

.badge-videos {
  background: linear-gradient(135deg, #e14f24, #fb7f2a);
  color: #fff;
}

.badge-entretenimiento {
  background: #fdf4ff;
  color: #c026d3;
}

.badge-salud {
  background: #f0fdfa;
  color: #0d9488;
}

.badge-ciencia {
  background: #faf5ff;
  color: #9333ea;
}

.badge-cultura {
  background: #fff7ed;
  color: #ea580c;
}

/* ===== VIDEO CARD SPECIFIC ===== */
.video-card .video-embed {
  background: #0f172a;
}

.video-card:hover {
  box-shadow: 0 20px 40px rgba(225, 79, 36, 0.15);
}

.video-card .badge-video {
  box-shadow: 0 2px 8px rgba(225, 79, 36, 0.3);
}

/* ===== ARTICLE CARD SPECIFIC ===== */
.article-card .card-img-wrapper {
  height: 220px;
}

.article-card:hover .news-card-img {
  transform: scale(1.05);
}

/* ===== SKELETON LOADING ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 14px;
  margin-bottom: 8px;
}

.skeleton-title {
  height: 20px;
  width: 75%;
  margin-bottom: 12px;
}

.skeleton-img {
  height: 200px;
  border-radius: 16px 16px 0 0;
}

/* ===== SCROLL-TO-TOP BUTTON ===== */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #e14f24, #fb7f2a);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(225, 79, 36, 0.4);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#back-to-top.b-show_scrollBut {
  opacity: 1;
  visibility: visible;
}

#back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(225, 79, 36, 0.5);
}

/* ===== FADE-IN ANIMATION FOR NEWS ITEMS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-item {
  animation: fadeInUp 0.5s ease forwards;
}

.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:nth-child(4) { animation-delay: 0.2s; }
.news-item:nth-child(5) { animation-delay: 0.25s; }
.news-item:nth-child(6) { animation-delay: 0.3s; }
.news-item:nth-child(7) { animation-delay: 0.35s; }
.news-item:nth-child(8) { animation-delay: 0.4s; }
.news-item:nth-child(9) { animation-delay: 0.45s; }

/* ===== CATEGORY FILTER BUTTONS (sidebar) ===== */
.category-btn.active {
  background: linear-gradient(135deg, #e14f24, #fb7f2a);
  color: #fff;
  box-shadow: 0 4px 15px rgba(225, 79, 36, 0.3);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state i {
  color: #cbd5e1;
  margin-bottom: 16px;
}

.empty-state h5 {
  color: #64748b;
  font-weight: 600;
}

.empty-state p {
  color: #94a3b8;
  font-size: 14px;
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
:focus-visible {
  outline: 3px solid #05cc9b;
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== PRINT STYLES ===== */
@media print {
  .header,
  .breaking-ticker,
  .hero-section,
  .sidebar,
  .content-selector,
  .contact-section,
  .footer,
  .loader_bg {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .news-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-content {
    animation: none;
    white-space: normal;
  }
}

/* ===== DARK MODE SUPPORT (future toggle) ===== */
body.dark-mode {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-color: #334155;
}

body.dark-mode .news-card {
  background: var(--bg-card);
  border-color: var(--border-color);
}

body.dark-mode .sidebar {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

body.dark-mode .content-selector {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

body.dark-mode .card-title {
  color: var(--text-primary);
}

body.dark-mode .card-excerpt {
  color: var(--text-secondary);
}

body.dark-mode .sidebar-link {
  color: var(--text-secondary);
}

body.dark-mode .sidebar-link:hover {
  background: rgba(225, 79, 36, 0.1);
  color: #fb7f2a;
}
