/* V151 — gallery-only refinement; deliberately scoped to the project detail gallery. */
.v150-project-detail .v150-gallery {
  padding:12px;
  border:1px solid #d5e8f5;
  border-radius:19px;
  background:#fff;
  box-shadow:0 14px 32px rgba(14,67,106,.07);
  overflow:hidden;
}
.v150-project-detail .v150-gallery-main {
  width:100%;
  overflow:hidden;
  border:1px solid #e0edf6;
  border-radius:14px;
  background:#f2f8fc;
  box-shadow:none;
  isolation:isolate;
}
.v150-project-detail .v150-gallery-main img {
  width:100%;
  height:clamp(230px,30vw,395px);
  display:block;
  border-radius:13px;
  object-fit:contain;
  transition:transform .22s ease;
}
.v150-project-detail .v150-gallery-expand {
  right:12px;
  bottom:12px;
  background:rgba(8,42,71,.86);
  color:#fff;
  border:1px solid rgba(255,255,255,.15);
  border-radius:9px;
  padding:8px 12px;
}
.v150-project-detail .v150-gallery-thumbs {
  display:flex;
  align-items:center;
  gap:9px;
  padding:10px 1px 1px;
  margin:0;
  overflow-x:auto;
  scrollbar-width:thin;
}
.v150-project-detail .v150-gallery-thumb {
  display:block;
  flex:0 0 75px;
  width:75px;
  height:75px;
  padding:3px;
  border:1px solid #d4e4f1;
  border-radius:12px;
  background:#f4f9fd;
  overflow:hidden;
  box-shadow:none;
  transition:border-color .17s ease, box-shadow .17s ease;
}
.v150-project-detail .v150-gallery-thumb img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:9px;
}
.v150-project-detail .v150-gallery-thumb:hover {
  border-color:#62b7e9;
}
.v150-project-detail .v150-gallery-thumb.is-selected {
  border-color:#078fda;
  box-shadow:inset 0 0 0 1px #078fda;
}
/* Light modal, with a blurred view of the actual site behind it. */
.v150-gallery-dialog.v151-gallery-dialog {
  box-sizing:border-box;
  width:min(1120px,94vw);
  max-width:94vw;
  max-height:min(90dvh,850px);
  padding:0;
  overflow:hidden;
  color:#0e3154;
  background:#fff;
  border:1px solid #d5e8f4;
  border-radius:21px;
  box-shadow:0 36px 100px rgba(8,34,61,.28);
}
.v150-gallery-dialog.v151-gallery-dialog::backdrop {
  background:rgba(22,47,74,.32);
  backdrop-filter:blur(13px);
  -webkit-backdrop-filter:blur(13px);
}
.v151-dialog-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 19px 14px;
  border-bottom:1px solid #e3eef7;
  background:#fff;
}
.v151-dialog-title {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}
.v151-dialog-icon {
  display:grid;
  place-items:center;
  width:37px;
  height:37px;
  flex:0 0 37px;
  border-radius:11px;
  background:#e8f6ff;
  color:#078ed0;
}
.v151-dialog-icon svg {
  width:21px;
  height:21px;
}
.v151-dialog-title-text {
  display:flex;
  gap:6px;
  align-items:center;
  min-width:0;
  line-height:1.3;
}
.v151-dialog-title-text strong {font-size:15px;font-weight:780;color:#102e53;white-space:nowrap}
.v151-dialog-title-text span {
  font-size:13px;
  color:#507493;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border-left:1px solid #d7e6f1;
  padding-left:11px;
}
.v150-gallery-dialog.v151-gallery-dialog .v151-dialog-close {
  display:grid;
  place-items:center;
  flex:0 0 36px;
  width:36px;
  height:36px;
  border:1px solid #e2eefa;
  border-radius:10px;
  padding:0;
  color:#294d70;
  background:#f3f9fd;
  cursor:pointer;
}
.v150-gallery-dialog.v151-gallery-dialog .v151-dialog-close:hover {background:#e2f3fd;color:#076ba9}
.v151-dialog-close svg {width:17px;height:17px}
.v151-dialog-body {
  display:grid;
  grid-template-columns:minmax(0,1fr) 106px;
  align-items:stretch;
  gap:15px;
  min-width:0;
  min-height:0;
  padding:17px 19px 18px;
  background:#fff;
}
.v151-gallery-stage {display:flex;flex-direction:column;gap:12px;min-width:0;min-height:0}
.v151-gallery-stage-image {
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
  border-radius:14px;
  border:1px solid #d8e9f5;
  background:#f2f7fb;
}
.v151-gallery-stage-image img {
  display:block;
  max-width:100%;
  max-height:min(69dvh,600px);
  height:auto;
  width:auto;
  border-radius:12px;
  object-fit:contain;
}
.v151-gallery-controls {
  display:flex;
  align-items:center;
  gap:11px;
  height:37px;
}
.v151-gallery-controls button {
  display:grid;
  place-items:center;
  flex:0 0 35px;
  width:35px;
  height:35px;
  padding:0;
  border:1px solid #d3e6f4;
  border-radius:10px;
  background:#f6fbff;
  color:#164d7a;
  cursor:pointer;
}
.v151-gallery-controls button:hover {background:#eaf6ff;border-color:#90c9eb}
.v151-gallery-controls button svg {width:17px;height:17px}
.v151-gallery-counter {
  min-width:51px;
  text-align:center;
  font-size:13px;
  font-weight:750;
  color:#315b7e;
  font-variant-numeric:tabular-nums;
}
.v151-gallery-rail {
  display:flex;
  flex-direction:column;
  gap:9px;
  min-width:0;
  max-height:min(69dvh,600px);
  overflow-y:auto;
  padding:1px 3px 2px 1px;
  scrollbar-width:thin;
}
.v151-gallery-rail-thumb {
  display:block;
  flex:0 0 auto;
  width:97px;
  aspect-ratio:1/1;
  padding:3px;
  border:1px solid #d4e6f2;
  border-radius:12px;
  overflow:hidden;
  cursor:pointer;
  background:#f4f9fd;
  transition:border-color .17s ease, box-shadow .17s ease;
}
.v151-gallery-rail-thumb img {
  display:block;
  width:100%;
  height:100%;
  border-radius:9px;
  object-fit:cover;
}
.v151-gallery-rail-thumb:hover {border-color:#75bde7}
.v151-gallery-rail-thumb.is-selected {
  border-color:#028de2;
  box-shadow:inset 0 0 0 1px #028de2,0 0 0 1px #028de2;
}
.v151-dialog-body.v151-single-image {grid-template-columns:1fr}
.v151-gallery-dialog :is(button:focus-visible) {
  outline:3px solid #0096e8;
  outline-offset:2px;
}
@media(max-width:700px) {
  .v150-project-detail .v150-gallery {border-radius:16px;padding:8px}
  .v150-project-detail .v150-gallery-main {border-radius:11px}
  .v150-project-detail .v150-gallery-main img {height:min(62vw,310px);border-radius:10px}
  .v150-project-detail .v150-gallery-thumb {flex-basis:64px;width:64px;height:64px;border-radius:10px}
  .v150-project-detail .v150-gallery-thumb img {border-radius:7px}
  .v150-gallery-dialog.v151-gallery-dialog {width:96vw;max-width:96vw;max-height:94dvh;border-radius:16px}
  .v151-dialog-head {padding:12px;gap:9px}
  .v151-dialog-icon {width:32px;height:32px;flex-basis:32px}
  .v151-dialog-title-text {display:block}
  .v151-dialog-title-text strong {display:block;font-size:13px}
  .v151-dialog-title-text span {display:block;max-width:65vw;padding:0;border:0;font-size:11px;margin-top:2px}
  .v151-dialog-body {display:flex;flex-direction:column;gap:10px;padding:10px 12px 13px;overflow:hidden}
  .v151-gallery-stage-image {flex:0 1 auto;min-height:0}
  .v151-gallery-stage-image img {max-height:56dvh;border-radius:10px}
  .v151-gallery-stage {gap:8px}
  .v151-gallery-rail {flex-direction:row;max-height:none;overflow-x:auto;overflow-y:hidden;gap:8px;padding:3px 1px}
  .v151-gallery-rail-thumb {width:68px;flex:0 0 68px;border-radius:10px}
  .v151-gallery-rail-thumb img {border-radius:7px}
  .v151-gallery-controls {height:32px}
  .v151-gallery-controls button {height:30px;width:30px;flex-basis:30px}
}
@media(prefers-reduced-motion:reduce){
 .v150-project-detail .v150-gallery-main img,.v150-project-detail .v150-gallery-thumb,.v151-gallery-rail-thumb {transition:none}
}
