/*
 * Yalowi — portada
 * Secciones propias de la home (prefijo .yh-). Paleta tomada de las páginas de perfil
 * para que toda la web se vea como una sola marca.
 */

:root {
  --yh-green-900: #123f36;
  --yh-green-700: #2d574d;
  --yh-green-500: #316659;
  --yh-cream: #fff8ea;
  --yh-mint: #eaf6f1;
  --yh-accent: #f1c50e;
  --yh-accent-light: #ffd35b;
  --yh-ink: #1a1a1a;
  --yh-muted: #4a5a55;
  --yh-line: #dfe7e3;
  --yh-radius: 16px;
  --yh-shadow: 0 1px 2px rgba(18, 63, 54, 0.06), 0 8px 24px -12px rgba(18, 63, 54, 0.25);
  --yh-font-head: 'Roboto', 'Open Sans', system-ui, sans-serif;
  --yh-font-body: 'Open Sans', system-ui, sans-serif;
}

/* ---------- Base ---------- */
.yh-section {
  padding: 96px 0;
  font-family: var(--yh-font-body);
  color: var(--yh-ink);
  background: #fff;
}

.yh-section--cream { background: var(--yh-cream); }
.yh-section--mint { background: var(--yh-mint); }
.yh-section--green { background: var(--yh-green-900); color: #fff; }

.yh-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.yh-head {
  max-width: 720px;
  margin: 0 0 48px;
}

.yh-head--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.yh-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-family: var(--yh-font-head);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--yh-green-500);
}

.yh-section--green .yh-eyebrow { color: var(--yh-accent); }

.yh-title {
  margin: 0;
  font-family: var(--yh-font-head);
  font-size: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--yh-green-900);
}

.yh-section--green .yh-title { color: #fff; }

.yh-lead {
  margin: 16px 0 0;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--yh-muted);
}

.yh-section--green .yh-lead { color: rgba(255, 255, 255, 0.82); }

/* ---------- Botones ---------- */
.yh-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.yh-actions--center { justify-content: center; }

.yh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--yh-font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.25s ease, color 0.25s ease, translate 0.25s ease, box-shadow 0.25s ease;
}

.yh-btn--primary { background: var(--yh-accent); color: var(--yh-ink); }
.yh-btn--outline { box-shadow: inset 0 0 0 2px currentColor; color: var(--yh-green-900); }
.yh-section--green .yh-btn--outline { color: #fff; }

@media (hover: hover) {
  .yh-btn:hover { translate: 0 -2px; }
  .yh-btn--primary:hover { background: var(--yh-accent-light); color: var(--yh-ink); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.45); }
  .yh-btn--outline:hover { background: var(--yh-green-900); color: #fff; box-shadow: none; }
  .yh-section--green .yh-btn--outline:hover { background: #fff; color: var(--yh-green-900); }
}

.yh-link {
  font-weight: 700;
  color: var(--yh-green-700);
  text-decoration: none;
  border-bottom: 2px solid var(--yh-accent);
  padding-bottom: 2px;
}

.yh-link:hover { color: var(--yh-green-900); }

/* ---------- Franja de confianza ---------- */
.yh-trust {
  background: var(--yh-green-900);
  color: #fff;
  font-family: var(--yh-font-body);
}

.yh-trust-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 28px 0;
  list-style: none;
}

.yh-trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
  line-height: 1.4;
}

.yh-trust-item strong { display: block; font-family: var(--yh-font-head); font-size: 1.0625rem; }
.yh-trust-item span { color: rgba(255, 255, 255, 0.75); font-size: 0.9375rem; }

.yh-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(241, 197, 14, 0.15);
  color: var(--yh-accent);
}

.yh-icon svg { width: 22px; height: 22px; }

/* ---------- Perfiles ---------- */
.yh-profiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 20px;
}

.yh-profile {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--yh-radius);
  background: #fff;
  box-shadow: var(--yh-shadow);
  color: var(--yh-ink);
  text-decoration: none;
  transition: translate 0.3s ease, box-shadow 0.3s ease;
}

.yh-profile-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--yh-mint);
}

.yh-profile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.6s ease;
}

.yh-profile-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  padding: 18px 20px 20px;
}

.yh-profile-name {
  margin: 0;
  font-family: var(--yh-font-head);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--yh-green-900);
}

.yh-profile-tag {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--yh-muted);
}

.yh-profile-more {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--yh-font-head);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--yh-green-500);
}

.yh-profile-more::after { content: ' →'; transition: margin 0.25s ease; }

/* Destacado (Healthspan): ocupa dos columnas con la imagen de fondo */
.yh-profile--featured { grid-column: span 2; }
.yh-profile--featured .yh-profile-media { position: absolute; inset: 0; aspect-ratio: auto; }
.yh-profile--featured .yh-profile-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 63, 54, 0) 30%, rgba(18, 63, 54, 0.92) 100%);
}
.yh-profile--featured .yh-profile-body { position: relative; justify-content: flex-end; min-height: 320px; padding: 28px; }
.yh-profile--featured .yh-profile-name { color: #fff; font-size: 1.5rem; }
.yh-profile--featured .yh-profile-tag { color: rgba(255, 255, 255, 0.88); font-size: 1rem; }
.yh-profile--featured .yh-profile-more { margin-top: 8px; color: var(--yh-accent); }

/* Tarjeta "no encajas en ningún perfil" */
.yh-profile--custom {
  grid-column: span 2;
  justify-content: center;
  background: var(--yh-green-900);
  color: #fff;
}
.yh-profile--custom .yh-profile-body { justify-content: center; padding: 32px; }
.yh-profile--custom .yh-profile-name { color: #fff; font-size: 1.5rem; }
.yh-profile--custom .yh-profile-tag { color: rgba(255, 255, 255, 0.82); font-size: 1rem; }
.yh-profile--custom .yh-profile-more { margin-top: 12px; color: var(--yh-accent); }

@media (hover: hover) {
  .yh-profile:hover { translate: 0 -6px; box-shadow: 0 20px 40px -20px rgba(18, 63, 54, 0.45); }
  .yh-profile:hover .yh-profile-media img { scale: 1.05; }
  .yh-profile:hover .yh-profile-more::after { margin-left: 4px; }
}

.yh-profile:focus-visible { outline: 3px solid var(--yh-accent); outline-offset: 3px; }

/* ---------- Cómo trabajamos ---------- */
.yh-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.yh-step {
  padding: 32px 28px;
  border-radius: var(--yh-radius);
  background: #fff;
  box-shadow: var(--yh-shadow);
  border-bottom: 3px solid var(--yh-green-500);
}

.yh-step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--yh-green-900);
  color: #fff;
  font-family: var(--yh-font-head);
  font-weight: 700;
}

.yh-step h3 {
  margin: 0 0 10px;
  font-family: var(--yh-font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--yh-green-900);
}

.yh-step p { margin: 0; line-height: 1.6; color: var(--yh-muted); }

/* ---------- Por qué Yalowi ---------- */
.yh-why {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.yh-why-card { margin: 0; }

.yh-why-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--yh-radius);
  margin-bottom: 18px;
}

.yh-why-card h3 {
  margin: 0 0 8px;
  font-family: var(--yh-font-head);
  font-size: 1.1875rem;
  font-weight: 700;
  color: #fff;
}

.yh-why-card p { margin: 0; line-height: 1.6; color: rgba(255, 255, 255, 0.78); font-size: 0.9375rem; }
.yh-why-card .yh-link { display: inline-block; margin-top: 12px; color: var(--yh-accent); border-color: transparent; padding: 0; }

/* ---------- Cita ---------- */
.yh-quote {
  position: relative;
  padding: 120px 0;
  background-color: var(--yh-green-900);
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  isolation: isolate;
}

.yh-quote::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(18, 63, 54, 0.78), rgba(18, 63, 54, 0.88));
}

.yh-quote blockquote {
  max-width: 820px;
  margin: 0 auto;
  font-family: var(--yh-font-head);
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.25rem);
  font-weight: 500;
  line-height: 1.35;
}

.yh-quote blockquote::before {
  content: '“';
  display: block;
  font-size: 4rem;
  line-height: 0.6;
  color: var(--yh-accent);
  margin-bottom: 16px;
}

/* ---------- Preguntas frecuentes ---------- */
.yh-faq { max-width: 820px; margin: 0 auto; }

.yh-faq details { border-bottom: 1px solid var(--yh-line); }

.yh-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 4px;
  font-family: var(--yh-font-head);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--yh-green-900);
  cursor: pointer;
  list-style: none;
}

.yh-faq summary::-webkit-details-marker { display: none; }

.yh-faq summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: 45deg;
  translate: 0 -3px;
  transition: rotate 0.25s ease, translate 0.25s ease;
}

.yh-faq details[open] summary::after { rotate: 225deg; translate: 0 3px; }
.yh-faq summary:focus-visible { outline: 3px solid var(--yh-accent); outline-offset: 2px; border-radius: 6px; }
.yh-faq details p { margin: 0 4px 22px; line-height: 1.7; color: var(--yh-muted); }

/* ---------- CTA final ---------- */
.yh-cta {
  padding: 96px 0;
  background: var(--yh-cream);
  font-family: var(--yh-font-body);
}

.yh-cta-box {
  padding: 64px 32px;
  border-radius: 24px;
  background: var(--yh-green-900);
  text-align: center;
  color: #fff;
}

.yh-cta-box .yh-title { color: #fff; }
.yh-cta-box .yh-lead { color: rgba(255, 255, 255, 0.82); max-width: 620px; margin-left: auto; margin-right: auto; }
.yh-cta-box .yh-btn--outline { color: #fff; }

@media (hover: hover) {
  .yh-cta-box .yh-btn--outline:hover { background: #fff; color: var(--yh-green-900); }
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .yh-section, .yh-cta { padding: 72px 0; }
  .yh-profiles { grid-template-columns: repeat(2, 1fr); }
  .yh-why { grid-template-columns: repeat(2, 1fr); }
  .yh-steps { grid-template-columns: 1fr; max-width: 560px; }
  .yh-trust-list { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
  .yh-quote { padding: 88px 0; }
}

@media (max-width: 575px) {
  .yh-container { padding: 0 16px; }
  .yh-section, .yh-cta { padding: 56px 0; }
  .yh-head { margin-bottom: 32px; }
  .yh-profiles { gap: 14px; }
  .yh-profile-body { padding: 14px 14px 16px; }
  .yh-profile-name { font-size: 1rem; }
  .yh-profile-tag { font-size: 0.875rem; }
  .yh-profile--featured .yh-profile-body { min-height: 260px; padding: 22px; }
  .yh-why { grid-template-columns: 1fr; }
  .yh-cta-box { padding: 48px 20px; border-radius: 18px; }
  .yh-actions .yh-btn { flex: 1 1 100%; }
}

/* ---------- Blindaje frente a nicepage.css ----------
   nicepage.css aplica reglas globales más específicas que una clase
   (p. ej. `h2:not(.u-subtitle)` con peso 400 y 3rem, o estilos de blockquote).
   Con el prefijo `body` recuperamos el control sin usar !important. */
body .yh-trust { display: flow-root; }
body .yh-trust-list, body .yh-steps { margin: 0; }
body .yh-trust-item p { margin: 0; }

body h2.yh-title {
  margin: 0;
  font-size: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
}

body .yh-profile-name,
body .yh-step h3,
body .yh-why-card h3 {
  font-weight: 700;
  line-height: 1.25;
}

body .yh-profile-name { margin: 0; }
body .yh-step h3 { margin: 0 0 10px; }
body .yh-why-card h3 { margin: 0 0 8px; }
body .yh-head p { margin-top: 0; }
body .yh-head .yh-lead { margin-top: 16px; }

body .yh-why-card img { height: auto; }

body .yh-quote blockquote {
  padding: 0;
  border: 0;
  font-style: normal;
}

/* ---------- Hero: contraste del texto sobre la foto ---------- */
/* Degradado verde muy oscuro detrás del texto (izquierda) que se desvanece hacia la persona (derecha).
   ::after va por encima del fondo con zoom (.yd-hero-bg) y por debajo del contenido. */
body > section.u-section-1 {
  position: relative;
  isolation: isolate;
}
body > section.u-section-1::after {
  content: '';
  display: block; /* .u-clearfix de Nicepage usa este ::after con display: table (quedaría a 0×0) */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 28, 23, 0.78) 0%, rgba(8, 28, 23, 0.62) 32%, rgba(8, 28, 23, 0.22) 58%, rgba(8, 28, 23, 0) 74%),
    linear-gradient(0deg, rgba(8, 28, 23, 0.35) 0%, rgba(8, 28, 23, 0) 40%);
}
body > section.u-section-1 h1,
body > section.u-section-1 .u-text-2 {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Móvil: el texto ocupa todo el ancho, así que el velo cubre la foto entera */
@media (max-width: 767px) {
  body > section.u-section-1::after {
    background: linear-gradient(180deg, rgba(8, 28, 23, 0.55) 0%, rgba(8, 28, 23, 0.68) 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .yh-profile, .yh-profile-media img, .yh-btn, .yh-faq summary::after { transition: none !important; }
  .yh-profile:hover, .yh-btn:hover { translate: none !important; }
  .yh-profile:hover .yh-profile-media img { scale: none !important; }
}
