/* Noticias y panel: estilos sobre el diseño de Notica (body.pn, ver ../portada.css) */
body.pn .nt-main { max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
body.pn .nt-main h1 { font-size: 1.6rem; margin: 8px 0 16px; }
body.pn .nt-main h2 { font-size: 1.15rem; margin: 20px 0 8px; }
body.pn .nt-volver { color: var(--pn-link); font-size: 14px; }

/* Filtros y formularios */
body.pn .filtros { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
body.pn select, body.pn input, body.pn textarea { width: 100%; box-sizing: border-box; padding: 10px; margin-top: 4px; font: inherit; color: var(--pn-texto); background: var(--pn-nav); border: 1px solid var(--pn-borde-fuerte); border-radius: 10px; }
body.pn .filtros select { width: auto; flex: 1; min-width: 160px; margin-top: 0; }
body.pn label { display: block; margin-top: 12px; font-size: 0.9rem; color: var(--pn-texto2); }
body.pn button { margin-top: 12px; padding: 10px 18px; font: inherit; font-weight: 600; border: 0; border-radius: 999px; background: var(--pn-acento); color: #1a1a1a; cursor: pointer; }
body.pn button.sec { background: var(--pn-sec); color: var(--pn-texto); }
body.pn .error { color: var(--pn-error); margin-top: 8px; }
body.pn .ok { color: var(--pn-ok); margin-top: 8px; }
body.pn ul { padding-left: 18px; }
body.pn li { margin-bottom: 8px; }

/* Tarjetas de noticias */
body.pn article { background: var(--pn-card); border: 1px solid var(--pn-borde); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
body.pn article h2 { margin: 8px 0 4px; font-size: 1.2rem; }
body.pn article p { color: var(--pn-texto2); line-height: 1.5; }
body.pn .etiqueta { display: inline-block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--pn-acento); }
body.pn .meta { color: var(--pn-muted); font-size: 0.85rem; margin: 4px 0 10px; }
body.pn .evento { background: var(--pn-nav); padding: 8px 10px; border-radius: 10px; margin-bottom: 10px; font-size: 0.95rem; }
body.pn .video { position: relative; padding-bottom: 56.25%; height: 0; margin: 10px 0; }
body.pn .video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; border-radius: 10px; }
body.pn .fuentes { font-size: 0.85rem; color: var(--pn-muted); border-top: 1px solid var(--pn-borde); margin-top: 10px; padding-top: 8px; }
body.pn .fuentes ul { margin: 4px 0 0; }
body.pn .nt-main a { color: var(--pn-link); }

/* Panel: las cajas usan la misma tarjeta de la portada */
body.pn section.caja { background: var(--pn-card); border: 1px solid var(--pn-borde); border-radius: 16px; padding: 16px; margin-top: 16px; }

/* Panel responsivo: separacion entre botones y apilado en pantallas angostas */
body.pn button { margin-right: 8px; max-width: 100%; }
body.pn section.caja p { overflow-wrap: anywhere; }
body.pn input[type="checkbox"], body.pn input[type="radio"] { width: auto; }
@media (max-width: 520px) {
  body.pn .nt-main { padding: 8px 12px 32px; }
  body.pn section.caja button { display: block; width: 100%; margin-right: 0; }
}

/* Pendientes: el titulo ocupa su propia linea y los botones van debajo */
body.pn .pend-titulo { display: block; overflow-wrap: anywhere; }
body.pn .pend-titulo + button { margin-top: 8px; }

/* Carrusel de fotos en la nota */
body.pn .carrusel { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; margin: 12px 0 4px; border-radius: 12px; }
body.pn .carrusel img { flex: 0 0 100%; width: 100%; height: 420px; object-fit: contain; background: #0a1626; scroll-snap-align: center; border-radius: 12px; }
body.pn .carrusel-pie { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
body.pn .carrusel-cont { font-size: 0.85rem; color: var(--pn-muted); min-width: 52px; text-align: center; }
body.pn .carrusel-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pn-borde); background: var(--pn-card); color: var(--pn-texto); font-size: 1.4rem; line-height: 1; cursor: pointer; }
body.pn .carrusel-btn:hover { border-color: var(--pn-acento); color: var(--pn-acento); }

/* Pagina de una nota: estilo editorial */
body.pn article.nota { background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; }
body.pn article.nota > img.imagen-noticia { order: -1; width: 100%; max-height: 460px; object-fit: cover; border-radius: 16px; margin: 4px 0 20px; }
body.pn article.nota > .carrusel { order: -1; margin: 4px 0 4px; }
body.pn article.nota > .carrusel-pie { order: -1; margin-bottom: 20px; }
body.pn article.nota .etiqueta { align-self: flex-start; padding: 4px 10px; border: 1px solid var(--pn-acento); border-radius: 999px; }
body.pn article.nota h1 { font-family: 'Crimson Pro', Georgia, serif; font-size: 2.3rem; line-height: 1.12; font-weight: 700; margin: 14px 0 8px; }
body.pn article.nota .meta { font-size: 0.95rem; margin: 0 0 22px; padding-bottom: 16px; border-bottom: 1px solid var(--pn-borde); }
body.pn article.nota > p { font-family: 'Crimson Pro', Georgia, serif; font-size: 1.28rem; line-height: 1.7; color: var(--pn-texto); margin: 0 0 1.1em; }
body.pn article.nota > p:first-of-type { font-size: 1.45rem; line-height: 1.55; }
body.pn .mas { margin-top: 32px; }
body.pn .mas h2 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pn-muted); }
body.pn .nt-main .mas a { display: block; padding: 14px 0; border-bottom: 1px solid var(--pn-borde); text-decoration: none; color: var(--pn-texto); }
body.pn .mas-titulo { display: block; font-family: 'Crimson Pro', Georgia, serif; font-size: 1.25rem; line-height: 1.3; }
body.pn .mas-fecha { display: block; margin-top: 4px; font-size: 0.85rem; color: var(--pn-muted); }
@media (max-width: 520px) {
  body.pn article.nota h1 { font-size: 1.85rem; }
  body.pn article.nota > p { font-size: 1.18rem; }
  body.pn article.nota > p:first-of-type { font-size: 1.3rem; }
}
body.pn img.imagen-cuerpo { display: block; width: 100%; max-width: 560px; max-height: 520px; object-fit: contain; margin: 18px auto; border-radius: 12px; background: #0a1626; }
body.pn a.tarjeta-img-enlace { display: block; margin: -4px 0 12px; }
body.pn img.tarjeta-img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: #0a1626; }

/* Reproductores de video incrustados (archivo, Facebook, TikTok, Instagram, Vimeo) */
body.pn .video video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 10px; background: #000; object-fit: contain; }
body.pn .video.vertical { max-width: 360px; height: 640px; padding-bottom: 0; margin: 10px auto; }

/* Compartir: discreto, una sola fila */
body.pn .compartir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 4px; padding-top: 14px; border-top: 1px solid var(--pn-borde); }
body.pn .compartir .comp-tit { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pn-muted); }
body.pn .compartir .comp-fila { display: flex; align-items: center; gap: 8px; }
body.pn .nt-main .compartir .comp-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; margin: 0; border: 1px solid var(--pn-borde); border-radius: 50%; background: transparent; color: var(--pn-muted); text-decoration: none; cursor: pointer; box-sizing: border-box; opacity: 0.85; transition: opacity .15s, background .15s, border-color .15s, color .15s; }
body.pn .compartir .comp-btn:hover, body.pn .compartir .comp-btn:focus-visible { opacity: 1; border-color: transparent; color: #fff; }
body.pn .compartir .comp-btn img.rs-ico { display: block; width: 16px; height: 16px; }
body.pn .compartir .comp-btn.rs-wa:hover { background: #25d366; }
body.pn .compartir .comp-btn.rs-fb:hover { background: #1877f2; }
body.pn .compartir .comp-btn.rs-tg:hover { background: #229ed9; }
body.pn .compartir .comp-btn.rs-x:hover { background: #000; }
body.pn .compartir .comp-btn.rs-nat:hover, body.pn .compartir .comp-btn.rs-copia:hover { background: var(--pn-acento); color: #06210f; }
body.pn .compartir .comp-btn.ok { background: var(--pn-acento); color: #06210f; border-color: transparent; }

/* ===== Fuentes y creditos al final de articulos ===== */
body.pn .fuentes { margin: 24px 0 0; padding-top: 14px; border-top: 1px solid var(--pn-borde); }
body.pn .fuentes .fuentes-tit { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pn-muted); margin: 0 0 8px; }
body.pn .fuentes .fuentes-lista { margin: 0; padding-left: 1.2em; font-size: 0.9rem; color: var(--pn-texto2); }
body.pn .fuentes .fuentes-lista li { margin: 0 0 4px; overflow-wrap: anywhere; }
body.pn .fuentes .fuentes-lista a { color: var(--pn-texto2); text-decoration: underline; }
body.pn .fuentes .creditos { margin: 10px 0 0; font-size: 0.82rem; color: var(--pn-muted); }

/* ===== Lista unificada: noticias y articulos ===== */
body.pn .nt-main.nt-ancho { max-width: 1080px; }
body.pn .nt-main.nt-ancho h1 { font-family: 'Crimson Pro', Georgia, serif; font-size: 2.1rem; line-height: 1.1; margin: 8px 0 14px; }
body.pn .nt-ancho .filtros { margin-bottom: 18px; }
body.pn .nt-ancho .filtros select { max-width: 320px; }

/* Chips de tipo: una fila que se desliza en celular */
body.pn .nt-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
body.pn .nt-chips::-webkit-scrollbar { display: none; }
body.pn .nt-chips button.nt-chip { flex: 0 0 auto; margin: 0; padding: 8px 16px; font-size: 0.9rem; font-weight: 600; border: 1px solid var(--pn-borde-fuerte); background: transparent; color: var(--pn-texto2); border-radius: 999px; transition: background .15s, border-color .15s, color .15s; }
body.pn .nt-chips button.nt-chip:hover { border-color: var(--pn-acento); color: var(--pn-texto); }
body.pn .nt-chips button.nt-chip[aria-pressed="true"] { background: var(--pn-acento); border-color: var(--pn-acento); color: #1a1a1a; }

/* Cuadricula */
body.pn .nt-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { body.pn .nt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { body.pn .nt-grid { grid-template-columns: repeat(3, 1fr); } }

body.pn .nt-grid article.nt-tarjeta { display: flex; flex-direction: column; padding: 0; margin: 0; overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; }
body.pn .nt-grid article.nt-tarjeta:hover { transform: translateY(-3px); border-color: var(--pn-acento); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
body.pn .nt-tarjeta a.tarjeta-img-enlace { margin: 0; }
body.pn .nt-tarjeta img.tarjeta-img { border-radius: 0; transition: transform .35s; }
body.pn .nt-tarjeta:hover img.tarjeta-img { transform: scale(1.03); }
body.pn .nt-tarjeta a.tarjeta-img-enlace { overflow: hidden; }
body.pn .nt-tarjeta a.sin-portada { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--pn-nav), var(--pn-card)); color: var(--pn-acento); font-size: 2.6rem; text-decoration: none; }

body.pn .tarjeta-cuerpo { display: flex; flex-direction: column; flex: 1; padding: 14px 16px 16px; }
body.pn .nt-tarjeta h2 { font-family: 'Crimson Pro', Georgia, serif; font-size: 1.35rem; line-height: 1.2; margin: 8px 0 4px; }
body.pn .nt-main .nt-tarjeta a.titulo-enlace { color: var(--pn-texto); text-decoration: none; }
body.pn .nt-main .nt-tarjeta a.titulo-enlace:hover { color: var(--pn-link); }
body.pn .nt-tarjeta p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.95rem; margin: 6px 0 12px; }
body.pn .nt-tarjeta .leer-mas { margin-top: auto; font-weight: 600; font-size: 0.9rem; text-decoration: none; }

/* Tarjeta destacada: ocupa todo el ancho; horizontal en pantallas grandes */
body.pn .nt-grid article.nt-tarjeta.destacada { grid-column: 1 / -1; }
body.pn .nt-tarjeta.destacada h2 { font-size: 1.65rem; }
@media (min-width: 860px) {
  body.pn .nt-grid article.nt-tarjeta.destacada { flex-direction: row; }
  body.pn .nt-tarjeta.destacada a.tarjeta-img-enlace { flex: 0 0 58%; min-height: 320px; }
  body.pn .nt-tarjeta.destacada img.tarjeta-img { height: 100%; aspect-ratio: auto; }
  body.pn .nt-tarjeta.destacada a.sin-portada { aspect-ratio: auto; }
  body.pn .nt-tarjeta.destacada .tarjeta-cuerpo { justify-content: center; padding: 28px; }
  body.pn .nt-tarjeta.destacada h2 { font-size: 2.1rem; }
  body.pn .nt-tarjeta.destacada p { -webkit-line-clamp: 4; font-size: 1.02rem; }
  body.pn .nt-tarjeta.destacada .leer-mas { margin-top: 6px; }
}

/* Ver mas */
body.pn .nt-mas { text-align: center; margin-top: 24px; }
body.pn .nt-mas button.sec { padding: 10px 30px; border: 1px solid var(--pn-borde-fuerte); }
body.pn .nt-mas button.sec:hover { border-color: var(--pn-acento); }

@media (prefers-reduced-motion: reduce) {
  body.pn .nt-grid article.nt-tarjeta, body.pn .nt-tarjeta img.tarjeta-img { transition: none; }
  body.pn .nt-grid article.nt-tarjeta:hover, body.pn .nt-tarjeta:hover img.tarjeta-img { transform: none; }
}

/* Visor de fotos en pantalla completa */
body.pn article.nota img.imagen-noticia, body.pn article.nota img.imagen-cuerpo { cursor: zoom-in; }
.visor { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(5, 10, 20, 0.94); }
.visor-img { max-width: 96vw; max-height: 88vh; object-fit: contain; border-radius: 6px; user-select: none; -webkit-user-drag: none; }
.visor button { position: absolute; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.12); color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.visor button:hover { background: rgba(255, 255, 255, 0.25); }
.visor-cerrar { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.visor-ant { left: 10px; top: 50%; transform: translateY(-50%); }
.visor-sig { right: 10px; top: 50%; transform: translateY(-50%); }
.visor-cont { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.9rem; background: rgba(0, 0, 0, 0.45); padding: 4px 12px; border-radius: 999px; }

/* Sigue leyendo: tarjetas al final de una noticia o articulo */
body.pn .sigue { margin-top: 40px; }
body.pn .sigue > h2 { font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pn-muted); margin: 0 0 14px; }
@media (min-width: 640px) { body.pn .sigue .nt-grid { grid-template-columns: repeat(2, 1fr); } }
body.pn .nt-main .sigue-todas { display: block; text-align: center; margin-top: 18px; font-weight: 600; text-decoration: none; }

/* Listas del panel (noticias y articulos): filas compactas con miniatura */
body.pn #listaPendientes,
body.pn #listaPublicadas,
body.pn #listaPublicados { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; }
body.pn #listaPendientes li,
body.pn #listaPublicadas li,
body.pn #listaPublicados li { margin: 0; padding: 10px; display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; background: var(--pn-card); border: 1px solid var(--pn-borde); border-radius: 14px; cursor: pointer; transition: border-color .15s; }
body.pn #listaPendientes li:hover,
body.pn #listaPublicadas li:hover,
body.pn #listaPublicados li:hover { border-color: var(--pn-acento); }
body.pn #listaPendientes li:focus-visible,
body.pn #listaPublicadas li:focus-visible,
body.pn #listaPublicados li:focus-visible { outline: 2px solid var(--pn-acento); outline-offset: 2px; }
body.pn .fila-thumb { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; background: var(--pn-chip); display: block; }
body.pn .fila-thumb.vacia { display: flex; align-items: center; justify-content: center; color: var(--pn-muted); font-size: 1.6rem; font-weight: 700; }
body.pn .fila-cuerpo { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
body.pn .fila-titulo { margin: 0; font-weight: 600; line-height: 1.3; color: var(--pn-texto); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
body.pn .fila-extracto { margin: 0; font-size: 0.85rem; line-height: 1.4; color: var(--pn-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
body.pn .fila-meta { display: flex; flex-wrap: wrap; gap: 6px; }
body.pn .fila-chip { padding: 3px 10px; border-radius: 999px; background: var(--pn-chip); color: var(--pn-texto2); font-size: 0.78rem; }
body.pn .fila-chip.auto { background: transparent; border: 1px solid var(--pn-acento); color: var(--pn-acento); }
@media (max-width: 480px) {
  body.pn #listaPendientes li,
  body.pn #listaPublicadas li,
  body.pn #listaPublicados li { grid-template-columns: 64px 1fr; gap: 12px; }
  body.pn .fila-thumb { width: 64px; height: 64px; }
}
