.noticias-page {
  --noticias-azul: #00579f;
  --noticias-fondo: #f3f8fc;
}

.noticias-page *,
.noticias-page *::before,
.noticias-page *::after {
  box-sizing: border-box;
}

/* Grupo de cada año */
.noticias-grupo {
  width: 100%;
  margin-bottom: 58px;
}

/* Encabezado del año */
.noticias-anio {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 38px;
  padding: 22px 28px;
  color: #00579f;
  background: #f3f8fc;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
}
.noticias-flecha {
  display: inline-block;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 0.25s ease;
}

.noticias-grupo:not(.is-open) .noticias-flecha {
  transform: rotate(180deg);
}

.noticias-grupo:not(.is-open) .noticias-grid {
  display: none !important;
}

.noticias-anio::after {
  position: absolute;
  top: 50%;
  right: 28px;
  content: "⌃";
  font-size: 1.6rem;
  line-height: 1;
  transform: translateY(-50%);
}

/* Tres noticias por fila */
.noticias-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 52px 42px;
  width: 100%;
  align-items: start;
}

.noticias-item {
  width: 100% !important;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
}

/* Tarjeta */
.noticias-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  text-align: center;
}

/* Imagen cuadrada */
.noticias-imagen {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
  border-radius: 42px;
  box-shadow: 0 8px 20px rgba(0, 87, 159, 0.1);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease;
}

.noticias-card:hover .noticias-imagen {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(0, 87, 159, 0.18);
}

.noticias-imagen a {
  display: block;
  width: 100%;
  height: 100%;
}

.noticias-imagen img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
}

/* Título */
.noticias-titulo {
  margin: 14px 8px 0;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}

.noticias-titulo a {
  color: var(--noticias-azul);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Por si Drupal imprime el campo auxiliar */
.views-field-created,
.noticias-fecha {
  display: none !important;
}

/* Dos columnas en tablet */
@media (max-width: 900px) {
  .noticias-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 38px 28px;
  }
}

/* Una columna en móvil */
@media (max-width: 560px) {
  .noticias-grid {
    grid-template-columns: 1fr !important;
  }

  .noticias-anio {
    padding: 18px 20px;
  }
}















.noticia-detalle-layout {
  display: grid;
  width: 100%;
  gap: 42px;
  align-items: start;
}

.noticia-detalle-layout.con-imagenes {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.noticia-detalle-layout.sin-imagenes {
  grid-template-columns: 1fr;
}

.noticia-detalle-media,
.noticia-detalle-texto {
  min-width: 0;
}

.noticia-detalle-media .carousel {
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: #f3f8fc;
  box-shadow: 0 10px 28px rgba(0, 87, 159, 0.12);
}
.noticia-detalle-media .carousel-item img {
  border-radius: 0 !important;
}

.noticia-detalle-media .carousel-inner {
  width: 100%;
}

.noticia-detalle-media .carousel-item img {
  display: block;
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.noticia-detalle-texto {
  color: #282828;
  font-size: 1rem;
  line-height: 1.7;
  text-align: justify;
}
.noticia-detalle-texto p,
.noticia-detalle-texto li {
  text-align: justify;
}

.noticia-detalle-texto > :first-child {
  margin-top: 0;
}

.noticia-detalle-texto img {
  max-width: 100%;
  height: auto;
}

.noticia-detalle-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-top: 52px;
  padding-top: 28px;
  border-top: 1px solid #dce8f2;
}

.noticia-boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 2px solid #00579f;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease;
}

.noticia-boton:hover,
.noticia-boton:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 87, 159, 0.18);
  text-decoration: none;
}

.noticia-boton-principal {
  color: #fff;
  background: #00579f;
}

.noticia-boton-principal:hover,
.noticia-boton-principal:focus {
  color: #fff;
  background: #164779;
}

.noticia-boton-secundario {
  color: #00579f;
  background: #fff;
}

.noticia-boton-secundario:hover,
.noticia-boton-secundario:focus {
  color: #fff;
  background: #00579f;
}

@media (max-width: 900px) {
  .noticia-detalle-layout.con-imagenes {
    grid-template-columns: 1fr;
  }

  .noticia-detalle-media .carousel-item img {
    height: 420px;
  }
}

@media (max-width: 560px) {
  .noticia-detalle-media .carousel-item img {
    height: 300px;
  }

  .noticia-detalle-acciones {
    flex-direction: column;
  }

  .noticia-boton {
    width: 100%;
  }
}
