.cim{
    text-align: center;
    margin-top: 30px;
    font-weight: 500;
    letter-spacing: 1.59px;
    margin-bottom: 40px;
}

.munkat {
  display: flex;
  gap: 80px; /* 4x the original 20px gap */
  justify-content: center; /* Center the items */
  align-items: flex-end;
 /* 100px margin from both sides */
  flex-wrap: wrap; /* Allow wrapping for the 5th profile */
}

.profile {
  position: relative;
  width: calc((100% - 160px) / 3); /* 3 profiles per row with two 80px gaps */
  aspect-ratio: 3 / 4;
  height: auto;
  flex-shrink: 0;
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 40px;
}

.profile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center; 
  display: block;
  background: #fff; 
}

/* Responsive overlay with proper text scaling */
.profile-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%; /* Keep percentage-based height */
  background: #1b1464cc;
  color: #fff;
  border-radius: 0 0 24px 24px;
  text-align: center;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px;
  gap: 0;
}
.profile-overlay:hover{
    background: #1b1464;
}

/* Responsive name with size constraints */
h5 {
  margin: 0;
  padding: 0;
  line-height: 1.1; /* Slightly better than 0 for text rendering */
  display: block;
  width: 100%; /* Ensure text takes full width */
  font-weight:bold;
  letter-spacing: 1.59PX;
  padding-bottom: 5px;
  font-size: 1vw; /* Scales from 0.7rem to 0.875rem on PC, stays fixed on mobile */
}

.tit {
  font-size: 0.8vw;
  font-weight: 300;
  margin: 0;
}
/* Responsive title with proportional sizing */
.title {
  font-weight: normal;
  margin-top: -3px; /* Keep the negative margin */
  padding: 0;
  line-height: 1;
  display: block;
  width: 100%; /* Ensure text takes full width */
}

@media (max-width: 1024px) {
  .munkat {
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 40px 20px; /* Smaller margins on mobile */
  }
  
  .profile {
    width: 90%;
    height: auto;
    min-height: 300px;
  }
  
  .profile:nth-child(5) {
    margin-top: 0; /* Remove extra margin on mobile */
  }

  .profile-overlay {
    height: 30%;
    padding: 4px 5px;
    gap: 1px;
  }
  
  .tit {
    font-size: 0.8rem;
    line-height: 1;
  }
  h5{
    font-size: 0.9rem;
    padding-bottom: 1px;
    line-height: 1;
  }
}

