/* ==========================================================================
   Café Entre Periodistas · Nayarit — Sistema de diseño
   Portal de noticias. Paleta tomada del logotipo: carbón, rojo y blanco.
   Titulares en Archivo (condensada, de periódico), cuerpo en Source Serif
   para que las notas largas se lean cómodas.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  --tinta:    #17181A;
  --tinta-2:  #232528;
  --carbon:   #2E3033;
  --carbon-2: #3C3F43;

  --rojo:     #E0242A;
  --rojo-hi:  #F2383E;
  --rojo-sup: #B51B20;

  --papel:    #FFFFFF;
  --papel-2:  #F5F5F4;
  --papel-3:  #EBEBE9;

  --gris:     #6B6E72;
  --gris-2:   #9B9EA2;

  --linea:      rgba(23, 24, 26, .13);
  --linea-soft: rgba(23, 24, 26, .07);
  --linea-osc:  rgba(255, 255, 255, .14);

  --ok:  #1F8A4C;
  --err: #C62828;

  --titular: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --cuerpo:  "Source Serif 4", Georgia, "Times New Roman", serif;
  --ui:      "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --margen: clamp(16px, 4vw, 48px);
  --ancho: 1240px;
  --ancho-texto: 68ch;
  --radio: 3px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--titular); font-weight: 700; line-height: 1.08; letter-spacing: -.015em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--rojo); outline-offset: 2px; border-radius: var(--radio); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* --- Utilidades --------------------------------------------------------- */
.caja { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--margen); }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--rojo); color: #fff; padding: 12px 20px; font-weight: 600;
}
.saltar:focus { left: 12px; top: 12px; }

/* --- Barra superior ----------------------------------------------------- */
.barra {
  background: var(--tinta);
  color: var(--papel-3);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.barra__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.barra__fecha { color: var(--gris-2); }
.barra__redes { display: flex; align-items: center; gap: 14px; }
.barra__redes a { color: var(--papel-3); display: grid; place-items: center; transition: color .25s var(--ease); }
.barra__redes a:hover { color: var(--rojo-hi); }

/* Indicador EN VIVO */
.vivo {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--ui); font-weight: 700; font-size: 11.5px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--rojo-hi);
}
.vivo::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--rojo); animation: latido 1.6s infinite;
}
@keyframes latido {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .35; transform: scale(.82); }
}

/* --- Cabecera ----------------------------------------------------------- */
.cab { background: var(--carbon); color: #fff; position: relative; z-index: 50; }
.cab__in { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); padding-block: clamp(12px, 2.4vw, 18px); }

.marca { display: flex; align-items: center; gap: 13px; flex: none; }
.marca__logo {
  width: clamp(48px, 7vw, 62px); height: auto;
  border-radius: 50%; background: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.marca__txt { display: flex; flex-direction: column; line-height: 1.04; }
.marca__nom {
  font-family: var(--titular); font-weight: 800;
  font-size: clamp(16px, 2.4vw, 21px); letter-spacing: -.01em; text-transform: uppercase;
}
.marca__sub {
  font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gris-2); margin-top: 4px;
}

.cab__der { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }

.menu-btn {
  width: 44px; height: 44px; display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--linea-osc); border-radius: var(--radio);
}
.menu-btn span { display: block; width: 20px; height: 2px; background: #fff; transition: transform .35s var(--ease), opacity .25s var(--ease); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Secciones ---------------------------------------------------------- */
.secciones { background: var(--tinta-2); border-top: 1px solid var(--linea-osc); }
.secciones__lista { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 30px); overflow-x: auto; scrollbar-width: none; }
.secciones__lista::-webkit-scrollbar { height: 0; }
.secciones__lista a {
  position: relative; white-space: nowrap; padding-block: 13px;
  font-weight: 600; font-size: 13.5px; letter-spacing: .06em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78); transition: color .25s var(--ease);
}
.secciones__lista a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 0;
  background: var(--rojo); transition: width .3s var(--ease);
}
.secciones__lista a:hover,
.secciones__lista a[aria-current="page"] { color: #fff; }
.secciones__lista a:hover::after,
.secciones__lista a[aria-current="page"]::after { width: 100%; }

/* --- Etiquetas ---------------------------------------------------------- */
.etiqueta {
  display: inline-block;
  font-family: var(--ui); font-weight: 700; font-size: 11px;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--rojo); margin-bottom: 10px;
}
.etiqueta--fondo { background: var(--rojo); color: #fff; padding: 5px 10px; border-radius: 2px; margin-bottom: 0; }

.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--gris);
}
.meta__sep { color: var(--gris-2); }

/* --- Portada ------------------------------------------------------------ */
.portada { padding-block: clamp(22px, 4vw, 40px); }
.portada__rejilla { display: grid; gap: clamp(24px, 3vw, 36px); }

/* Nota principal */
.principal { display: grid; gap: 18px; }
.principal__foto {
  position: relative; overflow: hidden; border-radius: var(--radio);
  background: var(--papel-3); aspect-ratio: 16 / 9;
}
.principal__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.principal:hover .principal__foto img { transform: scale(1.03); }
.principal__titulo {
  font-size: clamp(1.75rem, 4.6vw, 2.9rem);
  text-wrap: balance;
}
.principal:hover .principal__titulo { color: var(--rojo-sup); }
.principal__bajada {
  font-family: var(--cuerpo); font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: var(--gris); margin-top: 12px; max-width: 58ch;
}

/* Columna de secundarias */
.secundarias { display: grid; gap: 20px; align-content: start; }
.secundaria {
  display: grid; grid-template-columns: 1fr 104px; gap: 14px; align-items: start;
  padding-bottom: 20px; border-bottom: 1px solid var(--linea);
}
.secundaria:last-child { border-bottom: 0; padding-bottom: 0; }
.secundaria__foto { border-radius: var(--radio); overflow: hidden; background: var(--papel-3); aspect-ratio: 1 / 1; }
.secundaria__foto img { width: 100%; height: 100%; object-fit: cover; }
.secundaria__titulo { font-size: 1.02rem; line-height: 1.2; }
.secundaria:hover .secundaria__titulo { color: var(--rojo-sup); }

/* --- Franja EN VIVO ----------------------------------------------------- */
.franja-vivo { background: var(--tinta); color: #fff; padding-block: clamp(28px, 5vw, 48px); }
.franja-vivo__cab { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.franja-vivo h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); text-transform: uppercase; }
.franja-vivo__cuerpo { display: grid; gap: clamp(20px, 3vw, 34px); align-items: center; }
.video-caja {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  background: #000; border-radius: var(--radio); overflow: hidden;
}
.video-caja iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.franja-vivo__txt h3 { font-size: clamp(1.2rem, 2.4vw, 1.6rem); margin-bottom: 12px; }
.franja-vivo__txt p { font-family: var(--cuerpo); color: var(--gris-2); }

/* --- Rejilla de notas --------------------------------------------------- */
.bloque { padding-block: clamp(30px, 5vw, 56px); }
.bloque__cab {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 14px; margin-bottom: clamp(20px, 3vw, 30px);
  border-bottom: 3px solid var(--tinta);
}
.bloque__cab h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); text-transform: uppercase; }
.bloque__mas { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rojo); }
.bloque__mas:hover { color: var(--rojo-sup); }

.rejilla { display: grid; gap: clamp(22px, 3vw, 32px); }

.nota { display: grid; gap: 13px; align-content: start; }
.nota__foto { border-radius: var(--radio); overflow: hidden; background: var(--papel-3); aspect-ratio: 16 / 10; }
.nota__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.nota:hover .nota__foto img { transform: scale(1.04); }
.nota__titulo { font-size: 1.12rem; line-height: 1.22; text-wrap: balance; }
.nota:hover .nota__titulo { color: var(--rojo-sup); }
.nota__resumen { font-family: var(--cuerpo); font-size: .96rem; color: var(--gris); }

/* Marca de video sobre la miniatura */
.nota__foto, .principal__foto, .secundaria__foto { position: relative; }
.tiene-video::after {
  content: "";
  position: absolute; left: 12px; bottom: 12px; width: 34px; height: 34px;
  border-radius: 50%; background: var(--rojo) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 17px no-repeat;
}

/* --- Página de la nota -------------------------------------------------- */
.nota-pag { padding-block: clamp(22px, 4vw, 40px); }
.migas { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--gris); margin-bottom: 18px; }
.migas a:hover { color: var(--rojo); }

.nota-pag__cab { max-width: var(--ancho-texto); margin-inline: auto; }
.nota-pag__titulo { font-size: clamp(1.9rem, 5vw, 3.1rem); text-wrap: balance; }
.nota-pag__bajada {
  font-family: var(--cuerpo); font-size: clamp(1.08rem, 2vw, 1.28rem);
  color: var(--gris); margin-top: 16px; line-height: 1.5;
}
.nota-pag__firma {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 22px; padding-block: 16px;
  border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea);
  font-size: 13.5px; color: var(--gris);
}
.nota-pag__autor { font-weight: 600; color: var(--tinta); }

.nota-pag__medio { margin-block: clamp(24px, 4vw, 36px); }
.nota-pag__medio img { width: 100%; border-radius: var(--radio); }
.nota-pag__pie { font-size: 13px; color: var(--gris); margin-top: 10px; font-family: var(--cuerpo); }

.cuerpo {
  max-width: var(--ancho-texto); margin-inline: auto;
  font-family: var(--cuerpo); font-size: 1.14rem; line-height: 1.72;
}
.cuerpo p { margin-bottom: 1.25em; }
.cuerpo p:last-child { margin-bottom: 0; }
.cuerpo a { color: var(--rojo-sup); text-decoration: underline; text-underline-offset: 3px; }

.compartir {
  max-width: var(--ancho-texto); margin: clamp(30px, 5vw, 46px) auto 0;
  padding-top: 22px; border-top: 1px solid var(--linea);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.compartir__k { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.compartir a {
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--linea); border-radius: 50%; color: var(--tinta);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.compartir a:hover { background: var(--rojo); border-color: var(--rojo); color: #fff; }

/* --- Estados ------------------------------------------------------------ */
.aviso {
  padding: clamp(28px, 6vw, 56px) var(--margen);
  text-align: center; color: var(--gris); font-family: var(--cuerpo);
}
.aviso strong { display: block; font-family: var(--titular); font-size: 1.2rem; color: var(--tinta); margin-bottom: 8px; }

.cargando { display: grid; gap: 13px; }
.hueso { background: var(--papel-3); border-radius: var(--radio); animation: respira 1.4s infinite; }
.hueso--foto { aspect-ratio: 16 / 10; }
.hueso--linea { height: 14px; }
.hueso--linea.corta { width: 60%; }
@keyframes respira { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* --- Pie ---------------------------------------------------------------- */
.pie { background: var(--tinta); color: var(--papel-3); margin-top: clamp(40px, 7vw, 80px); padding-block: clamp(36px, 6vw, 64px) 24px; }
.pie__rejilla { display: grid; gap: clamp(26px, 4vw, 40px); }
.pie__titulo { font-family: var(--ui); font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--gris-2); margin-bottom: 16px; }
.pie__lista { display: grid; gap: 10px; font-size: 14.5px; }
.pie__lista a { color: var(--papel-3); transition: color .25s var(--ease); }
.pie__lista a:hover { color: var(--rojo-hi); }
.pie__nota { font-family: var(--cuerpo); font-size: 14.5px; color: var(--gris-2); max-width: 42ch; margin-top: 14px; }
.pie__abajo {
  margin-top: clamp(30px, 5vw, 48px); padding-top: 20px;
  border-top: 1px solid var(--linea-osc);
  display: grid; gap: 10px; font-size: 13px; color: var(--gris-2);
}
.pie__abajo a:hover { color: var(--rojo-hi); }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 859px) {
  .menu-btn { display: flex; }
  .secciones { position: absolute; left: 0; right: 0; top: 100%; display: none; border-bottom: 1px solid var(--linea-osc); }
  .secciones.abierto { display: block; }
  .secciones__lista { flex-direction: column; align-items: stretch; gap: 0; padding-block: 6px; }
  .secciones__lista a { padding-block: 14px; border-bottom: 1px solid var(--linea-osc); font-size: 15px; }
  .secciones__lista a:last-child { border-bottom: 0; }
  .secciones__lista a::after { display: none; }
  .barra__fecha { display: none; }
}

@media (min-width: 560px) {
  .rejilla { grid-template-columns: repeat(2, 1fr); }
  .pie__abajo { grid-template-columns: 1fr auto; align-items: center; }
}

@media (min-width: 860px) {
  .portada__rejilla { grid-template-columns: 1.65fr 1fr; }
  .franja-vivo__cuerpo { grid-template-columns: 1.5fr 1fr; }
  .pie__rejilla { grid-template-columns: 1.6fr 1fr 1fr; }
}

@media (min-width: 1040px) {
  .rejilla { grid-template-columns: repeat(3, 1fr); }
  .rejilla--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --- Paginación ------------------------------------------------------------ */
.paginas {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 14px; margin-top: clamp(30px, 5vw, 48px);
  padding-top: 24px; border-top: 1px solid var(--linea);
}
.paginas__b {
  display: inline-flex; align-items: center;
  font-family: var(--ui); font-weight: 600; font-size: 14px;
  padding: 11px 20px; border: 1px solid var(--linea); border-radius: var(--radio);
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.paginas__b:hover { border-color: var(--rojo); background: var(--rojo); color: #fff; }
.paginas__n { font-size: 13.5px; color: var(--gris); }
