/* ===================================
   TEAM SECTION - MEJORAS
   =================================== */

/* Team Photos con diferentes formas */
.team-photo {
  position: relative;
  overflow: hidden;
  width: 140px;
  /* Fixed size for consistency */
  height: 140px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  /* Center horizontally */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  border: 4px solid white;
  /* White border ring */
  background: rgba(255, 255, 255, 0.2);
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.team-photo-circle {
  border-radius: 50%;
}

.team-photo-square {
  border-radius: 0;
}

.team-photo-rounded {
  border-radius: 20px;
}

/* Team Card Styling */
.team-card {
  background: white;
  border-radius: 24px;
  padding: 0;
  /* Remove padding from main container */
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-card-header {
  background: linear-gradient(135deg, #1B9B9E 0%, #5CB85C 100%);
  padding: 2.5rem 2rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.team-card-body {
  padding: 1.5rem 2rem 2rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(27, 155, 158, 0.15);
  border-color: rgba(27, 155, 158, 0.2);
}

.team-card:hover .team-photo img {
  transform: scale(1.1);
}

.team-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.team-role {
  font-size: 0.95rem;
  color: var(--color-turquoise);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

/* Bio Indicator */
.team-bio-indicator {
  margin-top: auto;
  /* Push to bottom if needed */
  color: var(--color-turquoise);
  font-size: 0.9rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(27, 155, 158, 0.08);
  border-radius: 50px;
  transition: all 0.3s ease;
  width: fit-content;
  align-self: center;
}

.team-card:hover .team-bio-indicator {
  background: var(--color-turquoise);
  color: white;
}

.team-bio-indicator i {
  font-size: 1.125rem;
}



/* ===================================
   TEAM MODAL
   =================================== */

.team-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 18, 51, 0.9);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.team-modal-content {
  background-color: white;
  border-radius: 20px;
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
  position: relative;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.team-modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--color-gray);
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1;
  transition: color 0.2s ease;
}

.team-modal-close:hover,
.team-modal-close:focus {
  color: var(--color-dark);
}

.team-modal-header {
  text-align: center;
  padding: 3rem 2rem 2rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 20px 20px 0 0;
  position: relative;
}

.team-modal-photo {
  width: 150px;
  height: 150px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #1B9B9E 0%, #5CB85C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  position: relative;
}

.team-modal-photo.team-photo-circle {
  border-radius: 50%;
}

.team-modal-photo.team-photo-square {
  border-radius: 0;
}

.team-modal-photo.team-photo-rounded {
  border-radius: 16px;
}

.team-modal-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-modal-photo .team-initials {
  font-size: 3.5rem;
  font-weight: 900;
  color: white;
  font-family: 'Poppins', sans-serif;
}

.team-modal-header h2 {
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  font-weight: 800;
}

.team-modal-role {
  font-size: 1.125rem;
  color: var(--color-turquoise);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.team-modal-contact {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 2px solid rgba(27, 155, 158, 0.2);
}

.team-modal-contact a {
  color: var(--color-turquoise);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(27, 155, 158, 0.1);
}

.team-modal-contact a:hover {
  background: var(--color-turquoise);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(27, 155, 158, 0.3);
}

.team-modal-contact i {
  font-size: 1.125rem;
}

.team-modal-body {
  padding: 2.5rem;
}

.team-modal-body h3 {
  color: var(--color-turquoise);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--color-yellow);
  display: inline-block;
}

.team-modal-body #modalTeamBio {
  line-height: 1.8;
  color: var(--color-gray);
  font-size: 1rem;
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--color-turquoise);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
  .team-modal-content {
    width: 95%;
    max-height: 95vh;
  }

  .team-modal-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .team-modal-photo {
    width: 120px;
    height: 120px;
  }

  .team-modal-photo .team-initials {
    font-size: 2.5rem;
  }

  .team-modal-header h2 {
    font-size: 1.5rem;
  }

  .team-modal-role {
    font-size: 1rem;
  }

  .team-modal-contact {
    flex-direction: column;
    gap: 0.75rem;
  }

  .team-modal-contact a {
    justify-content: center;
  }

  .team-modal-body {
    padding: 1.5rem;
  }

  .team-modal-body h3 {
    font-size: 1.25rem;
  }

  .team-modal-close {
    top: 15px;
    right: 20px;
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  .team-modal-content {
    border-radius: 15px;
  }

  .team-modal-header {
    border-radius: 15px 15px 0 0;
  }

  .team-modal-photo {
    width: 100px;
    height: 100px;
  }

  .team-modal-photo .team-initials {
    font-size: 2rem;
  }

  .team-modal-body #modalTeamBio {
    font-size: 0.9375rem;
    padding: 1rem;
  }
}

/* Smooth scroll for modal */
.team-modal-content {
  scroll-behavior: smooth;
}

.team-modal-content::-webkit-scrollbar {
  width: 8px;
}

.team-modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.team-modal-content::-webkit-scrollbar-thumb {
  background: var(--color-turquoise);
  border-radius: 10px;
}

.team-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-dark);
}