:root {
  --radius: 14px;
  --border: #E8E8E8;
  --muted: #6b7280;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: #fff;
  color: #111;
}

.app-topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.app-topbar .back {
  text-decoration: none;
  color: #111;
}

.news-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* Tarjeta horizontal: título izq, imagen der */
.news-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  padding: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

.news-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
  border-color: rgba(0, 0, 0, .12);
}

.news-card .news-info {
  flex: 1 1 auto;
  min-width: 0;
}

.news-card h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
  /* multi-línea con elipsis si se quiere limitar */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card .news-thumb {
  width: 110px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
  flex: 0 0 auto;
  margin-left: 12px;
}

@media (max-width:640px) {
  .news-card .news-thumb {
    width: 112px;
    height: 72px;
  }
}


#news-detail {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}

#news-detail .hero {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

#news-detail h1 {
  margin: 8px 0 6px;
  font-size: 28px;
  line-height: 1.2;
}

#news-detail .byline {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 18px;
}

#news-detail .content {
  line-height: 1.7;
}

#news-detail .content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* ==================== MODAL PREMIUM (estilo mejorado) ==================== */

.ri-modal {
  position: fixed;
  inset: 0;
  display: none;
  /* .is-open -> flex */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ri-modal.is-open {
  display: flex;
}

/* Backdrop con blur y vignette suave */
.ri-modal__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 100% at 50% 0%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .75) 80%);
  backdrop-filter: blur(4px);
  opacity: 0;
  animation: ri-fade-in .18s ease forwards;
}

/* Dialog con glass + borde sutil */
.ri-modal__dialog {
  position: relative;
  width: min(980px, 94vw);
  max-height: min(90vh, 1100px);
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02))
    /* glass */
    ,
    #0f0f10;
  color: #F5F7FA;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, .55),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  overflow: hidden;
  transform: translateY(8px) scale(.985);
  animation: ri-pop-in .20s cubic-bezier(.2, .7, .3, 1) forwards;
}

/* Botón cerrar */
.ri-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 2px solid white;
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
  z-index: 99;
}

.ri-modal__close:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .24);
}

.ri-modal__close:active {
  transform: scale(.96);
}

/* Hero con overlay degradado para legibilidad */
.ri-modal__hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000 center/cover no-repeat;
  position: relative;
}

.ri-modal__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .35) 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .45) 100%);
  pointer-events: none;
}

/* Head + títulos */
.ri-modal__head {
  padding: 20px 24px 0 24px;
  background: white;
  color: black;

}

.ri-modal__title {
  margin: 10px 0 6px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.2;
  letter-spacing: .2px;
}

.ri-modal__byline {
  margin: 0 0 14px;
  color: black;
  font-size: 14px;
  opacity: .85;
}



/* Contenido con tipografía cuidada y scroll suave */
.ri-modal__content {
  padding: 10px 24px 24px;
  max-height: calc(min(90vh, 1100px) - 56px - 56px - 200px);
  overflow: auto;
  line-height: 1.75;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #6b7280 transparent;
  background-color: white;
}

.ri-modal__content p {
  margin: 0 0 14px;
  color: black;
}

.ri-modal__content h2,
.ri-modal__content h3 {
  margin: 18px 0 10px;
  line-height: 1.3;
}

.ri-modal__content h2 {
  font-size: 20px;
}

.ri-modal__content h3 {
  font-size: 18px;
  opacity: .95;
}

.ri-modal__content a {
  color: #E9C46A;
  text-decoration: none;
  border-bottom: 1px dashed rgba(233, 196, 106, .5);
}

.ri-modal__content a:hover {
  border-bottom-color: rgba(233, 196, 106, 1);
}

.ri-modal__content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  display: block;
  margin: 14px 0;
}

.ri-modal__content ul,
.ri-modal__content ol {
  padding-left: 20px;
}

.ri-modal__content::-webkit-scrollbar {
  width: 10px;
}

.ri-modal__content::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b3b3b, #4a4a4a);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.ri-modal__content::-webkit-scrollbar-track {
  background: transparent;
}

/* Estado sin hero (cuando ocultas el hero si no hay imagen) */
.ri-modal__hero[hidden]+.ri-modal__head {
  padding-top: 26px;
}

/* Body sin scroll cuando modal está abierto */
body.ri-no-scroll {
  overflow: hidden;
}

/* Animaciones */
@keyframes ri-fade-in {
  to {
    opacity: 1;
  }
}

@keyframes ri-pop-in {
  to {
    transform: translateY(0) scale(1);
  }
}

/* Responsivo */
@media (max-width: 560px) {
  .ri-modal__dialog {
    width: 96vw;
    border-radius: 18px;
  }

  .ri-modal__content {
    padding: 8px 16px 18px;
  }

  .ri-modal__head {
    padding: 16px 16px 0 16px;
  }

  .ri-modal__title {
    font-size: clamp(20px, 5vw, 26px);
  }

  .ri-modal__hero {
    aspect-ratio: 16/10;
  }
}

/* ===== Barra de acciones (compartir) ===== */
.ri-modal__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 16px 8px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: white;
}

.ri-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .15s ease, transform .08s ease, border-color .15s ease;
  text-decoration: none;
  /* para <a> estilo botón */
}

.ri-btn:hover {
  background: rgba(255, 255, 255, .12);
  border-color: rgba(255, 255, 255, .24);
}

.ri-btn:active {
  transform: scale(.98);
}

.ri-btn--primary {
  background: white;
  color: #111;
  border-color: gray;
}

/* Toast simple */
.ri-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 10000;
  background: rgba(17, 17, 17, .9);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.ri-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.ri-btn .icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
}


/* ==== FIX: modal que no corta el final del contenido ==== */

/* El diálogo se comporta como columna flexible */
.ri-modal__dialog {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(980px, 94vw);
  /* Usa viewport dinámico (móvil) y limita altura total del modal */
  max-height: min(92dvh, 1100px);
  /* el resto de estilos que ya tenías (fondo, borde, sombras...) se mantienen */
}

/* Bloques no scrollables (ocupan su alto natural) */
.ri-modal__hero,
.ri-modal__head,
.ri-modal__actions {
  flex: 0 0 auto;
}

/* Área de lectura: único bloque que hace scroll interno */
.ri-modal__content {
  flex: 1 1 auto;
  min-height: 0;
  /* clave para que flex permita el overflow */
  overflow: auto;
  /* Anula cualquier max-height anterior basado en calc() */
  max-height: none !important;
  /* Un poco de colchón por notch / barra del navegador en móvil */
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  /* scroll suave en iOS */
}

/* Si no hay hero, que no deje hueco arriba */
.ri-modal__hero[hidden] {
  display: none !important;
}

/* Fallback si el navegador no soporta dvh */
@supports not (height: 100dvh) {
  .ri-modal__dialog {
    max-height: min(92vh, 1100px);
  }
}

/* === NUEVO ESTILO: imagen a la izquierda, título a la derecha === */
.news-card {
  flex-direction: row;
  /* invierte el orden para poner imagen a la izquierda */
  justify-content: flex-start;
  margin: 10px;

}

/* Ajustes visuales específicos */
.news-card img {
  margin-left: 0;
  width: 130px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-card .meta {
  flex: 1;
}

.news-card h3 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: #111;
  text-align: left;
}

/* Pequeña mejora para móviles */
@media (max-width: 640px) {
  .news-card img {
    width: 100px;
    height: 72px;
  }

  .news-card h3 {
    font-size: 15px;
  }
}
@media (max-width: 400px) {
  .bb-lead__title {
  font-size: 20px !important;
  }

}
/* ===== Bloomberg-ish layout for #news-list ===== */
#news-list {
  padding: 14px;
}

.bb-news {
  display: grid;
  grid-template-columns: 1.05fr 2.2fr 1.05fr;
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.bb-col__head {
  font-weight: 800;
  letter-spacing: .02em;
  font-size: 12px;
  text-transform: uppercase;
  opacity: .75;
  margin: 6px 2px 10px;
}

.bb-list {
  display: grid;
  gap: 10px;
}

.bb-mini {
  display: grid;
  gap: 6px;
  padding: 10px 10px;
  background: rgba(255, 255, 255, .7);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid gainsboro;
}

.bb-mini:hover {
  border-color: rgba(0, 0, 0, .14);
  transform: translateY(-1px);
  transition: .18s ease;
}

.bb-mini__title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}

.bb-mini__meta {
  font-size: 12px;
  opacity: .65;
}

.bb-lead {
  position: relative;
  display: block;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .10);
  text-decoration: none;
  color: white;
  min-height: 340px;
}

.bb-lead__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05) contrast(1.05);
}

.bb-lead__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .68) 72%, rgba(0, 0, 0, .78) 100%);
}

.bb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
  opacity: .95;
}

.bb-lead__title {
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
  margin: 0;
}

.bb-meta {
  font-size: 12px;
  opacity: .85;
}

.bb-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 6px;
}

.bb-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .7);
  text-decoration: none;
  color: inherit;
}

.bb-card:hover {
  border-color: rgba(0, 0, 0, .14);
  transform: translateY(-1px);
  transition: .18s ease;
}

.bb-card__img img {
  width: 108px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.bb-card__body {
  display: grid;
  gap: 6px;
}

.bb-card__title {
  font-size: 14px;
  line-height: 1.2;
}

.bb-empty {
  max-width: 900px;
  margin: 0 auto;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .7);
  opacity: .8;
}

/* Modal: mejor byline actions */
.bb-byline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bb-byline__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Iframe inside modal */
.bb-iframeWrap {
  width: 100%;
  height: min(78vh, 820px);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .10);
  background: #fff;
}

.bb-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive */
@media (max-width: 980px) {
  .bb-news {
    grid-template-columns: 1fr;
  }

  .bb-grid {
    grid-template-columns: 1fr;
  }

  .bb-card {
    grid-template-columns: 92px 1fr;
  }

  .bb-card__img img {
    width: 92px;
    height: 74px;
  }

  .bb-lead {
    min-height: 260px;
  }
}

/* ===========================
   MOBILE EDITORIAL LAYOUT
   Bloomberg-style rhythm
   =========================== */

@media (max-width: 768px) {

  /* Contenedor principal */
  .bb-news {
    display: block;
    padding: 0 12px;
  }

  /* Grid inferior pasa a lista */
  .bb-grid {
    display: block;
    margin-top: 12px;
  }

  /* ===========================
     1️⃣ NOTICIA HERO (1ª)
     =========================== */
  .bb-grid>a:nth-child(1) {
    display: block;
    position: relative;
    border-radius: 18px;
    overflow: hidden;
  }

  .bb-grid>a:nth-child(1) img {
    width: 100%;
    height: 220px;
    object-fit: cover;
  }

  .bb-grid>a:nth-child(1) .bb-card__body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 14px;
    background: linear-gradient(180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, .75) 100%);
    color: #fff;
  }

  .bb-grid>a:nth-child(1) .bb-card__title {
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
  }

  .bb-grid>a:nth-child(1) .bb-meta,
  .bb-grid>a:nth-child(1) .bb-kicker {
    color: rgba(255, 255, 255, .85);
  }

  /* ===========================
     2️⃣–3️⃣ Cards horizontales
     =========================== */
  .bb-grid>a:nth-child(2),
  .bb-grid>a:nth-child(3) {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    align-items: center;
  }

  .bb-grid>a:nth-child(2) img,
  .bb-grid>a:nth-child(3) img {
    width: 96px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
  }

  /* ===========================
     4️⃣–6️⃣ Titulares compactos
     =========================== */
  .bb-grid>a:nth-child(4),
  .bb-grid>a:nth-child(5),
  .bb-grid>a:nth-child(6) {
    display: block;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .75);
  }

  .bb-grid>a:nth-child(4) img,
  .bb-grid>a:nth-child(5) img,
  .bb-grid>a:nth-child(6) img {
    display: none;
  }

  .bb-grid>a:nth-child(4) .bb-card__title,
  .bb-grid>a:nth-child(5) .bb-card__title,
  .bb-grid>a:nth-child(6) .bb-card__title {
    font-size: 15px;
    font-weight: 600;
  }

  /* ===========================
     7️⃣ Destacada secundaria
     =========================== */
  .bb-grid>a:nth-child(7) {
    display: block;
  }

  .bb-grid>a:nth-child(7) img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px;
  }

  /* ===========================
     Separadores editoriales
     =========================== */
  .bb-grid>a:not(:last-child) {
    padding-bottom: 14px;
  }

}

/* ===========================
   Mobile sections after feed
   =========================== */
@media (max-width: 768px) {

  .bb-sections {
    padding: 6px 12px 24px;
  }

  .bb-sec {
    margin-top: 24px;
  }

  .bb-sec__title {
    font-size: 13px;
    font-weight: 950;
    letter-spacing: .12em;
    text-transform: uppercase;
    opacity: .75;
    margin: 0 0 10px;
  }

  .bb-sec__list {
    display: grid;
    gap: 12px;
  }

  .bb-secItem {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: center;

    padding: 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(2, 6, 23, .10);

    text-decoration: none;
    color: inherit;
  }

  .bb-secItem img {
    width: 88px;
    height: 66px;
    border-radius: 10px;
    object-fit: cover;
  }

  .bb-secItem .t {
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
  }

  .bb-secItem .m {
    font-size: 12px;
    color: rgba(11, 18, 32, .6);
    margin-top: 6px;
  }
}

@media (max-width: 768px) {

  #news-by-section {
    margin-top: 28px;
    padding: 0 14px 40px;
  }

  /* Section block */
  .bb-sec {
    margin-bottom: 32px;
  }

  /* Section label */
  .bb-sec__head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #111;
    margin-bottom: 10px;
  }

  .bb-sec__head::after {
    content: "";
    display: block;
    height: 1px;
    background: rgba(0, 0, 0, .15);
    margin-top: 6px;
  }

  /* Lead story */
  .bb-sec__lead {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
  }

  .bb-sec__lead img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    margin-bottom: 8px;
  }

  .bb-sec__lead h4 {
    font-size: 18px;
    line-height: 1.15;
    font-weight: 700;
    margin: 0;
  }

  /* Compact list */
  .bb-sec__list {
    display: grid;
    gap: 10px;
  }

  .bb-sec__list a {
    text-decoration: none;
    color: #111;
    font-size: 15px;
    line-height: 1.3;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, .12);
  }
}

@media (max-width: 768px) {
  .bb-sec__link {
    color: inherit;
    text-decoration: none;
  }

  .bb-sec__link:active {
    opacity: .7;
  }
}

/* Mini-portada dentro de la bb-list (solo se usa en móvil via JS) */
.bb-lead--mini {
  min-height: 190px;
  border-radius: 16px;
}

.bb-lead--mini .bb-lead__overlay {
  padding: 14px;
  gap: 8px;
}

.bb-lead--mini .bb-lead__title {
  font-size: 18px;
  line-height: 1.15;
}

/* CSS */
/* =========================================================
   NUEVO LAYOUT DE NOTICIAS
   Categorías arriba + Hoy + Ayer + Anteriores con lazy load
   ========================================================= */

#news-list {
  padding: 14px 14px 40px;
  max-width: 1180px;
  margin: 0 auto;
}

/* CONTENEDOR GENERAL */
.news-hub {
  display: grid;
  gap: 0;
}

/* ===== BARRA DE CATEGORÍAS ===== */
.news-cats {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 0 6px;
  background: #fff;
  scrollbar-width: none;
}

.news-cats::-webkit-scrollbar {
  display: none;
}

.news-cat-chip {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #6b7280;
  border-radius: 0px;
  padding: 7px 6px 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s ease;
  border-bottom: 3px solid transparent;
}

.news-cat-chip.is-active {
    color: #111;
    font-weight: 700;
    border-bottom-color: #111;
}

/* ===== BLOQUES ===== */
.news-block {
  display: grid;
  gap: 14px;
}

.news-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.news-block-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -.02em;
}

.news-block-subtitle {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  display: none;
}

/* ===== SCROLL HORIZONTAL ===== */
.news-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 320px);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.news-row::-webkit-scrollbar {
  display: none;
}

/* TARJETA HORIZONTAL */
.news-h-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .04);
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}

.news-h-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
}

.news-h-card__body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.news-h-card__section {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
}

.news-h-card__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
  color: #111;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-radius: 0px !important;
}

.news-h-card__meta {
  font-size: 12px;
  color: #6b7280;
}

/* ===== LISTA VERTICAL DE ANTERIORES ===== */
.news-vertical {
  display: grid;
}

.news-v-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: none;
  border-radius: 18px;
  padding: 10px;
  transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}

.news-v-card__img {
  width: 150px;
  height: 104px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  background: #f3f4f6;
}

.news-v-card__body {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.news-v-card__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.news-v-card__section {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #6b7280;
}

.news-v-card__date {
  font-size: 12px;
  color: #6b7280;
}

.news-v-card__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  color: #111;
}

.news-v-card__excerpt {
  font-size: 13px;
  line-height: 1.45;
  color: #4b5563;
  display: none;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-radius: 0px !important;
}

/* ===== ESTADOS ===== */
.news-empty {
  border: 1px dashed rgba(0, 0, 0, .12);
  border-radius: 16px;
  padding: 18px;
  color: #6b7280;
  background: #fafafa;
  font-size: 14px;
}

.news-load-wrap {
  display: grid;
  place-items: center;
  padding: 16px 0 4px;
}

.news-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(0, 0, 0, .12);
  border-top-color: #111;
  animation: newsSpin .8s linear infinite;
  display: none;
}

.news-spinner.is-visible {
  display: block;
}

@keyframes newsSpin {
  to {
    transform: rotate(360deg);
  }
}

.news-sentinel {
  height: 1px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #news-list {
    padding: 0px 12px 34px;
  }

  .news-row {
    grid-auto-columns: 84vw;
  }

  .news-h-card__img {
    height: 190px;
  }

  .news-v-card {
    grid-template-columns: 96px 1fr;
    gap: 12px;
  }

  .news-v-card__img {
    width: 96px;
    height: 80px;
  }

  .news-v-card__title {
    font-size: 15px;
  }

  .news-v-card__excerpt {
    font-size: 12px;
  }
}

/* =========================================
   Limitar titulares a 3 líneas con "..."
========================================= */

/* Títulos de tarjetas horizontales */
.news-h-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* máximo 3 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Títulos de tarjetas verticales */
.news-v-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  /* máximo 3 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-radius: 0px !important;
}