/* ============================================================
   Equipo — tarjetas con foto + ficha ampliada en modal
   Usa las variables de css/styles.css (Design System v2)
   ============================================================ */

/* ---- Barra de filtros ---- */
.eq-filtros {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 26px 0 6px;
}
.eq-filtro {
  font-family: 'Raleway', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 9px 18px;
  border-radius: 40px;
  border: 1.5px solid var(--gris-1);
  background: var(--blanco);
  color: var(--texto-m);
  cursor: pointer;
  transition: var(--trans);
}
.eq-filtro:hover { border-color: var(--azul-l); color: var(--azul-d); }
.eq-filtro.activo {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--blanco);
  box-shadow: 0 4px 14px rgba(var(--azul-rgb), .28);
}

/* ---- Grilla ---- */
.eq-grupo { padding: 54px 0; }
.eq-grupo[hidden] { display: none; }
.eq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 24px;
  margin-top: 34px;
}
.eq-grid.es-destacado { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ---- Tarjeta ---- */
.eq-card {
  background: var(--blanco);
  border-radius: var(--radio-l);
  overflow: hidden;
  box-shadow: var(--sombra-s);
  border: 1px solid var(--gris-1);
  display: flex;
  flex-direction: column;
  transition: var(--trans);
}
.eq-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--sombra-l);
  border-color: var(--azul-xl);
}

.eq-foto {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--cielo);
  overflow: hidden;
}
.eq-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.eq-card:hover .eq-foto img { transform: scale(1.04); }

/* Sin foto: iniciales sobre degradado de marca */
.eq-foto-ini {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Raleway', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--blanco);
  background: linear-gradient(135deg, var(--azul-dd), var(--azul-m));
}

.eq-sede {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: 10px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--blanco);
  background: rgba(17, 40, 82, .82);
  padding: 5px 10px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eq-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.eq-body h3 {
  font-size: .98rem;
  line-height: 1.28;
  margin-bottom: 5px;
  color: var(--texto);
}
.eq-cargo {
  font-size: .8rem;
  font-weight: 600;
  color: var(--azul);
  line-height: 1.35;
  margin-bottom: 8px;
}
.eq-mat {
  font-size: .72rem;
  color: var(--texto-l);
  margin-bottom: 12px;
}
.eq-mas {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Raleway', sans-serif;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--azul-d);
  background: var(--cielo);
  border: 1px solid transparent;
  border-radius: 30px;
  padding: 7px 14px;
  cursor: pointer;
  transition: var(--trans);
}
.eq-mas:hover { background: var(--azul); color: var(--blanco); }
.eq-mas svg { width: 13px; height: 13px; }

/* Variante teal para bienestar/nutrición */
.eq-grupo.acento-verde .eq-cargo { color: var(--verde-d); }
.eq-grupo.acento-verde .eq-mas   { color: var(--verde-d); background: var(--verde-l); }
.eq-grupo.acento-verde .eq-mas:hover { background: var(--verde); color: var(--blanco); }
.eq-grupo.acento-verde .eq-card:hover { border-color: var(--verde-m); }
.eq-grupo.acento-verde .eq-foto-ini { background: linear-gradient(135deg, var(--verde-d), var(--verde-m)); }

/* ---- Modal de ficha ---- */
.eq-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 40, 82, .72);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.eq-modal.abierto { opacity: 1; visibility: visible; }

.eq-modal-box {
  position: relative;
  background: var(--blanco);
  border-radius: var(--radio-l);
  box-shadow: var(--sombra-l);
  width: min(860px, 100%);
  max-height: min(88vh, 760px);
  display: grid;
  grid-template-columns: 260px 1fr;
  overflow: hidden;
  transform: translateY(18px) scale(.98);
  transition: transform .28s ease;
}
.eq-modal.abierto .eq-modal-box { transform: none; }

.eq-modal-foto { background: var(--cielo); position: relative; }
.eq-modal-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.eq-modal-foto .eq-foto-ini { font-size: 3.6rem; }

.eq-modal-cuerpo { padding: 32px 34px; overflow-y: auto; }
.eq-modal-cuerpo h3 {
  font-size: 1.4rem;
  line-height: 1.22;
  margin-bottom: 6px;
}
.eq-modal-cargo {
  font-size: .95rem;
  font-weight: 700;
  color: var(--azul);
  margin-bottom: 16px;
}
.eq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.eq-chip {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--texto-m);
  background: var(--gris-f);
  border: 1px solid var(--gris-1);
  border-radius: 30px;
  padding: 5px 12px;
}
.eq-bloque { margin-bottom: 20px; }
.eq-bloque:last-child { margin-bottom: 0; }
.eq-bloque h4 {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--azul-l);
  margin-bottom: 7px;
}
.eq-bloque p {
  font-size: .92rem;
  line-height: 1.72;
  color: var(--texto-m);
}

.eq-cerrar {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--blanco);
  color: var(--texto-m);
  box-shadow: var(--sombra-s);
  cursor: pointer;
  transition: var(--trans);
  z-index: 3;
}
.eq-cerrar:hover { background: var(--azul); color: var(--blanco); transform: rotate(90deg); }
.eq-cerrar svg { width: 17px; height: 17px; }

body.eq-bloqueado { overflow: hidden; }

/* ---- Responsive ---- */
@media (max-width: 760px) {
  .eq-modal-box {
    grid-template-columns: 1fr;
    max-height: 90vh;
  }
  .eq-modal-foto { height: 240px; }
  .eq-modal-cuerpo { padding: 26px 24px 30px; }
  .eq-modal-cuerpo h3 { font-size: 1.2rem; }
}
@media (max-width: 560px) {
  .eq-grid,
  .eq-grid.es-destacado { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .eq-body { padding: 13px 13px 15px; }
  .eq-body h3 { font-size: .88rem; }
  .eq-cargo { font-size: .74rem; }
  .eq-grupo { padding: 40px 0; }
  .eq-sede {
    left: 7px; right: 7px; bottom: 7px;
    font-size: .6rem;
    letter-spacing: .01em;
    padding: 4px 7px;
  }
  .eq-mas { font-size: .72rem; padding: 6px 11px; }
}
