/* =========================
   NUESTRO EQUIPO (TEAM)
========================= */

.team-section{
  background:#636aa3;
  padding: 90px 0 120px;
  color:#fff;
  text-align:center;
}

.team-header{
  max-width: 900px;
  margin: 0 auto 70px;
}

.team-subtitle{
  display:block;
  font-size:12px;
  letter-spacing:4px;
  text-transform:uppercase;
  color:#ffbe0b;
  margin-bottom:14px;
}

.team-title{
  margin: 0 0 18px;
  font-size: clamp(42px, 5vw, 76px);
  font-weight: 900;
}

.team-quote{
  margin: 0 auto;
  max-width: 650px;
  font-size: 14px;
  line-height: 1.6;
  opacity: .9;
}

.team-quote span{
  display:block;
  margin-top:6px;
  opacity: .75;
  font-size: 13px;
}

/* GRID */
.team-grid{
  max-width: 1100px;
  margin: 0 auto;
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

/* CARD */
.team-card{
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255,255,255,.06);
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
  cursor: pointer;
  isolation: isolate;
}

.team-card img{
  width:100%;
  height: 360px;
  object-fit: cover;
  display:block;
  border-radius: 26px;
  transform: scale(1.01);
  transition: transform .45s ease, filter .45s ease;
}

/* Nombre SIEMPRE visible */
.team-name-wrap{
  position:absolute;
  inset: auto 0 18px 0;
  z-index: 2;
  padding: 0 18px;
  text-align:center;
}

.team-name{
  margin:0;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 10px 22px rgba(0,0,0,.55);
}

/* Sombra para leer bien el nombre */
.team-card::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55) 100%);
  z-index: 1;
  pointer-events:none;
  transition: opacity .35s ease;
}

/* OVERLAY HOVER */
.team-overlay{
  position:absolute;
  inset:0;
  background: rgba(26, 167, 168, .92);
  z-index: 3;

  opacity:0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
  pointer-events:none;
}

.team-overlay-inner{
  height: 100%;
  padding: 26px 22px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  text-align:left;
}

.team-name--overlay{
  text-shadow: none;
  margin-bottom: 8px;
}

/* Cargo */
.team-role{
  margin:0 0 10px;
  font-size:13px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.95;
}

/* Descripción */
.team-desc{
  font-size:13px;
  line-height:1.5;
  margin:0 0 14px;
  opacity:.95;
}

/* Link */
.team-linkedin{
  align-self:flex-start;
  font-size:13px;
  font-weight:800;
  color:#fff;
  text-decoration:underline;
  pointer-events:auto;
}

/* HOVER: aparece info */
.team-card:hover .team-overlay{
  opacity:1;
  transform: translateY(0);
  pointer-events:auto;
}

.team-card:hover img{
  transform: scale(1.08);
  filter: brightness(.55);
}

.team-card:hover::before{
  opacity: 0;
}

/* RESPONSIVE */
@media (max-width: 980px){
  .team-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px){
  .team-grid{
    grid-template-columns: 1fr;
  }
  .team-card img{
    height: 420px;
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce){
  .team-card img,
  .team-overlay,
  .team-card::before{
    transition: none !important;
  }
}

