/* Noticias IA — marquesina del home y grid de /noticias · IDEA Consultoría Digital */

/* ---------- Marquesina (home) ---------- */

.news-ticker {
  position: relative;
  height: 62px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.news-ticker-label {
  position: relative;
  z-index: 2;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 100%;
  padding: 0 22px 0 24px;
  background: var(--brand-deep);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.news-ticker-label::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  bottom: 0;
  width: 34px;
  background: linear-gradient(90deg, rgba(22,40,92,0.9), rgba(22,40,92,0));
  pointer-events: none;
}
.news-ticker-body {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  overflow: hidden;
}
@keyframes news-marq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.news-marq-track {
  display: flex;
  width: max-content;
  will-change: transform;
  animation: news-marq var(--news-marq-dur, 60s) linear infinite;
}
.news-ticker:hover .news-marq-track,
.news-ticker:focus-within .news-marq-track { animation-play-state: paused; }
.news-item {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  padding: 0 26px;
  text-decoration: none;
  white-space: nowrap;
}
.news-item .nt-src {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--gold);
}
.news-item .nt-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 16.5px;
  color: #fff;
}
.news-item:hover .nt-title { text-decoration: underline; text-underline-offset: 3px; }
.news-sep { color: var(--gold); align-self: center; font-size: 11px; }
.news-ticker-cta {
  display: inline-flex;
  align-items: center;
  padding: 0 26px;
  text-decoration: none;
  white-space: nowrap;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15.5px;
  color: var(--gold);
}
.news-ticker-cta:hover { text-decoration: underline; text-underline-offset: 3px; }
.news-ticker-fallback {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 0 26px;
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  .news-marq-track { animation: none; }
  .news-ticker-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 760px) {
  .news-ticker-label { padding: 0 14px; font-size: 10.5px; }
  .news-item .nt-title { font-size: 15px; }
}
@media (max-width: 640px) {
  .news-ticker-fallback .nt-title { display: none; }
}

/* ---------- Página /noticias ---------- */

.news-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.news-pill {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 100px;
  cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.news-pill:hover { color: var(--ink-2); border-color: var(--brand); }
.news-pill.activa {
  background: var(--brand-grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(32,63,142,0.28);
}
.news-src-select {
  margin-left: auto;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 9px 16px;
  cursor: pointer;
}
html.dark .idea2 .news-src-select { background: #101830; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 1000px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .news-grid { grid-template-columns: 1fr; } }

.news-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 24px 22px;
  box-shadow: 0 10px 30px rgba(32,63,142,0.05);
  transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s ease;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(32,63,142,0.16);
}
.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.news-card-src {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--brand);
  text-transform: uppercase;
}
html.dark .idea2 .news-card-src { color: #8FA8E0; }
.news-card-date {
  font-size: 12.5px;
  color: var(--muted-2);
  white-space: nowrap;
}
.news-card-title {
  margin: 0 0 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 18.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.news-card-title a {
  text-decoration: none;
  color: var(--ink-2);
  transition: color .2s ease;
}
.news-card-title a:hover { color: var(--brand); }
html.dark .idea2 .news-card-title a:hover { color: #8FA8E0; }
.news-card-excerpt {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.news-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
}
.news-badge-ia { color: var(--gold-ink); background: var(--gold-bg); }
.news-badge-tech { color: var(--brand); background: var(--card-soft); border: 1px solid var(--line); }
html.dark .idea2 .news-badge-tech { color: #8FA8E0; }
.news-card-go {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
}
html.dark .idea2 .news-card-go { color: #8FA8E0; }
.news-card-go:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Skeletons */
@keyframes news-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.news-skel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--card);
  animation: news-pulse 1.4s ease-in-out infinite;
}
.news-skel > div {
  height: 12px;
  border-radius: 6px;
  background: var(--line);
  margin-bottom: 12px;
}
.news-skel .sk-title { height: 18px; width: 90%; }
.news-skel .sk-line2 { width: 70%; }
.news-skel .sk-meta { width: 40%; }
@media (prefers-reduced-motion: reduce) { .news-skel { animation: none; } }

/* Estados */
.news-estado {
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  font-size: 15.5px;
}
.news-retry {
  margin-top: 18px;
  display: inline-block;
  background: var(--brand-grad);
  color: #fff;
  border: none;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 26px;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(32,63,142,0.26);
}
.news-more-wrap { text-align: center; margin-top: 34px; }
.news-more {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .2s ease, color .2s ease;
}
.news-more:hover { border-color: var(--brand); color: var(--brand); }
