/* ==========================================================================
   Noticias C3 — estilos propios del apartado de noticias.
   La base (fuentes, colores, navbar, hero y footer) está en c3-layout.css.
   ========================================================================== */

/* ==========================================================================
   NOTICIAS — utilidades comunes
   ========================================================================== */
.nt-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.nt-title {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: normal;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.nt-divider {
  background-color: var(--color-secondary);
  height: 3px;
  width: 80px;
  border: none;
  margin: 15px 0 25px;
  opacity: 1;
}

.nt-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--e-global-color-muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.nt-text,
.nt-content p {
  color: var(--color-primary);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 1.4rem;
}

.nt-text--bold {
  font-weight: 700;
}

.nt-text a,
.nt-content a {
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.nt-text a:hover,
.nt-content a:hover {
  text-decoration: underline;
}

.nt-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: var(--color-secondary);
  color: #ffffff;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  padding: 10px 26px;
  border-radius: 6px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(51, 202, 51, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.nt-btn:hover {
  color: #ffffff;
  background-color: #2bb32b;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(51, 202, 51, 0.35);
}

/* ==========================================================================
   NOTICIA DESTACADA (collage + texto) — estilo Yautalk seg1
   ========================================================================== */
.nt-featured {
  padding: 5rem 0;
}

.nt-featured__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.nt-collage {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.nt-collage__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.nt-collage__grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(7, 54, 82, 0.08);
  display: block;
}

.nt-collage__grid img:nth-child(3) {
  grid-column: span 2;
  aspect-ratio: 16 / 9;
  object-position: center 35%;
}

/* Botón "play" con ondas (sonar) */
.nt-sonar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: block;
  text-decoration: none;
}

.nt-sonar__emitter {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 3px solid var(--color-secondary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.nt-sonar:hover .nt-sonar__emitter,
.nt-sonar:focus-visible .nt-sonar__emitter {
  transform: scale(1.08);
}

.nt-sonar__icon {
  color: var(--color-secondary);
  font-size: 28px;
  margin-left: 5px;
}

.nt-sonar__wave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: var(--color-secondary);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  animation: nt-sonar 1.6s linear infinite;
}

.nt-sonar__wave--2 {
  animation-name: nt-sonar-2;
}

@keyframes nt-sonar {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(2); opacity: 0; }
}

@keyframes nt-sonar-2 {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nt-sonar__wave { animation: none; }
}

@media (min-width: 992px) {
  .nt-featured__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ==========================================================================
   CARRUSEL — CSS puro (scroll-snap)
   - Deslizar con el dedo / trackpad / rueda en todos los navegadores.
   - Flechas y puntos nativos con ::scroll-button / ::scroll-marker donde el
     navegador los soporta (mejora progresiva, sin JavaScript).
   ========================================================================== */
.c3-carousel {
  --per-view: 1;
  --gap: 24px;
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  padding: 8px 4px 24px;
  margin: 0;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) rgba(7, 54, 82, 0.08);
  anchor-name: --c3-carousel;
  anchor-scope: --c3-carousel; /* cada carrusel ancla sus propias flechas */
  scroll-marker-group: after;
}

.c3-carousel::-webkit-scrollbar {
  height: 6px;
}

.c3-carousel::-webkit-scrollbar-track {
  background: rgba(7, 54, 82, 0.08);
  border-radius: 3px;
}

.c3-carousel::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: 3px;
}

.c3-carousel > * {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .c3-carousel--cards { --per-view: 2; }
}

@media (min-width: 992px) {
  .c3-carousel--cards { --per-view: 3; }
}

@supports selector(::scroll-marker) {
  /* Con flechas y puntos nativos, la barra sobra */
  .c3-carousel {
    scrollbar-width: none;
  }

  .c3-carousel::-webkit-scrollbar {
    display: none;
  }

  .c3-carousel::scroll-button(*) {
    position: absolute;
    position-anchor: --c3-carousel;
    top: anchor(center);
    translate: 0 -50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--color-secondary);
    background: #ffffff;
    color: var(--color-primary);
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(7, 54, 82, 0.15);
    transition: background-color 0.2s ease, color 0.2s ease;
    z-index: 3;
  }

  .c3-carousel::scroll-button(*):hover:not(:disabled) {
    background: var(--color-secondary);
    color: #ffffff;
  }

  .c3-carousel::scroll-button(*):disabled {
    opacity: 0.35;
    cursor: default;
  }

  .c3-carousel::scroll-button(left) {
    content: "‹" / "Anterior";
    left: calc(anchor(left) - 22px);
  }

  .c3-carousel::scroll-button(right) {
    content: "›" / "Siguiente";
    right: calc(anchor(right) - 22px);
  }

  .c3-carousel::scroll-marker-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
  }

  .c3-carousel > *::scroll-marker {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-primary);
    opacity: 0.35;
  }

  .c3-carousel > *::scroll-marker:target-current {
    background: var(--color-secondary);
    opacity: 1;
  }
}

/* ==========================================================================
   LISTADO — más noticias (tarjetas dentro del carrusel)
   ========================================================================== */
.nt-more {
  padding: 1rem 0 2rem;
}

.nt-more__heading {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: normal;
  font-size: 1.6rem;
  margin: 0 0 1.5rem;
}

.nt-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(7, 54, 82, 0.08);
  border-bottom: 3px solid transparent;
  transition: transform 0.25s ease, border-color 0.25s ease;
  text-decoration: none;
  height: 100%;
}

.nt-card:hover {
  transform: translateY(-4px);
  border-bottom-color: var(--color-secondary);
}

.nt-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.nt-card__body {
  padding: 20px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.nt-card__title {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-size: 1.2rem;
  font-weight: normal;
  margin: 0 0 10px;
}

.nt-card__summary {
  color: var(--e-global-color-text);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 16px;
  flex: 1;
}

.nt-card__link {
  color: var(--color-accent);
  font-weight: 700;
  font-size: 15px;
}

/* ==========================================================================
   DETALLE DE NOTICIA
   ========================================================================== */
.nt-article {
  max-width: 900px;
  margin: 48px auto 0;
  padding: 0 20px;
}

.nt-article__hero {
  margin: 8px 0 32px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(7, 54, 82, 0.12);
  background: #e2e8f0;
}

.nt-article__hero img {
  width: 100%;
  height: auto;
  display: block;
}

.nt-content h2 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: normal;
  font-size: 1.5rem;
  margin: 2.2rem 0 1rem;
}

.nt-figure {
  margin: 2rem 0;
}

.nt-figure img,
.nt-figure video,
.nt-figure iframe {
  width: 100%;
  border-radius: 12px;
  display: block;
  box-shadow: 0 8px 24px rgba(7, 54, 82, 0.1);
  background: #000;
}

.nt-figure img {
  height: auto;
  background: #e2e8f0;
}

.nt-figure video {
  max-height: 80vh;
}

.nt-figure iframe {
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

/* Dos fotos lado a lado (bloque "imagenes") */
.nt-figure--pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.nt-figure--pair figure {
  margin: 0;
}

.nt-figure--pair img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@media (max-width: 575px) {
  .nt-figure--pair {
    grid-template-columns: 1fr;
  }
}

/* Video vertical (9:16): centrado y sin franjas negras laterales */
.nt-figure--vertical video {
  width: auto;
  max-width: 100%;
  max-height: 80vh;
  margin: 0 auto;
}

/* Resaltados de color dentro del texto (según el documento de contenido) */
.nt-hl {
  font-weight: 700;
}

.nt-hl--green {
  color: var(--color-secondary);
}

.nt-hl--blue {
  color: var(--color-primary);
}

.nt-figure figcaption {
  color: var(--e-global-color-muted);
  font-size: 14px;
  text-align: center;
  margin-top: 10px;
}

.nt-gallery {
  margin: 3rem 0 0;
}

.nt-gallery__heading {
  font-family: var(--font-heading);
  color: var(--color-primary);
  font-weight: normal;
  font-size: 1.4rem;
  margin: 0 0 1rem;
}

.nt-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.nt-thumb {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--color-primary);
}

.nt-thumb img,
.nt-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nt-thumb:hover img,
.nt-thumb:hover video {
  transform: scale(1.06);
  opacity: 0.85;
}

.nt-thumb__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 28px;
  background: rgba(7, 54, 82, 0.35);
}

.nt-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3rem;
  color: var(--color-accent);
  font-weight: 700;
  text-decoration: none;
}

.nt-back:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   VISOR A PANTALLA COMPLETA — CSS puro con :target
   Se abre al navegar a cualquier #id de un elemento dentro del visor
   (.c3-lightbox:has(:target)) y se cierra con el enlace "#cerrar".
   ========================================================================== */
.c3-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(7, 54, 82, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 24px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.c3-lightbox:has(:target) {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

.c3-lightbox__close {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease;
}

.c3-lightbox__close:hover {
  color: #ffffff;
  background: var(--color-secondary);
}

.c3-lightbox .c3-carousel {
  width: min(1000px, 100%);
  padding-bottom: 12px;
}

.c3-lightbox__slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - 140px);
  height: calc(100dvh - 140px);
  scroll-margin: 0;
}

.c3-lightbox__slide img,
.c3-lightbox__slide video,
.c3-lightbox__slide iframe {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.c3-lightbox__slide iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
}

.c3-lightbox .c3-carousel > *::scroll-marker {
  background: #ffffff;
}

.c3-lightbox .c3-carousel > *::scroll-marker:target-current {
  background: var(--color-secondary);
}

/* Bloquea el scroll del fondo mientras el visor está abierto */
body:has(.c3-lightbox :target) {
  overflow: hidden;
}
