/* Novedades / Updates — lista, detalle y editor. */

.news-page-head { align-items: flex-end; }
.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.news-search { flex: 1 1 300px; max-width: 460px; }
.news-search .input { width: 100%; }
.news-list-loading { opacity: .55; transition: opacity .12s ease; }
.news-feature { margin-bottom: 18px; }
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.news-card {
  --news-accent: var(--accent);
  --news-soft: var(--accent-soft);
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 0% 0%, var(--news-soft), transparent 58%),
    var(--surface);
  box-shadow: 0 14px 38px rgba(0, 0, 0, .12);
  min-width: 0;
}
.news-card.is-hero {
  padding: 24px;
  border-radius: 20px;
  align-items: flex-start;
}
.news-card-icon,
.news-detail-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  color: var(--news-accent);
  background: var(--news-soft);
  border: 1px solid color-mix(in srgb, var(--news-accent) 26%, transparent);
}
.news-card.is-hero .news-card-icon { width: 56px; height: 56px; border-radius: 16px; }
.news-card-icon svg { width: 22px; height: 22px; }
.news-card.is-hero .news-card-icon svg { width: 27px; height: 27px; }
.news-card-body { min-width: 0; flex: 1; }
.news-kicker {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.news-kicker span { color: var(--muted-2); }
.news-card h3 {
  margin: 7px 0 6px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -.01em;
}
.news-card.is-hero h3 { font-size: clamp(20px, 2.5vw, 29px); max-width: 25ch; }
.news-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.news-card.is-hero p { max-width: 72ch; font-size: 13px; }
.news-card-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}
.news-byline { display: inline-flex; align-items: center; gap: 5px; color: var(--muted-2); font-size: 10.5px; }
.news-byline svg { width: 12px; height: 12px; }
.news-voice-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--news-accent) 14%, transparent);
  color: var(--news-accent);
  font-size: 10px;
  font-weight: 600;
}
.news-voice-pill svg { width: 11px; height: 11px; }
.news-voice-pill.is-off { color: var(--muted-2); background: var(--bg-soft); }
.news-voice-play { border: 0; cursor: pointer; font: inherit; }
.news-voice-play:hover { filter: brightness(1.15); }
.news-read-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  color: var(--news-accent);
  font-size: 11.5px;
  font-weight: 650;
  text-decoration: none;
}
.news-read-link svg { width: 13px; height: 13px; transition: transform .15s ease; }
.news-read-link:hover svg { transform: translateX(3px); }
.news-more { display: flex; justify-content: center; margin: 20px 0 6px; }

.news-tone-accent { --news-accent: #ff6b6b; --news-soft: rgba(255, 107, 107, .13); }
.news-tone-green { --news-accent: #4ade80; --news-soft: rgba(74, 222, 128, .12); }
.news-tone-cyan { --news-accent: #22d3ee; --news-soft: rgba(34, 211, 238, .12); }
.news-tone-violet { --news-accent: #a78bfa; --news-soft: rgba(167, 139, 250, .13); }
.news-tone-amber { --news-accent: #fbbf24; --news-soft: rgba(251, 191, 36, .12); }
.news-tone-rose { --news-accent: #fb7185; --news-soft: rgba(251, 113, 133, .13); }

/* Detalle */
.news-detail-shell { max-width: 860px; margin: 0 auto; }
.news-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}
.news-back:hover { color: var(--text); }
.news-back svg { width: 14px; height: 14px; }
.news-detail {
  --news-accent: var(--accent);
  --news-soft: var(--accent-soft);
  position: relative;
  padding: clamp(22px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(100% 60% at 100% 0%, var(--news-soft), transparent 55%),
    var(--surface);
  overflow: hidden;
}
.news-detail::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--news-accent), transparent);
  opacity: .8;
}
.news-detail-icon { width: 54px; height: 54px; border-radius: 16px; margin-bottom: 18px; }
.news-detail h1 {
  margin: 10px 0 12px;
  color: var(--text);
  font-size: clamp(25px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -.025em;
  max-width: 24ch;
}
.news-detail-summary {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 68ch;
}
.news-detail-body { margin-top: 26px; color: var(--text-2); font-size: 14px; line-height: 1.82; }
.news-detail-body p { margin: 0 0 16px; max-width: 72ch; }
.news-detail-body p:last-child { margin-bottom: 0; }
.news-detail-foot {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-2);
  font-size: 11px;
}
.news-detail-foot span { display: inline-flex; align-items: center; gap: 5px; }
.news-detail-foot svg { width: 13px; height: 13px; }

/* Reproductor de lectura y seguimiento */
.news-player {
  --player-accent: var(--news-accent, var(--accent));
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--player-accent) 28%, var(--line));
  border-radius: 18px;
  background:
    radial-gradient(120% 120% at 0% 0%, color-mix(in srgb, var(--player-accent) 14%, transparent), transparent 54%),
    linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 48%),
    var(--surface);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .18);
  overflow: hidden;
}
.news-player::before {
  content: '';
  position: absolute;
  top: -70px;
  left: -55px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--player-accent) 16%, transparent);
  filter: blur(34px);
  pointer-events: none;
}
.news-player > * { position: relative; z-index: 1; }
.news-player > audio { display: none; }
.news-player-play {
  align-self: center;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--player-accent) 76%, #fff 12%);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--player-accent) 82%, #fff 18%), var(--player-accent));
  box-shadow: 0 10px 26px color-mix(in srgb, var(--player-accent) 30%, transparent);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.news-player-play:hover { transform: scale(1.045); filter: brightness(1.06); box-shadow: 0 12px 30px color-mix(in srgb, var(--player-accent) 38%, transparent); }
.news-player-play:active { transform: scale(.97); }
.news-player-play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.news-player.is-playing .news-player-play { box-shadow: 0 0 0 5px color-mix(in srgb, var(--player-accent) 13%, transparent), 0 12px 30px color-mix(in srgb, var(--player-accent) 38%, transparent); }
.news-player-core { min-width: 0; display: grid; align-content: center; gap: 5px; }
.news-player-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.news-player-kicker { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--text); font-size: 11px; font-weight: 700; letter-spacing: .01em; }
.news-player-kicker > svg { width: 14px; height: 14px; color: var(--player-accent); flex: none; }
.news-player-sync {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--player-accent);
  background: color-mix(in srgb, var(--player-accent) 12%, transparent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.news-player-sync svg { width: 10px; height: 10px; }
.news-player-time { color: var(--muted-2); font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-player-sep { margin: 0 4px; opacity: .55; }
.news-player-track {
  position: relative;
  height: 22px;
  margin: 2px 0;
  cursor: pointer;
  touch-action: none;
  outline: none;
}
.news-player-track::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, .09);
}
.news-player-progress {
  position: absolute;
  top: 50%;
  left: 0;
  width: 0;
  height: 5px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--player-accent) 72%, #fff 8%), var(--player-accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--player-accent) 30%, transparent);
  pointer-events: none;
}
.news-player-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%);
  border: 2px solid var(--player-accent);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--player-accent) 14%, transparent);
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: none;
}
.news-player:hover .news-player-thumb,
.news-player.is-playing .news-player-thumb,
.news-player-track:focus-visible .news-player-thumb { opacity: 1; }
.news-player-track:focus-visible::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 8px;
  outline: 2px solid color-mix(in srgb, var(--player-accent) 45%, transparent);
  outline-offset: 1px;
}
.news-player-bottom { display: flex; align-items: center; gap: 10px; min-width: 0; }
.news-player-caption {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.news-player-tools { display: flex; align-items: center; gap: 3px; flex: none; }
.news-player-tool {
  display: grid;
  place-items: center;
  min-width: 29px;
  height: 27px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font: inherit;
  font-size: 9.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.news-player-tool:hover { color: var(--text); background: rgba(255, 255, 255, .07); border-color: var(--line); }
.news-player-tool svg { width: 13px; height: 13px; }
.news-player-speed { min-width: 35px; }
.news-player.is-compact { grid-template-columns: 48px minmax(0, 1fr); gap: 11px; padding: 12px; border-radius: 14px; margin-top: 0; }
.news-player.is-compact .news-player-play { width: 46px; height: 46px; }
.news-player.is-compact .news-player-play svg { width: 19px; height: 19px; }
.news-player.is-compact .news-player-skip { display: none; }
.news-player.is-compact .news-player-kicker { font-size: 10px; }
.news-player.is-compact .news-player-caption { font-size: 9.5px; }
.news-player.is-compact .news-player-tool { height: 25px; min-width: 27px; }
@media (max-width: 560px) {
  .news-player { grid-template-columns: 48px minmax(0, 1fr); padding: 12px; gap: 11px; }
  .news-player-play { width: 46px; height: 46px; }
  .news-player-play svg { width: 19px; height: 19px; }
  .news-player-sync { display: none; }
  .news-player-caption { display: none; }
  .news-player-skip { display: none; }
}

.news-cue {
  border-radius: 4px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.news-cue.is-speaking {
  color: var(--text);
  background: color-mix(in srgb, var(--news-accent) 24%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--news-accent) 20%, transparent);
}
.news-detail h1 .news-cue.is-speaking { box-shadow: 0 0 0 5px color-mix(in srgb, var(--news-accent) 18%, transparent); }

/* Seguimiento dentro del editor */
.news-live-preview {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  transition: opacity .18s ease;
}
.news-live-preview.is-outdated { opacity: .58; }
.news-live-preview-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.news-live-preview-title { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 11.5px; font-weight: 700; }
.news-live-preview-title svg { width: 14px; height: 14px; color: var(--news-accent); }
.news-live-preview-head p { margin: 3px 0 0; color: var(--muted-2); font-size: 10px; line-height: 1.5; }
.news-live-preview-empty {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted-2);
  background: var(--bg-soft);
  font-size: 11px;
}
.news-live-preview-empty svg { width: 15px; height: 15px; flex: none; }
.news-live-preview-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  color: #ffd2a6;
  background: rgba(251, 191, 36, .09);
  font-size: 10px;
  line-height: 1.45;
}
.news-live-preview-note[hidden] { display: none; }
.news-live-preview-note svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.news-live-preview-article {
  max-height: 270px;
  margin-top: 12px;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--bg-soft);
  scroll-behavior: smooth;
}
.news-live-preview-article h3 { margin: 0 0 9px; color: var(--text); font-size: 15px; line-height: 1.35; }
.news-live-preview-article .news-detail-body { margin-top: 0; font-size: 12px; line-height: 1.7; }
.news-live-preview-article .news-detail-body p { margin-bottom: 10px; }
.news-live-preview-article .news-cue.is-speaking { background: color-mix(in srgb, var(--news-accent) 22%, transparent); }

/* Audio sin lectura */
.news-no-voice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 10.5px;
}
.news-no-voice svg { width: 13px; height: 13px; }

/* Administración */
.news-admin-stats { margin-bottom: 16px; }
.news-admin-title { display: flex; align-items: flex-start; gap: 9px; min-width: 230px; }
.news-admin-title > svg { width: 18px; height: 18px; margin-top: 2px; color: var(--accent); flex: none; }
.news-admin-title b { display: block; color: var(--text); font-size: 12.5px; line-height: 1.35; }
.news-admin-table .news-admin-title { min-width: 0; }
.news-admin-table .news-admin-title .tiny {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.news-admin-table td.actions { white-space: nowrap; }
.news-admin-table td:nth-child(3) { white-space: nowrap; }
.news-editor { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.news-editor-main { min-width: 0; }
.news-editor-side {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-soft);
}
.news-editor-side .field { margin-bottom: 11px; }
.textarea-news { min-height: 280px; resize: vertical; line-height: 1.65; }
.news-audio-panel {
  margin: 12px 0;
  padding: 11px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.news-audio-panel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}
.news-audio-panel-head svg { width: 14px; height: 14px; color: var(--violet, #a78bfa); }
.news-error { color: #ffb3ae; font-size: 11px; margin-top: 6px; }
.news-editor-side .check { margin-bottom: 8px; }
@media (max-width: 1180px) {
  .news-admin-table,
  .news-admin-table tbody { display: block; min-width: 0; }
  .news-admin-table thead { display: none; }
  .news-admin-table tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line-soft);
  }
  .news-admin-table tbody tr:last-child { border-bottom: 0; }
  .news-admin-table td { display: block; padding: 0; border: 0; }
  .news-admin-table td:first-child { flex: 1 1 100%; }
  .news-admin-table td:nth-child(3) { flex: 1 1 180px; }
  .news-admin-table td.actions { margin-left: auto; justify-content: flex-end; }
}
@media (max-width: 900px) {
  .news-editor { grid-template-columns: minmax(0, 1fr); }
  .news-card h3 { font-size: 15px; }
  .news-card.is-hero h3 { font-size: 21px; }
}
