/* Expertise Section */
.expertise-section {
  padding: 5rem 0;
  background-color: #fff;
  overflow: hidden;
}

.expertise-header {
  max-width: 900px;
  margin: 0 auto 4rem;
  text-align: center;
}

.expertise-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.expertise-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #666;
  text-align: center;
  margin: 0 auto;
  max-width: 850px;
}

/* Simple flex layout for evenly spaced images on a single row */
.expertise-images-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
}

.expertise-image-card {
  flex: 0 0 auto;
  width: 22%; /* Approximately 4 images per row with gaps */
  aspect-ratio: 3/4; /* Maintain image proportions */
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-image-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.expertise-image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .expertise-images-container {
    max-width: 90%;
  }
}

@media (max-width: 992px) {
  .expertise-title {
    font-size: 2.2rem;
  }

  .expertise-image-card {
    width: 30%; /* 3 images per row */
  }

  /* Hide the 4th and 5th images on medium screens */
  .expertise-image-card-4,
  .expertise-image-card-5 {
    display: none;
  }
}

@media (max-width: 768px) {
  .expertise-section {
    padding: 3rem 0;
  }

  .expertise-title {
    font-size: 2rem;
  }

  .expertise-description {
    font-size: 1rem;
    padding: 0 20px;
  }

  .expertise-header {
    margin-bottom: 2rem;
  }

  .expertise-image-card {
    width: 45%; /* 2 images per row */
  }

  /* Hide the 3rd image on smaller screens */
  .expertise-image-card-3 {
    display: none;
  }
}

@media (max-width: 576px) {
  .expertise-image-card {
    width: 80%; /* 1 image per row on very small screens */
  }

  /* Only show the first image on very small screens */
  .expertise-image-card-2 {
    display: none;
  }
}
