/* Team gallery: preserve the full photograph, with controls outside the frame. */
.team-gallery{margin-top:-8px;margin-bottom:48px}
.team-gallery .group-gallery{
  width:100%;height:clamp(300px,44vw,580px);aspect-ratio:auto;
  border:1px solid rgba(255,255,255,.05);border-radius:24px;
  background:#14191e;box-shadow:0 16px 40px rgba(12,16,20,.1);
}
.team-gallery .gallery-image{
  width:100%;height:100%;object-fit:contain;object-position:center;
  opacity:0;transition:opacity .65s ease;pointer-events:none;
}
.team-gallery .gallery-image.active{opacity:1}
.gallery-caption-layer{
  position:absolute;z-index:2;left:0;bottom:0;width:100%;
  padding:30px 18px 14px;pointer-events:none;visibility:hidden;
  background:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.12) 35%,rgba(0,0,0,.48));
}
.gallery-caption-layer.is-positioned{visibility:visible}
.gallery-caption{
  max-width:60ch;margin:0;color:#fff;font-size:13px;font-weight:500;line-height:1.4;
  letter-spacing:.015em;text-shadow:0 1px 4px rgba(0,0,0,.7);overflow-wrap:break-word;
}
.team-gallery button{font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.team-gallery button:focus-visible{outline:3px solid #78632b;outline-offset:4px}
.gallery-controls{
  display:grid;grid-template-columns:46px minmax(0,620px) 46px;
  align-items:center;justify-content:center;gap:22px;margin:22px auto 0;
}
.gallery-arrow{
  display:grid;place-items:center;width:46px;height:46px;padding:0;
  border:1px solid #cfc9bd;border-radius:50%;background:transparent;color:#343a40;
  transition:background .2s ease,border-color .2s ease;
}
.gallery-arrow:hover{background:#e8e2d6;border-color:#bcb39f}
.gallery-thumbnails{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;min-width:0}
.gallery-thumbnail{
  position:relative;display:block;width:100%;height:76px;padding:3px;
  border:1px solid transparent;border-radius:11px;background:transparent;
  opacity:.62;transition:opacity .2s ease,border-color .2s ease;
}
.gallery-thumbnail img{width:100%;height:100%;object-fit:contain;background:#14191e;border-radius:7px}
.gallery-thumbnail:hover,.gallery-thumbnail.active{opacity:1}
.gallery-thumbnail.active{border-color:#8b7440;background:#e7dfcf}
.gallery-meta{display:flex;justify-content:flex-end;align-items:center;gap:20px;max-width:756px;margin:14px auto 0}
.gallery-playback{display:flex;align-items:center;gap:20px}
.gallery-counter{font-size:12px;font-variant-numeric:tabular-nums;letter-spacing:.12em;color:#686e72;white-space:nowrap}
.gallery-pause{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:4px 0 4px 8px;border:0;background:transparent;color:#555c61;font-size:12px!important}
.gallery-pause:hover{color:#161b1f}
.gallery-pause-icon{display:inline-block;width:13px;text-align:center;font-size:13px;font-weight:700}
.gallery-announcement{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:980px){
  .team-gallery .group-gallery{height:min(60vw,540px)}
  .gallery-controls{gap:16px}
}
@media(max-width:640px){
  .team-gallery{margin-bottom:32px}
  .team-gallery .group-gallery{height:calc((100vw - 28px)*.75);border-radius:16px}
  .gallery-controls{grid-template-columns:36px minmax(0,1fr) 36px;gap:6px;margin-top:16px}
  .gallery-arrow{width:36px;height:36px}
  .gallery-thumbnails{gap:3px}
  .gallery-thumbnail{height:48px;padding:2px;border-radius:7px}
  .gallery-thumbnail img{border-radius:4px}
  .gallery-meta{margin-top:10px;gap:10px;padding:0 4px}
  .gallery-caption-layer{padding:26px 12px 10px}
  .gallery-caption{font-size:12px}
  .gallery-playback{gap:12px}
  .gallery-counter{font-size:10px;letter-spacing:.08em}
}
@media(prefers-reduced-motion:reduce){
  .team-gallery .gallery-image,.team-gallery button{transition:none}
}
