/* Hydrotech field photographs: grid by default, cinematic reel on Play. */

.gallery{
  --g-navy:#081722;
  --g-cyan:#7ed0ff;
  --g-ink:#e7f3fb;
  --g-mute:rgba(231,243,251,.62);
  --meter:0;
  margin:0 0 22px;
  padding:0;
  overflow:visible;
  color:inherit;
  background:none;
  border:0;
  box-shadow:none;
}

.gallery-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px 16px;
  margin:0 0 12px;
}

.gallery-kicker{
  margin:0;
  font-size:11px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--navy,#13304f);
  font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;
}

.gallery-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:0;
  padding:8px 16px 8px 14px;
  border:0;
  border-radius:999px;
  background:var(--navy,#13304f);
  color:#fff;
  font:600 12.5px/1 "Avenir Next","Segoe UI",system-ui,sans-serif;
  letter-spacing:.14em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 8px 18px rgba(19,48,79,.18);
}
.gallery-pill svg{
  width:12px;
  height:12px;
  display:block;
}
.gallery-pill-go{
  font-size:16px;
  line-height:1;
  font-weight:500;
  letter-spacing:0;
  transform:translateY(-1px);
}
.gallery-pill:hover,
.gallery-pill:focus-visible{
  background:#0d2438;
  color:var(--g-cyan);
  outline:none;
}

.shots{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:10px;
  margin:0;
  padding:0;
  list-style:none;
}
.shots a{display:block}
.shots img{
  display:block;
  width:100%;
  height:auto;
  border:1px solid var(--rule,#c9d4e0);
}
.shots a:focus img,
.shots a:hover img{border-color:var(--navy,#13304f)}

.gallery-overlay{
  display:none;
}

.gallery.is-full .gallery-overlay{
  display:flex;
  flex-direction:column;
  justify-content:center;
  position:fixed;
  inset:0;
  z-index:80;
  margin:0;
  padding:18px 0 12px;
  color:var(--g-ink);
  background:#050c14;
  font-family:"Avenir Next","Segoe UI",system-ui,sans-serif;
  overflow:hidden;
}
.gallery.is-full .gallery-overlay::after{
  content:"";
  position:absolute;
  left:0;right:0;bottom:0;
  height:120px;
  pointer-events:none;
  background:linear-gradient(180deg, transparent, rgba(126,208,255,.05));
}

.gallery-hd{
  position:relative;
  z-index:1;
  padding:0 22px 14px;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:space-between;
  gap:6px 18px;
}
.gallery.is-full .gallery-hd .gallery-kicker{color:var(--g-cyan)}
.gallery-lede{
  margin:0;
  font-size:13px;
  color:var(--g-mute);
  letter-spacing:.01em;
}

.gallery-stage{position:relative;z-index:1}

.gallery-reel{
  position:relative;
  display:grid;
  grid-auto-flow:column;
  grid-auto-columns:84%;
  gap:14px;
  overflow-x:auto;
  overflow-y:hidden;
  scroll-snap-type:x mandatory;
  scroll-padding-inline:8%;
  padding:4px 8% 18px;
  scrollbar-width:none;
  cursor:grab;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
  touch-action:pan-x;
}
.gallery-reel::-webkit-scrollbar{display:none}
.gallery-reel.is-drag{cursor:grabbing}

.gallery-slide{
  position:relative;
  scroll-snap-align:center;
  margin:0;
  border-radius:2px;
  overflow:hidden;
  background:#050c14;
  box-shadow:0 10px 28px rgba(0,0,0,.28);
}
.gallery-slide img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:1920/1446;
  object-fit:cover;
  -webkit-user-drag:none;
  user-select:none;
  pointer-events:none;
}
.gallery.is-full .gallery-slide{
  opacity:.42;
  transform:scale(.955);
  transform-origin:center center;
  transition:opacity .45s ease, transform .45s ease, box-shadow .45s ease;
}
.gallery.is-full .gallery-slide.is-on{
  opacity:1;
  transform:none;
  box-shadow:0 22px 55px rgba(0,0,0,.48);
}
.gallery.is-playing .gallery-slide.is-on img{
  animation:gallery-ken 9s ease-out forwards;
}

@keyframes gallery-ken{
  from{transform:scale(1)}
  to{transform:scale(1.055)}
}

.gallery-slide figcaption{
  position:absolute;
  left:0;right:0;bottom:0;
  padding:52px 20px 18px;
  background:linear-gradient(180deg, transparent 0%, rgba(5,12,20,.88) 72%);
  color:var(--g-ink);
  pointer-events:none;
}
.gallery.is-full .gallery-slide figcaption{
  opacity:0;
  transform:translateY(10px);
  transition:opacity .4s ease, transform .4s ease;
}
.gallery.is-full .gallery-slide.is-on figcaption{
  opacity:1;
  transform:none;
}
.gallery-no{
  display:inline-block;
  margin-right:10px;
  font-size:11px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  letter-spacing:.16em;
  color:var(--g-cyan);
}
.gallery-tag{
  display:inline-block;
  font-size:11px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
}
.gallery-cap{
  display:block;
  margin-top:5px;
  font-size:13.5px;
  line-height:1.4;
  color:rgba(231,243,251,.88);
  max-width:42em;
}

.gallery-nav{
  position:absolute;
  top:42%;
  z-index:4;
  width:48px;
  height:48px;
  margin:0;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(8,23,34,.48);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.gallery-nav svg{width:22px;height:22px;display:block}
.gallery-nav:hover,.gallery-nav:focus-visible{
  background:rgba(8,23,34,.82);
  border-color:var(--g-cyan);
  color:var(--g-cyan);
  outline:none;
}
.gallery-nav.prev{left:14px}
.gallery-nav.next{right:14px}

.gallery-hud{
  position:absolute;
  top:12px;
  right:18px;
  z-index:4;
  display:flex;
  gap:8px;
  align-items:center;
}
.gallery-hud button{
  width:40px;
  height:40px;
  margin:0;
  padding:0;
  border-radius:50%;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(8,23,34,.48);
  color:#fff;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
  display:grid;
  place-items:center;
}
.gallery [hidden]{display:none !important}
.gallery-hud button svg{width:18px;height:18px;display:block}
.gallery-hud button[aria-pressed="true"] [data-icon-play],
.gallery-hud button[aria-pressed="false"] [data-icon-pause]{display:none !important}
.gallery-hud button[aria-pressed="false"] [data-icon-play],
.gallery-hud button[aria-pressed="true"] [data-icon-pause]{display:block !important}
.gallery-hud button:hover,
.gallery-hud button:focus-visible{
  border-color:var(--g-cyan);
  color:var(--g-cyan);
  outline:none;
}
.gallery-count{
  margin:0;
  min-width:4.6em;
  text-align:center;
  font-size:12px;
  font-variant-numeric:tabular-nums;
  letter-spacing:.14em;
  color:var(--g-ink);
  background:rgba(8,23,34,.48);
  border:1px solid rgba(255,255,255,.18);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  padding:8px 10px;
  border-radius:20px;
}

.gallery-meter{
  position:absolute;
  left:8%;
  right:8%;
  bottom:18px;
  height:2px;
  z-index:3;
  background:rgba(255,255,255,.12);
  pointer-events:none;
  border-radius:1px;
  overflow:hidden;
  opacity:0;
}
.gallery.is-playing .gallery-meter{opacity:1}
.gallery-meter > i{
  display:block;
  height:100%;
  width:calc(var(--meter, 0) * 100%);
  background:linear-gradient(90deg, #3e90c4, var(--g-cyan));
  box-shadow:0 0 10px rgba(126,208,255,.7);
}

.gallery-film{
  position:relative;
  z-index:1;
  display:flex;
  gap:8px;
  list-style:none;
  margin:2px 0 0;
  padding:10px 18px 8px;
  overflow-x:auto;
  scrollbar-width:none;
  overscroll-behavior-x:contain;
}
.gallery-film::-webkit-scrollbar{display:none}
.gallery-film a{
  display:block;
  flex:0 0 92px;
  width:92px;
  border:1px solid rgba(255,255,255,.14);
  padding:0;
  background:#050c14;
  opacity:.45;
  filter:saturate(.65);
  transition:opacity .25s ease, filter .25s ease, border-color .25s ease, transform .25s ease;
}
.gallery-film a[aria-current="true"]{
  opacity:1;
  filter:none;
  border-color:var(--g-cyan);
  box-shadow:0 0 0 1px var(--g-cyan);
  transform:translateY(-3px);
}
.gallery-film a:hover,.gallery-film a:focus-visible{
  opacity:1;
  filter:none;
  outline:none;
}
.gallery-film img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:150/113;
  object-fit:cover;
}

.gallery.is-full .gallery-reel{
  --full-w: min(92vw, calc((100vh - 200px) * 1920 / 1446), 1280px);
  grid-auto-columns:var(--full-w);
  scroll-padding-inline:calc((100% - var(--full-w)) / 2);
  padding-inline:calc((100% - var(--full-w)) / 2);
}
.gallery.is-full .gallery-slide img{object-fit:contain;background:#000}
.gallery.is-full .gallery-meter{left:calc((100% - var(--full-w)) / 2);right:calc((100% - var(--full-w)) / 2)}
.gallery.is-full .gallery-close{display:grid !important}
.gallery-close{display:none}
body.gallery-lock{overflow:hidden}

@media (max-width:640px){
  .shots{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}
  .gallery-hd{padding:0 14px 10px}
  .gallery-lede{font-size:12.5px}
  .gallery-reel{
    grid-auto-columns:88%;
    scroll-padding-inline:6%;
    padding:2px 6% 16px;
    gap:10px;
  }
  .gallery-nav{width:42px;height:42px;top:38%}
  .gallery-nav.prev{left:6px}
  .gallery-nav.next{right:6px}
  .gallery-hud{top:8px;right:10px}
  .gallery-slide figcaption{padding:40px 14px 14px}
  .gallery-cap{font-size:12.5px}
  .gallery-film{padding:8px 14px 4px}
  .gallery-film a{flex-basis:76px;width:76px}
  .gallery-meter{left:6%;right:6%}
}

@media (prefers-reduced-motion:reduce){
  .gallery.is-full .gallery-slide,
  .gallery.is-full .gallery-slide figcaption,
  .gallery-film a{
    transition:none;
  }
  .gallery.is-playing .gallery-slide.is-on img{animation:none}
  .gallery-reel{scroll-behavior:auto}
}

/* L3 adaptation for the live hydrotechconstructioninc.com home page (2026-10-25):
   the page centers its copy; the gallery reads left to right. */
.home-copy .gallery{text-align:left;margin:16px 0 18px}
.home-copy .gallery a{color:inherit}
