/* Visión Multidisciplinaria — diseño corregido */

.g6-vision-team {
  --g6-vision-bg: #edf1f3;
  /* --g6-vision-line: #263e48; /*
  /*--g6-vision-dark: #263e48;*/
  --g6-vision-line: var(--g6-ink);
  --g6-vision-dark: var(--g6-ink-muted);
  --g6-vision-text: #5e7d8a;
  --g6-vision-text-light: #8da1ab;
  --g6-vision-marker: #8da1ab;

  background-color: #ffffff;
  padding: 50px 0;
  display: flex;
  justify-content: center;
  overflow: visible;
  font-family: "Montserrat", sans-serif;
}

.g6-vision-team__inner {
  width: 1400px;
  position: relative;
  padding: 60px 0;
  overflow: visible;
}

/* Bloque gris central */
.g6-vision-team__central-gray {
  position: absolute;
  top: 400px;
  left: 0;
  width: 100%;
  height: 850px;
  background-color: var(--g6-cream) !important;
  z-index: 1;
}

/* --- LÍNEAS (Z-INDEX: 2) --- */
.g6-vision-team__line-top {
  position: absolute;
  bottom: 900px;
  right: 65px;
  width: calc(100% - 196px);
  height: 400px;
  border-bottom: 1px solid var(--g6-stone); /* Cambiado a --g6-stone */
  border-right: 1px solid var(--g6-stone); /* Cambiado a --g6-stone */
  z-index: 2;
}

.g6-vision-team__line-bottom {
  position: absolute;
  bottom: 280px;
  left: 45px;
  width: calc(100% - 196px);
  height: 310px;
  border-bottom: 1px solid var(--g6-stone); /* Cambiado a --g6-stone */
  border-left: 1px solid var(--g6-stone); /* Cambiado a --g6-stone */
  z-index: 2;
}

/* Marcadores oscuros */
.g6-vision-team__marker {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.g6-vision-team__marker .point {
  width: 6px;
  height: 15px;
  background: var(--g6-stone); /* Homologado al color stone café */
  margin-bottom: 5px;
}

.g6-vision-team__marker span {
  writing-mode: vertical-rl;
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 10px;
  color: var(--g6-stone); /* Homologado al color stone café */
  letter-spacing: 2px;
}

.g6-vision-team__marker-somos {
  top: 320px; /*esto fue modificado manualmente para desktop*/
  right: 62px;
}

.g6-vision-team__marker-socios {
  bottom: 530px;
  left: 42px;
}

.g6-vision-team__marker-socios span {
  transform: rotate(180deg);
}

/* --- CONTENIDO (Z-INDEX: 3) --- */
.g6-vision-team__content {
  position: relative;
  z-index: 3;
  padding: 0 var(--g6-space-xl);
  overflow: visible;
}

.g6-vision-team__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: end;
  position: relative;
  z-index: 10;
}

/* Título principal - en la zona blanca, arriba del bloque crema */
.g6-vision-team__header {
  position: static;
  margin-bottom: 60px;
}

.g6-vision-team__header-title {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  color: var(--g6-stone);
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.g6-vision-team__header-subtitle {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 300;
  color: var(--g6-ink-muted);
  margin: 0;
  line-height: 1.4;
}

.g6-vision-team__header-description {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 400;
  color: var(--g6-ink-muted);
  margin: 20px 0 0 0;
  line-height: 1.6;
  max-width: 680px;
}

/* === POPUP FLOTANTE (sobresale sobre la foto) === */
.g6-vision-team__photo {
  position: relative;
  z-index: 3;
  background: white;
  aspect-ratio: 3 / 4;
  overflow: visible;
  cursor: pointer;
  /*box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);*/
}

/* Contenedor de imagen para el efecto grayscale */
.g6-vision-team__photo-img {
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: block;
  position: relative;
  z-index: 1;
}

.g6-vision-team__photo-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 20%;
  filter: grayscale(100%);
  transition:
    filter 0.4s ease,
    opacity 0.4s ease;
}

/* Foto en hover: color */
.g6-vision-team__photo:hover {
  z-index: 50;
}

.g6-vision-team__photo:hover .g6-vision-team__photo-img img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Fotos no-hover (agregado por JS) */
.g6-vision-team__photo.is-dimmed .g6-vision-team__photo-img img {
  filter: grayscale(100%);
  opacity: 0.45;
}

.g6-vision-team__popup {
  position: absolute;
  top: 52%;
  right: -320px;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.35s ease,
    visibility 0.35s;
  pointer-events: none;
  z-index: 100;
  width: 340px;
}

.g6-vision-team__popup-body {
  background: var(--g6-stone);
  padding: 14px 16px;
}

.g6-vision-team__popup-body h3 {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  margin: 0 0 8px 0;
  text-transform: uppercase;
}

.g6-vision-team__popup-body h3::before {
  content: "> ";
  font-weight: 400;
}

.g6-vision-team__popup-body p {
  font-family: "Montserrat", Helvetica, Arial, sans-serif;
  font-size: 10px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 10px 0;
  line-height: 1.4;
}

.g6-vision-team__popup-body .linkedin-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--g6-font);
  font-size: 10px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
  /*letter-spacing: 0.15em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--g6-orange);
  padding-bottom: 4px;
  transition: opacity 0.2s ease, letter-spacing 0.2s ease;*/
}

/*never used*/
.g6-vision-team__popup-body .linkedin-link:hover {
  color: #ffffff;
}

.g6-vision-team__popup-body .linkedin-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.g6-vision-team__photo:hover .g6-vision-team__popup {
  opacity: 1;
  visibility: visible;
}

/* Popup hacia la izquierda (fila inferior) */
.g6-vision-team__photo.popup-left .g6-vision-team__popup {
  right: auto;
  left: -320px;
}

/* Textos principales */
.g6-vision-team__text {
  margin: 110px 0;
  /* margin-top: 50px; */
  color: var(--g6-ink);
}

.g6-vision-team__text + .g6-vision-team__grid {
  margin-top: -80px;
}

/* Footer text */
.g6-vision-team__footer {
  text-align: left;
  margin-top: 80px;
  color: var(--g6-vision-text);
}

.g6-vision-team__footer h3 {
  margin: 0 0 8px 0 !important;
  color: var(--g6-stone);
}

.g6-vision-team__footer p {
  margin: 0;
  color: var(--g6-ink-muted) !important;
}

/* Responsive Tablet */
@media (max-width: 991px) {
  .g6-vision-team__inner {
    width: 100%;
    max-width: 100%;
    padding: 40px 20px;
  }

  .g6-vision-team__central-gray {
    width: 100%;
    height: 100%;
    min-height: 1300px;
  }

  .g6-vision-team__line-top,
  .g6-vision-team__line-bottom {
    display: none;
  }

  .g6-vision-team__marker {
    display: none;
  }

  .g6-vision-team__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    align-items: start;
  }

  .g6-vision-team__content {
    padding: 0;
  }

  .g6-vision-team__header {
    position: static;
    margin-bottom: 30px;
    padding-left: 0;
  }

  .g6-vision-team__header-title {
    font-size: clamp(22px, 5vw, 28px);
    margin-bottom: 8px;
  }

  .g6-vision-team__header-subtitle {
    font-size: clamp(14px, 3.5vw, 18px);
  }

  .g6-vision-team__header-description {
    font-size: clamp(13px, 3.5vw, 16px);
    margin-top: 15px;
  }

  .g6-vision-team__text h2 {
    font-size: 28px !important;
  }

  .g6-vision-team__text p {
    font-size: 18px !important;
  }

  /* Mobile/Tablet: popup below photo, triggered by click */
  .g6-vision-team__photo .g6-vision-team__popup {
    display: none !important;
    position: static !important;
    width: 100% !important;
    pointer-events: auto !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .g6-vision-team__photo.is-active .g6-vision-team__popup {
    display: block !important;
  }

  .g6-vision-team__photo {
    overflow: visible;
  }
}

/* Responsive Mobile */
@media (max-width: 575px) {
  .g6-vision-team {
    padding: 0 0 30px 0;
  }

  .g6-vision-team__inner {
    padding: 50px 20px 20px 20px;
  }

  .g6-vision-team__central-gray {
    top: 0;
    min-height: 1400px;
  }

  .g6-vision-team__grid {
    grid-template-columns: 1fr;
    gap: 20px;
    align-items: start;
  }

  .g6-vision-team__header {
    position: static;
    margin-bottom: 30px;
    margin-top: 0;
  }

  .g6-vision-team__header-title {
    font-size: clamp(22px, 7vw, 28px);
    margin-bottom: 8px;
  }

  .g6-vision-team__header-subtitle {
    font-size: clamp(14px, 4vw, 17px);
  }

  .g6-vision-team__header-description {
    font-size: clamp(12px, 3.5vw, 15px);
    margin-top: 12px;
  }

  /* Full width photos on mobile */
  .g6-vision-team__photo {
    max-width: 100%;
  }

  .g6-vision-team__text {
    margin: 50px 0;
  }

  .g6-vision-team__text h2 {
    font-size: 22px !important;
  }

  .g6-vision-team__text p {
    font-size: 15px !important;
  }

  .g6-vision-team__footer {
    margin-top: 50px;
  }

  .g6-vision-team__footer h3 {
    font-size: 20px !important;
  }

  .g6-vision-team__footer p {
    font-size: 14px !important;
  }
}
