:root {
  --primary-green: #2E9F52;
  --primary-red: #E51A24;
  --dark-bg: #111111;
  --light-bg: #F8F9FA;
  --white: #FFFFFF;
  --text-dark: #1F2937;
  --text-muted: #6B7280;
  --text-light: #FFFFFF;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  text-decoration: none;
  color: inherit;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  background: rgba(0, 0, 0, 0.04);
  border-radius: 999px;
  padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.lang-switcher button {
  background: transparent;
  border: none;
  color: #000000;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.lang-switcher button.active {
  background: #000000;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.lang-switcher button:not(.active):hover {
  background: rgba(0, 0, 0, 0.08);
  color: #000000;
}

.lang-switcher button:not(.active):focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.9);
  outline-offset: 2px;
}

/* إخفاء النسخة المخصصة للهاتف على سطح المكتب بشكل افتراضي */
.lang-switcher-mobile {
  display: none;
}

.quran-gloss {
  display: none;
  font-size: 0.95rem;
  color: #718096;
  margin-top: 8px;
  font-style: italic;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: heroSlideAnimation 15s infinite;
}

.slide:nth-child(1) {
  background-image: url('../image/front-page/fp1.webp');
  animation-delay: 0s;
}

.slide:nth-child(2) {
  background-image: url('../image/front-page/fp2.webp');
  animation-delay: 3s;
}

.slide:nth-child(3) {
  background-image: url('../image/front-page/fp3.webp');
  animation-delay: 6s;
}

.slide:nth-child(4) {
  background-image: url('../image/front-page/fp4.webp');
  animation-delay: 9s;
}

.slide:nth-child(5) {
  background-image: url('../image/front-page/fp5.webp');
  animation-delay: 12s;
}

@keyframes heroSlideAnimation {

  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }

  15%,
  35% {
    opacity: 1;
  }

  45% {
    opacity: 0;
    transform: scale(1.04);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.85) 100%);
  z-index: 1;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 15px 0;
}

/* ===== إصلاح مشكلة انعكاس اتجاه الهيدر في العربية =====
   تمت إزالة "direction: ltr" الثابتة من هنا.
   الاتجاه الآن يتبع لغة الصفحة (dir على <html>):
   - عربي (dir="rtl")   → القائمة تترتب من اليمين لليسار
   - فرنسي/إنجليزي (dir="ltr") → القائمة تترتب من اليسار لليمين (عبر القاعدة أدناه) */
.header .container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(42, 92, 83, 0.705), rgba(30, 120, 75, 0.88));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px 30px;
  box-shadow: 0 6px 20px rgba(20, 70, 60, 0.04);
}

html[dir="ltr"] .header .container {
  direction: ltr;
}

.logo img {
  height: 55px;
}

/* ===== محتوى القائمة القابل للطي (nav + الإجراءات) ===== */
.nav-collapse {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  margin-inline-start: 40px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links a {
  color: var(--text-light);
  font-size: 1.05rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: var(--transition);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-green);
  transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-green);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--white);
  min-width: 180px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  overflow: hidden;
  z-index: 100;
  border-top: 3px solid var(--primary-green);
}

.dropdown-content a {
  color: var(--text-dark) !important;
  padding: 12px 16px;
  display: block;
  font-size: 0.95rem;
}

.dropdown-content a:hover {
  background-color: var(--light-bg);
  color: var(--primary-green) !important;
  padding-right: 22px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
}

.btn-contact,
.btn-main,
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-contact {
  background-color: var(--primary-red);
  color: var(--text-light);
  padding: 10px 24px;
  box-shadow: 0 4px 15px rgba(229, 26, 36, 0.3);
}

.btn-contact:hover {
  background-color: #c4131b;
  transform: translateY(-2px);
}

/* ===== زر الهامبرغر (يظهر فقط على الهاتف) ===== */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  flex-shrink: 0;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-light);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  text-align: center;
  color: var(--text-light);
  padding: 0 20px;
}

.hero-content h1 {
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content h1 span {
  color: var(--primary-green);
}

.hero-content p {
  font-size: 1.3rem;
  color: #E5E7EB;
  margin-bottom: 35px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.btn-main {
  background-color: var(--primary-green);
  color: var(--text-light);
  padding: 14px 32px;
}

.btn-main:hover {
  background-color: #238041;
  transform: translateY(-2px);
}

.btn-outline {
  border: 2px solid var(--text-light);
  color: var(--text-light);
  padding: 12px 30px;
}

.btn-outline:hover {
  background-color: var(--text-light);
  color: #111;
}

.about-section,
.vision-section,
.strengths-section,
.companies-section,
.trust-quran-section {
  padding: 90px 0;
}

.about-card {
  display: grid;
  grid-template-columns: 1.8fr 1.2fr;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border-right: 6px solid var(--primary-green);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.about-card.active {
  opacity: 1;
  transform: translateY(0);
}

.about-text {
  padding: 50px;
}

.about-title-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 25px;
}

.about-text h2 {
  font-size: 2.2rem;
  margin: 0;
}

.about-logo {
  order: -1;
  width: 360px;
  height: 360px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(46, 159, 82, 0.08);
  padding: 14px;
  box-shadow: 0 10px 25px rgba(46, 159, 82, 0.15);
}

.about-text h2 span {
  color: var(--primary-green);
}

.about-text p {
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 18px;
  text-align: justify;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-slider-box {
  position: relative;
  min-height: 380px;
  overflow: hidden;
}

.about-slider {
  position: absolute;
  inset: 0;
}

.about-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: aboutSlideAnimation 9s infinite;
}

.about-slide:nth-child(1) {
  background-image: url('../image/hadidi-pic/h4.webp');
  animation-delay: 0s;
}

.about-slide:nth-child(2) {
  background-image: url('../image/hadidi-pic/h12.webp');
  animation-delay: 3s;
}

.about-slide:nth-child(3) {
  background-image: url('../image/hadidi-pic/h13.webp');
  animation-delay: 6s;
}

@keyframes aboutSlideAnimation {

  0%,
  100% {
    opacity: 0;
    transform: scale(1);
  }

  15%,
  35% {
    opacity: 1;
  }

  45% {
    opacity: 0;
    transform: scale(1.04);
  }
}

.about-slider-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(46, 159, 82, 0.15), rgba(229, 26, 36, 0.15));
}

.vision-section {
  background-color: var(--light-bg);
}

.vision-box {
  background: linear-gradient(135deg, #ffffff 0%, #f4f9f5 100%);
  border: 1px solid rgba(46, 159, 82, 0.2);
  border-right: 6px solid var(--primary-green);
  border-radius: 16px;
  padding: 40px 50px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.vision-box h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.vision-box h2 span {
  color: var(--primary-green);
}

.vision-box p {
  font-size: 1.15rem;
  color: var(--text-dark);
  line-height: 1.8;
  max-width: 900px;
  margin: 0 auto;
}

.strengths-section {
  background-color: var(--white);
}

.strengths-header {
  text-align: center;
  margin-bottom: 50px;
}

.strengths-header h2 {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.strengths-header h2 span {
  color: var(--primary-green);
}

.strengths-intro {
  font-size: 1.1rem;
  color: var(--text-muted);
}

.strengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.strength-card {
  background-color: var(--light-bg);
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease, background-color 0.4s ease;
}

.strength-card.card-wide {
  grid-column: 1 / -1;
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

.card-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-green);
  margin-bottom: 10px;
}

.card-icon {
  font-size: 2.2rem;
  margin: 10px 0 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.strength-card h3 {
  font-size: 1.2rem;
  color: var(--dark-bg);
}

.card-details {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease, margin-top 0.4s ease;
}

.card-details p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.strength-card.expanded,
.strength-card:hover {
  transform: scale(1.04);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-green);
  background-color: #ffffff;
}

.strength-card.expanded .card-num,
.strength-card:hover .card-num {
  color: var(--primary-red);
}

.strength-card.expanded .card-details,
.strength-card:hover .card-details {
  max-height: 150px;
  opacity: 1;
  margin-top: 15px;
}

.trust-quran-section {
  background: #ffffff;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.quran-card {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.trust-subtitle {
  font-size: 1.5rem;
  color: var(--primary-green);
  font-weight: 700;
  margin-bottom: 25px;
  display: inline-block;
}

.trust-subtitle::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary-green);
  margin: 8px auto 0;
  border-radius: 2px;
}

.quran-text-wrapper {
  background: #fafbfc;
  padding: 35px 25px;
  border-radius: 20px;
  border-right: 4px solid var(--primary-green);
  border-left: 4px solid var(--primary-green);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.basmala,
.quran-verse {
  font-family: 'Traditional Arabic', 'Amiri', serif, sans-serif;
  color: #2E9F52;
}

.basmala {
  font-size: 1.9rem;
  color: #333333;
  margin-bottom: 15px;
}

.quran-verse {
  font-size: 1.9rem;
  font-weight: bold;
  color: var(--primary-green);
  line-height: 1.8;
  margin: 0 0 15px 0;
}

.sadaq {
  font-size: 1.15rem;
  color: #718096;
  font-weight: 600;
  margin-top: 10px;
}

.timeline-section {
  padding: 90px 0;
  background-color: var(--white);
  text-align: center;
}

.timeline-section h2 {
  font-size: 2.4rem;
  margin-bottom: 12px;
}

.timeline-section h2 span {
  color: var(--primary-green);
}

.timeline-image-wrap {
  margin-top: 10px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border: 1px solid #edf2f7;
}

.timeline-image {
  width: 100%;
  height: auto;
  display: block;
}

.companies-section {
  background-color: var(--light-bg);
}

.companies-section h2 {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 12px;
}

.companies-section h2 span {
  color: var(--primary-green);
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 30px;
}

.companies-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.company-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid #edf2f7;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.company-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.company-logo {
  width: 100%;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.company-logo img {
  max-width: 160px;
  max-height: 80px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.company-card:hover .company-logo img {
  transform: scale(1.05);
}

.company-name {
  font-size: 1.3rem;
  color: #1a202c;
  font-weight: 700;
  margin-bottom: 12px;
}

.company-name::after {
  content: '';
  display: block;
  width: 35px;
  height: 3px;
  background: var(--primary-green);
  margin: 8px auto 0;
  border-radius: 2px;
}

.company-desc p {
  font-size: 0.95rem;
  color: #64748b;
  line-height: 1.6;
}

.main-footer {
  background-color: #0a0a0a;
  color: #ffffff;
  padding-top: 10px;
  border-top: 1px solid #222222;
  margin-top: auto;
  overflow: visible;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  min-height: 48px;
  overflow: visible;
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.footer-logo img {
  max-height: 90px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 12px rgba(255, 255, 255, 0.15));
  margin-top: 12px;
  position: relative;
  z-index: 2;
}

.footer-copyright p {
  color: #aaaaaa;
  font-size: 0.95rem;
  margin: 0;
}

/* =========================================================
   الاستجابة على الأجهزة اللوحية والهواتف
   ========================================================= */

@media (max-width: 992px) {
  .header .container {
    padding: 10px 16px;
    border-radius: 14px;
    gap: 8px;
    justify-content: space-between;
  }

  html[dir="ltr"] .header .container {
    direction: ltr;
  }

  .logo img {
    height: 42px;
  }

  .logo,
  .menu-toggle,
  .lang-switcher-mobile {
    flex-shrink: 0;
  }

  .menu-toggle {
    order: 3;
  }

  .lang-switcher-mobile {
    order: 2;
    margin: 0 auto;
  }

  .logo {
    order: 1;
  }

  .menu-toggle {
    display: flex;
  }

  /* لوحة القائمة المنسدلة على الهاتف */
  .nav-collapse {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    margin-inline-start: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    background: rgba(15, 15, 15, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 8px 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.3s ease, padding 0.35s ease;
  }

  .nav-collapse.open {
    max-height: 80vh;
    opacity: 1;
    overflow-y: auto;
    pointer-events: auto;
    padding: 20px;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }

  .nav-links>li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 12px 4px;
    width: 100%;
  }

  .nav-links a::after {
    display: none;
  }

  /* الأقسام الفرعية تظهر مباشرة بدون الحاجة لضغطة إضافية على الهاتف */
  .dropdown-content {
    display: block;
    position: static;
    box-shadow: none;
    border-radius: 10px;
    border-top: none;
    background: rgba(255, 255, 255, 0.06);
    margin: 4px 0 6px;
  }

  .dropdown-content a {
    color: var(--text-light) !important;
  }

  .dropdown-content a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-green) !important;
    padding-right: 16px;
  }

  /* السهم ▾ ما عاد له داعي بما إنه القسم مفتوح دايماً على الهاتف */
  .dropdown > .dropbtn {
    pointer-events: none;
    opacity: 0.75;
    font-size: 0.9em;
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    width: 100%;
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .btn-contact {
    width: 100%;
    text-align: center;
  }

  /* نستهدف فقط أداة اللغة الأصلية داخل القائمة المنسدلة، وليس النسخة المخصصة للهاتف */
  .header-actions .lang-switcher {
    justify-content: center;
    margin-inline-start: 0;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-actions,
  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .about-card {
    grid-template-columns: 1fr;
  }

  .about-slider-box {
    min-height: 300px;
  }

  .about-text {
    padding: 30px;
  }
}

@media (max-width: 768px) {
  .trust-quran-section {
    padding: 40px 15px;
  }

  .quran-verse {
    font-size: 1.4rem;
    line-height: 1.6;
  }

  .basmala {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 14px;
  }

  .hero-content h1 {
    font-size: 2.8rem;
  }

  .hero-content p {
    font-size: 0.92rem;
    margin-bottom: 26px;
  }

  .hero-actions {
    width: 100%;
    gap: 12px;
  }

  .btn-main,
  .btn-outline {
    width: 100%;
  }

  .about-section,
  .vision-section,
  .strengths-section,
  .companies-section,
  .trust-quran-section {
    padding: 55px 0;
  }

  .about-text {
    padding: 22px;
  }

  .about-text h2 {
    font-size: 1.7rem;
  }

  .vision-box {
    padding: 28px 22px;
  }

  .vision-box h2 {
    font-size: 1.6rem;
  }

  .vision-box p {
    font-size: 1rem;
  }

  .strengths-header h2,
  .companies-section h2,
  .timeline-section h2 {
    font-size: 1.7rem;
  }

  .timeline-section {
    padding: 55px 0;
  }

  .timeline-image-wrap {
    margin-top: 10px;
    border-radius: 14px;
  }

  .quran-verse {
    font-size: 1.15rem;
  }

  .basmala {
    font-size: 1.25rem;
  }

  .footer-content {
    text-align: center;
  }
}

.infinite-logos-slider {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  background: #ffffff;
  padding: 20px 0;
  border-top: 1px solid #edf2f7;
  border-bottom: 1px solid #edf2f7;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
  direction: ltr;
  /* يعزل اتجاه الشريط عن اتجاه الصفحة RTL - هذا مقصود لأنه شعارات فقط وليس نصاً */
}

.logos-track {
  display: flex;
  width: max-content;
  min-width: max-content;
  animation: scrollLoop 40s linear infinite;
  will-change: transform;
}

.infinite-logos-slider:hover .logos-track,
.infinite-logos-slider:focus-within .logos-track {
  animation-play-state: running;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 50px;
  padding-left: 50px;
  flex-shrink: 0;
}

.logo-group img {
  height: 45px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.logo-group img:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

@keyframes scrollLoop {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

@media (max-width: 768px) {
  .logo-group img {
    height: 35px;
    max-width: 80px;
  }

  .logo-group {
    gap: 30px;
    padding-left: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .nav-collapse,
  .menu-toggle span {
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   الكتلة الوحيدة والنهائية للتحكم بأداة اللغة على الهاتف
   (لا تُضِف أي كتلة أخرى تستهدف .lang-switcher-mobile في هذا
   الملف أو في contact.css / gallery.css — أبقِها هنا فقط)
   ========================================================= */

.lang-switcher-mobile {
  display: none;
}

@media (max-width: 992px) {
  .header-actions .lang-switcher {
    display: none !important;
  }

  .lang-switcher-mobile {
    display: flex !important;
    margin-left: 0;
    margin-right: 8px;
    padding: 3px;
    order: 2;
    margin: 0 auto;
  }

  .lang-switcher-mobile button {
    padding: 6px 9px;
    font-size: 0.72rem;
  }

  .header .container {
    gap: 8px;
  }

  .logo {
    flex-shrink: 0;
  }

  .menu-toggle {
    margin-inline-start: auto;
  }

  .hero-content {
    padding-top: 90px;
  }
}

@media (max-width: 480px) {
  .header .container {
    padding: 8px 12px;
  }

  .logo img {
    height: 36px;
  }

  .lang-switcher-mobile button {
    padding: 5px 7px;
    font-size: 0.68rem;
  }

  .menu-toggle {
    width: 36px;
    height: 36px;
  }

  .hero-content {
    padding-top: 80px;
  }

  .about-title-wrap {
    gap: 10px;
  }

  .about-logo {
    width: 280px;
    height: 280px;
  }

  .quran-text-wrapper {
    padding: 22px 16px;
  }

  .company-card {
    padding: 22px 16px;
  }

  .company-logo {
    height: 70px;
  }

  .footer-content {
    padding-bottom: 16px;
    gap: 10px;
  }

  .footer-logo img {
    max-height: 90px;
  }

  .footer-copyright p {
    font-size: 0.82rem;
    text-align: center;
    padding: 0 10px;
  }
}

@media (max-width: 380px) {
  .lang-switcher-mobile {
    gap: 2px;
  }

  .lang-switcher-mobile button {
    padding: 4px 6px;
    font-size: 0.62rem;
  }

  .logo img {
    height: 32px;
  }

  .hero-content h1 {
    font-size: 2.55rem;
  }

  .hero-content p {
    font-size: 0.85rem;
  }

  .strengths-grid {
    gap: 16px;
  }

  .strength-card {
    padding: 22px 14px;
  }
}
/* =========================================================
   تحسين نهائي ومتناسق للهاتف
   لا يغيّر المحتوى أو الصور — فقط التخطيط والمسافات
   ========================================================= */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }

  .header { padding: 8px 10px; }
  .header .container {
    width: 100%;
    max-width: none;
    min-height: 54px;
    padding: 7px 10px;
    border-radius: 13px;
    gap: 8px;
  }
  .logo img { height: 38px; width: auto; }
  .menu-toggle { width: 38px; height: 38px; flex: 0 0 38px; }
  .lang-switcher-mobile { margin-inline: auto !important; }

  .nav-collapse {
    top: calc(100% + 8px);
    max-height: 0;
    border-radius: 14px;
    padding: 0 16px;
  }
  .nav-collapse.open { max-height: calc(100vh - 85px); padding: 14px 16px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 11px 5px; font-size: .98rem; }
  .header-actions { gap: 10px; margin-top: 10px; padding-top: 12px; }

  .hero { min-height: 100svh; height: 100svh; }
  .hero-content {
    width: 100%;
    max-width: 620px;
    padding: 90px 18px 35px;
    text-align: center;
  }
  .hero-content h1 {
    font-size: clamp(2.35rem, 10vw, 3.35rem);
    line-height: 1.2;
    margin-bottom: 14px;
  }
  .hero-content p { font-size: .96rem; line-height: 1.75; max-width: 560px; margin-inline: auto; }
  .hero-actions { width: 100%; max-width: 360px; margin: 24px auto 0; }
  .btn-main, .btn-outline { width: 100%; min-height: 46px; display: flex; align-items: center; justify-content: center; }

  .about-section, .vision-section, .strengths-section, .companies-section, .timeline-section, .trust-quran-section {
    padding: 52px 0;
  }
  .about-card { width: 100%; border-radius: 16px; overflow: hidden; }
  .about-text { padding: 24px 20px; }
  .about-title-wrap { align-items: center; justify-content: space-between; }
  .about-text h2 { font-size: clamp(1.5rem, 6vw, 1.9rem); line-height: 1.35; }
  .about-logo { width: 280px; height: 280px; }
  .about-text p { font-size: .96rem; line-height: 1.9; }
  .about-slider-box { min-height: 240px; }

  .vision-box { padding: 26px 20px; border-radius: 16px; }
  .vision-box h2 { font-size: 1.55rem; }
  .vision-box p { font-size: .96rem; line-height: 1.85; }

  .strengths-header h2, .companies-section h2, .timeline-section h2 { font-size: 1.65rem; line-height: 1.35; }
  .strengths-intro { font-size: .94rem; line-height: 1.8; }
  .strengths-grid { grid-template-columns: 1fr !important; gap: 16px; }
  .strength-card, .strength-card.card-wide { width: 100%; min-height: 0; padding: 22px 18px; border-radius: 15px; }
  .strength-card h3 { font-size: 1.02rem; line-height: 1.55; }
  .card-details p { font-size: .91rem; line-height: 1.8; }

  .timeline-section .container { padding-inline: 14px; }
  .timeline-section h2 { margin-bottom: 10px; }
  .timeline-image-wrap { width: 100%; margin-top: 0; border-radius: 12px; overflow: hidden; }
  .timeline-image { width: 100%; height: auto; display: block; }

  .companies-grid { grid-template-columns: 1fr !important; gap: 18px; }
  .company-card { width: 100%; padding: 22px 18px; border-radius: 16px; }
  .company-logo { height: 72px; max-width: 85%; margin-inline: auto; }
  .company-name { font-size: 1.05rem; line-height: 1.5; }
  .company-card p { font-size: .92rem; line-height: 1.8; }

  .infinite-logos-slider { padding: 14px 0; }
  .logo-group { gap: 24px; padding-left: 24px; }
  .logo-group img { height: 31px; max-width: 72px; }

  .quran-card { border-radius: 16px; }
  .quran-text-wrapper { padding: 20px 15px; }
  .quran-verse { font-size: 1.08rem; line-height: 1.9; }

  .footer-content { gap: 12px; padding: 24px 14px; }
  .footer-logo img { max-height: 75px; }
}

@media (max-width: 380px) {
  .header { padding-inline: 7px; }
  .header .container { padding-inline: 8px; }
  .logo img { height: 34px; }
  .lang-switcher-mobile button { padding: 4px 6px; font-size: .61rem; }
  .hero-content { padding-inline: 14px; }
  .hero-content h1 { font-size: 1.7rem; }
  .about-text, .vision-box, .company-card { padding-inline: 15px; }
  .about-logo { width: 250px; height: 250px; }
}

/* ======= GROUP STATS ======= */
.group-stats {
  padding: 0 0 55px;
  background: #f8faf9;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.stat-card {
  min-height: 125px;
  padding: 22px 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(46, 159, 82, .12);
  box-shadow: 0 8px 24px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1;
  color: var(--primary-green);
  margin-bottom: 10px;
  font-weight: 800;
}

.stat-card span {
  color: #4a5568;
  font-size: .98rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .group-stats { padding: 0 0 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-card { min-height: 105px; padding: 16px 10px; border-radius: 15px; }
  .stat-card strong { font-size: 1.65rem; }
  .stat-card span { font-size: .86rem; line-height: 1.5; }
}

@media (max-width: 380px) {
  .stats-grid { gap: 10px; }
  .stat-card { min-height: 96px; }
  .stat-card strong { font-size: 1.5rem; }
  .stat-card span { font-size: .8rem; }
}


/* ======= FINAL POLISH ======= */
.company-card { position: relative; overflow: hidden; }
.company-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, transparent, var(--primary-green), transparent); opacity: .75; }
.company-desc p { max-width: 520px; }

@media (max-width: 768px) {
  .company-card { padding: 26px 17px 24px; }
  .company-logo { height: 82px; margin-bottom: 14px; }
  .company-name { font-size: 1.15rem; line-height: 1.5; }
  .company-desc p { font-size: .92rem; line-height: 1.8; }
}

/* ===================================================
   شريط التنقل السفلي الثابت (موبايل فقط)
   =================================================== */
.bottom-nav {
  display: none;
}

@media (max-width: 992px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: linear-gradient(135deg, rgba(42, 92, 83, 0.94), rgba(30, 120, 75, 0.97));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
    padding: 8px 2px calc(8px + env(safe-area-inset-bottom));
    justify-content: space-between;
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 4px 1px;
    transition: color 0.2s ease;
    min-width: 0;
  }

  .bottom-nav-item svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
  }

  .bottom-nav-item span {
    font-size: 0.52rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.1;
  }

  .bottom-nav-item:hover,
  .bottom-nav-item:active {
    color: var(--primary-green);
  }

  .bottom-nav-item.active {
    color: var(--primary-green);
  }

  /* مساحة كافية بأسفل الصفحة حتى ما يغطي الشريط آخر محتوى */
  body {
    padding-bottom: 78px;
  }
}

@media (max-width: 380px) {
  .bottom-nav-item span {
    font-size: 0.46rem;
  }

  .bottom-nav-item svg {
    width: 16px;
    height: 16px;
  }

  .bottom-nav {
    padding-left: 0;
    padding-right: 0;
  }
}
