:root {
  --celeste: #2f7fc1;       /* azul tirando a celeste */
  --celeste-oscuro: #1d5f9a;
  --cielo: #74acdf;         /* celeste de la bandera */
  --cielo-claro: #e8f1fa;
  --tinta: #14181d;
  --gris-900: #2b3138;
  --gris-600: #5d6670;
  --gris-300: #d3d8de;
  --gris-100: #f2f4f6;
  --blanco: #fff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--blanco); color: var(--tinta);
  font-family: var(--sans); font-size: 17px; line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--celeste); outline-offset: 2px; }
.wrap { max-width: 1168px; margin: 0 auto; padding: 0 20px; }

/* Cabecera */
.flagbar { height: 10px; background: linear-gradient(var(--cielo) 0 33%, var(--blanco) 33% 66%, var(--cielo) 66%); border-bottom: 1px solid var(--gris-300); }
.masthead { border-bottom: 3px solid var(--tinta); background: var(--blanco); }
.masthead__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 18px; padding-bottom: 18px; }
.brand__logo {
  font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1; letter-spacing: -0.02em; text-decoration: none; color: var(--tinta); white-space: nowrap;
}
.brand__logo span { color: var(--celeste); }
.brand__date { margin: 8px 0 0; font-size: 0.9rem; color: var(--gris-600); }
.brand__date span { font-weight: 700; color: var(--tinta); margin-right: 6px; }
.brand__date span::after { content: "|"; margin-left: 8px; font-weight: 400; color: var(--gris-300); }

/* Espacios publicitarios */
.slot { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.slot[hidden] { display: none; }
.slot--header { flex: 0 1 728px; min-width: 0; }
.slot__item { display: block; max-width: 100%; }
.slot__item img { max-width: 100%; height: auto; }
.slot--header .slot__item { width: 728px; }
.slot--lateral .slot__item { width: 300px; }

/* Estructura */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; padding-top: 28px; padding-bottom: 48px; }
.sidebar .slot { position: sticky; top: 16px; }
.feed__title {
  margin: 0 0 4px; padding-bottom: 8px; font-family: var(--sans); font-size: 1rem; font-weight: 700;
  color: var(--celeste-oscuro); border-bottom: 2px solid var(--celeste);
}

/* Lista de notas */
.nota-item { overflow-wrap: anywhere; display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--gris-300); }
.nota-item__media { display: block; text-decoration: none; aspect-ratio: 3 / 2; background: var(--gris-100); overflow: hidden; }
.nota-item__meta { margin: 0 0 4px; font-size: 0.85rem; color: var(--gris-600); }
.nota-item__medio { font-weight: 700; color: var(--celeste-oscuro); }
.nota-item__title { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.005em; }
.nota-item__title a { text-decoration: none; }
.nota-item__title a:hover { color: var(--celeste-oscuro); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.nota-item__bajada { margin: 0; color: var(--gris-900); font-size: 1rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Fotos de archivo (Wikimedia Commons) y su crédito */
.nota-item__fig { min-width: 0; }
.foto__img { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--gris-100); }
.foto-credito { margin: 4px 0 0; font-size: 0.7rem; line-height: 1.3; color: var(--gris-600); overflow-wrap: anywhere; }
.foto-credito a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.foto-credito a:hover { color: var(--celeste-oscuro); }
.foto-credito--nota { margin-top: 8px; font-size: 0.82rem; }

/* Gráfico genérico de marca (cuando no hay foto de archivo) */
.tile {
  position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: space-between;
  padding: 10px 12px; overflow: hidden; color: var(--blanco); font-family: var(--serif);
}
.tile::after {
  content: ""; position: absolute; right: -22%; bottom: -38%; width: 85%; aspect-ratio: 1; border-radius: 50%;
  border: 14px solid currentColor; opacity: 0.12; pointer-events: none;
}
.tile__mark { width: 28px; height: 28px; flex: none; position: relative; z-index: 1; }
.tile__name { position: relative; z-index: 1; font-weight: 700; font-size: 1.05rem; line-height: 1.1; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.tile--lanacion { background: linear-gradient(135deg, #1d5f9a, #154a78); }
.tile--clarin { background: linear-gradient(135deg, #74acdf, #a9cdee); color: #0f2f4d; }
.tile--infobae { background: linear-gradient(135deg, #3b4a59, #2b3138); }
.tile--otro { background: linear-gradient(135deg, #5d6670, #2b3138); }
.tile--rueda { background: var(--cielo-claro); color: var(--celeste-oscuro); box-shadow: inset 0 0 0 3px var(--celeste); }
.tile--rueda .tile__mark { width: 34px; height: 34px; }

/* Paginador */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 28px; }
.pager[hidden] { display: none; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--gris-300); text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--tinta); background: var(--blanco);
}
.pager a:hover { border-color: var(--celeste); color: var(--celeste-oscuro); }
.pager [aria-current="page"] { background: var(--celeste-oscuro); border-color: var(--celeste-oscuro); color: var(--blanco); }
.pager .is-disabled { color: var(--gris-300); background: var(--gris-100); }
.pager .gap { border-color: transparent; background: none; min-width: 24px; padding: 0; }

/* Mensajes */
.status { margin: 28px 0; padding: 24px; background: var(--gris-100); border-left: 4px solid var(--cielo); color: var(--gris-900); }
.status strong { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 1.3rem; color: var(--tinta); }
.status p { margin: 0 0 12px; }
.status a { color: var(--celeste-oscuro); font-weight: 600; }

/* Nota interna */
.back { display: inline-block; margin-bottom: 18px; color: var(--celeste-oscuro); font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
.nota__medio { margin: 0 0 8px; font-size: 0.9rem; color: var(--gris-600); }
.nota__medio strong { color: var(--gris-600); font-weight: 600; }
.nota__title { overflow-wrap: anywhere; margin: 0 0 14px; font-family: var(--serif); font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.5rem); line-height: 1.12; letter-spacing: -0.015em; }
.nota__bajada { overflow-wrap: anywhere; margin: 0 0 22px; font-size: 1.2rem; line-height: 1.5; color: var(--gris-900); }
.nota__fig { margin: 0 0 24px; max-width: 480px; }
.nota__foto { aspect-ratio: 3 / 2; background: var(--gris-100); overflow: hidden; }
.nota__foto .tile { padding: 18px 22px; }
.nota__foto .tile__mark { width: 48px; height: 48px; }
.nota__foto .tile__name { font-size: 1.8rem; }
.nota__aviso { margin: 0 0 18px; font-size: 0.9rem; color: var(--gris-600); }
.nota__fuente { margin: 0 0 4px; font-size: 0.82rem; font-weight: 400; color: var(--gris-600); }
.nota__cuerpo { font-size: 1.1rem; line-height: 1.65; overflow-wrap: anywhere; }
.nota__cuerpo p { margin: 0 0 1.1em; }
.nota__subtitulo { margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--gris-300); font-family: var(--sans); font-size: 0.82rem; font-weight: 600; color: var(--gris-600); }
.fuentes { margin: 0; padding-left: 1.2em; font-size: 0.82rem; line-height: 1.45; color: var(--gris-600); }
.fuentes li { margin-bottom: 6px; }
.fuentes a { color: var(--gris-600); }
.btn {
  display: inline-block; padding: 0; background: none; color: var(--gris-600); font-size: 0.82rem; font-weight: 400;
  text-decoration: underline; text-underline-offset: 3px; border: 0;
}
.btn:hover { color: var(--celeste-oscuro); background: none; }
.footer .footer__fotos a { color: inherit; text-decoration: underline; }
.creditos { max-width: 760px; }
.creditos li { margin-bottom: 10px; font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere; }

/* Pie */
.footer { background: var(--tinta); color: #c6ccd3; padding: 28px 0; font-size: 0.9rem; }
.footer strong { color: var(--blanco); font-family: var(--serif); font-size: 1.2rem; }
.footer p { margin: 6px 0 0; max-width: 60ch; }
.footer .footer__fotos { font-size: 0.82rem; color: #9aa3ad; }

/* Móvil */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sidebar .slot { position: static; }
  .masthead__row { flex-direction: column; align-items: flex-start; gap: 14px; }
  .slot--header { align-self: stretch; flex-basis: auto; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nota-item { grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 16px 0; }
  .tile { padding: 8px; }
  .tile__mark { width: 22px; height: 22px; }
  .tile__name { font-size: 0.82rem; }
  .nota-item__title { font-size: 1.12rem; }
  .nota-item__bajada { -webkit-line-clamp: 2; font-size: 0.92rem; }
  .slot--header .slot__item { width: 100%; }
  .slot--lateral .slot__item { width: min(300px, 100%); }
  .pager a, .pager span { min-width: 38px; height: 38px; padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
