/* ==========================================================================
   BIPC Hero Slider — hero-slider.css
   قرار دادن در: assets/css/hero-slider.css داخل قالب فرزند وودمارت
   ========================================================================== */

:root{
  --bipchs-navy:#2E3191;
  --bipchs-red:#ED1D24;
  --bipchs-white:#FFFFFF;
  --bipchs-divider:rgba(255,255,255,.3);
  --bipchs-slide-duration:6000ms; /* مدت هر اسلاید — باید با DURATION در hero-slider.js یکی باشد */
}

.bipchs-slider *{box-sizing:border-box;}

/* ریست کامل دکمه‌ها — جلوگیری از استایل پیش‌فرض مرورگر/قالب (شکل کپسولی روی نقطه‌ها
   و پنهان شدن آیکون پخش/توقف دقیقاً به‌خاطر همین استایل پیش‌فرض بود) */
.bipchs-slider .bipchs-scrolldown,
.bipchs-slider .bipchs-nav-item{
  min-height:0 !important;
  text-transform:none !important;
  letter-spacing:0 !important;
  border:0 !important;
  box-shadow:none !important;
}
.bipchs-nav-item,
.bipchs-playpause,
.bipchs-scrolldown{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  box-shadow:none;
  outline:none;
  margin:0;
  min-width:0;
  min-height:0;
  line-height:1;
  font:inherit;
  -webkit-tap-highlight-color:transparent;
}

/* ===== Slider shell ===== */
.bipchs-slider{
  position:relative;
  width:100vw;                      /* تمام عرض صفحه، حتی اگر داخل کانتینر باکس‌دار قالب باشد */
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  height:1024px;
  max-height:92vh;
  overflow:hidden;
}

/* ===== Slides ===== */
.bipchs-slide{
  position:absolute;
  inset:0;
  background-image:var(--bipchs-image);
  background-size:cover;
  background-position:center;
  opacity:0;
  visibility:hidden;
  transition:opacity .6s ease;
}
.bipchs-slide.is-active{
  opacity:1;
  visibility:visible;
}
@media (max-width:768px){
  .bipchs-slide{
    background-image:var(--bipchs-image-mobile, var(--bipchs-image));
  }
}

.bipchs-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, var(--bipchs-navy) 0%, rgba(46,49,145,0) 100%);
  opacity:.75;
}
[dir="rtl"] .bipchs-overlay{
  transform:scaleX(-1);
}

.bipchs-shell{
  position:relative;
  height:100%;
  display:flex;
  align-items:center;       /* وسط عمودی کادر */
  justify-content:flex-start; /* در dir=rtl یعنی سمت راست */
  max-width:1440px;
  margin:0 auto;
  padding:0 48px;
}
.bipchs-content-inner{
  display:flex;
  flex-direction:column;
  align-items:flex-start; /* در dir=rtl یعنی «شروع سطر» = راست */
  gap:12px;
  max-width:676px;
  width:100%;
}
.bipchs-eyebrow{
  font-weight:600;
  font-size:16px;
  line-height:29px;
  color:var(--bipchs-white);
}
.bipchs-title{
  margin:0;
  font-weight:800;
  font-size:40px;
  line-height:1.5;
  color:var(--bipchs-white);
  text-align:right;
}
.bipchs-button{
  display:flex;
  align-items:center;
  gap:14px;
  padding:7px 16px 7px 7px;
  background:var(--bipchs-red);
  border-radius:10px;
  text-decoration:none;
  margin-top:10px;
}
.bipchs-button-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  width:29px;
  height:29px;
  background:var(--bipchs-white);
  border-radius:7px;
}
.bipchs-button span:first-child{
  color:var(--bipchs-white);
  font-size:16px;
}

/* ===== Play/Pause =====
   قالب وودمارت به همه <button>ها padding:5px 20px و min-height و رنگ پس‌زمینه می‌دهد؛
   در دکمه ۳۴ پیکسلی همین padding کل فضای آیکون را می‌خورد و آیکون صفر می‌شد.
   برای همین همه‌چیز با !important ریست شده و آیکون با CSS خالص (بدون SVG) ساخته شده. */
.bipchs-slider .bipchs-playpause{
  position:absolute !important;
  left:48px !important;
  right:auto !important;
  bottom:18px !important;
  top:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:40px !important;
  height:40px !important;
  min-width:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:1.5px solid rgba(255,255,255,.8) !important;
  border-radius:50% !important;
  background:transparent !important;
  color:#fff !important;
  font-size:0 !important;
  line-height:0 !important;
  cursor:pointer;
  z-index:5;
  transition:background .2s ease;
}
.bipchs-slider .bipchs-playpause:hover{
  background:rgba(255,255,255,.15) !important;
}
.bipchs-slider .bipchs-playpause:focus-visible{
  outline:2px solid #fff !important;
  outline-offset:3px;
}
.bipchs-pp-icon{
  position:absolute !important;
  top:50%;
  left:50%;
  display:block !important;
  width:12px;
  height:14px;
  -webkit-transform:translate(-50%,-50%);
  transform:translate(-50%,-50%);
}
/* حالت «در حال پخش» → آیکون توقف (دو خط) */
.bipchs-pp-icon::before,
.bipchs-pp-icon::after{
  content:"";
  position:absolute;
  top:0;
  bottom:0;
  width:4px;
  background:#fff;
  border-radius:1px;
}
.bipchs-pp-icon::before{left:0;}
.bipchs-pp-icon::after{right:0;}
/* حالت «متوقف» → آیکون پخش (مثلث) */
.bipchs-slider.is-paused .bipchs-pp-icon::before{
  left:2px;
  width:0;
  height:0;
  background:transparent;
  border-radius:0;
  border-top:7px solid transparent;
  border-bottom:7px solid transparent;
  border-left:12px solid #fff;
}
.bipchs-slider.is-paused .bipchs-pp-icon::after{display:none;}

/* ===== اسلاید «فقط تصویر» ===== */
.bipchs-slide.is-image-only .bipchs-overlay{display:none;}
.bipchs-slide-link{
  position:absolute;
  inset:0;
  z-index:1;
}

/* ===== Scroll-down (فقط موبایل) ===== */
.bipchs-scrolldown{
  display:none;
}

/* ===== Progress-bar navigation (desktop) ===== */
.bipchs-nav{
  position:absolute;
  left:0; right:0; bottom:0;
  display:flex;
  justify-content:center;
  z-index:3;
}
.bipchs-nav-list{
  display:flex;
  width:100%;
  max-width:1234px;
  padding:0 24px;
}
.bipchs-nav-item{
  position:relative;
  flex:1;
  padding:20px 22px 18px;
  background:none;
  border:none;
  cursor:pointer;
  text-align:center;
  color:var(--bipchs-white);
}
.bipchs-nav-item::before{
  content:"";
  position:absolute;
  top:0; right:22px; left:22px;
  height:1px;
  background:var(--bipchs-divider);
}
.bipchs-nav-progress{
  position:absolute;
  top:0; right:22px;
  height:4px;
  width:0%;
  background:var(--bipchs-red);
}
.bipchs-nav-item.is-active .bipchs-nav-progress{
  animation:bipchs-fill var(--bipchs-slide-duration) linear forwards;
}
.bipchs-slider.is-paused .bipchs-nav-item.is-active .bipchs-nav-progress{
  animation-play-state:paused;
}
@keyframes bipchs-fill{
  from{width:0%;}
  to{width:100%;}
}
.bipchs-nav-label{
  display:block;
  text-align:center;
  font-size:12px;
  line-height:19px;
  opacity:.6;
  transition:opacity .3s ease;
}
.bipchs-nav-item.is-active .bipchs-nav-label{
  opacity:1;
}
.bipchs-slider .bipchs-nav-item{
  background:transparent !important;
  border-radius:0 !important;
}
/* ترنزیشن فقط بعد از آماده شدن اسلایدر (کلاس is-ready توسط JS) تا هنگام لود صفحه رنگ پیش‌فرض دکمه چشمک نزند */
.bipchs-slider.is-ready .bipchs-nav-item{
  transition:background-color .25s ease;
}
@media (hover:hover) and (min-width:769px){
  .bipchs-slider .bipchs-nav-item:hover{
    background-color:#C7C8E4 !important;
  }
  .bipchs-slider .bipchs-nav-item:hover .bipchs-nav-label{
    color:#2E3191;
    opacity:1;
  }
}
/* در عرض‌های کمتر از ۱۴۰۰ فضای دکمه پخش در سمت چپ نوار پیمایش رزرو می‌شود تا روی هم نیفتند */
/* وسط‌چین قطعی برچسب‌های پیمایش دسکتاپ — مستقل از هر CSS دیگری در سایت */
@media (min-width:769px){
  .bipchs-slider .bipchs-nav-list .bipchs-nav-item{
    display:block !important;
    text-align:center !important;
  }
  .bipchs-slider .bipchs-nav-list .bipchs-nav-item .bipchs-nav-label{
    display:block !important;
    width:100% !important;
    text-align:center !important;
  }
}
@media (min-width:769px) and (max-width:1400px){
  .bipchs-nav{padding-left:96px;padding-right:96px;}
}

/* ===== Mobile: نوار پایین با نقطه + فلش اسکرول + پخش/توقف در یک ردیف ===== */
@media (max-width:768px){
  .bipchs-slider{
    height:100vh;
    height:100svh; /* ارتفاع واقعی صفحه موبایل بدون احتساب نوار آدرس مرورگر */
    max-height:none;
  }
  .bipchs-shell{padding:0 20px;}
  .bipchs-title{font-size:22px;}
  .bipchs-eyebrow{font-size:13px;}

  /* ردیف پایین: نقطه‌ها سمت چپ، فلش وسط، دکمه پخش سمت راست (دقیقاً مطابق نمونه) */
  /* از left/right فیزیکی استفاده شده تا جهت rtl سایت روی چیدمان این نوار اثر نگذارد */
  .bipchs-nav{
    left:16px; right:auto; bottom:16px;
    justify-content:flex-start;
  }
  .bipchs-nav-list{
    max-width:none;
    width:auto;
    padding:0;
    gap:6px;
  }
  .bipchs-nav-item{
    flex:none;
    padding:0;
    width:7px;
    height:7px;
    border-radius:50%;
    background:rgba(255,255,255,.45);
    overflow:hidden;
  }
  .bipchs-slider .bipchs-nav-item{
    background:rgba(255,255,255,.45) !important;
    border-radius:50% !important;
  }
  .bipchs-nav-item.is-active{
    width:9px;
    height:9px;
  }
  .bipchs-nav-item::before{display:none;}
  .bipchs-nav-label{display:none;}
  .bipchs-nav-progress{
    display:block;
    position:static;
    width:100% !important;
    height:100%;
    border-radius:50%;
    background:transparent;
    animation:none !important;
  }
  .bipchs-nav-item.is-active .bipchs-nav-progress{
    background:var(--bipchs-red);
  }

  .bipchs-scrolldown{
    display:flex;
    align-items:center;
    justify-content:center;
    position:absolute;
    left:50%;
    bottom:16px;
    transform:translateX(-50%);
    width:24px;
    height:24px;
    padding:0;
    border:none;
    background:transparent;
    color:rgba(255,255,255,.85);
    z-index:3;
  }
  .bipchs-scrolldown svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;}

  .bipchs-slider .bipchs-playpause{
    left:auto !important;
    right:16px !important;
    bottom:12px !important;
    width:36px !important;
    height:36px !important;
    border:0 !important;
    background:rgba(255,255,255,.18) !important;
    -webkit-backdrop-filter:blur(6px);
    backdrop-filter:blur(6px);
  }
  .bipchs-pp-icon{width:10px;height:12px;}
  .bipchs-pp-icon::before,
  .bipchs-pp-icon::after{width:3px;}
  .bipchs-slider.is-paused .bipchs-pp-icon::before{
    border-top-width:6px;
    border-bottom-width:6px;
    border-left-width:10px;
    width:0;
  }
}
