/* Hamon–Gerdbad Bridge 1.12.0 — ادغام دکمهٔ پخش آنلاین + پوستر عمودی یکسان و ریسپانسیو.
   فقط افزودنی؛ فایل قالب‌ها و افزونه‌ها تغییر نمی‌کند. بدون وابستگی به :has / color-mix تا روی مرورگر تلویزیون‌ها هم کار کند. */

/* ───────── ۱) دکمهٔ «پخش آنلاین» مجزای قالب (فقط وقتی باکس دانلود و تماشا دکمهٔ پخش دارد) ───────── */
body.hgb-merged-play .dlboxpr a.playonline,
body.hgb-merged-play a.playonline,
body.hgb-merged-play [data-hgb112-dup]{display:none!important}

/* ───────── ۲) پوستر عمودی یکسان (نسبت ۲:۳) در همهٔ بخش‌ها ───────── */
body.hgb-poster-uniform{--hgb-pw:150px;--hgb-ph:225px}
@media (max-width:1024px){body.hgb-poster-uniform{--hgb-pw:140px;--hgb-ph:210px}}
@media (max-width:700px){body.hgb-poster-uniform{--hgb-pw:128px;--hgb-ph:192px}}
@media (max-width:360px){body.hgb-poster-uniform{--hgb-pw:112px;--hgb-ph:168px}}
/* صفحه‌نمایش‌های بزرگ و تلویزیون: کمی بزرگ‌تر، همچنان همان نسبت */
@media (min-width:1600px){body.hgb-poster-uniform{--hgb-pw:180px;--hgb-ph:270px}}

/* کارت‌های شبکه‌ای قالب (صفحهٔ اول، آرشیو، دسته، جستجو) */
body.hgb-poster-uniform .main-contents-poster{
  position:relative;display:block;overflow:hidden;
  width:100%;max-width:var(--hgb-pw);aspect-ratio:2/3;height:auto;border-radius:12px;margin-inline:auto;
}
body.hgb-poster-uniform .main-contents-poster a{display:block;width:100%;height:100%}
body.hgb-poster-uniform .main-contents-poster img{
  display:block;width:100%!important;height:100%!important;max-width:100%;object-fit:cover;object-position:center;aspect-ratio:2/3;
}

/* موارد مشابه (single-slider) و پوستر صفحهٔ فیلم */
body.hgb-poster-uniform .single-slider li{width:var(--hgb-pw);flex:0 0 var(--hgb-pw)}
body.hgb-poster-uniform .single-slider li > a{display:block;position:relative;width:var(--hgb-pw);height:var(--hgb-ph)!important;overflow:hidden;border-radius:12px}
body.hgb-poster-uniform .single-slider li > a img{
  width:var(--hgb-pw)!important;height:var(--hgb-ph)!important;aspect-ratio:2/3!important;object-fit:cover!important;display:block;
}
body.hgb-poster-uniform .post-single-main .poster img{object-fit:cover;aspect-ratio:2/3;height:auto;max-width:100%}

/* صفحهٔ بازیگر */
body.hgb-poster-uniform.tax-actor .actorpst .play-slider.postp .swiper-slide,
body.hgb-poster-uniform.tax-actor .actorpst .play-slider.postp .swiper-slide > a{
  width:var(--hgb-pw)!important;min-width:var(--hgb-pw)!important;height:var(--hgb-ph)!important;min-height:var(--hgb-ph)!important;aspect-ratio:2/3!important;
  background-size:cover!important;background-position:center!important;border-radius:12px!important;
}

/* کارت‌های ردیف‌های افزونه */
body.hgb-poster-uniform .hgb-rows .hgb-card{flex:0 0 var(--hgb-pw)}
body.hgb-poster-uniform .hgb-rows .hgb-card__img{aspect-ratio:2/3}
body.hgb-poster-uniform .hgb-rows .hgb-card__img img{width:100%;height:100%;object-fit:cover}

/* مرورگرهای قدیمی (WebView تلویزیون‌های اندروید/iOS قدیمی) بدون پشتیبانی از aspect-ratio */
@supports not (aspect-ratio:2/3){
  body.hgb-poster-uniform .main-contents-poster{height:0;padding-bottom:150%}
  body.hgb-poster-uniform .main-contents-poster a{position:absolute;inset:0;top:0;right:0;bottom:0;left:0}
  body.hgb-poster-uniform .main-contents-poster img{position:absolute;top:0;left:0}
  body.hgb-poster-uniform .hgb-rows .hgb-card__img{height:0;padding-bottom:150%}
  body.hgb-poster-uniform .hgb-rows .hgb-card__img img{position:absolute;top:0;left:0}
}

/* ───────── ۳) باکس «دانلود و تماشا» و پلیر روی همهٔ دستگاه‌ها ───────── */
.hgb-unified-links,.hgb-unified-links *{-webkit-box-sizing:border-box;box-sizing:border-box}
.hgb-link-btn{-webkit-tap-highlight-color:transparent;touch-action:manipulation;min-height:44px}
.hgb-link-btn:focus,.hgb-link-btn:focus-visible{outline:3px solid var(--hgb-gold,#e29f37);outline-offset:2px} /* ناوبری با ریموت تلویزیون */
.hgb-link-btn--play{font-size:1rem}
.hgb-player-modal__panel{max-width:100%}
.hgb-player-modal__stage{height:0;padding-bottom:56.25%;aspect-ratio:auto}
.hgb-player-modal__stage iframe,.hgb-player-modal__stage video{position:absolute;top:0;left:0;width:100%;height:100%}
@media (max-width:480px){.hgb-link-meta{font-size:.8rem}.hgb-unified-links__head strong{font-size:1rem}}
@media (min-width:1600px){.hgb-link-btn{min-width:150px;font-size:1.1rem}}
