/* ---------------------------------------------------------
   PENTAGRAM UY / NEWS CLOUD
   news_cloud.css (optimizado)
   Objetivos:
   - Orden, consistencia, menos duplicación.
   - Fix overflow horizontal en mobile.
   - Blindaje de contenido (img/table/pre/code) dentro del body.
--------------------------------------------------------- */

/* Base */
.news-page{
  max-width:1120px;
  margin:0 auto;
  padding:1.5rem 1rem 3rem;
  color:#f5f5f5;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
}

/* Header */
.news-header-main{
  margin-bottom:1.5rem;
  border-bottom:1px solid rgba(255,255,255,0.08);
  padding-bottom:0.75rem;
}
.news-header-main-title{
  font-size:1.9rem;
  letter-spacing:0.03em;
  text-transform:uppercase;
  color:#f5f5f5;
  margin:0;
}
.news-header-main-sub{
  margin:0.35rem 0 0 0;
  font-size:0.95rem;
  color:#9a9a9a;
}

/* RSS (UI mínima) */
.news-header-main-rss{
  margin-top:10px;
  display:flex;
  justify-content:flex-start;
  gap:10px;
  font-size:13px;
  opacity:.9;

  /* FIX overflow horizontal */
  flex-wrap:wrap;
}
.news-header-main-rss a{
  text-decoration:underline;
}
.news-header-main-rss span{
  min-width:0;
  overflow-wrap:anywhere;
  word-break:break-word;
}

/* Listado general */
.news-list{
  display:flex;
  flex-direction:column;
  gap:1.5rem;
  margin-top:1.5rem;
}

.news-card{
  border-bottom:1px solid rgba(255,255,255,0.06);
  padding-bottom:1.25rem;

  /* evita que elementos internos rompan layout */
  overflow:hidden;
}
.news-card:last-child{ border-bottom:none; }

.news-card-date{
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#9a9a9a;
  margin-bottom:0.3rem;
}

.news-card-title{
  font-size:1.25rem;
  letter-spacing:0.01em;
  margin:0 0 0.3rem 0;
  line-height:1.25;
}
.news-card-title a{
  color:#f5f5f5;
  text-decoration:none;
}
.news-card-title a:hover,
.news-card-title a:focus{
  color:#e01b4f;
  text-decoration:underline;
}

.news-card-copete{
  font-size:0.95rem;
  color:#d0d0d0;
  line-height:1.4;
  margin:0;
}

/* LISTADO: estructura (mobile default) */
.news-card-top,
.news-card-bottom{
  display:block;
}

.news-card-media{
  margin:10px 0;
  display:block;
}
.news-card-media .news-card-media-inner{
  width:100%;
  aspect-ratio:16/9;
  overflow:hidden;
  border-radius:12px;
}
.news-card-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Layout de nota ampliada + sidebar */
.news-layout{
  display:flex;
  gap:2rem;
  align-items:flex-start;
  margin-top:1.5rem;
}
.news-main{
  flex:1 1 auto;
  min-width:0; /* clave en flex para evitar overflow */
}
.news-sidebar{
  flex:0 0 260px;
  max-width:260px;
}

/* Nota ampliada */
.news-article-header{
  margin-bottom:0.75rem;
  border-bottom:1px solid rgba(255,255,255,0.06);
  padding-bottom:0.75rem;
}
.news-article-date{
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#9a9a9a;
  margin-bottom:0.25rem;
}
.news-article-title{
  font-size:1.6rem;
  letter-spacing:0.02em;
  color:#f5f5f5;
  margin:0 0 0.45rem 0;
  line-height:1.2;

  /* si llega un título muy largo, no rompe */
  overflow-wrap:anywhere;
}
.news-article-copete{
  font-size:1rem;
  color:#dcdcdc;
  line-height:1.5;
  margin:0 0 0.9rem 0;
}

/* Imagen destacada */
.news-article-image{
  margin:1.25rem 0;
  display:flex;
  justify-content:center;
}
.news-article-image img{
  width:100%;
  height:auto;
  display:block;
}

/* Cuerpo */
.news-article-body{
  font-size:0.95rem;
  color:#dcdcdc;
  line-height:1.55;

  /* FIX general: URLs/palabras largas no rompen el ancho */
  overflow-wrap:anywhere;
}
.news-article-body p{ margin:0 0 0.9rem 0; }

.news-article-body h2,
.news-article-body h3{
  margin:1.1rem 0 0.6rem 0;
}

.news-article-body a{ color:#e01b4f; }
.news-article-body a:hover,
.news-article-body a:focus{ text-decoration:underline; }

/* Blindaje: contenido ancho dentro del body */
.news-article-body img,
.news-article-body iframe,
.news-article-body video{
  max-width:100%;
  height:auto;
}
.news-article-body table{
  width:100%;
  max-width:100%;
  display:block;
  overflow-x:auto;
}
.news-article-body pre,
.news-article-body code{
  max-width:100%;
  overflow-x:auto;
}

/* Video YouTube embebido */
.news-yt{
  margin:18px 0 8px 0;
  display:flex;
  justify-content:center;
}
.news-yt-inner{
  width:100%;
  max-width:600px; /* mismo ancho que imagen en desktop */
}
.news-yt-iframe{
  width:100%;
  aspect-ratio:16/9;
  border:0;
  display:block;
}

/* Bloque de artista relacionado */
.news-artist-related{
  margin-top:1.75rem;
  padding-top:1.25rem;
  border-top:1px solid rgba(255,255,255,0.09);
  display:flex;
  align-items:center;
  gap:0.85rem;
}
.news-artist-link{
  display:flex;
  align-items:center;
  gap:0.85rem;
  text-decoration:none;
  color:#f5f5f5;
}
.news-artist-thumb-wrap{
  width:72px;
  height:72px;
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,0.18);
  flex-shrink:0;
}
.news-artist-thumb{
  width:100%;
  height:100%;
  object-fit:cover;
}
.news-artist-text{
  display:flex;
  flex-direction:column;
  gap:0.15rem;
}
.news-artist-label{
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.09em;
  color:#c4c4c4;
}
.news-artist-name{
  font-size:1.05rem;
  font-weight:600;
  letter-spacing:0.02em;
}

/* Sidebar – últimas noticias */
.news-sidebar-box{
  background:rgba(6,6,8,0.96);
  border:1px solid rgba(255,255,255,0.08);
  border-radius:0.75rem;
  padding:1rem 1rem 0.75rem;
}
.news-sidebar-title{
  font-size:0.9rem;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:#f0f0f0;
  margin:0 0 0.75rem 0;
}
.news-sidebar-list{
  list-style:none;
  padding:0;
  margin:0 0 0.75rem 0;
}
.news-sidebar-item{ margin-bottom:0.45rem; }

.news-sidebar-item-date{
  display:block;
  font-size:0.7rem;
  text-transform:uppercase;
  letter-spacing:0.08em;
  color:#808080;
  margin-bottom:0.05rem;
}
.news-sidebar-item a{
  display:block;
  font-size:0.88rem;
  line-height:1.25;
  color:#d0d0d0;
  text-decoration:none;

  /* evitar overflow por títulos largos */
  overflow-wrap:anywhere;
}
.news-sidebar-item a:hover,
.news-sidebar-item a:focus{
  color:#ffffff;
  text-decoration:underline;
}

.news-sidebar-more{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0.35rem 0.9rem;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.35);
  background:transparent;
  color:#f5f5f5;
  font-size:0.8rem;
  text-transform:uppercase;
  letter-spacing:0.12em;
  text-decoration:none;
}
.news-sidebar-more:hover,
.news-sidebar-more:focus{
  background:rgba(224,27,79,0.15);
  border-color:rgba(224,27,79,0.9);
}

/* BLOQUE: REUTILIZACIÓN (hardcode) */
.news-reuse{
  margin:20px 0 4px 0;
  display:flex;
  justify-content:center;
}
.news-reuse-inner{
  width:100%;
  max-width:600px;
  padding:12px 14px;
  border-top:1px dashed rgba(245,245,245,.22);
  border-bottom:1px dashed rgba(245,245,245,.16);
  background:rgba(255,255,255,.03);
  border-radius:12px;
}
.news-reuse-inner p{
  margin:0;
  font-size:12.5px;
  line-height:1.55;
  opacity:.86;
  font-style:italic;
}
.news-reuse-inner a{ text-decoration:underline; }

/* Responsive */
@media (max-width:768px){
  .news-layout{ flex-direction:column; }
  .news-sidebar{
    max-width:100%;
    flex:0 0 auto;
  }
  .news-page{ padding-top:1rem; }
  .news-header-main-title{ font-size:1.6rem; }
}

/* Desktop: imagen/yt/reuse con ancho consistente */
@media (min-width:768px){
  .news-article-image img{ max-width:600px; }

  /* DESKTOP: fecha + título (derecha), foto (izquierda), síntesis (derecha) */
  .news-card.has-media{
    display:grid;
    grid-template-columns:260px 1fr;
    grid-template-areas:
      "media top"
      "media bottom";
    gap:14px;
    align-items:start;
  }
  .news-card.has-media .news-card-media{
    grid-area:media;
    margin:0;
  }
  .news-card.has-media .news-card-media .news-card-media-inner{
    width:260px;
  }
  .news-card.has-media .news-card-top{ grid-area:top; }
  .news-card.has-media .news-card-bottom{ grid-area:bottom; }

  .news-card.no-media{ display:block; }
}
