/* ==========================================================================
   SBIC — home.css
   تنسيقات خاصة بصفحة index.html فقط (الأقسام الفريدة للصفحة الرئيسية)
   ملاحظة: يعتمد على المتغيرات المعرّفة في base.css
   ========================================================================== */

/* ==========================================================================
   1) قسم الـ Hero (البوابة السينمائية)
   ========================================================================== */
#hero {
  position: relative;
  min-height: 92vh;
  min-height: 92dvh;
  display: flex;
  align-items: center;
  /* التخطيط غير المتماثل: نبدأ المحتوى من جهة "البداية" المنطقية (يمين في RTL، يسار في LTR)
     تاركين الجهة المقابلة فارغة نسبياً ليظهر الفيديو (السفن/الحاويات) بوضوح دون تشتيت */
  justify-content: flex-start;
  overflow: hidden;
  background-color: var(--color-navy-900); /* لون احتياطي أثناء تحميل الفيديو */
  padding-bottom: 5.5rem; /* مساحة محجوزة للشريط العائم السفلي حتى لا يغطي المحتوى */
}

.hero-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
}

/* طبقة التعتيم أصبحت أكثر تركيزاً على جهة النص (البداية) وأخف على الجهة المقابلة،
   حتى يبقى الفيديو (السفن والحاويات) واضحاً في الجانب الآخر كما طُلب */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to var(--hero-fade-direction, right),
    var(--overlay-navy-92) 0%,
    rgba(15, 32, 39, 0.72) 38%,
    rgba(15, 32, 39, 0.25) 68%,
    transparent 100%
  );
  z-index: 1;
}

/* في العربية (RTL) نريد التعتيم القوي يبدأ من اليمين (حيث النص)،
   وفي الإنجليزية (LTR) يبدأ من اليسار — نتحكم بذلك عبر متغير الاتجاه */
html[dir="rtl"] .hero-overlay {
  --hero-fade-direction: left; /* التدرج يذهب من اليمين (غامق) إلى اليسار (شفاف) */
}
html[dir="ltr"] .hero-overlay {
  --hero-fade-direction: right;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-block: var(--space-3xl);
}

/* لوحة الهيرو: الحاوية غير المتماثلة التي تحمل النص، بعرض محدود تاركة الباقي للفيديو */
.hero-panel {
  display: flex;
  align-items: stretch;
  gap: var(--space-lg);
  max-width: 620px;
}

/* الخط العمودي الدلالي — يبرز هوية "التفتيش الفني" بلون وردي/أحمر فاتح متدرج */
.hero-panel__accent-bar {
  flex-shrink: 0;
  width: 4px;
  border-radius: 3px;
  background: linear-gradient(
    to bottom,
    var(--color-accent-400) 0%,
    var(--color-accent-500) 50%,
    var(--color-accent-600) 100%
  );
  box-shadow: 0 0 16px rgba(232, 99, 111, 0.55);
}

/* اللوحة الزجاجية خلف النص — ضبابية خفيفة تضمن وضوح القراءة فوق الفيديو المتحرك */
.hero-panel__body {
  background: rgba(15, 32, 39, 0.38);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  color: var(--color-white);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 4.2vw, 2.9rem); /* أصغر قليلاً من السابق ليتناسب مع اللوحة الجانبية الأضيق */
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: var(--space-lg);
  color: var(--color-white);
  text-align: start;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* كلمات مفتاحية بارزة بالذهبي داخل العنوان (اختياري للاستخدام اليدوي مستقبلاً) */
.hero-title .text-gold {
  color: var(--color-gold-500);
}

.hero-subtitle {
  font-size: var(--fs-base);
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: var(--space-xl);
  line-height: 1.8;
  text-align: start;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
}

/* اهتزاز خفيف وفخم للزر التمييزي الرئيسي لجذب الانتباه دون إزعاج -
   نستخدم animation بسيطة تتكرر كل بضع ثوانٍ فقط، وليست دائمة الاهتزاز */
.hero-actions .btn--accent {
  animation: heroPulse 3.5s ease-in-out infinite;
}

@keyframes heroPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(232, 99, 111, 0.45);
  }
  50% {
    box-shadow: 0 0 0 14px rgba(232, 99, 111, 0);
  }
}

.hero-actions .btn--accent:hover {
  animation: none; /* نوقف الاهتزاز التلقائي عند التفاعل الحقيقي بالفأرة */
}

/* شريط الإحصائيات الحية داخل الـ Hero — محاذاة من جهة البداية لتناسب اللوحة الجانبية */
.hero-live-stats {
  display: flex;
  justify-content: flex-start;
  gap: var(--space-xl);
  flex-wrap: wrap;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-live-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2xs);
}

.hero-live-stat__number {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-accent-500);
  letter-spacing: -0.5px;
}

.hero-live-stat__label {
  font-size: var(--fs-xs);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   شريط الإجراءات العائم أسفل الهيرو (Hero Bottom Bar)
   شريط أبيض طافٍ يبرز فوق حدود قسم الهيرو، يحمل معلومات تواصل سريعة
   -------------------------------------------------------------------------- */
.hero-bottom-bar {
  position: absolute;
  bottom: var(--space-lg);
  inset-inline: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none; /* الحاوية نفسها شفافة للنقر، العناصر بداخلها فقط قابلة للنقر */
}

.hero-bottom-bar__inner {
  pointer-events: auto;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-md) var(--space-xl);
  width: 100%;
  max-width: 920px;
}

.hero-bottom-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition-fast);
  min-width: 0;
}

.hero-bottom-bar__item:hover {
  transform: translateY(-2px);
}

.hero-bottom-bar__item i {
  font-size: 1.3rem;
  color: var(--color-gold-500);
  flex-shrink: 0;
}

.hero-bottom-bar__item--email i {
  color: var(--color-navy-700);
}

.hero-bottom-bar__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.hero-bottom-bar__label {
  font-size: var(--fs-xs);
  color: var(--color-text-secondary);
  font-weight: 600;
}

.hero-bottom-bar__value {
  font-size: var(--fs-sm);
  color: var(--color-navy-900);
  font-weight: 700;
  white-space: nowrap;
}

/* الزر الأحمر الجاذب للانتباه في منتصف الشريط العائم */
.hero-bottom-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background-color: var(--color-alert-red);
  color: var(--color-white);
  border: none;
  padding: 0.75em 1.6em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(214, 69, 80, 0.35);
  transition: var(--transition-smooth);
  animation: heroBottomCtaPulse 3s ease-in-out infinite;
}

.hero-bottom-bar__cta:hover {
  background-color: var(--color-alert-red-hover);
  transform: translateY(-2px) scale(1.03);
  animation-play-state: paused;
}

@keyframes heroBottomCtaPulse {
  0%, 100% {
    box-shadow: 0 8px 20px rgba(214, 69, 80, 0.35), 0 0 0 0 rgba(214, 69, 80, 0.4);
  }
  50% {
    box-shadow: 0 8px 20px rgba(214, 69, 80, 0.35), 0 0 0 10px rgba(214, 69, 80, 0);
  }
}

/* ==========================================================================
   2) شريط الاعتمادات (Accreditations Bar)
   ========================================================================== */
.accreditations-bar {
  background-color: var(--color-off-white);
  padding-block: var(--space-2xl);
  border-bottom: 1px solid var(--color-border-soft);
}

.accreditations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-xl);
  text-align: center;
}

.accreditation-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  font-weight: 700;
  color: var(--color-navy-900);
  font-size: var(--fs-sm);
}

.accreditation-item i {
  font-size: 2rem;
  color: var(--color-gold-500);
}

/* ==========================================================================
   3) قسم القيم المضافة (Why Choose Us)
   ========================================================================== */
.value-props {
  padding-block: var(--space-4xl);
}

.value-props-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-xl);
}

.value-prop-card {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
  border: 1px solid var(--color-border-soft);
}

.value-prop-card:hover {
  border-color: var(--color-gold-500);
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
}

.value-prop-card__icon {
  width: 64px;
  height: 64px;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-navy-900), var(--color-navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.value-prop-card__icon i {
  font-size: 1.6rem;
  color: var(--color-gold-500);
}

.value-prop-card:hover .value-prop-card__icon {
  transform: scale(1.1) rotate(-6deg);
}

.value-prop-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
}

.value-prop-card p {
  font-size: var(--fs-sm);
  line-height: 1.7;
}

/* ==========================================================================
   4) قسم "نبذة عنا" (About Preview)
   ========================================================================== */
.about {
  padding-block: var(--space-4xl);
  background-color: var(--color-off-white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-visual {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-soft);
  background: var(--color-white);
}

.about-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.about-visual figcaption {
  padding: var(--space-md);
  font-size: var(--fs-sm);
  color: var(--color-text-secondary);
  text-align: center;
  font-weight: 600;
  border-top: 1px solid var(--color-border-soft);
}

.about-text p {
  margin-bottom: var(--space-xl);
  font-size: var(--fs-md);
  line-height: 1.85;
  color: var(--color-text-primary);
}

.about-text__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* ==========================================================================
   5) شبكة الخدمات (Services Grid) — بطاقات مع تأثير Hover فخم
   ========================================================================== */
.services {
  background-color: var(--color-bg-soft-light);
  padding-block: var(--space-4xl);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: var(--space-xl);
}

.service-card {
  /* البطاقة السوداء الأنيقة الجديدة — خلفية شبه سوداء مع نص فاتح لضمان تباين عالٍ،
     لا يختفي أي نص أبداً فوق هذه الخلفية الداكنة */
  background: var(--color-surface-dark);
  border-radius: var(--radius-md);
  padding: var(--space-2xl) var(--space-xl);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  text-align: center;
  border: 1px solid var(--color-border-dark);
  position: relative;
  overflow: hidden;
}

/* خط وردي علوي يظهر تدريجياً عند مرور الفأرة — تفصيلة فخمة بسيطة */
.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent-500), var(--color-accent-400));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-pink-glow);
  border-color: rgba(232, 99, 111, 0.4);
}

.service-card__badge-wrap {
  margin-bottom: var(--space-md);
}

.service-card__visual {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  aspect-ratio: 4 / 3;
}

.service-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.service-card:hover .service-card__visual img {
  transform: scale(1.1);
}

.service-card h3 {
  font-size: var(--fs-lg);
  margin-bottom: var(--space-sm);
  color: var(--color-text-on-dark-strong); /* عنوان أبيض كامل فوق الخلفية الداكنة */
}

.service-card p {
  font-size: var(--fs-sm);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  min-height: 4.6rem;
  color: var(--color-text-on-dark-soft); /* نص وصفي فاتح بدرجة أهدأ، يبقى مقروءاً بوضوح */
}

.service-cta {
  background: none;
  border: 2px solid var(--color-accent-500);
  color: var(--color-text-on-dark-strong);
  font-weight: 700;
  padding: 0.6em 1.8em;
  border-radius: var(--radius-pill);
  transition: var(--transition-smooth);
}

.service-cta:hover {
  background: var(--color-accent-500);
  color: var(--color-white);
  border-color: var(--color-accent-500);
  box-shadow: var(--shadow-pink-glow);
}

.services-footer-cta {
  text-align: center;
  margin-top: var(--space-3xl);
}

/* ==========================================================================
   6) شبكة القطاعات (Sectors Grid) — صور مع تراكب نصي (Overlay Caption)
   ========================================================================== */
.sectors {
  padding-block: var(--space-4xl);
  background-color: var(--color-off-white);
}

.sectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-xl);
}

.sector-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
}

.sector-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-medium);
}

.sector-card__visual {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.sector-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sector-card:hover .sector-card__visual img {
  transform: scale(1.1);
}

.sector-card figcaption {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--overlay-navy-92) 0%,
    rgba(15, 32, 39, 0.2) 65%,
    transparent 100%
  );
  color: var(--color-white);
  padding: var(--space-lg);
  font-weight: 700;
  font-size: var(--fs-md);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  text-align: center;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   7) شريط العملاء (Clients / Trusted Logos)
   ========================================================================== */
.clients {
  padding-block: var(--space-3xl);
  background-color: var(--color-white);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2xl);
  align-items: center;
  justify-items: center;
}

.client-item {
  filter: grayscale(100%);
  opacity: 0.55;
  transition: var(--transition-smooth);
}

.client-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.08);
}

.client-item img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   8) قسم الإحصائيات (Stats) — خلفية كحلية غامقة
   ========================================================================== */
.stats {
  background-color: var(--color-navy-900);
  color: var(--color-white);
  padding-block: var(--space-3xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-gold-500);
  display: block;
  margin-bottom: var(--space-2xs);
  letter-spacing: -1px;
}

.stat-label {
  font-size: var(--fs-base);
  font-weight: 600;
  opacity: 0.95;
}

/* ==========================================================================
   9) شريط الدعوة للعمل الختامي (CTA Banner)
   ========================================================================== */
.cta-banner {
  background: linear-gradient(120deg, var(--color-navy-900) 0%, var(--color-navy-700) 100%);
  padding-block: var(--space-3xl);
}

.cta-banner__inner {
  text-align: center;
  color: var(--color-white);
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--fs-md);
  margin-bottom: var(--space-xl);
}

/* ==========================================================================
   10) الاستجابة للشاشات المختلفة (Responsive — Mobile First داخل هذا الملف)
   ========================================================================== */
@media (max-width: 992px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .about-visual img {
    aspect-ratio: 16 / 9;
  }
  .hero-panel {
    max-width: 100%;
  }
  .hero-bottom-bar__inner {
    max-width: 90%;
  }
}

@media (max-width: 768px) {
  #hero {
    min-height: auto;
    padding-block: 7rem var(--space-4xl);
    /* على الشاشات الصغيرة نعيد المحتوى للوسط، لأن التخطيط الجانبي غير المتماثل
       يحتاج مساحة أفقية غير متوفرة على الجوال */
    justify-content: center;
  }
  .hero-panel {
    max-width: 100%;
  }
  .hero-title,
  .hero-subtitle {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-live-stats {
    justify-content: center;
    gap: var(--space-lg);
  }
  .hero-live-stat {
    align-items: center;
  }
  .hero-live-stat__number {
    font-size: 1.8rem;
  }
  .accreditations-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* الشريط العائم السفلي يتحول لعمود رأسي على الجوال ويصبح جزءاً من تدفق الصفحة
     بدل أن يكون طافياً فوق الفيديو، تفادياً لتغطية المحتوى */
  .hero-bottom-bar {
    position: static;
    padding-inline: var(--container-padding);
    margin-top: -2.5rem;
  }
  .hero-bottom-bar__inner {
    flex-direction: column;
    align-items: stretch;
    max-width: 100%;
    gap: var(--space-md);
  }
  .hero-bottom-bar__item {
    justify-content: center;
    text-align: center;
  }
  .hero-bottom-bar__text {
    align-items: center;
  }
  .hero-bottom-bar__cta {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-panel__body {
    padding: var(--space-lg);
  }
  .hero-title {
    font-size: 1.9rem;
  }
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: var(--space-lg);
  }
  .accreditations-grid {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
  .stat-number {
    font-size: 2.3rem;
  }
}