/* =========================================================
   PÁGINA NOSOTROS
   EQUIPO PROFESIONAL
========================================================= */

.team-section {
  width: 100%;
  padding: 20px 0 96px;
  background: var(--color-white, #ffffff);
}

.team-section__container {
  width: min(100% - 40px, var(--container, 1500px));
  margin: 0 auto;
}

/* =========================================================
   ENCABEZADO DE LA SECCIÓN
========================================================= */

.team-section__header {
  max-width: 900px;
  margin: 0 auto 46px;
  text-align: center;
}

.team-section__header .section-label {
  display: block;
  margin: 0 0 18px;
  color: var(--color-navy-dark, #071a35);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.team-section__header .section-line {
  width: 82px;
  height: 2px;
  margin: 0 auto 24px;
  background: var(--color-accent, #c97832);
}

.team-section__header h2 {
  max-width: 760px;
  margin: 0 auto 18px;
  color: var(--color-navy-dark, #071a35);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.35rem, 4vw, 3.55rem);
  font-weight: 600;
  line-height: 1.02;
  text-align: center;
  text-wrap: balance;
}

.team-section__header p {
  max-width: 700px;
  margin: 0 auto;
  color: var(--color-text, #53637a);
  font-family: "Inter", sans-serif;
  font-size: 1.02rem;
  line-height: 1.78;
  text-align: center;
}

/* =========================================================
   CONTENEDOR DE PERFILES
========================================================= */

.team-section__profiles {
  display: grid;
  gap: 34px;
}

/* =========================================================
   TARJETA PROFESIONAL
========================================================= */

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns:
    minmax(420px, 1fr)
    minmax(0, 1.18fr);
  min-height: 610px;
  overflow: hidden;
  border: 1px solid rgba(7, 26, 53, 0.13);
  border-radius: 34px;
  background: var(--color-white, #ffffff);
  box-shadow: 0 24px 60px rgba(7, 26, 53, 0.08);
  isolation: isolate;
}

.profile-card::before,
.profile-card::after {
  position: absolute;
  z-index: 0;
  display: block;
  content: "";
  pointer-events: none;
}

.profile-card::before {
  top: -92px;
  left: -82px;
  width: 205px;
  height: 205px;
  border-radius: 0 0 90px 0;
  background: rgba(7, 26, 53, 0.045);
}

.profile-card::after {
  right: -76px;
  bottom: -94px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(201, 120, 50, 0.07);
}

/* =========================================================
   TARJETA INVERTIDA
========================================================= */

.profile-card--reverse {
  grid-template-columns:
    minmax(0, 1.18fr)
    minmax(420px, 1fr);
}

.profile-card--reverse .profile-card__media {
  order: 2;
}

.profile-card--reverse .profile-card__content {
  order: 1;
}

/* =========================================================
   FOTOGRAFÍA
========================================================= */

.profile-card__media {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  min-height: 100%;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding: 22px 16px 0;
  background: #ffffff;
}

.profile-card__media::after {
  position: absolute;
  right: 16px;
  bottom: 20px;
  left: 16px;
  z-index: -1;
  height: 48%;
  border-radius: 26px;
  background:
    linear-gradient(
      180deg,
      rgba(7, 26, 53, 0),
      rgba(7, 26, 53, 0.035)
    );
  content: "";
}

.profile-card__photo {
  display: block;
  width: 100%;
  max-width: 680px;
  height: 100%;
  max-height: 760px;
  object-fit: contain;
  object-position: center bottom;
}

/* =========================================================
   CONTENIDO
========================================================= */

.profile-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 58px 64px;
}

.profile-card__role {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  padding: 10px 17px;
  border: 1px solid rgba(201, 120, 50, 0.22);
  border-radius: 999px;
  color: var(--color-navy-dark, #071a35);
  background: rgba(201, 120, 50, 0.09);
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.profile-card__name {
  max-width: 780px;
  margin: 22px 0 28px;
  color: var(--color-navy-dark, #071a35);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.35rem, 3.6vw, 3.9rem);
  font-weight: 700;
  line-height: 0.96;
  text-wrap: balance;
}

.profile-card__description {
  max-width: 850px;
}

.profile-card__description p {
  margin: 0;
  color: var(--color-text, #53637a);
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.05vw, 1.12rem);
  font-weight: 400;
  line-height: 1.78;
}

.profile-card__description p + p {
  margin-top: 20px;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

  .profile-card {
    grid-template-columns:
      minmax(330px, 0.95fr)
      minmax(0, 1.08fr);
    min-height: 560px;
  }

  .profile-card--reverse {
    grid-template-columns:
      minmax(0, 1.08fr)
      minmax(330px, 0.95fr);
  }

  .profile-card__content {
    padding: 48px 42px;
  }

  .profile-card__media {
    padding: 20px 14px 0;
  }

  .profile-card__photo {
    max-width: 560px;
    max-height: 640px;
  }

  .profile-card__name {
    font-size: clamp(2.3rem, 4.6vw, 3.4rem);
  }

}

/* =========================================================
   MÓVIL Y TABLET VERTICAL
========================================================= */

@media (max-width: 860px) {

  .team-section {
    padding: 16px 0 72px;
  }

  .team-section__container {
    width: min(100% - 32px, var(--container, 1500px));
  }

  .team-section__header {
    margin-bottom: 32px;
    text-align: center;
  }

  .team-section__header .section-label {
    margin-bottom: 16px;
  }

  .team-section__header .section-line {
    margin-bottom: 22px;
  }

  .team-section__header h2 {
    max-width: 540px;
    font-size: clamp(2rem, 7vw, 2.9rem);
    line-height: 1.05;
  }

  .team-section__header p {
    max-width: 620px;
    font-size: 0.98rem;
    line-height: 1.72;
  }

  .profile-card,
  .profile-card--reverse {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .profile-card--reverse .profile-card__media,
  .profile-card--reverse .profile-card__content {
    order: initial;
  }

  .profile-card__media {
    min-height: 520px;
    padding: 20px 20px 0;
  }

  .profile-card__photo {
    width: min(100%, 580px);
    max-width: 580px;
    max-height: 560px;
  }

  .profile-card__content {
    padding: 42px 38px 48px;
    text-align: center;
  }

  .profile-card__role {
    align-self: center;
    justify-content: center;
    text-align: center;
  }

  .profile-card__name {
    max-width: 650px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    font-size: clamp(2.15rem, 8vw, 3.15rem);
  }

  .profile-card__description {
    width: 100%;
    max-width: 680px;
    margin-right: auto;
    margin-left: auto;
  }

  .profile-card__description p {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }

}

/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 600px) {

  .team-section {
    padding-bottom: 58px;
  }

  .team-section__container {
    width: min(100% - 28px, var(--container, 1500px));
  }

  .team-section__profiles {
    gap: 26px;
  }

  .profile-card {
    border-radius: 26px;
  }

  .profile-card::before {
    top: -105px;
    left: -98px;
  }

  .profile-card::after {
    right: -105px;
    bottom: -115px;
  }

  .profile-card__media {
    min-height: 410px;
    padding: 18px 16px 0;
  }

  .profile-card__photo {
    max-width: 440px;
    max-height: 450px;
  }

  .profile-card__content {
    padding: 34px 24px 40px;
    text-align: center;
  }

  .profile-card__role {
    padding: 9px 14px;
    font-size: 0.69rem;
    line-height: 1.4;
  }

  .profile-card__name {
    margin-top: 20px;
    margin-bottom: 24px;
    font-size: clamp(2rem, 11vw, 2.8rem);
    line-height: 1.02;
  }

  .profile-card__description {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  .profile-card__description p {
    margin-right: auto;
    margin-left: auto;
    font-size: 0.98rem;
    line-height: 1.7;
    text-align: center;
  }

  .profile-card__description p + p {
    margin-top: 18px;
  }

}

/* =========================================================
   MÓVILES PEQUEÑOS
========================================================= */

@media (max-width: 420px) {

  .team-section__header h2 {
    font-size: clamp(1.85rem, 10vw, 2.45rem);
  }

  .profile-card__media {
    min-height: 350px;
  }

  .profile-card__photo {
    max-width: 360px;
    max-height: 385px;
  }

  .profile-card__content {
    padding-right: 20px;
    padding-left: 20px;
  }

}