@font-face {
  font-family: 'Tajawal';
  src: url('/fonts/ArbFONTS-Tajawal-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'TajawalCustom';
  src: url('/fonts/ArbFONTS-Tajawal-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

.tajawal-title {
  font-family: 'TajawalCustom', sans-serif;
  font-weight: 700;
}

#about,
#about h2,
#about p,
#about span {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* تنسيق النص التعريفي */
#about-typing-text {
  color: #000000;
  text-align: justify;
  text-justify: inter-word;
  line-height: 1.85;
  word-break: normal;
  overflow-wrap: break-word;
}

/* تأثير مؤشر الكتابة الوامض */
#about-typing-text::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: #6C3CF0;
  margin-inline-start: 2px;
  font-weight: bold;
}

#about-typing-text.typing-finished::after {
  content: '';
  animation: none;
}

@keyframes blink {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

/* الإحصائيات */
.stat-plus {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-plus.visible {
  opacity: 1;
}

/* تنسيق الكروت المتراتبة (Stacked Cards) */
.about-cards-container {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.about-card {
  position: absolute;
}

.about-card-left {
  left: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  width: 58%;
  z-index: 1;
}

.about-card-right {
  right: 0;
  top: 50%;
  transform: translateY(-50%) scale(0.92);
  width: 58%;
  z-index: 1;
}

.about-card-center {
  position: relative;
  width: 64%;
  z-index: 5;
}

.about-card-inner {
  border-radius: 32px;
  overflow: hidden;
  background-color: #ffffff;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
}

.about-card-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* حركات الظهور البدائية (Entrance Animation) */
.about-card-anim {
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.about-card-anim.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* التبديل بين صورة p2 و p4 للكارت الأوسط */
.about-card-img-p2,
.about-card-img-p4 {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 500ms ease-in-out, transform 500ms ease-in-out;
}

.about-card-img-p4 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  pointer-events: none;
}

.about-card-center.show-alt .about-card-img-p2 {
  opacity: 0;
  transform: scale(0.95);
}

.about-card-center.show-alt .about-card-img-p4 {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* تحسينات الشاشات الصغيرة */
@media (max-width: 768px) {
  #about {
    padding-top: 32px;
    padding-bottom: 32px;
  }

  #about-typing-text {
    font-size: 1rem;
    line-height: 1.75;
    text-align: justify;
    text-justify: inter-word;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-plus {
    font-size: 1.875rem;
  }
}

@media (max-width: 480px) {
  #about h2 {
    font-size: 1.875rem;
  }

  #about-typing-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    min-height: 100px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .stat-plus {
    font-size: 1.5rem;
  }
}