/* Galería de obras instaladas y visor de fotos (assets/js/obras.js). Las fotos son cuadradas y traen el marco de
   Grupo Albaher: siempre se muestran completas en recuadros cuadrados, sin recortes. */
.ob { display: flex; flex-direction: column; gap: 22px; }
.ob-filtros { display: flex; flex-wrap: wrap; gap: 8px; }
.ob-filtros .chip { padding: 0 16px; }
.ob-filtros .chip b { font-family: var(--f-tecnica); font-weight: 600; font-size: 12px; color: var(--azul); }
.ob-filtros .chip.on { background: var(--marino); color: #fff; border-color: var(--marino); box-shadow: none; }
.ob-filtros .chip.on b { color: var(--azul-cielo); }
.ob-rejilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; gap: clamp(8px, 1.1vw, 16px); }
.ob-foto { position: relative; display: block; aspect-ratio: 1; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: #e7edf3; cursor: zoom-in; isolation: isolate; }
.ob-foto.grande { grid-column: span 2; grid-row: span 2; border-radius: 22px; }
.ob-foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.ob-foto::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8,21,52,.55)); opacity: 0; transition: opacity .4s; }
.ob-foto::before { content: ""; position: absolute; z-index: 1; right: 14px; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23081534' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 20px no-repeat; transform: scale(.6); opacity: 0; transition: transform .4s cubic-bezier(.2,1.4,.4,1), opacity .3s; }
.ob-foto:hover img, .ob-foto:focus-visible img { transform: scale(1.06); }
.ob-foto:hover::after, .ob-foto:focus-visible::after { opacity: 1; }
.ob-foto:hover::before, .ob-foto:focus-visible::before { opacity: 1; transform: none; }
.ob-foto:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; }
.ob-foto.oculta, .ob-foto.extra { display: none; }
/* Entrada escalonada al aparecer en pantalla */
.ob.listo .ob-foto { opacity: 0; transform: translateY(34px) scale(.96); transition: opacity .7s ease var(--d, 0s), transform .9s cubic-bezier(.2,.9,.2,1) var(--d, 0s); }
.ob.listo .ob-foto.visto { opacity: 1; transform: none; }
.ob-foto.en-visor { visibility: hidden; }
.ob-mas { align-self: flex-start; }
/* Versión compacta dentro de la ficha de un modelo */
.ob-ficha .ob-rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ob-ficha .ob-foto { border-radius: 12px; }
.ob-ficha .ob-foto::before { width: 30px; height: 30px; right: 8px; bottom: 8px; background-size: 16px; }
@media (max-width: 760px) {
  .ob-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ob-foto { border-radius: 12px; }
  .ob-foto.grande { border-radius: 16px; }
  .ob-filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .ob-filtros .chip { flex: none; }
}
@media (prefers-reduced-motion: reduce) { .ob.listo .ob-foto { opacity: 1; transform: none; } }

/* Visor de fotos a pantalla completa: la foto crece desde su recuadro y regresa a él al cerrar */
.lb { position: fixed; inset: 0; z-index: 9990; display: none; touch-action: none; overscroll-behavior: contain; }
.lb.abierto { display: block; }
.lb-fondo { position: absolute; inset: 0; background: rgba(5, 14, 36, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; }
.lb-foto { position: fixed; margin: 0; border-radius: 18px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.7); transform-origin: 0 0; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; object-fit: cover; background: #10204a; }
.lb-ui { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.lb.ui .lb-ui { opacity: 1; }
.lb-ui > * { pointer-events: auto; }
.lb-boton { position: absolute; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .25s, border-color .25s, transform .2s; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lb-boton:hover { background: var(--azul); border-color: var(--azul); }
.lb-boton:active { transform: scale(.94); }
.lb-boton:focus-visible { outline: 2px solid var(--azul-cielo); outline-offset: 3px; }
.lb-boton svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-cerrar { top: max(18px, env(safe-area-inset-top)); right: 18px; }
.lb-ant { left: clamp(10px, 2vw, 28px); top: 50%; margin-top: -27px; }
.lb-sig { right: clamp(10px, 2vw, 28px); top: 50%; margin-top: -27px; }
.lb-ant svg { transform: rotate(180deg); }
.lb-pie { position: absolute; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 84px; color: #fff; text-align: center; }
.lb-num { font-family: var(--f-tecnica); font-weight: 600; font-size: 13px; letter-spacing: .2em; color: var(--azul-cielo); white-space: nowrap; }
.lb-texto { font-size: 15px; color: rgba(255,255,255,.86); }
@media (max-width: 760px) {
  .lb-ant, .lb-sig { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); margin-top: 0; width: 48px; height: 48px; }
  .lb-pie { bottom: calc(max(14px, env(safe-area-inset-bottom)) + 62px); flex-direction: column; gap: 4px; padding: 0 20px; }
  .lb-foto { border-radius: 12px; }
}
