/* Ajustes propios del tema WordPress (lo que en Next.js resolvían next/image, React y el router). */

/* Imágenes que llenan su contenedor (equivale a <Image fill />) */
.olv-cubre, .olv-contiene,
.pc-media > img, .home-destacadaMedia > img, .gal-celda > img, .eq-foto > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.olv-contiene { object-fit: contain; }
.home-heroMedia > img { border-radius: inherit; }
.eq-foto img { object-position: center 25%; }
.eq-avatares img { width: 100%; height: 100%; }
/* Caras de la burbuja de WhatsApp: tamaño fijo (WordPress da 3000px "virtuales" a las imágenes lazy). */
.wa-caras img { width: 36px; height: 36px; contain-intrinsic-size: 36px; }

/* Transiciones entre páginas (View Transitions entre documentos; navegadores sin soporte navegan normal) */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 160ms ease-in both vt-fade reverse, 160ms ease-in both vt-sube reverse; }
  ::view-transition-new(root) { animation: 260ms ease-out 120ms both vt-fade, 420ms cubic-bezier(.2, .7, .2, 1) both vt-sube; }
  ::view-transition-group(*) { animation-duration: 450ms; }
}

/* Pestañas de la portada: el panel nuevo entra suave */
@media (prefers-reduced-motion: no-preference) {
  [data-tabs] [role="tabpanel"]:not([hidden]) { animation: vt-fade .3s ease-out both; }
}

/* Mensaje de error de campo y estado del formulario enviado por JS */
.cf-campo input[aria-invalid="true"], .cf-campo textarea[aria-invalid="true"] { border-color: #c2410c; }
.cf-form[aria-busy="true"] .btn { opacity: .6; cursor: progress; }

/* Contenido editado en WordPress dentro de .prosa */
.prosa iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radio-m); }
.prosa a { text-decoration: underline; }
