/* Alfa Energy "Our Work" photo gallery + lightbox (Canada Create, 4 Nov 2026). No external assets. */
.ae-gal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5, 1.25rem); list-style: none; margin: 0; padding: 0; }
.ae-gal-item { margin: 0; min-width: 0; }
.ae-gal-link { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 14px; background: var(--color-surface-2, #eaf2fb); box-shadow: var(--shadow-md, 0 6px 20px rgba(12,84,168,.1)); color: #fff; text-decoration: none; isolation: isolate; }
.ae-gal-link picture, .ae-gal-link img { display: block; width: 100%; height: 100%; }
.ae-gal-link img { object-fit: cover; object-position: var(--pos, 50% 50%); transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1); }
.ae-gal-link:hover img, .ae-gal-link:focus-visible img { transform: scale(1.04); }
.ae-gal-link:focus-visible { outline: 3px solid var(--orange, #c0302e); outline-offset: 3px; }
.ae-gal-cap { position: absolute; inset: auto 0 0 0; padding: 2.5rem 1rem 0.85rem; font-size: var(--text-sm, .95rem); font-weight: 600; line-height: 1.35; color: #fff; background: linear-gradient(to top, rgba(9,63,128,.92), rgba(9,63,128,.55) 55%, rgba(9,63,128,0)); text-align: left; }
.ae-gal-zoom { position: absolute; top: .75rem; right: .75rem; width: 38px; height: 38px; border-radius: 9999px; display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--navy, #0c54a8); box-shadow: 0 2px 8px rgba(0,0,0,.18); opacity: 0; transform: scale(.9); transition: opacity 200ms, transform 200ms; }
.ae-gal-link:hover .ae-gal-zoom, .ae-gal-link:focus-visible .ae-gal-zoom { opacity: 1; transform: none; }
@media (max-width: 639px) {
  .ae-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .ae-gal-item--lead { grid-column: 1 / -1; }
  .ae-gal-item--lead .ae-gal-link { aspect-ratio: 4 / 3; }
  .ae-gal-item:not(.ae-gal-item--lead) .ae-gal-cap { display: none; }
  .ae-gal-item--lead .ae-gal-link img { object-position: var(--pos-lead, var(--pos, 50% 50%)); }
  .ae-gal-zoom { opacity: 1; transform: none; width: 32px; height: 32px; top: .5rem; right: .5rem; }
}

/* Lightbox */
html.ae-lb-lock, html.ae-lb-lock body { overflow: hidden !important; }
.ae-lb { position: fixed; inset: 0; z-index: 10000; display: none; background: rgba(6, 22, 45, .97); color: #fff; font-family: var(--font-body, sans-serif); }
.ae-lb.is-open { display: flex; flex-direction: column; animation: ae-lb-in 220ms ease-out; }
@keyframes ae-lb-in { from { opacity: 0; } to { opacity: 1; } }
.ae-lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1rem; flex: 0 0 auto; }
.ae-lb-count { font-size: .95rem; font-weight: 600; color: rgba(255,255,255,.8); font-variant-numeric: tabular-nums; }
.ae-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 4.5rem; touch-action: pan-y pinch-zoom; }
.ae-lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 14px; box-shadow: 0 18px 48px rgba(0,0,0,.45); user-select: none; -webkit-user-drag: none; transition: opacity 180ms ease; }
.ae-lb-img.is-loading { opacity: .35; }
.ae-lb-cap { flex: 0 0 auto; margin: 0 auto; max-width: 60rem; padding: .9rem 1.25rem 1.25rem; text-align: center; font-size: var(--text-sm, 1rem); line-height: 1.45; color: rgba(255,255,255,.92); }
.ae-lb-btn { appearance: none; border: 0; cursor: pointer; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 9999px; background: rgba(255,255,255,.12); color: #fff; transition: background 200ms; }
.ae-lb-btn:hover { background: rgba(255,255,255,.24); }
.ae-lb-btn:focus-visible { outline: 3px solid #ffb274; outline-offset: 2px; }
.ae-lb-prev, .ae-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.ae-lb-prev { left: 1rem; }
.ae-lb-next { right: 1rem; }
@media (max-width: 767px) {
  .ae-lb-stage { padding: 0 .75rem; }
  .ae-lb-prev, .ae-lb-next { position: fixed; top: auto; bottom: max(.75rem, env(safe-area-inset-bottom)); transform: none; width: 44px; height: 44px; background: rgba(255,255,255,.16); }
  .ae-lb-prev { left: .75rem; }
  .ae-lb-next { right: .75rem; }
  .ae-lb-cap { min-height: 4.25rem; padding: .75rem 4rem max(1rem, env(safe-area-inset-bottom)); font-size: .9rem; display: flex; align-items: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ae-gal-link img, .ae-lb-img { transition: none; }
  .ae-lb.is-open { animation: none; }
}
