.ms-office-gallery {
  width: 100%;
  max-width: none;
  margin: 0 0 40px;
  color: #163447;
  font-family: Arial, sans-serif;
  outline: none;
}
.ms-office-gallery *, .ms-office-gallery *::before, .ms-office-gallery *::after { box-sizing: border-box; }
.ms-office-gallery [hidden] { display: none !important; }
.ms-office-gallery__frame {
  position: relative;
  width: 100%;
  height: clamp(380px, 76vh, 900px);
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #eef1f3;
  touch-action: pan-y;
}
.ms-office-gallery__slide { width: 100%; height: 100%; margin: 0; padding: 0; }
.ms-office-gallery__slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  user-select: none;
  -webkit-user-drag: none;
}
.ms-office-gallery__caption { display: flex; justify-content: space-between; gap: 16px; width: calc(100% - 32px); max-width: 1200px; margin: 0 auto; padding: 12px 2px 8px; font-size: 15px; line-height: 1.5; }
.ms-office-gallery [data-gallery-label] { font-weight: 600; }
.ms-office-gallery [data-gallery-counter] { color: #526773; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ms-office-gallery__controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; width: calc(100% - 32px); max-width: 480px; margin: 0 auto; }
.ms-office-gallery button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #ced9df;
  border-radius: 8px;
  background: #fff;
  color: #163447;
  font: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.ms-office-gallery button:hover { background: #edf4f7; border-color: #839ca9; }
.ms-office-gallery:focus-visible .ms-office-gallery__frame,
.ms-office-gallery button:focus-visible { outline: 3px solid #0878a7; outline-offset: 3px; }
.ms-office-gallery__dots { display: flex; align-items: center; gap: 0; }
.ms-office-gallery .ms-office-gallery__dot { min-width: 32px; min-height: 44px; padding: 8px 3px; border-color: transparent; background: transparent; }
.ms-office-gallery__dot span { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; font-size: 13px; }
.ms-office-gallery__dot[aria-current="true"] span { color: #fff; background: #176285; font-weight: 700; }
.ms-office-gallery .ms-office-gallery__play { padding-inline: 12px; font-size: 14px; min-width: 90px; }
.ms-office-gallery__sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 767px) {
  .ms-office-gallery { width: 100%; margin-bottom: 28px; }
  .ms-office-gallery__frame { height: auto; aspect-ratio: 4 / 3; border-radius: 0; }
  .ms-office-gallery__caption { font-size: 14px; }
  .ms-office-gallery__controls { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 4px; }
  .ms-office-gallery__dots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ms-office-gallery .ms-office-gallery__dot { min-width: 0; width: 100%; padding-inline: 0; }
  .ms-office-gallery .ms-office-gallery__play { grid-column: 1 / -1; justify-self: center; }
}

/* Motion starts only after initialization; without JS the first photo stays visible. */
.ms-office-gallery.is-ready .ms-office-gallery__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 0;
  transition: opacity 1200ms ease-in-out;
  pointer-events: none;
}
.ms-office-gallery.is-ready .ms-office-gallery__slide.is-outgoing { opacity: 1; z-index: 1; }
.ms-office-gallery.is-ready .ms-office-gallery__slide.is-active { opacity: 1; z-index: 2; }
.ms-office-gallery.is-ready .ms-office-gallery__slide.is-moving img {
  transform-origin: center;
  animation: ms-office-gallery-drift 8200ms linear both;
  will-change: transform;
}
.ms-office-gallery.is-paused .ms-office-gallery__slide.is-moving img { animation-play-state: paused; }
@keyframes ms-office-gallery-drift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.045) translate(-0.4%, -0.25%); }
}
@media (prefers-reduced-motion: reduce) {
  .ms-office-gallery.is-ready .ms-office-gallery__slide { transition: none; }
  .ms-office-gallery.is-ready .ms-office-gallery__slide.is-moving img { animation: none; transform: none; will-change: auto; }
}

/* Presentación solicitada: únicamente las fotografías en movimiento. */
.ms-office-gallery__caption,
.ms-office-gallery__controls { display: none !important; }
