/* ============================================================
   Services Section - Modern Clean Design
   ============================================================ */

/* Wrapper to enable flex ordering */
.wrapper.services {
  display: flex !important;
  flex-direction: column !important;
  width: 100%;
}

/* Hero card always first */
.hero-services-card {
  order: 1 !important;
  width: 100%;
  background: #fff;
  border: 0.5px solid #e5e7eb;
  border-radius: 16px;
  padding: 2.5rem 3rem;
  text-align: center;
  margin-bottom: 2.5rem;
}

.hero-services-card h2 {
  font-size: 26px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
  line-height: 1.5;
}

.hero-services-card p {
  font-size: 16px;
  color: #666;
  line-height: 1.9;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 20px;
}

.service-badge {
  font-size: 14px;
  padding: 8px 20px;
  border-radius: 24px;
  font-weight: 500;
}

.badge-blue { background: #E6F1FB; color: #185FA5; }
.badge-teal { background: #E1F5EE; color: #0F6E56; }
.badge-coral { background: #FAECE7; color: #993C1D; }
.badge-purple { background: #EEEDFE; color: #534AB7; }

/* Section Headings - centered with proper width */
.section-heading {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1c1c1e;
  margin: 2rem auto 1rem;
  padding-bottom: 0.6rem;
  text-align: center;
  border-bottom: 2px solid #e5e7eb;
  display: table;
  direction: rtl;
  width: auto;
}

/* svc-order classes for proper ordering */
/* ترتیب: کلیه خدمات (کوچک) → خدمات تخصصی (3کارتی) → گروه بیماران (2کارتی) */
.svc-order-2 { order: 10 !important; }  /* عنوان کلیه خدمات */
.svc-order-3 { order: 11 !important; }  /* گرید کارت‌های کوچک */
.svc-order-6 { order: 20 !important; }  /* عنوان خدمات تخصصی */
.svc-order-7 { order: 21 !important; }  /* گرید 3 کارتی */
.svc-order-4 { order: 30 !important; }  /* عنوان گروه بیماران */
.svc-order-5 { order: 31 !important; }  /* گرید 2 کارتی */

/* Main Services Grid - 3 columns */
.services-main-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

/* Patient groups grid - 2 columns */
.services-main-grid.patient-groups-grid {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* General Services Grid - 6 columns */
.services-general-grid {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr);
  gap: 1rem;
  width: 100%;
}

/* Section Subtitle */
.services-section-subtitle {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #6B7280);
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  padding-right: 0.25rem;
  direction: rtl;
  text-align: right;
}

.services-section-subtitle:first-of-type {
  margin-top: 0;
}

/* Hero Badges */
.service-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

/* Specialty Card */
.service-specialty-card {
  background: var(--color-background-primary, #fff);
  border: 0.5px solid var(--color-border-tertiary, #E5E7EB);
  border-radius: 1.25rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.3s ease;
  direction: rtl;
  text-align: right;
}

.service-specialty-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.service-specialty-card.compact {
  padding: 1.25rem;
}

/* Card Header */
.service-spec-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  direction: rtl;
}

/* Card Icon */
.service-spec-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.service-spec-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-blue {
  background: #E6F1FB;
  color: #185FA5;
}

.icon-teal {
  background: #E1F5EE;
  color: #0F6E56;
}

.icon-coral {
  background: #FAECE7;
  color: #993C1D;
}

.icon-purple {
  background: #EEEDFE;
  color: #534AB7;
}

.icon-amber {
  background: #FAEEDA;
  color: #854F0B;
}

/* Card Title */
.service-spec-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-primary, #1F2937);
  line-height: 1.4;
  text-align: right;
  direction: rtl;
}

/* Card List */
.service-spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  direction: rtl;
  text-align: right;
}

.service-spec-list li {
  font-size: 0.875rem;
  color: var(--color-text-secondary, #6B7280);
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  direction: rtl;
  text-align: right;
}

.service-spec-list li::before {
  content: "•";
  color: #185FA5;
  font-size: 1.125rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.125rem;
  margin-left: 0;
  margin-right: 0;
}

/* Tags */
.service-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
  direction: rtl;
  justify-content: flex-start;
}

.service-tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1.25rem;
  font-weight: 500;
}

.tag-blue {
  background: #E6F1FB;
  color: #185FA5;
}

.tag-teal {
  background: #E1F5EE;
  color: #0F6E56;
}

.tag-coral {
  background: #FAECE7;
  color: #993C1D;
}

.tag-purple {
  background: #EEEDFE;
  color: #534AB7;
}

.tag-amber {
  background: #FAEEDA;
  color: #854F0B;
}

/* General Service Card (compact) */
.service-general-card {
  background: var(--color-background-primary, #fff);
  border: 0.5px solid var(--color-border-tertiary, #E5E7EB);
  border-radius: 1rem;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  text-align: center;
  transition: all 0.3s ease;
}

.service-general-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.service-gen-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}

.service-gen-icon svg {
  width: 1.125rem;
  height: 1.125rem;
}

.service-gen-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-primary, #1F2937);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .services-general-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .services-main-grid {
    grid-template-columns: 1fr !important;
    gap: 1.25rem;
  }

  .services-main-grid.patient-groups-grid {
    grid-template-columns: 1fr !important;
  }

  .services-general-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }

  .service-specialty-card {
    padding: 1.25rem;
  }

  .service-spec-title {
    font-size: 0.95rem;
  }

  .service-spec-list li {
    font-size: 0.8125rem;
  }

  .service-general-card {
    padding: 0.875rem 0.625rem;
  }

  .service-gen-icon {
    width: 2rem;
    height: 2rem;
  }

  .service-gen-icon svg {
    width: 1rem;
    height: 1rem;
  }

  .service-gen-title {
    font-size: 0.8125rem;
  }

  .services-section-subtitle {
    font-size: 0.875rem;
    margin-bottom: 0.875rem;
  }
  
  .section-heading {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .services-general-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-services-card {
    padding: 1.75rem 1.25rem;
  }
  
  .hero-services-card h2 {
    font-size: 19px;
  }
  
  .hero-services-card p {
    font-size: 14px;
  }
  
  .service-badge {
    font-size: 12px;
    padding: 6px 14px;
  }
}

@media (max-width: 480px) {
  .services-section-subtitle {
    font-size: 0.8125rem;
  }
  
  .service-gen-title {
    font-size: 0.75rem;
  }
  
  .section-heading {
    font-size: 1rem;
    margin: 1.5rem auto 0.75rem;
  }
}
