/* =========================
   Media: shared button reset
========================= */
.thumb-btn{
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}
.thumb-btn img{ display:block; }

/* =========================
   Media: images in grid
========================= */
.photo{
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

/* =========================
   Media: inline video player (non-cropped)
   (если где-то показываешь <video controls> прямо на странице)
========================= */
.video{
  width: 100%;
  border-radius: 16px;
  background: rgba(0,0,0,.35);
  display:block;
  object-fit: contain;
}

/* =========================
   Media: video preview card (poster + play)
========================= */
.video-thumb-wrap{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0,0,0,.35);
}

.video-thumb{
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;  /* смещение вверх, чтобы "голову" не резало */
  display:block;
}

.video-thumb-wrap::after{
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(closest-side, rgba(0,0,0,.25), transparent 65%);
  pointer-events:none;
}

.play-badge{
  position:absolute;
  left: 12px;
  bottom: 12px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events:none;
}

.play-badge::before{
  content:"";
  width: 0;
  height: 0;
  border-left: 14px solid rgba(255,255,255,.9);
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

/* =========================
   Inline showreel (cropped preview + cropped playback)
   (твой текущий inline showreel без модалки)
========================= */
.showreel{
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(244,180,84,.18);
  background: rgba(0,0,0,.35);
  box-shadow: var(--shadow);
}

.showreel__poster,
.showreel__video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;        /* кроп */
  object-position: 50% 25%;
  display: block;
}

.showreel__poster--placeholder{
  background: linear-gradient(135deg, rgba(244,180,84,.12), rgba(255,255,255,.03));
}

.showreel__play{
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.showreel.is-playing .showreel__play{ display:none; }
.showreel.is-playing .showreel__poster{ display:none; }

/* =========================
   Lightbox (image + video)
========================= */
.lightbox{
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.lightbox__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
}

.lightbox__dialog{
  position: relative;
  z-index: 1;
  width: min(980px, calc(100% - 32px));
  margin: 24px auto;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.30);
  box-shadow: 0 18px 70px rgba(0,0,0,.65);
}

.lightbox__img,
.lightbox__video{
  display:block;
  width:100%;
  height:auto;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  background: rgba(0,0,0,.35);
}

.lightbox__close{
  position:absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
