/* ==========================================================================
   Coppelius · ficha de noticia (noticia-detalle.html) — Fase 1
   Plantilla Single de las entradas (posts). SIN diseño en Figma: estructura
   de la referencia (Wiener Staatsoper, magazin/detail) adaptada a styles.css.
   Se carga después de styles.css y media.css (.news-card, .media-heading).

   Bloques: .news-article · .news-share · .news-gallery · .news-related
   Fase 2: el cuerpo es Post Content; sus reglas de elemento (p, h2, h3, ul)
   van colgadas de .news-article__body, que es la clase del elemento.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Cabecera del artículo · columna centrada de 880px
   -------------------------------------------------------------------------- */
.news-article__header {
  padding: var(--space-16) var(--space-gutter) var(--space-12);
}

.news-article__header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-stack-md);
  width: 100%;
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.news-article__meta {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-tight);
  color: var(--color-text-muted);
}

.news-article__category {
  font-size: var(--font-size-overline);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-accent-on-light);
}

.news-article__category:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Separador de punto entre fecha y tiempo de lectura */
.news-article__reading::before {
  content: "·";
  margin-right: var(--space-4);
  color: var(--color-text-disabled);
}

.news-article__title {
  font-size: var(--font-size-h1);
  color: var(--color-text-heading);
}

.news-article__lead {
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
  color: var(--color-text-body);
}

.news-article__author {
  font-size: var(--font-size-body-sm);
  line-height: var(--line-height-tight);
  color: var(--color-text-muted);
}

.news-article__author-name {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-heading);
}

/* --------------------------------------------------------------------------
   Imagen destacada · a lo ancho del contenedor
   -------------------------------------------------------------------------- */
.news-article__hero {
  margin: var(--space-0);
  padding-inline: var(--space-gutter);
}

.news-article__hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.news-article__hero-media {
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-radius: var(--radius-surface);
  background-color: var(--color-bg-disabled);
}

.news-article__hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-article__caption {
  font-size: var(--font-size-caption);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   Cuerpo · compartir (izquierda, sticky) | texto 720 | hueco
   -------------------------------------------------------------------------- */
.news-article__layout {
  padding: var(--space-16) var(--space-gutter) var(--space-20);
}

.news-article__layout-inner {
  display: grid;
  grid-template-columns: minmax(0px, 1fr) minmax(0px, 720px) minmax(0px, 1fr);
  grid-template-areas: "share body .";
  gap: var(--space-12);
  align-items: start;
}

.news-article__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: var(--space-stack-md);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body);
  color: var(--color-text-body);
}

.news-article__body h2 {
  margin-top: var(--space-6);
  font-size: var(--font-size-h3);
  color: var(--color-text-heading);
}

.news-article__body h3 {
  margin: var(--space-4) var(--space-0) var(--space-0);
  font-family: var(--font-family-display);
  font-size: var(--font-size-h4);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
  color: var(--color-text-heading);
}

.news-article__link {
  color: var(--color-text-link);
  text-decoration: underline;
  text-decoration-thickness: var(--border-width-thin);
  text-underline-offset: 0.2em;
}

.news-article__link:hover {
  color: var(--color-text-link-hover);
  text-decoration-thickness: var(--border-width-focus);
}

.news-article__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.news-article__list li {
  position: relative;
  padding-left: var(--space-6);
}

.news-article__list li::before {
  content: "";
  position: absolute;
  top: 0.7em;
  left: 0px;
  width: 8px;
  height: 8px;
  background-color: var(--color-border-accent-on-light);
  transform: rotate(45deg);
}

/* Cita destacada */
.news-article__quote {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin: var(--space-6) var(--space-0);
  padding: var(--space-8) var(--space-0);
  border-top: var(--border-width-focus) solid var(--color-border-accent-on-light);
  border-bottom: var(--border-width-thin) solid var(--color-border-default);
}

.news-article__quote-text {
  margin: var(--space-0);
  font-family: var(--font-family-display);
  font-size: var(--font-size-h4);
  font-style: italic;
  line-height: var(--line-height-heading);
  color: var(--color-text-heading);
}

.news-article__quote-text p::before {
  content: "“";
}

.news-article__quote-text p::after {
  content: "”";
}

.news-article__quote-author {
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-accent-on-light);
}

.news-article__quote-author::before {
  content: "— ";
}

/* Imagen dentro del texto */
.news-article__figure {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-4) var(--space-0);
}

.news-article__figure-image {
  width: 100%;
  border-radius: var(--radius-surface);
}

.news-article__actions {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
  padding-top: var(--space-8);
  border-top: var(--border-width-thin) solid var(--color-border-default);
}

/* --------------------------------------------------------------------------
   Compartir
   -------------------------------------------------------------------------- */
.news-share {
  grid-area: share;
  position: sticky;
  top: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.news-share__title {
  font-size: var(--font-size-overline);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.news-share__list {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-1);
}

.news-share__link {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  min-height: 36px;
  padding: var(--space-0);
  border: 0px;
  background-color: transparent;
  font-size: var(--font-size-body-sm);
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: var(--color-text-link);
  cursor: pointer;
}

.news-share__link:hover {
  color: var(--color-text-link-hover);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.news-share__status {
  min-height: 1.2em;
  font-size: var(--font-size-caption);
  line-height: var(--line-height-tight);
  color: var(--color-feedback-success-text);
}

/* --------------------------------------------------------------------------
   Galería · 1 grande (2 filas) + 3
   -------------------------------------------------------------------------- */
.news-gallery {
  padding: var(--space-0) var(--space-gutter) var(--space-20);
}

.news-gallery__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.news-gallery__title {
  font-size: var(--font-size-h3);
  color: var(--color-text-heading);
}

.news-gallery__grid {
  display: grid;
  grid-template-columns: minmax(0px, 2fr) minmax(0px, 1fr) minmax(0px, 1fr);
  grid-auto-rows: 280px;
  gap: var(--space-4);
}

.news-gallery__item {
  min-width: 0px;
}

.news-gallery__item--wide {
  grid-row: span 2;
}

.news-gallery__item:last-child {
  grid-column: span 2;
}

.news-gallery__figure {
  position: relative;
  height: 100%;
  margin: var(--space-0);
  overflow: hidden;
  border-radius: var(--radius-surface);
  background-color: var(--color-bg-disabled);
}

.news-gallery__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-gallery__caption {
  position: absolute;
  inset: auto 0px 0px 0px;
  padding: var(--space-8) var(--space-4) var(--space-3);
  background-image: linear-gradient(to top, var(--color-bg-overlay), transparent);
  font-size: var(--font-size-caption);
  line-height: var(--line-height-body);
  color: var(--color-text-inverse);
}

/* --------------------------------------------------------------------------
   Más noticias
   -------------------------------------------------------------------------- */
.news-related {
  padding: var(--space-section-y) var(--space-gutter);
  background-color: var(--color-bg-subtle);
}

.news-related__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

.news-related__header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-6);
}

.news-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0px, 1fr));
  gap: var(--space-6);
}

.news-related__item {
  display: flex;
  flex-direction: column;
  min-width: 0px;
}

/* --------------------------------------------------------------------------
   ≤991 · tableta (derivado): compartir pasa debajo del texto
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .news-article__layout-inner {
    grid-template-columns: minmax(0px, 1fr);
    grid-template-areas:
      "body"
      "share";
    max-width: 720px;
    gap: var(--space-10);
  }

  .news-share {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3) var(--space-6);
    padding-top: var(--space-6);
    border-top: var(--border-width-thin) solid var(--color-border-default);
  }

  .news-share__list {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1) var(--space-6);
  }

  .news-share__link {
    min-height: var(--size-tap-target);
  }

  .news-share__status {
    flex-basis: 100%;
  }

  .news-gallery__grid {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
    grid-auto-rows: 220px;
  }

  .news-gallery__item--wide {
    grid-column: span 2;
  }

  .news-related__grid {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
  }

  /* 2 columnas: la 3.ª tarjeta sobra */
  .news-related__item:nth-child(3) {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   ≤767 · móvil
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .news-article__header {
    padding-top: var(--space-10);
    padding-bottom: var(--space-8);
  }

  .news-article__header-inner {
    align-items: flex-start;
    gap: var(--space-stack-sm);
    text-align: left;
  }

  .news-article__meta {
    justify-content: flex-start;
  }

  .news-article__hero-media {
    aspect-ratio: 4 / 3;
  }

  .news-article__layout {
    padding-top: var(--space-10);
    padding-bottom: var(--space-12);
  }

  .news-article__quote {
    padding-block: var(--space-6);
  }

  .news-gallery {
    padding-bottom: var(--space-12);
  }

  .news-gallery__inner {
    gap: var(--space-6);
  }

  .news-gallery__grid {
    grid-template-columns: minmax(0px, 1fr);
    grid-auto-rows: 240px;
    gap: var(--space-3);
  }

  .news-gallery__item--wide,
  .news-gallery__item:last-child {
    grid-column: auto;
    grid-row: auto;
  }

  .news-related__inner {
    gap: var(--space-6);
  }

  .news-related__grid {
    grid-template-columns: minmax(0px, 1fr);
  }

  .news-related__item:nth-child(3) {
    display: flex;
  }
}
