/* ─────────────────────────────────────────────────────────────────────
   REAL JOB PHOTOS
   Homepage "Recent Work" slider, /gallery/ grid and its lightbox.
   Loaded after pages.css and glass.css. Images live in /images/work/.
   ───────────────────────────────────────────────────────────────────── */

/* ── Recent Work slider (homepage) ─────────────────────────────────── */

.hg-work {
  padding: 80px 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(240,249,255,0.78) 0%, rgba(240,249,255,0.78) 100%);
}
.hg-work .section-title { margin-bottom: 30px; }

.work-slider {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}
.work-frame { position: relative; }
.work-track {
  display: flex;
  aspect-ratio: 4 / 3;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-radius: var(--glass-radius, 22px);
  box-shadow: var(--glass-shadow-lift, 0 14px 36px rgba(32,42,111,0.16));
  background: #dfe9f5;
}
.work-track::-webkit-scrollbar { display: none; }
.work-track:focus-visible { outline: 3px solid var(--teal, #1acbd0); outline-offset: 4px; }
.work-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.work-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--navy, #202a6f);
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(var(--glass-blur-soft, 10px));
  backdrop-filter: blur(var(--glass-blur-soft, 10px));
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 6px 18px rgba(8,14,45,0.22);
  cursor: pointer;
  transition: background 0.2s;
}
.work-arrow:hover { background: #fff; }
.work-arrow:focus-visible { outline: 3px solid var(--teal, #1acbd0); outline-offset: 2px; }
.work-prev { left: 14px; }
.work-next { right: 14px; }

.work-dots {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 14px;
}
.work-dot {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.work-dot::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(32,42,111,0.25);
  transition: background 0.2s, transform 0.2s;
}
.work-dot[aria-current="true"]::before { background: var(--teal2, #13a8ac); transform: scale(1.25); }
.work-dot:focus-visible { outline: 2px solid var(--teal2, #13a8ac); border-radius: 50%; }

.work-more { margin-top: 26px; }
.work-more .btn-primary { display: inline-block; }

/* ── /gallery/ page ────────────────────────────────────────────────── */

.gw-page { padding: 64px 24px 80px; }
.gw-page h1 {
  font-size: clamp(2rem, 4.4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--navy, #202a6f);
  text-align: center;
  margin-bottom: 34px;
}
.gw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.gw-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 14px;
  background: #dfe9f5;
  box-shadow: var(--glass-shadow, 0 6px 22px rgba(32,42,111,0.10));
}
.gw-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gw-item:hover img { transform: scale(1.04); }
.gw-item:focus-visible { outline: 3px solid var(--teal, #1acbd0); outline-offset: 3px; }

/* ── Lightbox ──────────────────────────────────────────────────────── */

.lb {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(6,10,28,0.94);
  color: #fff;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.lb:not([open]) { display: none; }
.lb::backdrop { background: rgba(6,10,28,0.94); }
.lb-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 72px;
}
.lb-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  user-select: none;
  -webkit-user-drag: none;
}
.lb-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 1.6rem;
  line-height: 1;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}
.lb-btn:hover { background: rgba(255,255,255,0.24); }
.lb-btn:focus-visible { outline: 3px solid var(--teal, #1acbd0); outline-offset: 2px; }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 14px; top: 50%; transform: translateY(-50%); }
html.lb-lock, html.lb-lock body { overflow: hidden; }

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .gw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 640px) {
  .hg-work { padding: 60px 18px; }
  .work-track { border-radius: 18px; }
  .work-arrow { width: 40px; height: 40px; font-size: 1.3rem; }
  .work-prev { left: 8px; }
  .work-next { right: 8px; }
  .work-more .btn-primary { display: block; text-align: center; }
  .gw-page { padding: 44px 18px 60px; }
  .gw-grid { gap: 8px; }
  .gw-item { border-radius: 12px; }
  .lb-stage { padding: 64px 10px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
  .lb-prev { left: calc(50% - 60px); }
  .lb-next { right: calc(50% - 60px); }
}
@media (prefers-reduced-motion: reduce) {
  .work-track { scroll-behavior: auto; }
  .gw-item:hover img { transform: none; }
}
