/* Egochi Team Showcase Styles */

.egochi-team-section {
  background: linear-gradient(180deg, #5B7DB1 0%, #2C3E50 100%);
  padding: 60px 20px;
  text-align: center;
  position: relative;
}

.egochi-team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  max-width: 1400px;
  margin: 0 auto 40px;
  position: relative;
}

.egochi-team-member {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: visible;
  aspect-ratio: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.egochi-team-member:hover {
  z-index: 100;
  transform: scale(1.02);
}

.egochi-team-member > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* The expandable info card */
.egochi-team-info-card {
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 320px;
  height: auto;
  min-height: 120px;
  background: #D4E249;
  border-radius: 8px;
  display: flex;
  align-items: center;
  padding: 15px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  z-index: 101;
}

.egochi-team-member:hover .egochi-team-info-card {
  opacity: 1;
  pointer-events: auto;
}

/* Image container inside card */
.egochi-team-card-image {
  width: 90px;
  height: 90px;
  flex-shrink: 0;
  margin-right: 15px;
}

.egochi-team-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

/* Text container */
.egochi-team-card-text {
  flex: 1;
  text-align: left;
  min-width: 0;
}

.egochi-team-name {
  font-size: 17px;
  font-weight: 700;
  color: #000;
  margin-bottom: 5px;
  line-height: 1.2;
  word-wrap: break-word;
}

.egochi-team-title {
  font-size: 13px;
  color: #333;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Toggle button */
.egochi-team-toggle {
  background: #D4E249;
  color: #000;
  border: none;
  padding: 18px 50px;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin-top: 20px;
}

.egochi-team-toggle:hover {
  background: #FFD700;
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

.egochi-team-toggle:active {
  transform: translateY(0);
}

/* Hidden grid */
.egochi-team-hidden {
  display: none;
  margin-top: 30px;
}

.egochi-team-visible {
  display: grid;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bottom toggle button - only shows when team is expanded */
.egochi-team-toggle-bottom {
  margin-top: 40px;
  margin-bottom: 20px;
}

.egochi-team-toggle-bottom.egochi-team-hidden {
  display: none;
}

.egochi-team-toggle-bottom.egochi-team-visible {
  display: inline-block;
  animation: fadeIn 0.4s ease;
}

/* Tablet (3 columns) */
@media (max-width: 1024px) {
  .egochi-team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  
  .egochi-team-info-card {
    width: 280px;
  }
  
  .egochi-team-card-image {
    width: 80px;
    height: 80px;
  }
}

/* Mobile (2 columns) */
@media (max-width: 768px) {
  .egochi-team-section {
    padding: 40px 15px;
  }
  
  .egochi-team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .egochi-team-info-card {
    width: 240px;
    padding: 12px;
    min-height: 100px;
  }
  
  .egochi-team-card-image {
    width: 70px;
    height: 70px;
    margin-right: 10px;
  }
  
  .egochi-team-name {
    font-size: 15px;
  }
  
  .egochi-team-title {
    font-size: 12px;
  }
  
  .egochi-team-toggle {
    padding: 15px 40px;
    font-size: 14px;
  }
}

/* Very small mobile */
@media (max-width: 480px) {
  .egochi-team-info-card {
    width: 200px;
    flex-direction: column;
    text-align: center;
    padding: 10px;
  }
  
  .egochi-team-card-image {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
  }
  
  .egochi-team-card-text {
    text-align: center;
  }
  
  .egochi-team-name {
    font-size: 14px;
  }
  
  .egochi-team-title {
    font-size: 11px;
  }
}