/* Carrusel local: mantiene el visor ampliado del módulo de secciones. */
.eg-gallery {
  max-width: 760px;
  margin-inline: auto;
  color: var(--oc-texto, var(--color-text));
}

section.oc-section .oc-gallery.eg-gallery-track {
  position: relative;
  display: flex;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-radius: 18px;
}

.eg-gallery-track::-webkit-scrollbar { display: none; }
.eg-gallery-track[hidden] { display: none !important; }

.eg-gallery-slide {
  flex: 0 0 100%;
  min-width: 0;
  aspect-ratio: 3 / 2;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--color-primary, #123d32), var(--color-bg, #101714));
  box-shadow: inset 0 0 0 1px var(--oc-borde, rgb(255 255 255 / 18%));
}

section.oc-section .oc-gallery.eg-gallery-track .eg-gallery-slide > button {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  aspect-ratio: auto;
  background: transparent;
  cursor: zoom-in;
}

section.oc-section .oc-gallery.eg-gallery-track img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 550ms cubic-bezier(.2, .6, .3, 1);
}

section.oc-section .oc-gallery.eg-gallery-track button:hover img { transform: scale(1.025); }

.eg-gallery-hint {
  margin: 18px 0 10px;
  font-size: .73rem;
  line-height: 1.6;
  letter-spacing: .045em;
  color: var(--oc-suave, var(--color-muted));
}

.eg-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.eg-gallery-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--oc-borde, rgb(255 255 255 / 20%));
  border-radius: 50%;
  background: var(--color-button, #285c4d);
  color: var(--color-text, #f2eee5);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.eg-gallery-arrow svg { width: 23px; height: 23px; }
.eg-gallery-arrow:hover:not(:disabled) { transform: translateY(-2px); }
.eg-gallery-arrow:disabled { opacity: .4; cursor: default; }

.eg-gallery-pagination { display: grid; justify-items: center; gap: 3px; }
.eg-gallery-dots { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; }
.eg-gallery-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.eg-gallery-dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
  border-radius: 999px;
  transition: width 220ms ease, background 220ms ease;
}

.eg-gallery-dot[aria-current="true"]::before { width: 22px; background: currentColor; }
.eg-gallery-count { font-size: .68rem; letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.eg-gallery-empty { padding: 28px 15px; line-height: 1.7; color: var(--oc-suave, var(--color-muted)); }

.eg-gallery-track:focus-visible,
.eg-gallery button:focus-visible {
  outline: 2px solid var(--oc-texto, var(--color-text));
  outline-offset: 4px;
}

.eg-gallery-track:focus-visible,
.eg-gallery-slide > button:focus-visible { outline-offset: -4px; }

.eg-gallery-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 580px) {
  .eg-gallery-slide { aspect-ratio: 4 / 3; }
  .eg-gallery-controls { gap: 8px; }
  .eg-gallery-dot { width: 30px; min-height: 36px; }
  .eg-gallery-hint { font-size: .68rem; letter-spacing: .01em; }
}

@media (prefers-reduced-motion: reduce) {
  .eg-gallery-track { scroll-behavior: auto; }
  .eg-gallery *, .eg-gallery *::before { transition: none !important; }
  section.oc-section .oc-gallery.eg-gallery-track button:hover img { transform: none; }
}
