/* =========================================================================
   CD TERUEL — Detalle de noticia (cabecera roja + imagen + cuerpo)
   ========================================================================= */
.nd-loading { color: var(--texto-sec); padding: 4rem 0; }

/* Cabecera roja con detalle gráfico */
.nd-head {
  position: relative; overflow: hidden;
  color: #fff;
  padding-top: clamp(1.4rem, 3vw, 2.2rem);
  padding-bottom: clamp(1.8rem, 4vw, 3rem);
  /* base: rojo con leve profundidad hacia el marino en las esquinas */
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(26,42,82,.55), transparent 55%),
    linear-gradient(135deg, var(--rojo) 0%, var(--rojo-600) 100%);
}
/* Abanico de líneas que radian desde la esquina superior derecha */
.nd-head::before {
  content: ""; position: absolute; top: -40%; right: -12%;
  width: 720px; height: 720px; pointer-events: none; opacity: .5;
  background:
    repeating-conic-gradient(from 200deg at 100% 0%,
      rgba(255,255,255,.10) 0deg 0.6deg, transparent 0.6deg 6deg);
  -webkit-mask-image: radial-gradient(circle at 100% 0%, #000 60%, transparent 100%);
          mask-image: radial-gradient(circle at 100% 0%, #000 60%, transparent 100%);
}
/* Rayas diagonales sutiles cubriendo toda la cabecera */
.nd-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg,
    transparent 0 42px, rgba(255,255,255,.045) 42px 44px);
}
.nd-head__inner { position: relative; z-index: 2; }
.nd-crumb { color: rgba(255,255,255,.7); margin-bottom: 1.4rem; }
.nd-crumb a:hover { color: #fff; }
.nd-crumb .icon { opacity: .6; }
.nd-tags { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.nd-cat {
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3);
  font-family: "Barlow", sans-serif; font-weight: 700; font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .35rem .8rem; color: #fff;
}
.nd-date { font-family: "Barlow", sans-serif; font-weight: 600; font-size: .82rem; color: rgba(255,255,255,.8); }
.nd-title {
  font-family: "Cinzel", sans-serif; text-transform: uppercase; font-weight: 700;
  color: #fff; line-height: 1.08; letter-spacing: .005em;
  font-size: clamp(1.8rem, 5vw, 3.4rem); max-width: 20ch;
}

/* Imagen destacada, GRANDE y bajo la cabecera (sin solaparse con el titular).
   Respeta la proporción real de la foto (para las 1:1 sale entera y grande),
   centrada. */
.nd-figure { margin-top: clamp(1.4rem, 3vw, 2.4rem); position: relative; z-index: 3; text-align: center; }
.nd-figure img {
  display: block; margin: 0 auto;
  max-width: 100%; width: auto;
  max-height: 88vh;
  object-fit: contain;
  box-shadow: var(--sombra-lg); background: var(--marino);
}

/* Cuerpo bajo la imagen: centrado, justificado y con poco margen lateral */
.nd-body { padding-block: clamp(2rem, 4vw, 3.2rem); }
.nd-prose { max-width: 90ch; margin: 0 auto; }
.nd-prose p { color: var(--gris-700); font-size: 1.08rem; line-height: 1.75; text-align: justify; text-justify: inter-word; hyphens: auto; }
.nd-prose p + p { margin-top: 1.2rem; }
.nd-back { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--linea); }
.nd-back a { display: inline-flex; align-items: center; gap: .5rem; color: var(--rojo); font-weight: 700; font-family: "Barlow", sans-serif; }
.nd-back a .icon { width: 18px; height: 18px; }
.nd-back a:hover { gap: .8rem; }

/* =========================================================================
   Últimas noticias de la categoría (al final del detalle)
   ========================================================================= */
.nd-rel { background: var(--papel-2); padding-block: clamp(2.5rem, 5vw, 4rem); }
.nd-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.4rem, 3vw, 2rem); }
.nd-rel-head h2 { font-family: "Cinzel", sans-serif; text-transform: uppercase; font-weight: 700; font-size: clamp(1.3rem, 3vw, 1.9rem); color: var(--gris-400); letter-spacing: .02em; }
.nd-rel-all { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--linea-fuerte); border-radius: 999px; padding: .55rem 1.2rem; font-family: "Cinzel", sans-serif; text-transform: uppercase; font-weight: 600; letter-spacing: .04em; font-size: .82rem; color: var(--gris-900); transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.nd-rel-all .icon { width: 15px; height: 15px; }
.nd-rel-all:hover { background: var(--rojo); color: #fff; border-color: var(--rojo); }

.nd-rel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.6rem); }
@media (max-width: 860px) { .nd-rel-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .nd-rel-grid { grid-template-columns: 1fr; } }

.nd-rel-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--linea); overflow: hidden; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.nd-rel-card:hover { transform: translateY(-4px); box-shadow: var(--sombra); }
.nd-rel-media { aspect-ratio: 16/10; overflow: hidden; background: var(--marino); }
.nd-rel-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.nd-rel-card:hover .nd-rel-media img { transform: scale(1.05); }
.nd-rel-body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.nd-rel-title { font-family: "Cinzel", sans-serif; text-transform: uppercase; font-weight: 700; line-height: 1.18; font-size: 1rem; color: var(--gris-900); transition: color var(--dur) var(--ease); }
.nd-rel-card:hover .nd-rel-title { color: var(--rojo); }
.nd-rel-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-family: "Barlow", sans-serif; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.nd-rel-cat { color: var(--rojo); font-weight: 700; }
.nd-rel-date { color: var(--gris-400); font-weight: 600; }

/* Enlace al álbum de fotos vinculado a la noticia */
.nd-album { margin-top: 2rem; }

/* Fotos del álbum vinculado: rejilla 4 por fila (2 en móvil), tamaños adaptables */
.alb-inline__title {
  font-family: "Cinzel", serif; text-transform: uppercase; letter-spacing: .02em;
  font-size: 1.15rem; margin: 2.4rem 0 1rem; text-align: center;
}
.alb-inline { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(.5rem, 1.2vw, .9rem); align-items: start; }
@media (max-width: 760px) { .alb-inline { grid-template-columns: repeat(2, 1fr); } }
.alb-inline__item {
  display: block; overflow: hidden;
  border-radius: var(--radio-lg);
}
.alb-inline__item img { width: 100%; height: auto; display: block; transition: transform .5s var(--ease); }
.alb-inline__item:hover img { transform: scale(1.05); }
