/* ============================================================
 * UPSAFIP — sitio web público, diseño "Revista".
 *
 * Colores tomados del logo (petróleo #004C6C, acero #6388A1, gris #D3D3D3)
 * + tinta/papel para el texto editorial y un ámbar ("señal") que se usa
 * SOLO para lo que está pasando ahora: "en vivo", "último momento", "nuevo".
 * Sobre la señal el texto va siempre en tinta (8,2:1), nunca en blanco.
 * ============================================================ */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/fraunces-latin-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/fraunces-latin-ext-standard-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/fraunces-latin-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/fraunces-latin-ext-standard-italic.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/archivo-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/archivo-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --petroleo: #004c6c;
  --acero: #6388a1;
  --gris-baldosa: #d3d3d3;
  --tinta: #0b2230;
  --papel: #f4f6f7;
  --texto-2: #3a4b56;
  --texto-3: #56656f;
  --volanta: #3f6680;
  --linea: #d5dee3;
  --linea-oscura: #34495a;
  --claro: #d5e2ea;
  --suave: #b9c9d2;
  --senal: #f2a93b;
  --senal-texto: #7a4a00;
  --senal-fondo: #fff1da;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* La "esquina UPS": dos esquinas opuestas redondeadas, como las baldosas
     del logo (gris en una diagonal, acero en la otra). */
  --esquina-xl: 40px 4px 40px 4px;
  --esquina-l: 28px 4px 28px 4px;
  --esquina-m: 18px 4px 18px 4px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; display: block; }
a { color: var(--petroleo); }
a:hover { color: var(--tinta); }
button { font: inherit; cursor: pointer; }

:focus-visible { outline: 3px solid var(--senal); outline-offset: 2px; }

.contenedor { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .contenedor { padding: 0 32px; } }

.saltar {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.saltar:focus { top: 8px; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Barra superior: fecha + «Último momento» ─────────────── */
.barra-sup { background: var(--tinta); color: #fff; font-size: 13px; }
.barra-sup__fila { display: flex; align-items: center; gap: 16px; height: 40px; }
.barra-sup__fecha { color: var(--suave); flex-shrink: 0; display: none; }
.barra-sup__fecha::first-letter { text-transform: uppercase; }
@media (min-width: 640px) { .barra-sup__fecha { display: inline; } }
.barra-sup__ultimo {
  display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1;
  color: #fff; text-decoration: none;
}
.barra-sup__ultimo:hover { color: #fff; text-decoration: underline; }
.barra-sup__ultimo[hidden] { display: none; }
@media (min-width: 640px) {
  .barra-sup__ultimo { border-left: 1px solid var(--linea-oscura); padding-left: 16px; }
}
.en-vivo {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-weight: 700; letter-spacing: 0.1em; color: var(--senal);
}
.en-vivo--oscuro { color: var(--senal-texto); font-size: 12px; }
.punto-vivo {
  width: 8px; height: 8px; border-radius: 50%; background: var(--senal);
  animation: pulso 1.8s ease-out infinite;
}
@keyframes pulso {
  0% { box-shadow: 0 0 0 0 rgba(242, 169, 59, 0.6); }
  100% { box-shadow: 0 0 0 9px rgba(242, 169, 59, 0); }
}
@media (prefers-reduced-motion: reduce) { .punto-vivo { animation: none; } }
.barra-sup__texto { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Cabecera + menú ──────────────────────────────────────── */
.marca {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 24px 0; color: var(--petroleo); text-decoration: none;
}
.marca:hover { color: var(--petroleo); }
.marca img { height: 52px; width: auto; }
.marca__nombre {
  font-family: var(--serif); font-weight: 700; font-size: 40px; line-height: 0.95; letter-spacing: -0.02em;
}
.marca__lema { display: block; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 16px; color: var(--volanta); letter-spacing: 0; }
@media (min-width: 640px) {
  .marca { padding: 32px 0; }
  .marca img { height: 72px; }
  .marca__nombre { font-size: 56px; }
  .marca__lema { font-size: 18px; }
}

.menu {
  display: flex; align-items: center; gap: 28px; height: 56px;
  overflow-x: auto; white-space: nowrap; scrollbar-width: none;
  border-top: 2px solid var(--tinta); border-bottom: 1px solid var(--tinta);
  font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.menu::-webkit-scrollbar { display: none; }
@media (min-width: 900px) { .menu { justify-content: center; gap: 40px; } }
.menu a {
  color: var(--tinta); text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.menu a:hover { color: var(--petroleo); }
.menu a[aria-current="page"] { border-bottom-color: var(--senal); }

/* ── Contenido ────────────────────────────────────────────── */
main { flex: 1; outline: none; }

.estado {
  padding: 96px 16px; text-align: center; color: var(--texto-3);
}
.estado a { font-weight: 700; }
.cargando {
  width: 28px; height: 28px; margin: 96px auto; border-radius: 50%;
  border: 3px solid var(--linea); border-top-color: var(--petroleo);
  animation: girar 0.9s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

.volanta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--volanta);
}
.volanta__fecha { font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--texto-3); }

.titulo-bloque {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 12px; margin-bottom: 28px; border-bottom: 2px solid var(--tinta);
}
@media (min-width: 640px) {
  .titulo-bloque { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 16px; }
}
.titulo-bloque h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; }
@media (min-width: 640px) { .titulo-bloque h2 { font-size: 40px; } }
.ver-todo {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  font-size: 15px; font-weight: 700; text-decoration: none;
}
.ver-todo:hover { text-decoration: underline; }
.flecha { width: 16px; height: 16px; flex-shrink: 0; }

/* Portada: nota principal + Último momento */
.portada-cabeza { display: grid; gap: 40px; padding-top: 40px; padding-bottom: 48px; }
@media (min-width: 1024px) { .portada-cabeza { grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; } }

.principal { display: flex; flex-direction: column; gap: 16px; color: var(--tinta); text-decoration: none; }
.principal:hover { color: var(--tinta); }
.principal:hover .principal__titulo { text-decoration: underline; }
.principal img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--esquina-xl); background: var(--linea); }
.principal__titulo {
  margin: 0; font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.05; letter-spacing: -0.02em;
}
@media (min-width: 640px) { .principal__titulo { font-size: 56px; } }
.principal__copete { margin: 0; font-size: 18px; line-height: 1.55; color: var(--texto-2); }

.ultimo { display: flex; flex-direction: column; }
.ultimo__cabeza {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 2px solid var(--tinta);
}
.ultimo__cabeza h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 26px; }
.ultimo ol { list-style: none; margin: 0; padding: 0; }
.ultimo li { border-bottom: 1px solid var(--linea); }
.ultimo li:last-child { border-bottom: 0; }
.ultimo a { display: flex; gap: 16px; padding: 16px 0; color: var(--tinta); text-decoration: none; }
.ultimo a:hover .ultimo__titulo { text-decoration: underline; }
.ultimo__num { width: 28px; flex-shrink: 0; font-family: var(--serif); font-weight: 700; font-size: 30px; line-height: 1; color: var(--petroleo); }
.ultimo__meta { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--volanta); margin-bottom: 6px; }
.ultimo__meta--reciente { color: var(--senal-texto); }
.ultimo__titulo { font-size: 17px; font-weight: 600; line-height: 1.35; }
.ultimo__vacio { padding: 24px 0; color: var(--texto-3); font-size: 14px; }

/* Espacio de publicidad / convenios */
.publicidad { padding-bottom: 56px; }
.publicidad__rotulo { margin: 0 0 12px; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; color: var(--texto-3); }
.banner {
  display: flex; flex-direction: column-reverse; overflow: hidden;
  border-radius: 32px 4px 32px 4px; background: var(--petroleo); color: #fff; text-decoration: none;
}
.banner:hover { color: #fff; }
@media (min-width: 640px) { .banner { flex-direction: row; height: 260px; } }
.banner__texto { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; padding: 28px; }
@media (min-width: 640px) { .banner__texto { padding: 40px; } }
.banner__titulo { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 30px; line-height: 1.1; }
@media (min-width: 640px) { .banner__titulo { font-size: 42px; } }
.banner__copete { font-size: 17px; color: var(--claro); }
.banner__boton {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 12px 20px; border-radius: 16px 4px 16px 4px; background: var(--senal); color: var(--tinta);
  font-size: 15px; font-weight: 800;
}
/* Alto fijo: las piezas suelen ser afiches verticales; sin tope el banner
   crecería con la imagen en vez de recortarla. */
.banner img { width: 100%; height: 190px; object-fit: cover; object-position: top; }
@media (min-width: 640px) { .banner img { width: 38%; height: 100%; } }
.puntos { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.puntos button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: #b4c1c9;
  transition: width 0.2s;
}
.puntos button[aria-current="true"] { width: 24px; background: var(--petroleo); }
/* Área táctil de 44 px sin agrandar el punto que se ve. */
.puntos button { position: relative; }
.puntos button::after { content: ""; position: absolute; inset: -18px -10px; }

/* Grilla de tarjetas (portada y secciones) */
.bloque { padding-bottom: 64px; }
.grilla { display: grid; gap: 48px 32px; }
@media (min-width: 640px) { .grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tarjeta { display: flex; flex-direction: column; gap: 12px; color: var(--tinta); text-decoration: none; }
.tarjeta:hover { color: var(--tinta); }
.tarjeta:hover .tarjeta__titulo { text-decoration: underline; }
.tarjeta img, .tarjeta__sin-imagen {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top;
  border-radius: var(--esquina-l); background: var(--linea);
}
.tarjeta__sin-imagen {
  display: flex; align-items: flex-end; padding: 20px; background: var(--petroleo);
  font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--claro);
}
.tarjeta__titulo { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.15; }
.tarjeta__copete {
  font-size: 16px; line-height: 1.55; color: var(--texto-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Banda de la revista */
.revista { background: var(--petroleo); color: #fff; margin-bottom: 64px; }
.revista__fila { display: flex; flex-direction: column; align-items: center; gap: 40px; padding-top: 64px; padding-bottom: 64px; }
@media (min-width: 768px) { .revista__fila { flex-direction: row; gap: 80px; } }
.revista__texto { flex: 1; display: flex; flex-direction: column; gap: 20px; }
.revista__rotulo { font-size: 14px; font-weight: 600; letter-spacing: 0.1em; color: var(--claro); }
.revista__cita { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 32px; line-height: 1.1; }
@media (min-width: 640px) { .revista__cita { font-size: 52px; } }
.revista__titulo { margin: 0; font-size: 18px; font-weight: 600; }
.boton-borde {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px; border: 2px solid #fff; border-radius: var(--esquina-m);
  color: #fff; font-weight: 700; text-decoration: none;
}
.boton-borde:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.revista img { width: 240px; border-radius: 24px 4px 24px 4px; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, 0.5); }

/* Comunicados en la portada */
.lista-comunicados { display: grid; column-gap: 48px; }
@media (min-width: 640px) { .lista-comunicados { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lista-comunicados a {
  display: flex; flex-direction: column; gap: 6px; padding: 20px 0;
  border-bottom: 1px solid var(--linea); color: var(--tinta); text-decoration: none;
}
.lista-comunicados a:hover span:last-child { text-decoration: underline; }
.lista-comunicados .fecha { font-size: 13px; font-weight: 600; color: var(--texto-3); }
.lista-comunicados .titulo { font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.2; }

/* Sección */
.seccion-cabeza { padding: 40px 0 24px; margin-bottom: 40px; border-bottom: 2px solid var(--tinta); display: flex; flex-direction: column; gap: 20px; }
.seccion-cabeza h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 48px; line-height: 1; letter-spacing: -0.02em; }
@media (min-width: 640px) { .seccion-cabeza h1 { font-size: 64px; } }
.filtros { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filtros__rotulo { margin-right: 4px; font-size: 14px; font-weight: 600; color: var(--texto-3); }
.filtros a {
  display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 22px;
  border: 1px solid #c9d5dc; background: #fff; color: #24343f; font-size: 14px; font-weight: 600; text-decoration: none;
}
.filtros a:hover { border-color: var(--petroleo); color: var(--petroleo); }
.filtros a[aria-current="true"] { background: var(--petroleo); border-color: var(--petroleo); color: #fff; }

/* Nota */
.nota-fila { display: grid; gap: 48px; padding-top: 40px; padding-bottom: 64px; }
@media (min-width: 1024px) { .nota-fila { grid-template-columns: minmax(0, 1fr) 340px; } }
.nota { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.nota__volver {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--volanta); text-decoration: none;
}
.nota__volver:hover { text-decoration: underline; color: var(--volanta); }
.nota h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; }
@media (min-width: 640px) { .nota h1 { font-size: 56px; } }
.nota__copete { margin: 0; font-size: 20px; line-height: 1.55; color: var(--texto-2); }
.nota__fecha { margin: 0; font-size: 14px; color: var(--texto-3); }
.nota__imagen { width: 100%; border-radius: var(--esquina-xl); }
.nota__cuerpo { font-size: 18px; line-height: 1.7; }
.nota__cuerpo h2, .nota__cuerpo h3 { font-family: var(--serif); line-height: 1.2; }
.nota__cuerpo a { font-weight: 600; }
.nota__enlaces { display: flex; flex-direction: column; gap: 8px; padding-top: 20px; border-top: 1px solid var(--linea); }
.nota__enlaces a { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; word-break: break-all; }
@media (min-width: 1024px) { .nota-aside { padding-top: 40px; } }

/* ── Pie ──────────────────────────────────────────────────── */
.pie { margin-top: 16px; background: var(--tinta); color: #fff; }
.pie__fila { display: grid; gap: 40px; padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 768px) { .pie__fila { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pie__marca { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 700; font-size: 24px; }
.pie__marca img { height: 48px; width: auto; }
.pie__nombre-completo { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--suave); }
.pie ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.pie li { display: flex; align-items: flex-start; gap: 12px; }
.pie li svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; color: var(--senal); }
.pie a { color: #fff; }
.pie a:hover { color: var(--senal); }
.pie__legal { border-top: 1px solid var(--linea-oscura); padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--suave); }

.icono { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
