/* 13 · Novedades
   El tablero de avisos, videos y publicaciones.

   Los archivos de css/ se cargan en orden, del 01 al 16 (public/partes/
   cabeza.html). Con el mismo selector, gana el archivo que va después. */

/* --- Novedades: tablero ---------------------------------------------------------
   Como Pinterest (D54, D55): columnas de alto libre donde manda la imagen o el
   video, entero (el afiche vertical no se corta), con lo justo debajo y siempre
   a la vista: de donde viene, el titulo y una frase. Sin caja alrededor: el
   borde fino es de la imagen. js/novedades.js reparte las fichas por filas en
   2 columnas, o 3 desde 900 px, asi la mas nueva queda arriba a la izquierda.
   Antes cada ficha era una caja con una tabla de datos (26 y 30 de octubre). */
.nov-gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.nov-col { display: grid; gap: 28px; align-content: start; min-width: 0; }

.nov-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--color-text);
  text-decoration: none;
}

.nov-tile:focus-visible,
.nov-media:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 4px; border-radius: var(--radius); }
.nov-media { display: block; }

/* Con width y height en la etiqueta, el navegador guarda el lugar de la foto
   o el video antes de que cargue y el tablero no salta. */
.nov-img,
.nov-video,
.nov-cover {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  transition: border-color 0.25s ease;
}

.nov-video { background: var(--color-ink-soft); cursor: pointer; }

/* Al pasar por una ficha que lleva a algun lado, el borde de su imagen se
   aclara (blanco en el tema oscuro, nunca azul) y el titulo se subraya. */
a.nov-tile:hover :is(.nov-img, .nov-video, .nov-cover),
.nov-media:hover .nov-img { border-color: var(--color-text-muted); }
a.nov-tile:hover .nov-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Novedad sin foto: portada tipografica, como un afiche. */
.nov-cover {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 4 / 5;
  padding: 22px 20px;
  background: var(--color-ink-soft);
}

.nov-cover-date {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a9a9b1;
}

.nov-cover-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
  line-height: 1.02;
  text-transform: uppercase;
  color: #ffffff;
}

/* Lo de debajo de la imagen: de donde viene, el titulo y una frase. */
.nov-info { display: flex; flex-direction: column; padding: 0 2px; }

.nov-kicker {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.nov-title {
  margin: 2px 0 0;
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.25rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  text-wrap: balance;
}

.nov-text {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.nov-note { margin: 8px 0 0; font-size: 0.85rem; line-height: 1.5; color: var(--color-text-muted); }

/* "Ver en Instagram", "Leer nota" o el enlace del aviso. */
.nov-more {
  align-self: flex-start;
  margin-top: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.nov-more:hover { text-decoration-thickness: 2px; }

/* --- Videos (D61) -------------------------------------------------------------
   La portada con el boton de reproducir: un cuadro oscuro con el triangulo,
   que se entiende sin texto. Al tocarlo se abre el reproductor grande. */
.nov-play-media {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.nov-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 64px;
  height: 64px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(242, 242, 243, 0.55);
  border-radius: var(--radius);
  background: rgba(15, 15, 17, 0.72);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nov-play::after {
  content: '';
  position: absolute;
  top: 20px;
  left: 25px;
  border-style: solid;
  border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #f2f2f3;
}
.nov-play-media:hover .nov-play { border-color: #ffffff; background: rgba(15, 15, 17, 0.9); }
/* La portada de un video sin foto: vertical, como los videos de las redes. */
.nov-cover--video { aspect-ratio: 3 / 4; }
.nov-cover-red { font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem); line-height: 1; text-transform: uppercase; color: rgba(242, 242, 243, 0.4); }
.nov-play-media:hover :is(.nov-img, .nov-cover) { border-color: var(--color-text-muted); }
.nov-play-media:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 4px; border-radius: var(--radius); }

/* El reproductor grande, encima de la pagina. Su ancho lo pone
   js/novedades.js segun la proporcion del video y el alto de la pantalla. */
.reproductor { max-width: none; max-height: none; padding: 0; overflow: visible; border: 0; background: transparent; color: #f2f2f3; }
.reproductor::backdrop { background: rgba(10, 10, 12, 0.88); }
.reproductor-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.reproductor-titulo {
  margin: 0;
  overflow: hidden;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: #f2f2f3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reproductor-cerrar {
  flex: none;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(242, 242, 243, 0.5);
  border-radius: var(--radius);
  background: transparent;
  color: #f2f2f3;
  font-weight: 700;
  cursor: pointer;
}
.reproductor-cerrar:hover { border-color: #ffffff; }
.reproductor-marco { width: 100%; overflow: hidden; border-radius: var(--radius); background: #000; }
.reproductor-marco iframe { display: block; width: 100%; height: 100%; border: 0; }
.reproductor-enlace { display: inline-block; margin-top: 12px; font-weight: 700; color: #f2f2f3; text-decoration: underline; text-underline-offset: 4px; }

/* Celular: dos columnas angostas, como Pinterest, con menos aire y la letra
   un poco mas chica para que quepa sin cortarse. */
@media (max-width: 640px) {
  .nov-gallery { gap: 12px; }
  .nov-col { gap: 20px; }
  .nov-tile { gap: 8px; }
  .nov-title { font-size: 0.98rem; }
  .nov-text { font-size: 0.84rem; }
  .nov-note,
  .nov-more { font-size: 0.8rem; }
  .nov-cover { padding: 16px 14px; }
}
