.overlay_section {
    position: relative;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  .overlay_section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1;
  }
  .bg_text {
    position: relative;
    z-index: 2;
    word-spacing: 3px;
    width: 80%;
    color: white;
    text-align: center;
    border-radius: 10px;
  }
/****************************************************/

.hero-video-section {
  position: relative;
  width: 100%;
  height: 102vh;
  overflow: hidden;
  z-index: 0;
  margin-top: -125px; /* حسب ارتفاع النافبار عندك */
}


.hero-video-section video.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 101%;
  min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}


@media (max-width: 767px) {
  .hero-video-section {
    height: auto;
    margin-top: -90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px; /* ✅ إضافة المسافة المطلوبة من فوق */
  }

  .hero-video-section video.hero-video {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }
.bg_text {
    font-size: 1rem; /* أو جرب 0.95rem لو بدك أصغر */
  }
  
}

/****************************************************/

.card_section{
  padding: 20px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 10px;
}
.card_img{
  height: 250px;
}
.card-hover-box {
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: all 0.4s ease;
}

.card-hover-box  {
  position: absolute;
  bottom: 0;
  width: 100%;
  transition: transform 0.4s ease;
  height: 250px;
}

.info-bar{
  height: 60px;
  position: absolute;
  bottom: 0;
  width: 100%;
  background-color: rgba(0,0,0,0.8);
  transition: transform 0.4s ease;
}
.card-hover-box .hover-text {
  position: absolute;
  bottom: -170%;
  width: 100%;
  background-color: rgba(0, 0, 0, 0.59);
  transition: bottom 0.8s ease;
  text-align: center;
}

/*  التأثير عند تمرير الماوس */
.card-hover-box:hover .info-bar {
  transform: translateY(-250px);
}

.card-hover-box:hover .hover-text {
  bottom: 0;
}
/* الميديا   */
@media (max-width: 768px) {
  .card_section {
    flex-direction: column;
    align-items: center;
  }

  .card-hover-box {
    position: relative !important;
    height: auto !important;
  }

  .card-hover-box .card_img {
    width: 100%;
    height: 150px;
    display: block;
  }

  .info-bar {
    position: static !important;
    height: auto;
    padding: 10px 0;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .card-hover-box .hover-text {
    position: static !important;
    display: block;
    background-color: rgba(0,0,0,0.85);
    color: white;
    padding: 0px !important;
    margin: 0px !important;;
    text-align: center;
    bottom: auto !important;
    
  }

  .card-hover-box:hover .info-bar,
  .card-hover-box:hover .hover-text {
    transform: none !important;
    bottom: auto !important;
  }
}
/*  زر اقرأ المزيد */
.read-more-btn {
  display: inline-block;
  padding: 0px 20px;
  background-color:transparent;
  color: white;
  text-decoration: none;
  font-weight: bold;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.read-more-btn:hover {
  background-color: black;
  color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}
/****************************************************/ 

  /* ✅ لما تكون الصفحة بالعربي */
  
  
  /* اختياري: السهم يشير لليسار بدل اليمين */
  html[dir="rtl"] .liner{
    height: auto;
    
   padding:20px 10%  20px 25%;
   background: linear-gradient(to left, rgba(255, 255, 255, 0.96) 30%, rgba(255, 255, 255, 0.6) 65%, rgba(255, 255, 255, 0) 100%);z-index: 10;
}
  
.liner_img{
    height: auto;
}
.liner{
    height: auto;
    
   padding:20px 25%  20px 10%;
   background: linear-gradient(to right, rgba(255, 255, 255, 0.96) 30%, rgba(255, 255, 255, 0.6) 65%, rgba(255, 255, 255, 0) 100%);z-index: 10;
}
.liner_color{
    padding-top: 20px;
    color: #BCB338;
    font-size: xx-large;
    font-weight: bolder;   
}
/* ✅ حركة دخول من الأعلى */
.liner {
  opacity: 0;
  transform: translateY(-50px); /* بداية من فوق */
  animation: slideDown 1s ease forwards;
}

@keyframes slideDown {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ✅ تجاوب الموبايل والتابلت */
@media (max-width: 992px) {
  .liner {
    padding: 20px 20px;
    height: auto;
    background: rgba(255,255,255,0.9); /* خلفية بيضاء واضحة */
  }

  .liner_img {
    height: auto;
  }
}

/****************************************************/

.BG_section{
    background-color: #F8F8F8;
}
.secondary{
    padding: 10px 50px;   
}
.secondary_title{
    margin-top: 20px;
    color: #B7AE2A;
    font-size: 22px;
    font-weight: bolder;
}
.secondary_text{
    line-height:2em;
    padding-top: 10px;
    text-align: start;
    font-size: 20px;
}
.group_section{
  
      padding: 20px 100px;
      display: flex;
      justify-content: space-between; /* بدل space-around */
      align-items: flex-start;
      gap: 30px;
      flex-wrap: wrap; /* 🟢 للسماح بالكسر على الشاشات الصغيرة */
    
    
}
.group_section .secondary {
  flex: 1 1 30%;
  min-width: 280px;
  max-width: 100%;
}

/* ✅ إعداد الأعمدة للحركة */
.group_section .secondary {
  opacity: 0;
  transform: translateX(50px); /* دخول من اليمين */
  animation: slideInRight 0.6s ease forwards;
}

/* ✅ تأخير الدخول التدريجي */
.group_section .secondary:nth-child(1) {
  animation-delay: 0s;
}
.group_section .secondary:nth-child(2) {
  animation-delay: 0.3s;
}
.group_section .secondary:nth-child(3) {
  animation-delay: 0.6s;
}

/* ✅ تعريف الحركة */
@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ✅ التجاوب للتابلت والموبايل */
@media (max-width: 992px) {
  .group_section {
    flex-direction: column;
    padding: 20px 30px;
  }

  .group_section .secondary {
    width: 100%;
    text-align: center;
  }
}


/****************************************************/
/* ✅ تنسيق لعرض خدمتين جنب بعض على الموبايل */
@media (max-width: 767.98px) {
  .card_section .col-12 {
    width: 50% !important;
    flex: 0 0 50%;
  }

  /* إخفاء النص الطويل داخل الهوفر */
  .card-hover-box .hover-text p,
  .card-hover-box .hover-text .editable.mb-2.small {
    display: none !important;
  }

  /* ✅ تحسين ظهور العنوان ورابط اقرأ المزيد فقط */
  .card-hover-box .hover-text {
    
    text-align: center;
  }

  .card-hover-box .hover-text .read-more-btn {
    display: inline-block;
    margin-top: 0.5rem;
  }

  /* ✅ تقليل حجم الأيقونة داخل الـ info-bar */
  .card-hover-box .info-bar i {
    font-size: 1.8rem !important;
  }

  h1, h2, h3, h4 {
    font-size: 1.2rem !important;
  }

  p,
  .secondary_text,
  .liner .secondary_text {
    font-size: 0.95rem !important;
    line-height: 1.6;
  }

  .liner {
    padding: 1rem !important;
    text-align: center;
  }

  .liner_color {
    font-size: 1.4rem !important;
  }

  .h2_hero {
    font-size: 1.3rem !important;
    text-align: center;
  }

  /* ✅ تصغير الصور الدائرية */
  .rounded-circle {
    width: 100px !important;
    height: 100px !important;
  }

  /* ✅ تنظيم العناصر داخل .group_section */
  .group_section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .secondary_title {
    font-size: 1.2rem !important;
    margin-top: 0.5rem;
  }

  .secondary {
    padding: 0 1rem;
    text-align: center;
  }

  /* ✅ ضبط أقسام الشهادات والعملاء */
  section[style*="height: 20vh"] {
    height: auto !important;
    padding: 2rem 1rem !important;
    text-align: center;
  }


  .overlay_section {
    padding: 2rem 1rem;
    position: relative;
    text-align: center;
  }

  .overlay_section .bg_text {
    font-size: 0.95rem !important;
    color: #fff !important;
    line-height: 1.6;
    position: relative;
    z-index: 2;
  }

  .overlay_section .overlay {
    background-color: rgba(0, 0, 0, 0.5); /* تغميق الخلفية لتوضيح النص */
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
  }
}
