* {
  box-sizing: border-box;
}

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  min-height: 100vh;
  background: #ffffff;
  color: #0f6675;
}

.team-page {
  position: relative;
  overflow: hidden;
}

/* ===== HERO INTERNO ===== */
.team-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #006176;
  padding: 20px 20px;
  text-align: center;
}

.team-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(60, 33, 104, 0.25), transparent 60%);
}

.team-hero-line {
  display: block;
  width: 96px;
  height: 1px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.4);
}

.team-hero-title {
  margin: 20px 0 20px;
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.03;
  color: #ffffff;
}

.team-hero-sub {
  max-width: 640px;
  margin: 16px auto 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

/* ===== SECCIONES ===== */
.team-section {
  padding: 80px 24px;
}

.team-container {
  max-width: 1200px;
  margin: 0 auto;
}

.team-group + .team-group {
  margin-top: 72px;
}

.team-group-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 44px;
}

.team-group-title-wrap .hairline {
  flex: 1;
  height: 1px;
  background-image: linear-gradient(
    to right,
    transparent,
    rgba(0, 97, 118, 0.4),
    transparent
  );
}

.team-group-title {
  margin: 0;
  color: #006176;
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

/* ===== GRID DE CARDS ===== */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.team-grid .team-card {
  width: calc((100% - 56px) / 5);
}

.team-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid #e2ecf0;
  background: #ffffff;
  box-shadow: 0 18px 45px -22px rgba(0, 97, 118, 0.55);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 70px -30px rgba(60, 33, 104, 0.45);
}

.team-card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f1f6f8;
}

.team-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-avatar-initials {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(1.1rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #ffffff;
}

.avatar-a {
  background: linear-gradient(135deg, #006176, #00a9cc);
}

.avatar-b {
  background: linear-gradient(135deg, #2d7f8d, #60c6d5);
}

.avatar-c {
  background: linear-gradient(135deg, #1f90a5, #6dd4df);
}

.avatar-d {
  background: linear-gradient(135deg, #ec008c, #ff75c8);
}

.team-card-body {
  padding: 14px 10px;
}

.team-card-name {
  margin: 0;
  color: #006176;
  font-family: 'Open Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
}

.team-card-role {
  margin: 6px 0 0;
  color: #5a6f7a;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.55;
}

.team-card-email {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 6px 0 0;
  color: #006176;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-all;
}

.team-card-email i {
  flex-shrink: 0;
  font-size: 0.78rem;
}

/* ===== CTA ===== */
.team-cta {
  background: #f1f6f8;
  padding: 80px 24px;
  text-align: center;
}

.team-cta h2 {
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 600;
  color: #006176;
}

.team-cta p {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #5a6f7a;
}

.team-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

.team-btn-primary {
  border-radius: 50px;
  background: #006176;
  color: #ffffff;
  padding: 14px 28px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 18px 45px -22px rgba(0, 97, 118, 0.55);
  transition: transform 0.3s ease, background 0.3s ease;
}

.team-btn-primary:hover {
  color: #ffffff;
  background: #0087a5;
  transform: translateY(-2px);
}

.team-btn-outline {
  border-radius: 50px;
  border: 1px solid rgba(0, 97, 118, 0.3);
  background: #ffffff;
  color: #006176;
  padding: 14px 28px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.team-btn-outline:hover {
  color: #006176;
  transform: translateY(-2px);
  border-color: #006176;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1199.98px) {
  .team-grid .team-card {
    width: calc((100% - 42px) / 4);
  }
}

@media (max-width: 991.98px) {
  .team-hero {
    padding-top: 30px;
    padding-bottom: 34px;
  }

  .team-section {
    padding: 56px 24px;
  }

  .team-group + .team-group {
    margin-top: 56px;
  }
}

@media (max-width: 767.98px) {
  .team-section {
    padding: 48px 20px;
  }

  .team-group-title-wrap {
    flex-direction: column;
    gap: 0;
  }

  .team-group-title-wrap .hairline {
    display: none;
  }

  .team-group-title {
    white-space: normal;
    display: inline-block;
    position: relative;
    padding-bottom: 16px;
    max-width: 100%;
  }

  .team-group-title::after {
    content: "";
    display: block;
    width: 100%;
    height: 1px;
    margin: 12px auto 0;
    background-image: linear-gradient(
      to right,
      transparent,
      rgba(0, 97, 118, 0.4),
      transparent
    );
  }

  .team-grid .team-card {
    width: calc((100% - 14px) / 2);
  }

  .team-cta {
    padding: 56px 20px;
  }
}