/* Crossfade en mobile: dos capas superpuestas en .nh-right */
@media (max-width: 779px) {
  #historia .nh-right {
    position: relative !important;
    overflow: visible !important;
  }
  #historia .nh-img-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: opacity 750ms cubic-bezier(.22, 1, .36, 1);
    will-change: opacity;
  }
  #historia .nh-img-layer img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
  }
  /* La primera capa visible define el espacio; la segunda flota encima */
  #historia .nh-img-layer--a {
    position: relative;
    z-index: 1;
  }
  #historia .nh-img-layer--b {
    z-index: 2;
    opacity: 0;
  }
  /* Respetar prefers-reduced-motion */
  @media (prefers-reduced-motion: reduce) {
    #historia .nh-img-layer {
      transition: none;
    }
  }
}
/* Desktop: ocultar capas mobile, mantener imagen original */
@media (min-width: 780px) {
  #historia .nh-img-layer {
    display: none !important;
  }
  #historia #nh-img {
    display: block !important;
    transition: opacity 800ms cubic-bezier(.22, 1, .36, 1) !important;
    will-change: opacity;
  }
}
