/* قسم الخدمات */
.services-section {
  padding: var(--space-xl) 0;
  background: linear-gradient(135deg, 
    var(--background-off-white) 0%, 
    var(--background-light) 100%);
  position: relative;
  overflow: hidden;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(26, 111, 166, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: var(--primary-color);
  margin: 0 auto var(--space-sm);
  position: relative;
  padding-bottom: 15px;
  display: block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-medium);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto var(--space-xl);
  line-height: 1.6;
  padding: 0 var(--space-md);
}

/* شبكة الخدمات */
.services-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* أزرار التبويب */
.services-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.tab-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--background-light);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn i {
  font-size: 1.1rem;
}

.tab-btn:hover {
  background: var(--primary-light);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

/* الشبكة الرئيسية */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

/* بطاقة الخدمة */
.service-card {
  background: var(--card-background);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.service-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
  color: white;
  font-size: 1.8rem;
  box-shadow: var(--shadow-sm);
}

.service-card h3 {
  color: var(--primary-color);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.service-card .iso-code {
  display: inline-block;
  background: rgba(11, 60, 93, 0.1);
  color: var(--primary-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.service-card p {
  color: var(--text-medium);
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.service-tag {
  background: var(--background-off-white);
  color: var(--text-medium);
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 0.85rem;
  border: 1px solid rgba(0,0,0,0.05);
}

/* زر عرض الكل */
.view-all-container {
  text-align: center;
  margin-top: 0px;
  /* background-color: red; */
}

/* زر عرض الخدمات بتصميم بريميوم */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, 
        rgba(11, 60, 93, 0.95) 0%,
        rgba(29, 111, 165, 0.95) 50%,
        rgba(52, 152, 219, 0.95) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-width: 240px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 
        0 10px 30px rgba(11, 60, 93, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.view-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.95) 0%,
        rgba(242, 209, 107, 0.95) 50%,
        rgba(230, 184, 0, 0.95) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: var(--radius-full);
}

.view-all-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    border-radius: var(--radius-full);
}

.view-all-btn:hover {
    transform: translateY(-4px);
    gap: 16px;
    box-shadow: 
        0 20px 50px rgba(11, 60, 93, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.view-all-btn:hover::before {
    opacity: 1;
}

.view-all-btn:hover::after {
    transform: translateX(100%);
}

.view-all-btn i {
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.view-all-btn:hover i {
    transform: translateX(8px) scale(1.1);
    color: var(--primary-color);
}

.view-all-btn .btn-text {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.view-all-btn:hover .btn-text {
    color: var(--primary-color);
    font-weight: 800;
}

/* تأثير النقر */
.view-all-btn:active {
    transform: translateY(-2px) scale(0.98);
    transition: transform 0.1s ease;
}

/* تحسين إمكانية الوصول */
.view-all-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(29, 111, 165, 0.3),
        0 10px 30px rgba(11, 60, 93, 0.3);
}

/* زر مع حدود متحركة */
.view-all-btn.bordered {
    background: transparent;
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.view-all-btn.bordered::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        var(--primary-color), 
        var(--secondary-color),
        var(--primary-light));
    z-index: -2;
    border-radius: var(--radius-full);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.view-all-btn.bordered:hover::before {
    opacity: 0.8;
    animation: borderRotate 2s linear infinite;
}

@keyframes borderRotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

/* زر مع تأثير التوهج */
.view-all-btn.glow {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 
            0 10px 30px rgba(11, 60, 93, 0.3),
            0 0 0 0 rgba(29, 111, 165, 0.7);
    }
    70% {
        box-shadow: 
            0 10px 30px rgba(11, 60, 93, 0.3),
            0 0 0 15px rgba(29, 111, 165, 0);
    }
    100% {
        box-shadow: 
            0 10px 30px rgba(11, 60, 93, 0.3),
            0 0 0 0 rgba(29, 111, 165, 0);
    }
}

/* زر مع أيقونة ثلاثية الأبعاد */
.view-all-btn.three-d i {
    text-shadow: 
        0 1px 0 rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 6px rgba(0, 0, 0, 0.1);
}

.view-all-btn.three-d:hover i {
    text-shadow: 
        0 2px 0 rgba(255, 255, 255, 0.4),
        0 3px 6px rgba(0, 0, 0, 0.3),
        0 6px 9px rgba(0, 0, 0, 0.2);
    transform: translateX(8px) scale(1.1) translateY(-2px);
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .view-all-btn {
        padding: var(--space-md) var(--space-xl);
        min-width: 200px;
        font-size: 1rem;
        gap: 10px;
    }
    
    .view-all-btn:hover {
        gap: 14px;
    }
    
    .view-all-btn i {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .view-all-btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 24px;
    }
}

/* تأثير تحميل عند النقر */
.view-all-btn.loading {
    position: relative;
    color: transparent;
}

.view-all-btn.loading::before {
    opacity: 1;
}

.view-all-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========== نافذة التفاصيل المنبثقة ========== */
.service-detail-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--background-light);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.close-modal {
  position: absolute;
  top: 15px;
  left: 15px;
  background: var(--primary-color);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.close-modal:hover {
  background: var(--primary-light);
  transform: rotate(90deg);
}

.modal-body {
  padding: var(--space-xl);
}

/* أنماط محتوى الـ Modal */
.service-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 2px solid var(--background-off-white);
}

.detail-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.2rem;
  flex-shrink: 0;
}

.detail-iso {
  background: rgba(11, 60, 93, 0.1);
  color: var(--primary-color);
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 5px;
}

.detail-description,
.detail-content,
.detail-tags,
.contact-cta {
  margin-bottom: var(--space-lg);
}

.detail-description h3,
.detail-content h3,
.detail-tags h3,
.contact-cta h3 {
  color: var(--primary-color);
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-description h3 i,
.detail-content h3 i,
.detail-tags h3 i,
.contact-cta h3 i {
  color: var(--secondary-color);
}

.details-list {
  background: var(--background-off-white);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  border-right: 4px solid var(--primary-light);
  line-height: 1.8;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tag {
  background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--secondary-color), #E6B800);
  color: var(--text-dark);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  gap: 15px;
}

/* التجاوب */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
  
  .services-tabs {
    gap: var(--space-xs);
  }
  
  .tab-btn {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .modal-body {
    padding: var(--space-lg);
  }
  
  .service-detail-header {
    flex-direction: column;
    text-align: center;
  }
  
  .detail-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 1.8rem;
  }
  
  .service-card {
    padding: var(--space-md);
  }
  
  .view-all-btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 1rem;
  }
  
  .modal-content {
    margin: 10px;
    max-height: 85vh;
  }
}