.weblabs-galley-picture{
  --wlgp-cols: 4;
  --wlgp-gap: 18px;
  --wlgp-h: 190px;
  --wlgp-mw: 240px;

  --wlgp-radius: 0px;

  --wlgp-gold: #c8a85a;
  --wlgp-headline: #0b2f39;

  --wlgp-fade-h: 76px;
  --wlgp-fade-from: rgba(0,0,0,0);
  --wlgp-fade-to: rgba(0,0,0,0.75);

  --wlgp-hover-bg: rgba(11,47,57,0.78);

  --wlgp-btn-bg: #c8a85a;
  --wlgp-dia-bg: #ffffff;
  --wlgp-dia-fg: #c8a85a;

  position: relative;
  width: 100%;
  overflow: hidden;
  contain: layout paint;
}

/* =========================
   Header (مثل ویجت‌های قبلی)
   ========================= */
.weblabs-galley-picture__header{
  display:flex;
  align-items:flex-start;
  gap:14px;
  margin-bottom: 18px;
  direction:ltr; /* نوار طلایی سمت چپ */
}

.weblabs-galley-picture__bar{
  width:100px;
  height:16px;
  background: var(--wlgp-gold);
  margin-top:6px;
  flex:0 0 auto;
}

.weblabs-galley-picture__headwrap{
  direction:rtl;
  text-align:right;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
  flex:1 1 auto;
  min-width:0;
}

.weblabs-galley-picture__headrow{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:14px;
  flex-wrap:wrap;
}

.weblabs-galley-picture__header-title{
  margin:0;
  font-weight:800;
  font-size:16px;
  line-height:1.2;
  color:#0b2f39;
}

.weblabs-galley-picture__header-desc{
  font-size:13px;
  color: rgba(11,47,57,.65);
}

.weblabs-galley-picture__underline{
  width:34px;
  height:2px;
  background: var(--wlgp-headline);
}

/* =========================
   Grid
   ========================= */
.weblabs-galley-picture__grid{
  display:grid;
  grid-template-columns: repeat(var(--wlgp-cols), minmax(0, 1fr));
  gap: var(--wlgp-gap);
}

/* =========================
   Card
   ========================= */
.weblabs-galley-picture__card{
  position: relative;
}

.weblabs-galley-picture__media{
  position: relative;
  height: var(--wlgp-h);
  border-radius: var(--wlgp-radius);
  overflow: hidden;
}

.weblabs-galley-picture__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
  transform: translateZ(0);
}

/* bottom fade */
.weblabs-galley-picture__fade{
  position:absolute;
  left:0; right:0; bottom:0;
  height: var(--wlgp-fade-h);
  background: linear-gradient(to bottom, var(--wlgp-fade-from), var(--wlgp-fade-to));
  pointer-events:none;
  z-index:2;
}

/* bottom label */
.weblabs-galley-picture__label{
  position:absolute;
  left:10px;
  right:10px;
  bottom:10px;
  text-align:right;
  font-size:12px;
  color: rgba(255,255,255,.9);
  z-index:3;
  pointer-events:none;
  transition: opacity 250ms ease, transform 250ms ease;
}

/* hover overlay */
.weblabs-galley-picture__hover {
    position: absolute;
    inset: 0;
    background: var(--wlgp-hover-bg);
    opacity: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: flex-start;
    text-align: center;
    padding: 18px 16px;
    transition: opacity 250ms ease;
}

.weblabs-galley-picture__hover-title{
  font-weight:800;
  font-size:14px;
  line-height:1.4;
  margin:0 0 10px;
  color:#fff;
}

.weblabs-galley-picture__hover-desc{
  font-size:12px;
  line-height:1.9;
  margin:0 0 14px;
  text-align:right;
  color: rgba(255,255,255,.85);
  max-width: 90%;
}

/* button (فلش داخل لوزی سفید) */
.weblabs-galley-picture__btn{
  background: var(--wlgp-btn-bg);
  color:#0b2f39;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  white-space:nowrap;
  align-self: flex-end;
}

.weblabs-galley-picture__diamond{
  width: 30px;
  height: 30px;
  background: var(--wlgp-dia-bg);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transform: rotate(45deg);
}

.weblabs-galley-picture__diamond svg{
  transform: rotate(-45deg);
  color: var(--wlgp-dia-fg);
}

.weblabs-galley-picture__coverlink{
  position:absolute;
  inset:0;
  z-index:5;
  text-indent:-9999px;
}

/* hover interactions */
.weblabs-galley-picture__media:hover .weblabs-galley-picture__hover,
.weblabs-galley-picture__media:focus-within .weblabs-galley-picture__hover{
  opacity:1;
}

.weblabs-galley-picture__media:hover .weblabs-galley-picture__label,
.weblabs-galley-picture__media:focus-within .weblabs-galley-picture__label{
  opacity:0;
  transform: translateY(6px);
}

/* =========================
   Mobile: horizontal scroll (بدون JS)
   ========================= */
@media (max-width: 767px){
  .weblabs-galley-picture__grid{
    display:flex;
    gap: var(--wlgp-gap);
    overflow-x:auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .weblabs-galley-picture__grid::-webkit-scrollbar{ height: 6px; }
  .weblabs-galley-picture__grid::-webkit-scrollbar-thumb{ background: rgba(0,0,0,.15); border-radius: 20px; }
  .weblabs-galley-picture__grid::-webkit-scrollbar-track{ background: transparent; }

  .weblabs-galley-picture__card{
    flex: 0 0 var(--wlgp-mw);
    scroll-snap-align: start;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce){
  .weblabs-galley-picture__hover,
  .weblabs-galley-picture__label{ transition:none !important; }
}
