/* Transportes Valdés — efectos de movimiento y visor de fotos */

html { scroll-behavior: smooth; }

/* ---------- Aparición suave al hacer scroll ---------- */
.rv {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .75s cubic-bezier(.2, .65, .3, 1), transform .75s cubic-bezier(.2, .65, .3, 1);
  will-change: opacity, transform;
}
.rv-left  { transform: translate3d(-48px, 0, 0); }
.rv-right { transform: translate3d(48px, 0, 0); }
.rv-zoom  { transform: scale(.94); }
.rv.rv-nt { transition: none !important; }
.rv.rv-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Encabezado: entra desde arriba al cargar la página */
@keyframes rvDown {
  from { opacity: 0; transform: translate3d(0, -14px, 0); }
  to   { opacity: 1; transform: none; }
}
.rv-load { animation: rvDown .7s cubic-bezier(.2, .65, .3, 1) backwards; }

/* Evita barras horizontales mientras algo entra desde un costado */
html, body { overflow-x: clip; }

/* ---------- Efectos al pasar el mouse ---------- */
a[style*="border-radius: 2px"]:not(.rv),
button[type="submit"] {
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
a[style*="border-radius: 2px"]:not(.rv):hover,
button[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(20, 32, 26, .2);
  filter: brightness(1.06);
}

/* ---------- Fotos que se pueden ampliar ---------- */
[data-lightbox-group] img {
  cursor: zoom-in;
  transition: opacity .75s cubic-bezier(.2, .65, .3, 1), transform .75s cubic-bezier(.2, .65, .3, 1), filter .3s ease;
}
[data-lightbox-group] img:hover { filter: brightness(1.07); }
[data-lightbox-group] figure[style*="overflow: hidden"] > img:hover,
[data-lightbox-group] div[style*="overflow: hidden"] > img:hover,
[data-lightbox-group] .gallery figure > img:hover { transform: scale(1.05); }
[data-lightbox-group] img:focus-visible { outline: 3px solid #D9A96B; outline-offset: 2px; }

/* ---------- Visor de fotos (lightbox) ---------- */
.lb {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 16, 12, .94);
  opacity: 0;
  transition: opacity .25s ease;
}
.lb[hidden] { display: none; }
.lb.lb-open { opacity: 1; }

.lb-fig {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 94vw;
}
.lb-img {
  display: block;
  max-width: 94vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #14201A;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
  transition: opacity .2s ease;
}
.lb-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  text-align: center;
  color: #B7C1B3;
  font: 500 12px 'IBM Plex Mono', ui-monospace, monospace;
  letter-spacing: .08em;
}
.lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font: 400 34px/1 Arial, sans-serif;
  cursor: pointer;
  transition: background .2s ease;
}
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-btn:focus-visible { outline: 3px solid #D9A96B; outline-offset: 2px; }
.lb-close { top: 16px; right: 16px; font-size: 36px; }
.lb-prev  { left: 16px;  top: 50%; margin-top: -26px; }
.lb-next  { right: 16px; top: 50%; margin-top: -26px; }

html.lb-lock,
html.lb-lock body { overflow: hidden; }

@media (max-width: 760px) {
  .lb-btn { width: 44px; height: 44px; font-size: 28px; }
  .lb-prev { left: 8px; margin-top: -22px; }
  .lb-next { right: 8px; margin-top: -22px; }
  .lb-img { max-height: 74vh; }
}

/* ---------- Respeta a quien prefiere menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv.rv-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .rv-load { animation: none; }
  .lb, .lb-img { transition: none; }
}
