/* template-parts/team css */

.team-section {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Decorative elements */
.team-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  
  opacity: 0.1;
  border-radius: 50%;
}

.team-container {
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Header Section */
.team-header {
  text-align: center;
  margin-bottom: 5rem;
  position: relative;
}

.team-title {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 200;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.team-title::after {
  content: 'Team';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 900;
  font-style: italic;
  background: linear-gradient(135deg, #3892A6 0%, #5EADBF 50%, #73553C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.15;
  z-index: -1;
  white-space: nowrap;
}

.team-subtitle {
  font-size: 1.3rem;
  color: #4a5568;
  font-weight: 400;
  margin-top: 1rem;
  letter-spacing: 0.02em;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

/* Team Member Card */
.team-member {
  position: relative;
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.team-member:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(56, 146, 166, 0.2);
}

.team-member::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3892A6 0%, #5EADBF 50%, #F2D7B6 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.team-member:hover::before {
  transform: scaleX(1);
}

/* Image Container */
.team-image-wrapper {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, #BAD3D9 0%, #F2D7B6 100%);
}

.team-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: all 0.6s ease;
}

.team-member:hover .team-image {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* Overlay gradient */
.team-image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(56, 146, 166, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.team-member:hover .team-image-overlay {
  opacity: 1;
}

/* Content Section */
.team-content {
  position: absolute;
  width: 100%;
  bottom: 0;
  background-color: rgb(0,0,0, .5);
  padding: 1rem;

}

.team-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: #fff;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.team-member:hover .team-name {
  /*background: linear-gradient(135deg, #3892A6 0%, #73553C 100%);*/
  background-color: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-role {
  font-size: 0.95rem;
  color: #5EADBF;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;

}

/* Social Links */
.team-social {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.social-link {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F2D7B6;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #73553C;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.social-link:hover {
  background: linear-gradient(135deg, #3892A6 0%, #5EADBF 100%);
  color: white;
  transform: translateY(-3px) rotate(360deg);
}

/* Contact Info */
.team-contact {
  border-top: 1px solid #e5e7eb;
  padding-top: .5rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: white;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.contact-item:hover {
  color: #3892A6;
}

.contact-icon {
  color: #5EADBF;
  font-size: 1.1rem;
}

.contact-link {
  color: inherit;
  text-decoration: none;
  position: relative;
}

.contact-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #5EADBF;
  transition: width 0.3s ease;
}

.contact-link:hover::after {
  width: 100%;
}

/* Join Team CTA */
.team-cta {
  text-align: center;
  padding: 4rem 2rem;
  background: white;
  border-radius: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.team-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 40%;
  height: 200%;
  background: linear-gradient(135deg, #BAD3D9 0%, #F2D7B6 100%);
  opacity: 0.1;
  transform: rotate(45deg);
}

.team-cta-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #3892A6 0%, #73553C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.team-cta-text {
  font-size: 1.2rem;
  color: #4a5568;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.team-cta-button {
  display: inline-block;
  padding: 1.2rem 3rem;
  background: linear-gradient(135deg, #3892A6 0%, #5EADBF 100%);
  color: white;
  text-decoration: none;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.team-cta-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.team-cta-button:hover::before {
  width: 300px;
  height: 300px;
}

.team-cta-button:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 35px rgba(56, 146, 166, 0.3);
}

.team-column{
  display: flex;
  flex-direction: column;
}

.team-row{
  display: flex;
  flex-direction: row;
  margin-bottom: .5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .team-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .team-title {
    font-size: 2.5rem;
  }
  
  .team-cta-title {
    font-size: 2rem;
  }
  
  .team-section {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .team-content {
    padding: 1.5rem;
  }
  
  .team-name {
    font-size: 1.5rem;
  }
  
  .team-cta {
    padding: 2rem 1.5rem;
  }
}



/* ===========================
   TEAM — MOBILE POLISH (<= 640px)
   =========================== */
@media (max-width: 640px) {
  /* Grid: 1 col, respirando menos */
  .team-section { padding: 1.25rem 1rem; }
  .team-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 420px;
    margin: 0 auto 1.5rem;
  }

  /* Card: compacta y ligera */
  .team-member {
    max-width: 420px;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(15,23,42,.08);
    transform: none !important;
  }
  .team-member:hover { transform: none; box-shadow: 0 6px 18px rgba(15,23,42,.08); }

  /* Imagen: deja de ser un monstrico de 520px */
  .team-image-wrapper {
    height: clamp(220px, 58vw, 340px); /* antes 520px fijo */
    border-radius: inherit;
    overflow: hidden;
  }
  .team-image {
    object-fit: cover;
    object-position: center 30%;
    filter: grayscale(0%);              /* más humano en mobile */
    transform: none !important;
  }
  .team-member:hover .team-image { transform: none; }

  /* Overlay + contenido: más sobrio y legible */
  .team-content {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(180deg, rgba(2,6,23,0) 0%, rgba(2,6,23,.55) 40%, rgba(2,6,23,.65) 100%);
    padding: .9rem 1rem 1rem;
  }

  .team-name {
    font-size: 1.125rem;   /* was 1.5rem */
    font-weight: 700;
    margin: 0 0 .15rem;
    color: #fff;
    letter-spacing: -0.01em;
  }

  .team-role {
    font-size: .78rem;     /* was .95rem */
    letter-spacing: .06em;
    margin-bottom: .5rem;
    color: #5EADBF;
  }

  .team-contact { border-top: 1px solid rgba(255,255,255,.15); padding-top: .5rem; }
  .contact-item {
    font-size: .92rem;     /* was 1rem */
    line-height: 1.3;
    color: #e5e7eb;
    margin-bottom: .4rem;
    overflow-wrap: anywhere;
  }
  .contact-icon { font-size: 1rem; color: #93c5ce; }

  /* Decos y títulos: menos ruido en mobile */
  .team-header { margin-bottom: 2rem; }
  .team-title { font-size: 2rem; }
  .team-title::after { display: none; } /* quita el 'Team' gigante en bg */

  /* CTA general */
  .team-cta {
    padding: 1.5rem 1rem;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
  }
  .team-cta-title { font-size: 1.5rem; }
  .team-cta-text { font-size: 1rem; margin-bottom: 1.25rem; }
}

/* ===========================
   TEAM — TIGHT TABLET (641–768px)
   =========================== */
@media (min-width: 641px) and (max-width: 768px){
  .team-grid { gap: 1.5rem; }
  .team-image-wrapper { height: clamp(260px, 42vw, 380px); }
  .team-name { font-size: 1.25rem; }
  .team-role { font-size: .85rem; }
  .contact-item { font-size: .95rem; }
}
