/* ==========================================================================
   ACTUALIDAD · V31 (creada en V30)
   Título, barra de vistas y filtros (fija bajo la cabecera al bajar), vista destacada (1 grande + 3 pequeñas en un solo
   bloque en el que van pasando las noticias) y vista en cuadrícula (filas de cuatro).
   WordPress: sin portada de escenario ni coreografía de scroll (flujo vertical en todos los tamaños). Las tarjetas
   (css/ncard.css) y la cuadrícula (.actu-grid) también las usan los listados (templates/parts/listado.php).
   Prefijo «actu-»: «act-» ya lo usan las fichas de actuación.
   WordPress: las tarjetas de noticia (.ncard, sin imagen) están en css/ncard.css, común a Actualidad, listados, Home
   y ficha de Comunicación. Aquí solo su colocación en la vista destacada (.actu-slot) y en la cuadrícula.
   ========================================================================== */

.page-actualidad main { background: var(--crema); }

/* ---------- 1 · Cabecera ----------
   WordPress: sin la portada de escenario (imagen de cabecera, ornamentos y título que viajaba; ya anulada en V45).
   El título queda donde aterrizaba con la coreografía: arriba a la izquierda, sobre la barra. */
.actu-intro { position: relative; background: var(--crema); }
.actu-intro-stage { position: relative; padding: calc(var(--header-h) + clamp(36px, 5vw, 60px)) 0 clamp(16px, 2vw, 24px); }
.actu-head-title { display: inline-block; margin: 0; font-size: clamp(40px, 4.4vw, 64px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; color: var(--azul-profundo); }

/* ---------- 2 · Noticias ---------- */
.actu-news { position: relative; z-index: 3; padding-bottom: clamp(60px, 8vw, 120px); }

/* Barra de vistas y filtros: fija bajo la cabecera mientras se recorren las noticias */
.actu-bar { position: sticky; top: var(--header-h); z-index: 20; background: var(--crema); border-bottom: 1px solid var(--azul-linea); }
.actu-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
/* V31: las vistas son solo sus cuadraditos, sin recuadro: la elegida en azul oscuro y la otra al 65 % */
.actu-views { display: flex; gap: 6px; }
.actu-view {
  display: grid; place-items: center; width: 44px; height: 40px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; color: var(--azul-profundo); cursor: pointer; opacity: .65; transition: opacity .3s var(--ease);
}
.actu-view svg { width: 30px; height: 22px; fill: currentColor; }
.actu-view:hover, .actu-view.is-active { opacity: 1; }
.actu-view:focus-visible, .actu-icon-btn:focus-visible, .actu-clear:focus-visible, .actu-nav button:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 3px; }

.actu-filters { display: flex; align-items: center; gap: 6px; }
.actu-icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--azul-profundo); cursor: pointer; transition: background-color .3s var(--ease);
}
.actu-icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.actu-icon-btn:hover, .actu-icon-btn[aria-expanded="true"] { background: var(--azul-tinta); }
.actu-icon-btn.has-value::after { content: ""; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--azul-claro); }
/* Lupa: al pulsarla se abre el espacio para escribir */
.actu-search { display: flex; align-items: center; }
.actu-search-input {
  width: 0; height: 40px; padding: 0; border: 0; border-bottom: 2px solid transparent; background: transparent; opacity: 0;
  font: inherit; font-size: 15px; color: var(--azul-profundo); outline: none;
  transition: width .45s var(--ease), padding .45s var(--ease), opacity .3s var(--ease), border-color .3s var(--ease);
}
.actu-search.is-open .actu-search-input { width: clamp(180px, 18vw, 260px); padding: 0 8px; opacity: 1; border-bottom-color: var(--azul); }
.actu-search-input::placeholder { color: var(--texto-suave); opacity: .8; }
/* Fechas: pestaña que se abre bajo el icono de filtros */
.actu-dates { position: relative; }
.actu-dates-panel {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 5; display: grid; gap: 10px; width: min(340px, calc(100vw - 2 * var(--gutter))); padding: 16px;
  border-radius: 16px; background: #fff; box-shadow: var(--sombra); border: 1px solid var(--azul-linea);
}
.actu-dates-panel::before { content: ""; position: absolute; right: 16px; top: -7px; width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--azul-linea); border-top: 1px solid var(--azul-linea); transform: rotate(45deg); }
.actu-dates-panel[hidden] { display: none; }
/* 17/11/2026: los campos no caben en el panel y se cortaban por la derecha: el panel crece (sin pasar del ancho de la
   pantalla) y el control de cada campo ocupa el sitio que queda, sin desbordar. */
.actu-field { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; height: 44px; padding: 0 14px; border: 1.5px solid var(--azul-linea); border-radius: 12px; background: #fff; color: var(--azul-profundo); }
.actu-field:focus-within { border-color: var(--azul); }
.actu-field span { flex: 0 0 auto; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-suave); }
.actu-field select { flex: 1 1 auto; min-width: 0; text-align: right; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 700; color: var(--azul-profundo); outline: none; cursor: pointer; }
.actu-field input { flex: 1 1 auto; min-width: 0; text-align: right; border: 0; background: transparent; font: inherit; font-size: 15px; color: var(--azul-profundo); outline: none; }
.actu-dates-panel .actu-clear { justify-self: end; height: 32px; padding: 0 4px; }
.actu-clear { height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; font: inherit; font-size: 14px; font-weight: 900; letter-spacing: .04em; color: var(--azul); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.actu-clear:hover { color: var(--azul-profundo); }

.actu-body { padding-top: clamp(24px, 3vw, 40px); }
.actu-status { margin: 0 0 clamp(20px, 2.4vw, 32px); font-size: 14px; color: var(--texto-suave); }

/* Vista destacada: la noticia grande y, a la derecha, tres pequeñas en vertical.
   V31: un solo bloque en el que van pasando las noticias. Cada hueco (.actu-slot) apila sus tarjetas (una por tanda de 4)
   en la misma celda; js/actualidad.js descubre el panel de la siguiente y cruza los textos.
   WordPress: sin avance ligado al scroll; las tandas se pasan con el contador, las flechas y los botones de tanda.
   Sin imágenes, cada hueco toma el alto del texto más largo de sus tandas: se recortan título y resumen. */
.actu-feat { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); gap: 18px clamp(24px, 2.6vw, 40px); }
.actu-feat-main { grid-column: 1; grid-row: 1 / span 3; display: flex; flex-direction: column; }
.actu-feat-main .actu-status { margin-bottom: 14px; }
.actu-feat-main .actu-slot { flex: 1 1 auto; }
.actu-slot { position: relative; display: grid; min-width: 0; }
.actu-slot > .ncard { grid-area: 1 / 1; }
.actu-slot--small { grid-column: 2; }
.actu-slot > .ncard:not(:first-child) { pointer-events: none; } /* solo la tarjeta visible recibe el clic (js/actualidad.js) */
.actu-slot > .ncard:not(:first-child) .ncard-panel { clip-path: inset(0 0 0 100%); }
.actu-slot > .ncard:not(:first-child) .ncard-body { opacity: 0; visibility: hidden; }
.actu-slot .ncard-panel, .actu-slot .ncard-body { will-change: clip-path, opacity, transform; }
/* Cuadrícula y listados: cada tarjeta ocupa el alto de su fila */
.actu-grid > li { display: flex; min-width: 0; }
.actu-grid .ncard { flex: 1 1 auto; }
/* Paso de las tandas: contador y un botón por tanda */
.actu-nav { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; }
.actu-count { font-size: 14px; font-weight: 700; letter-spacing: .06em; color: rgba(31, 60, 122, .6); font-variant-numeric: tabular-nums; }
.actu-count b { font-size: 20px; font-weight: 900; color: var(--azul-profundo); }
.actu-dots { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.actu-dots button { display: block; width: 34px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: var(--azul-profundo); opacity: .25; cursor: pointer; transition: opacity .3s var(--ease), width .3s var(--ease); }
.actu-dots button.is-active { opacity: 1; width: 52px; }
.actu-dots button:hover { opacity: .6; }
.actu-dots button.is-active:hover { opacity: 1; }
/* WordPress: flechas (con muchas tandas no caben los botones de cada una) */
.actu-nav-btn { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1.5px solid var(--azul-linea); border-radius: 50%; background: transparent; color: var(--azul-profundo); cursor: pointer; transition: background-color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease); }
.actu-nav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.actu-nav-btn:hover:not(:disabled) { background: var(--azul-tinta); border-color: var(--azul); }
.actu-nav-btn:disabled { opacity: .35; cursor: default; }
.actu-nav-btn:focus-visible { outline: 3px solid var(--mostaza); outline-offset: 3px; }

/* Vista en cuadrícula: filas de cuatro */
.actu-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(32px, 3.4vw, 48px) clamp(20px, 2vw, 30px); }

.actu-empty { padding: 60px 0; text-align: center; color: var(--azul-profundo); font-size: 18px; font-weight: 700; }
.actu-empty p { margin: 0 0 8px; }

/* ---------- Apariciones ---------- */
html.js .actu-reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
html.js .actu-reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .actu-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .actu-feat { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .actu-feat-main, .actu-slot--small { grid-column: 1; grid-row: auto; }
  .actu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .actu-bar-inner { flex-wrap: nowrap; gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .actu-search.is-open .actu-search-input { width: min(150px, 36vw); }
  .actu-view { width: 38px; }
  .actu-nav { justify-content: center; }
}
@media (max-width: 560px) {
  .actu-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  html.js .actu-reveal { opacity: 1; transform: none; transition: none; }
}
