.tilawi-hs {
  position: relative;
  width: 100%;
}

.tilawi-hs__swiper {
  width: 100%;
  position: relative;
  overflow: hidden; /* prevent showing part of another slide at the left/right */
}

.tilawi-hs .swiper-wrapper {
  display: flex;
  align-items: stretch;
}

.tilawi-hs .swiper-slide {
  width: 100% !important;
  height: auto;
  flex-shrink: 0;
  display: flex;
}

.tilawi-hs__slide {
  position: relative;
  width: 100%;
  min-height: 148px;
  background: #0b2a5b;
  border-radius: 12px;
  overflow: hidden;
}

.tilawi-hs__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  z-index: 0;
}

/* Desktop background image - show on desktop, hide on mobile */
.tilawi-hs__bg--desktop {
  display: block;
}

/* Mobile background image - hide on desktop, show on mobile */
.tilawi-hs__bg--mobile {
  display: none !important;
}

/* على الديسكتوب: إخفاء صورة الجوال بشكل صريح */
@media (min-width: 701px) {
  .tilawi-hs__bg--mobile {
    display: none !important;
  }
  
  .tilawi-hs__bg--desktop {
    display: block !important;
  }
}

.tilawi-hs__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /*background: radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.65));*/
}

.tilawi-hs__container {
  position: relative;
  z-index: 2;
  width: min(1200px, 92%);
  margin: 0 auto;
  min-height: 295px;
  display: grid;
  grid-template-columns: 420px 1fr;
  align-items: center;
  gap: 30px;
  padding: 28px 0;
}

[dir="rtl"] .tilawi-hs__container {
  grid-template-columns: 1fr 295px;
}

.tilawi-hs__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tilawi-hs__product {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}

.tilawi-hs__badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 800;
}

[dir="rtl"] .tilawi-hs__badge {
  right: auto;
  left: 24px;
}

.tilawi-hs__content {
  color: #fff;
}

.tilawi-hs__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 12px;
  margin-bottom: 12px;
}

.tilawi-hs__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3vw, 44px);
  line-height: 1.15;
  font-weight: 900;
}

.tilawi-hs__subtitle {
  margin: 0 0 16px;
  opacity: 0.95;
  font-size: 16px;
  line-height: 1.6;
  max-width: 58ch;
}

.tilawi-hs__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #0b2a3c;
  font-weight: 800;
  text-decoration: none;
}

.tilawi-hs__btn:hover {
  opacity: 0.92;
}

.tilawi-hs .swiper-button-next,
.tilawi-hs .swiper-button-prev {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  top: 50% !important;
  transform: translateY(-50%) !important;
}

.tilawi-hs .swiper-button-next::after,
.tilawi-hs .swiper-button-prev::after {
  font-size: 16px;
  color: #fff;
  font-weight: 800;
}

.tilawi-hs .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.55);
}

.tilawi-hs .swiper-pagination-bullet-active {
  background: #fff;
}

.tilawi-hs .swiper-pagination {
  position: absolute !important;
  left: 0;
  right: 0;
  bottom: 12px !important;
}

@media (max-width: 991px) {
  .tilawi-hs__container {
    grid-template-columns: 1fr;
    min-height: 80px;
    padding: 22px 0;
    text-align: center;
  }

  .tilawi-hs__slide {
    min-height: 80px;
  }

  .tilawi-hs__product {
    max-height: 220px;
  }

  .tilawi-hs__badge {
    top: 14px;
    right: 14px;
  }
}

/* =========================
   Mobile Only - Max 700px
========================= */
@media (max-width: 700px) {
  .tilawi-hs__container {
    grid-template-columns: 1fr;
    min-height: auto !important;
    padding: 28px 20px;
    text-align: center;
    gap: 20px;
    flex-direction: column;
    display: flex !important;
  }

  .tilawi-hs__slide {
    aspect-ratio: 375 / 600 !important; /* عمودي (بالطول) على الموبايل */
    min-height: auto !important;
  }

  .tilawi-hs__product {
    max-height: 220px;
    max-width: 80%;
    width: auto;
    object-fit: contain;
  }

  .tilawi-hs__media {
    order: 2;
    margin-top: 15px;
  }

  .tilawi-hs__content {
    order: 1;
  }

  .tilawi-hs__badge {
    top: 14px;
    right: 14px;
    font-size: 11px;
    padding: 8px 12px;
  }

  .tilawi-hs__title {
    font-size: clamp(20px, 5vw, 28px);
    margin-bottom: 8px;
  }

  .tilawi-hs__subtitle {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .tilawi-hs__btn {
    font-size: 14px;
    padding: 10px 20px;
  }
}
















/* =========================
   RESET أي ارتفاع محجوز
========================= */
.tilawi-hs,
.tilawi-hs__swiper {
    padding: 0 !important;
    margin: 0 !important;
}

/* Swiper elements should respect slide height */
.tilawi-hs .swiper,
.tilawi-hs .swiper-wrapper {
    height: auto !important;
    min-height: 0 !important;
}

.tilawi-hs .swiper-slide {
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* =========================
   السلايد هو المتحكم الوحيد
========================= */
.tilawi-hs__slide {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: transparent;
}

/* =========================
   الصورة Contain بدون كروب على الديسكتوب
========================= */
.tilawi-hs__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* =========================
   منع أي فراغ سفلي نهائيًا
========================= */
.tilawi-hs__container,
.tilawi-hs__content,
.tilawi-hs__overlay {
    height: 100%;
}

/* =========================
   شيل أي min-height من الثيم
========================= */
.tilawi-hs {
    min-height: unset !important;
}





/* Desktop - عرض الصورة كاملة بدون كروب */
@media (min-width: 701px) {
  /* ضمان أن swiper-slide يأخذ الارتفاع الكامل */
  .tilawi-hs .swiper-slide {
    height: auto !important;
    align-items: flex-start !important;
  }
  
  .tilawi-hs .swiper-wrapper {
    align-items: flex-start !important;
  }
  
  /* تعيين aspect-ratio للارتفاع المطلوب 350 */
  .tilawi-hs__slide {
    aspect-ratio: 1920 / 350 !important;
    min-height: unset !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    overflow: visible !important;
  }
  
  /* جعل الصورة تحدد ارتفاع الـ slide على الديسكتوب - عرض كامل بدون كروب */
  .tilawi-hs__bg,
  .tilawi-hs__bg--desktop {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: none !important;
    inset: unset !important;
    top: 0 !important;
    left: 0 !important;
    right: unset !important;
    bottom: unset !important;
    display: block !important;
    object-fit: contain !important;
    object-position: center top !important;
  }
  
  /* الـ overlay والـ container يبقون absolute فوق الصورة */
  .tilawi-hs__overlay {
    position: absolute !important;
    inset: 0;
    top: 0;
    bottom: auto !important;
    height: 100% !important;
    z-index: 1;
  }
  
  .tilawi-hs__container {
    position: absolute !important;
    inset: 0;
    top: 0;
    bottom: auto !important;
    height: 100% !important;
    z-index: 2;
  }
}

.tilawi-hs {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    position: relative;
    z-index: 1;
}

/* =========================
   Mobile - أولوية عالية - بالطول (عمودي)
========================= */
@media (max-width: 700px) {
  .tilawi-hs {
    margin-bottom: 30px !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
  }
  
  .tilawi-hs__swiper {
    position: relative !important;
    overflow: hidden !important;
    height: auto !important;
    min-height: 0 !important;
  }
  
  .tilawi-hs .swiper-wrapper {
    height: auto !important;
    position: relative !important;
    min-height: 0 !important;
  }
  
  .tilawi-hs .swiper-slide {
    height: auto !important;
    display: flex !important;
    align-items: stretch !important;
    position: relative !important;
    min-height: 0 !important;
  }
  
  /* ارتفاع ثابت للسلايدر على الموبايل */
  .tilawi-hs__slide {
    height: 600px !important;
    min-height: 600px !important;
    max-height: 600px !important;
    position: relative !important;
    overflow: hidden !important;
  }
  
  .tilawi-hs__container {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100% !important;
    height: 100% !important;
    position: relative !important;
    padding: 28px 20px !important;
  }

  /* إخفاء صورة الديسكتوب وإظهار صورة الجوال على الموبايل */
  .tilawi-hs__bg--desktop {
    display: none !important;
  }

  .tilawi-hs__bg--mobile {
    display: block !important;
  }
  
  /* التأكد من عدم التداخل مع الأقسام الأخرى */
  .tilawi-hs + .tilawi-home-cats,
  .tilawi-hs + section,
  .tilawi-hs + div {
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
  }
  
  /* ضمان ظهور قسم التصنيفات */
  .tilawi-home-cats {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }
}

