/* ====== متغيرات جديدة للقسم ====== */
:root {
  --gradient-about: linear-gradient(135deg, #8A2BE2 0%, #470d88 100%);
  --gradient-about-light: linear-gradient(135deg, rgba(138, 43, 226, 0.08) 0%, rgba(71, 13, 136, 0.04) 100%);
  --shadow-about: 0 20px 40px rgba(138, 43, 226, 0.12);
  --shadow-about-hover: 0 25px 50px rgba(138, 43, 226, 0.18);
}

/* ====== إعدادات عامة للقسم ====== */
.ab-about-section {
  padding: 120px 50px;
  background: linear-gradient(135deg, #fdf7ff 0%, #f9f0ff 50%, #f5e9ff 100%);
  font-family: var(--font-family);
  position: relative;
  overflow: hidden;
}

.ab-about-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 60%;
  height: 60%;
  background: var(--gradient-about-light);
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(80px);
  z-index: 0;
}

.ab-about-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -30%;
  width: 50%;
  height: 50%;
  background: var(--gradient-about-light);
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(60px);
  z-index: 0;
}

.ab-about-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* ====== العمود الأيسر: الصورة ====== */
.ab-about-image-col {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.ab-about-image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-about);
  transform: perspective(1000px) rotateY(-5deg);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ab-about-image-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg);
  box-shadow: var(--shadow-about-hover);
}

.ab-about-image {
  width: 100%;
  height: auto;
  border-radius: 24px;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.ab-about-image-wrapper:hover .ab-about-image {
  transform: scale(1.05);
}

.ab-about-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(138, 43, 226, 0.2), transparent);
  border-radius: 24px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.ab-about-image-wrapper:hover .ab-about-image-overlay {
  opacity: 1;
}

/* ====== العمود الأيمن: النصوص ====== */
.ab-about-text-col {
  flex: 1.2;
  min-width: 320px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ab-about-subtitle {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8A2BE2;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
  padding: 6px 16px;
  background: rgba(138, 43, 226, 0.1);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.ab-about-subtitle::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  100% {
    left: 100%;
  }
}

.ab-about-title {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  color: #470d88;
  margin-bottom: 30px;
  font-weight: 800;
  line-height: 1.2;
  position: relative;
}

.ab-about-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--gradient-about);
  border-radius: 2px;
}

.ab-about-desc {
  font-size: 1.1rem;
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 50px;
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(138, 43, 226, 0.08);
  border-left: 4px solid #8A2BE2;
  position: relative;
  overflow: hidden;
}

.ab-about-desc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(138, 43, 226, 0.02) 100%);
  z-index: -1;
}

/* ====== البطاقات الصغيرة ====== */
.ab-about-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
}

.ab-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(138, 43, 226, 0.08);
  display: flex;
  align-items: flex-start;
  padding: 28px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(138, 43, 226, 0.1);
}

.ab-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-about);
  transform: scaleY(0);
  transition: transform 0.4s ease;
}

.ab-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(138, 43, 226, 0.15);
}

.ab-card:hover::before {
  transform: scaleY(1);
}

.ab-card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, #8A2BE2 0%, #470d88 100%);
  border-radius: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  flex-shrink: 0;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.ab-card:hover .ab-card-icon {
  transform: rotate(10deg) scale(1.1);
  box-shadow: 0 10px 20px rgba(138, 43, 226, 0.3);
}

.ab-card-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.2) 50%, transparent 70%);
  animation: shine 3s infinite linear;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.ab-card-icon img {
  width: 35px;
  height: 35px;
  filter: brightness(0) invert(1);
  transition: transform 0.4s ease;
}

.ab-card:hover .ab-card-icon img {
  transform: scale(1.1);
}

.ab-card-content {
  flex: 1;
}

.ab-card-content h3 {
  font-size: 1.3rem;
  color: #470d88;
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
  display: inline-block;
}

.ab-card-content h3::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #8A2BE2;
  transition: width 0.4s ease;
}

.ab-card:hover .ab-card-content h3::after {
  width: 100%;
}

.ab-card-content p {
  font-size: 1rem;
  color: #64748b;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.ab-card:hover .ab-card-content p {
  color: #4a5568;
}

/* ====== RTL Support ====== */
html[dir="rtl"] .ab-about-title::after {
  left: auto;
  right: 0;
}

html[dir="rtl"] .ab-about-desc {
  border-left: none;
  border-right: 4px solid #8A2BE2;
}

html[dir="rtl"] .ab-card-icon {
  margin-right: 0;
  margin-left: 20px;
}

html[dir="rtl"] .ab-card::before {
  left: auto;
  right: 0;
}

/* ====== Responsiveness ====== */

/* ===== الأجهزة اللوحية الكبيرة حتى 1200px ===== */
@media (max-width: 1200px) {
  .ab-about-container {
    gap: 60px;
  }
  
  .ab-about-cards {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

/* ===== الأجهزة اللوحية حتى 991px ===== */
@media (max-width: 991px) {
  .ab-about-section {
    padding: 100px 40px;
  }
  
  .ab-about-container {
    flex-direction: column;
    text-align: center;
    gap: 50px;
  }
  
  .ab-about-title::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  html[dir="rtl"] .ab-about-title::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
  }
  
  .ab-about-desc {
    text-align: center;
    border-left: none;
    border-top: 4px solid #8A2BE2;
    border-bottom: 4px solid #8A2BE2;
    padding: 25px 20px;
  }
  
  html[dir="rtl"] .ab-about-desc {
    border-right: none;
  }
  
  .ab-about-cards {
    justify-items: center;
  }
  
  .ab-card {
    max-width: 400px;
    text-align: left;
  }
  
  html[dir="rtl"] .ab-card {
    text-align: right;
  }
}

/* ===== الأجهزة اللوحية الصغيرة حتى 768px ===== */
@media (max-width: 768px) {
  .ab-about-section {
    padding: 80px 30px;
  }
  
  .ab-about-title {
    font-size: 2.5rem;
  }
  
  .ab-about-desc {
    font-size: 1.05rem;
    padding: 20px;
  }
  
  .ab-about-cards {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .ab-card {
    max-width: 100%;
    padding: 24px;
  }
  
  .ab-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
  }
  
  .ab-card-icon img {
    width: 30px;
    height: 30px;
  }
  
  .ab-card-content h3 {
    font-size: 1.2rem;
  }
}

/* ===== الهواتف الكبيرة حتى 576px ===== */
@media (max-width: 576px) {
  .ab-about-section {
    padding: 70px 24px;
  }
  
  .ab-about-title {
    font-size: 2.2rem;
  }
  
  .ab-about-desc {
    font-size: 1rem;
    line-height: 1.7;
    padding: 18px;
  }
  
  .ab-card {
    padding: 20px;
    flex-direction: column;
    text-align: center;
  }
  
  .ab-card-icon {
    margin: 0 auto 15px auto;
  }
  
  html[dir="rtl"] .ab-card-icon {
    margin: 0 auto 15px auto;
  }
  
  .ab-card-content h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  html[dir="rtl"] .ab-card-content h3::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
  }
}

/* ===== الهواتف الصغيرة حتى 480px ===== */
@media (max-width: 480px) {
  .ab-about-section {
    padding: 60px 20px;
  }
  
  .ab-about-title {
    font-size: 2rem;
  }
  
  .ab-about-subtitle {
    font-size: 0.85rem;
    padding: 5px 14px;
  }
  
  .ab-about-desc {
    font-size: 0.95rem;
    padding: 16px;
  }
  
  .ab-card {
    padding: 18px;
  }
  
  .ab-card-icon {
    width: 55px;
    height: 55px;
  }
  
  .ab-card-content h3 {
    font-size: 1.1rem;
  }
  
  .ab-card-content p {
    font-size: 0.95rem;
  }
}

/* ===== أصغر الهواتف حتى 360px ===== */
@media (max-width: 360px) {
  .ab-about-section {
    padding: 50px 16px;
  }
  
  .ab-about-title {
    font-size: 1.8rem;
  }
  
  .ab-about-subtitle {
    font-size: 0.8rem;
    letter-spacing: 1px;
  }
  
  .ab-about-desc {
    font-size: 0.9rem;
    padding: 14px;
  }
  
  .ab-card {
    padding: 16px;
  }
  
  .ab-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }
  
  .ab-card-icon img {
    width: 25px;
    height: 25px;
  }
  
  .ab-card-content h3 {
    font-size: 1rem;
  }
  
  .ab-card-content p {
    font-size: 0.9rem;
  }
}

/* ===== تأثيرات التحميل ===== */
.ab-loading {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.ab-loading:nth-child(1) { animation-delay: 0.1s; }
.ab-loading:nth-child(2) { animation-delay: 0.2s; }
.ab-loading:nth-child(3) { animation-delay: 0.3s; }
.ab-loading:nth-child(4) { animation-delay: 0.4s; }

/* ===== تأثيرات العائمة ===== */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.ab-about-image-wrapper {
  animation: float 6s ease-in-out infinite;
}