/* Nuestro equipo — tarjetas propias (no réplica de referencias externas) */

.team-section {
  --team-surface: #ffffff;
  --team-ink: #1a2332;
  --team-muted: #5c6678;
  --team-accent: #0d9488;
  --team-deep: #0c3d5c;
  background: linear-gradient(180deg, #eef6f4 0%, var(--color-bg, #f4f6f8) 55%);
}

.team-section__head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  max-width: 44rem;
}

.team-section__lead {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

.team-grid {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-card {
  --team-glow: rgba(13, 148, 136, 0.22);
  --team-ring: rgba(13, 148, 136, 0.55);
  --team-avatar-bg: linear-gradient(145deg, #0f766e 0%, #0c4a6e 100%);
  position: relative;
  height: 100%;
  margin: 0;
  padding: 1.35rem 1.35rem 1.45rem 1.25rem;
  border-radius: 22px;
  border: 1px solid rgba(12, 61, 92, 0.12);
  background: var(--team-surface);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 14px 36px rgba(12, 61, 92, 0.08);
  display: grid;
  grid-template-columns: minmax(4.5rem, 5.25rem) minmax(0, 1fr);
  gap: 1.1rem 1.15rem;
  align-items: start;
  overflow: hidden;
  transition: transform 0.28s var(--ease, cubic-bezier(0.4, 0, 0.2, 1)), box-shadow 0.28s ease;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: auto -35% 42% -20%;
  height: 120%;
  background: radial-gradient(ellipse at 30% 0%, var(--team-glow), transparent 58%);
  opacity: 0.9;
  pointer-events: none;
}

.team-card:hover {
  transform: translateY(-5px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 22px 48px rgba(12, 61, 92, 0.12);
}

.team-card--t2 {
  --team-glow: rgba(14, 116, 144, 0.2);
  --team-ring: rgba(8, 145, 178, 0.5);
  --team-avatar-bg: linear-gradient(145deg, #0369a1 0%, #0f766e 100%);
}

.team-card--t3 {
  --team-glow: rgba(12, 74, 110, 0.18);
  --team-ring: rgba(12, 61, 92, 0.45);
  --team-avatar-bg: linear-gradient(145deg, #155e75 0%, #134e4a 100%);
}

.team-card__avatar {
  position: relative;
  z-index: 1;
  width: 5.25rem;
  aspect-ratio: 1;
  border-radius: 1.15rem;
  background: var(--team-avatar-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 3px #fff,
    0 0 0 5px var(--team-ring),
    0 12px 24px rgba(12, 61, 92, 0.18);
  transform: rotate(-3deg);
}

.team-card:nth-child(even) .team-card__avatar {
  transform: rotate(3deg);
}

.team-card__initials {
  font-family: var(--font-display, inherit);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.team-card__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.team-card__name {
  margin: 0 0 0.45rem;
  font-family: var(--font-display, inherit);
  font-size: clamp(1.05rem, 2.1vw, 1.2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--team-deep);
  letter-spacing: -0.02em;
}

.team-card__name::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--team-accent), rgba(13, 148, 136, 0.25));
}

.team-card__role {
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(100deg, var(--team-accent), #0e7490);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.team-card__contact {
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.team-card__row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--team-muted);
}

.team-card__row > span {
  min-width: 0;
  flex: 1 1 auto;
}

.team-card__icon {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.12rem;
  color: var(--team-accent);
}

.team-card__row a {
  color: var(--team-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(12, 61, 92, 0.22);
  overflow-wrap: break-word;
  word-break: normal;
}

.team-card__row a:hover {
  color: var(--team-accent);
  border-bottom-color: rgba(13, 148, 136, 0.45);
}

.team-card__ext {
  font-weight: 600;
  color: var(--team-deep);
}

.team-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  justify-content: center;
}

.team-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-family: var(--font-sans, inherit);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-card__btn--call {
  background: var(--color-primary, #0c3d5c);
  color: #fff;
  border-color: rgba(12, 61, 92, 0.35);
  box-shadow: 0 2px 8px rgba(12, 61, 92, 0.15);
}

.team-card__btn--call:hover {
  background: var(--color-primary-hover, #0a3250);
  color: #fff;
  transform: translateY(-1px);
}

.team-card__btn--wa {
  background: #25d366;
  color: #fff;
  border-color: rgba(22, 163, 74, 0.45);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.25);
}

.team-card__btn--wa:hover {
  background: #1ebe5b;
  color: #fff;
  transform: translateY(-1px);
}

.team-grid--in-about .team-card__actions {
  justify-content: center;
}

/* Dentro del panel Nosotros el ancho es limitado: una columna y tarjetas en bloque */
.team-grid--in-about {
  margin: 0;
  grid-template-columns: minmax(0, 1fr);
  max-width: none;
}

.team-grid--in-about > li {
  min-width: 0;
}

.team-grid--in-about .team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 26rem;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.team-grid--in-about .team-card__avatar {
  transform: none;
  flex-shrink: 0;
}

.team-grid--in-about .team-card__body {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.team-grid--in-about .team-card__contact {
  width: 100%;
  text-align: left;
}

.team-grid--in-about .team-card__row {
  align-items: flex-start;
}

.team-grid--in-about .team-card__name::after {
  margin-left: auto;
  margin-right: auto;
}

/* Nosotros — tarjetas de equipo: tono institucional */
.team-grid--in-about.team-grid--in-about--institutional .team-card {
  display: grid;
  grid-template-columns: minmax(3.75rem, 4.35rem) minmax(0, 1fr);
  gap: 1rem 1.1rem;
  align-items: start;
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: 34rem;
  padding: 1.2rem 1.3rem 1.25rem 1.15rem;
  border-radius: 12px;
  border: 1px solid rgba(12, 61, 92, 0.14);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.88) inset,
    0 5px 18px rgba(12, 61, 92, 0.05);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card:hover {
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.92) inset,
    0 8px 24px rgba(12, 61, 92, 0.08);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card::before {
  opacity: 0.2;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__avatar {
  width: 4.35rem;
  border-radius: 10px;
  transform: none;
  box-shadow:
    0 0 0 2px #fff,
    0 1px 0 rgba(12, 61, 92, 0.12),
    0 6px 14px rgba(12, 61, 92, 0.1);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__initials {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__body {
  text-align: left;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__name {
  font-weight: 700;
  font-size: clamp(1rem, 1.85vw, 1.12rem);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__name::after {
  margin-left: 0;
  margin-right: 0;
  width: 2rem;
  height: 2px;
  margin-top: 0.4rem;
  background: rgba(12, 61, 92, 0.28);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__role {
  display: block;
  margin: 0 0 0.85rem;
  padding: 0 0 0 0.65rem;
  border-radius: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  color: var(--team-muted);
  background: none;
  box-shadow: none;
  border-left: 2px solid rgba(12, 61, 92, 0.22);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__actions {
  justify-content: flex-start;
  margin-top: 0.65rem;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__btn {
  border-radius: 8px;
  padding: 0.38rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  box-shadow: none;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__btn--call {
  background: #fff;
  color: var(--team-deep);
  border: 1px solid rgba(12, 61, 92, 0.22);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__btn--call:hover {
  background: rgba(12, 61, 92, 0.06);
  color: var(--team-deep);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__btn--wa {
  background: #fff;
  color: #128c7e;
  border: 1px solid rgba(18, 140, 126, 0.35);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__btn--wa:hover {
  background: rgba(37, 211, 102, 0.08);
  color: #0d7a6f;
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__row a[href^="tel:"] {
  color: var(--team-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(12, 61, 92, 0.2);
}

.team-grid--in-about.team-grid--in-about--institutional .team-card__row a[href^="tel:"]:hover {
  color: var(--team-accent);
  border-bottom-color: rgba(13, 148, 136, 0.45);
}

@media (max-width: 960px) {
  .team-grid:not(.team-grid--in-about) {
    grid-template-columns: 1fr;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
  }

  .team-card:nth-child(even) .team-card__avatar {
    transform: rotate(-3deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-card {
    transition: none;
  }

  .team-card:hover {
    transform: none;
  }
}
