/* ==========================================================
   Personalizaciones sobre la web original de Xenomium.
   Se carga después de los estilos originales en todas las páginas.
   ========================================================== */

:root {
  /* Margen lateral único para toda la web */
  --xg: clamp(1rem, 2.5vw, 2rem);

  /* Imágenes de las tarjetas de la sección unificada.
     Para usar fotos propias: copia el archivo a assets/brand/secciones/
     y cambia aquí el nombre (p. ej. captacion.jpg). Proporción recomendada 3:2. */
  --img-captacion:      url("/assets/brand/secciones/captacion.svg");
  --img-integracion:    url("/assets/brand/secciones/integracion.svg");
  --img-interpretacion: url("/assets/brand/secciones/interpretacion.svg");
  --img-prevencion:     url("/assets/brand/secciones/prevencion.svg");
  --img-diagnostico:    url("/assets/brand/secciones/diagnostico.svg");
  --img-tratamiento:    url("/assets/brand/secciones/tratamiento.svg");
  --img-seguimiento:    url("/assets/brand/secciones/seguimiento.svg");
}

/* ---------- 1. Misma alineación en todas las secciones ---------- */
/* Todos los contenedores (cabecera, portada, secciones, pie) ocupan el
   ancho completo con el mismo margen lateral reducido. */
html body .container,
html body .band--omx2 > .container,
html body .band--apply > .container,
html body .band--journey > .container,
html body .band--trust2 > .container,
html body .band--help > .container {
  width: auto !important;
  max-width: none !important;
  margin-inline: var(--xg) !important;
}

/* Textos alineados a la izquierda (antes había bloques centrados o justificados) */
html body .band--omx2 .omx2__head p {
  text-align: left !important;
}
html body .band--journey .path__head {
  text-align: left !important;
  margin: 0 !important;
  max-width: none !important;
}

/* ---------- 2. Esquema circular: el nombre cabe en la pestaña ---------- */
html body .omx2-node {
  max-width: none !important;   /* antes 11.5rem / 10.25rem: cortaba nombres largos */
}
html body .omx2-node__name {
  white-space: nowrap;
}
@media (min-width: 761px) and (max-width: 1000px) {
  /* Órbita algo más amplia para que las pestañas vecinas no se toquen */
  html body .omx2 { --omx-r: clamp(11rem, 30vw, 14.5rem) !important; }
  html body .omx2-node { font-size: .78rem !important; gap: .45rem !important; }
}
@media (max-width: 760px) {
  /* En móvil las pestañas pasan a rejilla: se permite partir línea */
  html body .omx2-node__name { white-space: normal; }
}

/* ---------- 3. Una sola sección: "Información que se convierte en
   conocimiento" + "De la prevención al tratamiento personalizado" ---------- */
html body .band--apply {
  padding-bottom: clamp(1rem, 2vw, 1.5rem) !important;
}
/* Fondo degradado de izquierda a derecha con tonos suaves del logo
   (azul marino → turquesa). Igual en las dos bandas para que se lea como
   un único fondo continuo. */
html body .band--apply,
html body .band--journey {
  background: linear-gradient(90deg, #d6dfea 0%, #e2eef1 45%, #b9e4e0 100%) !important;
}
html body .band--journey {
  padding-top: 0 !important;
  padding-bottom: clamp(3.25rem, 6.5vw, 5.25rem) !important;
}
/* El bloque de prevención/tratamiento se presenta como un panel más de la
   misma sección, con el mismo estilo que las tarjetas de fases. */
html body .band--journey .path {
  padding: clamp(1.25rem, 2.5vw, 2rem) !important;
  border: 1px solid rgba(255, 255, 255, .82);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 1px #fffffff2, 0 18px 36px -24px #05162266;
}
html body .band--journey .path__head h2 {
  margin: 0 0 .5rem !important;
  font-size: clamp(1.25rem, 2vw, 1.6rem) !important;
}
html body .band--journey .path__head p {
  font-size: .98rem !important;
  line-height: 1.6 !important;
}
html body .band--journey .path-steps {
  margin-top: clamp(1.5rem, 3vw, 2.25rem) !important;
}

/* ---------- Botón "Resultados" en el menú superior ---------- */
html body .xeno-results-link {
  position: fixed; z-index: 60; top: 12px; right: 190px; padding: .55rem 1.1rem; border-radius: 999px;
  background: #178a8f; color: #fff; font: 700 .85rem Montserrat, system-ui, sans-serif; text-decoration: none;
  white-space: nowrap; transition: background .2s; box-shadow: 0 6px 18px -10px rgba(5, 22, 34, .6);
}
html body .xeno-results-link:hover { background: #127177; }
@media (max-width: 700px) {
  /* En móvil no cabe en la cabecera: botón flotante abajo a la derecha */
  html body .xeno-results-link { top: auto !important; bottom: 16px !important; right: 16px !important; padding: .7rem 1.2rem; box-shadow: 0 10px 24px -8px rgba(5, 22, 34, .55); }
}

/* ---------- 5. Imagen encima de cada tarjeta ---------- */
html body .apply-card::before,
html body .band--journey .path-step::before {
  content: "";
  display: block;
  grid-column: 1 / -1;
  aspect-ratio: 3 / 2;
  border-radius: 12px;
  background: var(--img) center / cover no-repeat, #dfeeee;
}
html body .apply-card:nth-child(1) { --img: var(--img-captacion); }
html body .apply-card:nth-child(2) { --img: var(--img-integracion); }
html body .apply-card:nth-child(3) { --img: var(--img-interpretacion); }
html body .path-step:nth-child(1)  { --img: var(--img-prevencion); }
html body .path-step:nth-child(2)  { --img: var(--img-diagnostico); }
html body .path-step:nth-child(3)  { --img: var(--img-tratamiento); }
html body .path-step:nth-child(4)  { --img: var(--img-seguimiento); }
/* Cuatro apartados en "Aplicaciones en todo el proceso asistencial" (en escritorio) */
@media (min-width: 821px) {
  html body .band--journey .path-steps { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; column-gap: 1.25rem !important; }
}

/* Las tres fases, siempre en tres columnas en escritorio (antes pasaban a una
   sola columna por debajo de 1100 px) */
@media (min-width: 821px) {
  html body .apply__phases { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; max-width: none !important; }
}

/* En "Aplicaciones…" la imagen sustituye al icono y a la línea que los unía */
html body .band--journey .path-step__icon,
html body .band--journey .path-steps::before { display: none !important; }
html body .band--journey .path-step::before { margin-bottom: 1rem; }
html body .band--journey .path-steps { grid-template-rows: auto auto auto 1fr !important; }
@media (max-width: 820px) {
  html body .band--journey .path-step { grid-template-columns: 1fr !important; }
  html body .band--journey .path-step > * { grid-column: 1 !important; }
  html body .apply-card::before,
  html body .band--journey .path-step::before { aspect-ratio: 16 / 9; }
}

/* ---------- Portada: un solo párrafo bajo el titular (solo en español) ---------- */
html[lang="es"] body .hero__lead--follow { display: none !important; }

/* ---------- 4. Textos nuevos que no tienen elemento propio ---------- */
/* Subtítulo sobre las tres fases (solo en español) */
html[lang="es"] body .apply__phases::before {
  content: "Cómo transformamos los datos en conocimiento";
  grid-column: 1 / -1;
  margin: 0 0 .25rem;
  color: var(--xeno-ink);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
}
/* Etiqueta de fase como "01 · Captación molecular" */
html body .apply-card__meta {
  justify-content: flex-start !important;
  gap: .4rem !important;
}
html body .apply-card__meta span + span::before { content: "· "; }

/* Cabecera algo más ancha para el texto introductorio, que es más largo */
html body .apply__head { max-width: 52rem !important; }
html body .apply__lead { max-width: none !important; }

/* Foto del investigador: en escritorio deja de ser fondo (quedaba tapada por
   el texto y recortada) y se muestra entera a la derecha de la cabecera. */
@media (min-width: 901px) {
  html body .band--apply {
    --media-w: calc((100vw - 2 * var(--xg)) * .6 - .75rem);
  }
  html body .apply__media {
    inset: clamp(3.25rem, 6.5vw, 5.25rem) var(--xg) auto auto !important;
    width: var(--media-w) !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 40px -24px #05162266;
  }
  html body .apply__media img { object-position: center !important; }
  /* Clic en la foto = verla a pantalla completa (los rótulos son pequeños) */
  html body .apply__media { pointer-events: auto !important; cursor: zoom-in; }
  /* El contenedor del texto cubría la foto: los clics pasan a través, salvo en el texto y las tarjetas */
  html body .band--apply > .container.apply { pointer-events: none; }
  html body .apply__head, html body .apply__phases { pointer-events: auto; }
  html body .apply__media::before {
    content: "Ampliar";
    position: absolute; right: .75rem; bottom: .75rem; z-index: 2;
    padding: .3rem .7rem; border-radius: 999px;
    background: rgba(13, 36, 56, .72); color: #fff;
    font-size: .72rem; font-weight: 700; letter-spacing: .06em;
    pointer-events: none;
  }
  html body .apply__media::after { display: none !important; }
  html body .apply__head {
    max-width: calc(100% - var(--media-w) - 1.5rem) !important;
    min-height: calc(var(--media-w) * 9 / 16);
    margin-bottom: clamp(1.75rem, 3vw, 2.5rem) !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* Frase de cierre de la sección (solo en español) */
html[lang="es"] body .band--journey .path::after {
  content: "Xenomium. Más allá de los genes, una visión integrada de la salud.";
  display: block;
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  padding-top: 1.25rem;
  border-top: 1px solid #7f97a64d;
  color: var(--xeno-deep);
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  font-weight: 700;
  font-style: italic;
}
