.team-grid-widget {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  font-family: sans-serif;
}
.team-grid-widget .team-grid-filter {
  margin-bottom: 24px;
  text-align: right;
}
.team-grid-widget .team-grid-filter select {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.team-grid-widget .team-grid {
  display: grid;
  grid-template-columns: repeat(var(--team-grid-columns, 4), 1fr);
  /* Remove or comment out min-height and grid-template-rows */
  /* min-height: 400px; */
  /* grid-template-rows: repeat(2, 1fr); */
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  position: relative;
}
.team-grid-widget .team-member {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.2s;
  min-height: 250px;
  display: flex;
  align-items: stretch;
}
.team-grid-widget .team-member img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.2s;
}
.team-grid-widget .overlay {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(23, 105, 163, 0.8);
  color: #fff;
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px 20px;
  transition: opacity 0.3s, background 0.3s;
  font-family: inherit;
  pointer-events: none;
}
.team-grid-widget .team-member:hover .overlay,
.team-grid-widget .team-member:focus .overlay {
  opacity: 1;
  pointer-events: auto;
}
.team-grid-widget .overlay .title {
  font-size: 1rem;
  font-weight: 400;
  margin-bottom: 0.3em;
}
.team-grid-widget .overlay .name {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* Overlay for details */
.team-grid-widget .emp-overlay {
  position: absolute;
  z-index: 10;
  left: 0; top: 0; right: 0; bottom: 0;
  width: 100%;
  height: 100%;
  background: #1769a3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.96);
  transition: opacity 0.35s cubic-bezier(.4,0,.2,1), transform 0.35s cubic-bezier(.4,0,.2,1);
}
.team-grid-widget .emp-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}
.team-grid-widget .emp-overlay-left {
  width: 40%;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70%;
  border-radius: 16px;
  margin-left: 2%;
}
.team-grid-widget .emp-overlay-left img {
      width: 100%; /* or 95% */
  max-width: 400px; /* or any value you like */

  height: auto;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  opacity: 0;
  transform: translateX(-40px);
  transition: none;
}
.team-grid-widget .emp-overlay-right {
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70%;
}
.team-grid-widget .emp-overlay-info {
  text-align: center;
  color: #fff;
  opacity: 0;
  transform: translateX(40px);
  transition: none;
}
.team-grid-widget .emp-overlay-name {
  font-size: 30px;
  line-height: 32px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 0.5em;
}
.team-grid-widget .emp-overlay-title {
  font-size: 1.2rem;
  color: #fff;
}
.team-grid-widget .emp-overlay-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  font-size: 2.2rem;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  transition: color 0.2s;
}
.team-grid-widget .emp-overlay-close:hover {
  color: #ef4444;
}
/* Animations */
@keyframes overlayImgIn {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes overlayInfoIn {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
.team-grid-widget .emp-overlay-img-animate {
  animation: overlayImgIn 0.5s cubic-bezier(.4,0,.2,1) 0.1s both;
}
.team-grid-widget .emp-overlay-info-animate {
  animation: overlayInfoIn 0.5s cubic-bezier(.4,0,.2,1) 0.25s both;
}
@media (max-width: 1000px) {
  .team-grid-widget .team-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }
}
@media (max-width: 600px) {
  .team-grid-widget .team-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, 1fr);
  }
  .team-grid-widget .emp-overlay {
    flex-direction: column;
  }
  .team-grid-widget .emp-overlay-left, 
  .team-grid-widget .emp-overlay-right {
    width: 100%;
    height: 44%;
    margin-left: 0;
  }
  .team-grid-widget .emp-overlay-left img {
    width: 60%;
  }
}
.emp-overlay-excerpt{
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    font-family: inherit;
    margin-top: 20px;
    padding: 0px 20px;
    
}
.team-grid-widget .team-grid {
  display: grid !important;
  grid-template-columns: repeat(var(--team-grid-columns, 4), 1fr) !important;
  /* ...rest of your styles... */
}
.team-social-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
}

.team-social-links .social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.team-social-links .social-link:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transform: translateY(-3px);
}