/* ==========================================================================
   02 · Juntos (presentación institucional)
   ========================================================================== */

.juntos-section {
  /* Padding inferior corto: deja asomar la sección siguiente como señal de scroll */
  padding: 6.5rem 0 2.5rem;
  background-color: var(--color-bg-sand);
}

.juntos-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 5rem;
}

/* --- Collage de fotos --- */
.juntos-visual {
  position: relative;
  width: 100%;
  padding-right: 2rem;
  padding-bottom: 3.5rem;
}

/* Flor multicolor girando detrás de la foto */
.juntos-flower {
  position: absolute;
  top: -2.5rem;
  left: -2.5rem;
  z-index: 0;
  opacity: 0.15;
}

/* Foto principal: el equipo, protagonista */
.juntos-photo {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 40%;
  border-radius: 2rem 7.5rem 2rem 2rem;
  box-shadow: var(--shadow-card-hover);
}

/* Foto secundaria: chica, en la esquina, fuera de las caras */
.juntos-photo-float {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 30%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: 42% 70%; /* el acceso al edificio */
  border-radius: 50%;
  border: 0.5rem solid var(--color-bg-sand);
  box-shadow: 0 0.75rem 1.5rem rgba(var(--rgb-black), 0.1);
}

/* Sello de trayectoria: texto en círculo que gira lento, con la flor al centro.
   Se apoya sobre la esquina redondeada superior derecha de la foto */
.brand-seal {
  position: absolute;
  top: -3.25rem;
  right: -2.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 9rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: var(--color-white);
  box-shadow: 0 1rem 2.5rem -1rem rgba(var(--rgb-carbon), 0.25);
}

.brand-seal-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: flower-spin 40s linear infinite;
}

.brand-seal-ring text {
  font-family: var(--font-family-base);
  font-size: 0.5625rem;
  font-weight: 700;
  fill: var(--color-carbon);
}

.brand-seal-flower {
  width: 2.5rem;
  aspect-ratio: 1;
  background-color: var(--color-primary);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='24' r='22'/%3E%3Ccircle cx='74.7' cy='42' r='22'/%3E%3Ccircle cx='65.3' cy='71' r='22'/%3E%3Ccircle cx='34.7' cy='71' r='22'/%3E%3Ccircle cx='25.3' cy='42' r='22'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='24' r='22'/%3E%3Ccircle cx='74.7' cy='42' r='22'/%3E%3Ccircle cx='65.3' cy='71' r='22'/%3E%3Ccircle cx='34.7' cy='71' r='22'/%3E%3Ccircle cx='25.3' cy='42' r='22'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* --- Texto --- */
.juntos-title {
  margin-bottom: 1.5rem;
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Bajada: la trayectoria (el hero ya dice a quiénes y cómo acompañan) */
.juntos-desc {
  margin-bottom: 2rem;
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--color-carbon-light);
}

/* Palabras clave dentro del texto */
.juntos-desc strong {
  font-weight: 700;
  color: var(--color-carbon);
}

/* Cómo nos organizamos: tres datos en columnas, separados por una línea fina */
.juntos-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding-top: 1.75rem;
  border-top: 1px solid rgba(var(--rgb-black), 0.08);
}

.juntos-fact {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 0 1.5rem;
  border-left: 1px solid rgba(var(--rgb-black), 0.08);
}

.juntos-fact:first-child {
  padding-left: 0;
  border-left: none;
}

.juntos-fact:last-child {
  padding-right: 0;
}

.juntos-fact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  background-color: var(--color-tint-red);
  color: var(--color-primary);
}

.juntos-fact-title {
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-carbon);
}

.juntos-fact-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-carbon-muted);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .juntos-grid {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
}

/* Mobile: pretítulo y título primero (dan contexto), después la foto y el detalle.
   .juntos-content se "disuelve" para poder intercalar la foto entre sus hijos. */
@media (max-width: 768px) {
  .juntos-section {
    padding: 4.5rem 0 3.5rem;
  }

  .juntos-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .juntos-content {
    display: contents;
  }

  .juntos-content .eyebrow { order: 1; }
  .juntos-title { order: 2; }
  .juntos-visual { order: 3; }
  .juntos-desc { order: 4; }
  .juntos-facts { order: 5; }

  .juntos-title {
    margin-bottom: 2rem;
    font-size: 2.25rem;
  }

  .juntos-visual {
    margin-bottom: 2rem;
    padding-right: 1rem;
    padding-bottom: 2.5rem;
  }

  .juntos-photo {
    border-radius: 1.5rem 4.5rem 1.5rem 1.5rem;
  }

  .juntos-photo-float {
    width: 34%;
    border-width: 0.375rem;
  }

  .brand-seal {
    top: -2.25rem;
    right: -0.5rem;
    width: 6.5rem;
  }

  .brand-seal-flower {
    width: 1.75rem;
  }

  .juntos-desc {
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
  }

  /* Los tres datos pasan a filas: ícono a la izquierda, texto a la derecha */
  .juntos-facts {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 1.5rem;
  }

  .juntos-fact,
  .juntos-fact:first-child,
  .juntos-fact:last-child {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    row-gap: 0.125rem;
    padding: 0;
    border-left: none;
  }

  .juntos-fact-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }
}
