/* ==========================================================================
   Noticias: tarjeta (portada, /noticias y "Otras noticias"), listado y detalle
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tarjeta de noticia
   -------------------------------------------------------------------------- */
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 3px solid var(--pm-blue-500);
  border-radius: 16px;
  background: var(--pm-navy-850);
  transition: translate .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.news-card:hover {
  translate: 0 -6px;
  border-color: var(--pm-gold-500);
  box-shadow: var(--pm-shadow);
}

.news-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1rem 1.1rem;
}

.news-card__title {
  margin: 0 0 .5rem;
  color: var(--pm-gold-400);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
}

.news-card__title a:hover {
  color: var(--pm-gold-300);
}

.news-card__date {
  display: block;
  margin-bottom: .6rem;
  color: var(--pm-blue-300);
  font-size: .88rem;
  font-weight: 600;
}

.news-card__excerpt {
  margin-bottom: 1rem;
  color: var(--pm-text);
  font-size: .93rem;
  line-height: 1.6;
}

.news-card__more {
  display: inline-flex;
  align-items: center;
  align-self: flex-end;
  gap: .4rem;
  margin-top: auto;
  color: var(--pm-gold-400);
  font-size: .9rem;
  font-style: italic;
  letter-spacing: .06em;
}

.news-card__more i {
  transition: translate .2s ease;
}

.news-card:hover .news-card__more i {
  translate: 4px 0;
}


/* --------------------------------------------------------------------------
   2. Listado (/noticias)
   -------------------------------------------------------------------------- */
.news-list {
  padding: 2.5rem 0 4.5rem;
}

.news-list__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.news-list__count {
  margin: 0;
  color: var(--pm-text-soft);
  font-size: .92rem;
}

.news-list__count a {
  color: var(--pm-gold-400);
  text-decoration: underline;
}

.news-search {
  position: relative;
  display: flex;
  flex: 1 1 360px;
  max-width: 520px;
  gap: .5rem;
}

.news-search > i {
  position: absolute;
  top: 50%;
  left: 1rem;
  color: var(--pm-text-soft);
  translate: 0 -50%;
}

.news-search input {
  flex: 1;
  min-width: 0;
  padding: .7rem 1rem .7rem 2.6rem;
  border: 2px solid var(--pm-navy-700);
  border-radius: 999px;
  background: var(--pm-navy-950);
  color: var(--pm-text);
}

.news-search input::placeholder {
  color: var(--pm-text-soft);
}

.news-search input:focus {
  border-color: var(--pm-gold-500);
  outline: none;
  box-shadow: 0 0 0 3px rgba(247, 209, 56, .25);
}

.news-search .btn {
  border-radius: 999px;
}

.news-empty {
  padding: 3rem 1rem;
  border: 2px dashed var(--commune-line);
  border-radius: 16px;
  color: var(--pm-text-soft);
  text-align: center;
}

.news-empty i {
  display: block;
  margin-bottom: .5rem;
  color: var(--pm-gold-500);
  font-size: 2.4rem;
}

.news-empty p {
  margin: 0;
}

/* La más reciente, en grande */
.news-feature {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  margin-bottom: 2rem;
  overflow: hidden;
  border: 3px solid var(--pm-blue-500);
  border-radius: 16px;
  background: var(--pm-navy-850);
  transition: border-color .25s ease, box-shadow .25s ease;
}

.news-feature:hover {
  border-color: var(--pm-gold-500);
  box-shadow: var(--pm-shadow);
}

.news-feature__media .media-img,
.news-feature__media .mock-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-feature__body {
  display: flex;
  flex-direction: column;
  padding: 2rem 2.25rem;
}

.news-feature__title {
  margin: 0 0 .6rem;
  color: var(--pm-gold-400);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

.news-feature__title a:hover {
  color: var(--pm-gold-300);
}

.news-feature__excerpt {
  margin-bottom: 1.25rem;
  color: var(--pm-text);
  font-size: 1.02rem;
  line-height: 1.65;
}

.news-feature:hover .news-card__more i {
  translate: 4px 0;
}

.news-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 2rem;
  margin-top: 2.5rem;
}

.news-pagination__info {
  color: var(--pm-text-soft);
  font-size: .92rem;
}

.news-pagination__step {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.2rem;
  border: 2px solid var(--pm-blue-500);
  border-radius: 999px;
  color: var(--pm-gold-400);
  font-weight: 700;
}

.news-pagination__step:hover {
  border-color: var(--pm-gold-500);
  color: var(--pm-gold-300);
}

/* --------------------------------------------------------------------------
   3. Detalle de una noticia
   -------------------------------------------------------------------------- */
.news-article .commune-hero__title {
  max-width: 24ch;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.1;
}

.news-article .commune-hero__lead {
  max-width: 62ch;
}

.news-preview-bar {
  padding: .7rem 0;
  background: var(--pm-gold-500);
  color: var(--pm-navy-950);
  font-size: .95rem;
}

.news-preview-bar a {
  margin-left: .5rem;
  color: var(--pm-navy-950);
  font-weight: 700;
  text-decoration: underline;
}

.news-article__body {
  padding: 2.5rem 0 3.5rem;
}

.news-article__column {
  max-width: 820px;
  margin: 0 auto;
}

.news-article__cover {
  margin: 0 0 1.25rem;
  overflow: hidden;
  border: 3px solid var(--pm-blue-500);
  border-radius: 16px;
}

.news-article__cover img {
  display: block;
  width: 100%;
  height: auto;
}

.news-article__cover-link {
  display: block;
  cursor: zoom-in;
}

.news-article__cover-link:focus-visible {
  outline: 3px solid var(--pm-gold-500);
  outline-offset: -3px;
}

.news-article__meta {
  margin-bottom: 1.5rem;
  color: var(--pm-blue-300);
  font-size: .92rem;
  font-weight: 600;
}

.news-article__meta time::first-letter {
  text-transform: uppercase;
}

/* Texto escrito en el editor del panel */
.news-content {
  color: var(--pm-text);
  font-size: 1.08rem;
  line-height: 1.8;
}

.news-content > :last-child {
  margin-bottom: 0;
}

.news-content p,
.news-content ul,
.news-content ol {
  margin-bottom: 1.15rem;
}

.news-content h2,
.news-content h3 {
  margin: 2rem 0 .75rem;
  color: var(--pm-gold-400);
  font-weight: 800;
  line-height: 1.2;
}

.news-content h2 {
  font-size: 1.6rem;
}

.news-content h3 {
  font-size: 1.25rem;
}

.news-content a {
  color: var(--pm-gold-400);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-content a:hover {
  color: var(--pm-gold-300);
}

.news-content li + li {
  margin-top: .35rem;
}

.news-content li::marker {
  color: var(--pm-gold-500);
}

.news-content blockquote {
  margin: 1.75rem 0;
  padding: .5rem 0 .5rem 1.4rem;
  border-left: 4px solid var(--pm-gold-500);
  color: var(--pm-text-soft);
  font-size: 1.15rem;
  font-style: italic;
}

.news-content strong {
  color: #fff;
}

/* Galería al final de la nota */
.news-gallery {
  margin-top: 2.5rem;
}

.news-gallery__title {
  margin-bottom: 1rem;
  color: var(--pm-gold-400);
  font-size: 1.25rem;
  font-weight: 700;
}

.news-gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-gallery__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: var(--pm-navy-850);
}

.news-gallery__item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .35s ease;
}

.news-gallery__item:hover img,
.news-gallery__item:focus-visible img {
  transform: scale(1.05);
}

.news-gallery__caption {
  position: absolute;
  inset: auto 0 0;
  padding: 1.5rem .75rem .6rem;
  background: linear-gradient(transparent, rgba(3, 12, 28, .85));
  color: #fff;
  font-size: .85rem;
  line-height: 1.3;
}

/* Compartir */
.news-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--commune-line);
}

.news-share__label {
  margin-right: .25rem;
  color: var(--pm-text-soft);
  font-family: var(--pm-font-condensed);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.news-share__btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem 1rem;
  border: 2px solid var(--pm-navy-700);
  border-radius: 999px;
  background: transparent;
  color: var(--pm-text);
  font-size: .92rem;
  font-weight: 600;
}

.news-share__btn:hover {
  border-color: var(--pm-gold-500);
  color: var(--pm-gold-300);
}

/* Otras noticias */
.news-others {
  padding: 3rem 0 4.5rem;
  border-top: 1px solid var(--commune-line);
  background: var(--pm-navy-950);
}

.news-others__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.news-others__all {
  color: var(--pm-gold-400);
  font-weight: 700;
}

.news-others__all:hover {
  color: var(--pm-gold-300);
}

@media (max-width: 767.98px) {
  .news-feature {
    grid-template-columns: 1fr;
  }

  .news-feature__body {
    padding: 1.25rem 1.25rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-gallery__item img {
    transition: none;
  }
}
