/* ==========================================================================
   toniferra.com — página de formación (formacion.html)
   Requiere css/styles.css (tokens y bloques base) cargado antes.
   ========================================================================== */

:root {
  --color-dark-soft: #1e293b;   /* slate-800: tarjetas sobre fondo oscuro */
  --color-indigo-soft: #818cf8; /* indigo-400: eyebrows sobre fondo oscuro (5.7:1) */
}

/* Anula el alto fijo (100%) del layout de portada: esta página scrollea normal
   y la cabecera sticky necesita que el body crezca con el contenido */
html:has(.page-formacion) { height: auto; }
.page-formacion { overflow: auto; height: auto; }

@keyframes tfFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes tfBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -24px) scale(1.12); }
}

/* ---------- Cabecera fija ---------- */
.page-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  background: rgba(15, 23, 42, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.page-nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
}
.page-nav__links { display: flex; align-items: center; gap: 1.75rem; }
.page-nav__link {
  text-decoration: none;
  color: #cbd5e1;
  font-size: .9rem;
  font-weight: 500;
  transition: color .2s ease;
}
.page-nav__link:hover { color: #fff; }
.page-nav__cta {
  text-decoration: none;
  padding: .5rem 1.1rem;
  border-radius: 10px;
  background: var(--color-brand-strong);
  color: #fff;
  font-size: .88rem;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.page-nav__cta:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99, 102, 241, .45); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--color-dark);
  color: #fff;
  padding: 6rem 2rem 7rem;
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.hero__blob--1 {
  width: 420px; height: 420px;
  opacity: .35;
  background: radial-gradient(circle, var(--color-brand), transparent 70%);
  top: -120px; left: -80px;
  animation: tfBlob 9s ease-in-out infinite;
}
.hero__blob--2 {
  width: 360px; height: 360px;
  opacity: .3;
  background: radial-gradient(circle, var(--color-accent), transparent 70%);
  bottom: -140px; right: -60px;
  animation: tfBlob 11s ease-in-out infinite reverse;
}
.hero__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
  animation: tfFadeUp .8s ease-out;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: 1.5rem;
  padding: .4rem .9rem;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .5);
  background: rgba(99, 102, 241, .14);
  color: #c7d2fe;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
.hero__subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--color-text-soft);
  max-width: 640px;
  margin: 0 auto 2.25rem;
  text-wrap: pretty;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero__btn {
  padding: .95rem 1.8rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}
.hero__btn--primary {
  background: var(--color-brand-strong);
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(99, 102, 241, .5); }
.hero__btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  transition: background .2s ease, border-color .2s ease;
}
.hero__btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.hero__notes {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  justify-content: center;
  margin-top: 2.75rem;
  color: var(--color-text-soft);
  font-size: .85rem;
  font-weight: 500;
}
.hero__note { display: flex; align-items: center; gap: .45rem; }

/* ---------- Cabecera de sección ---------- */
.section-head { text-align: center; margin-bottom: 3rem; }
.section-head__eyebrow {
  color: var(--color-indigo-soft);
  font-weight: 600;
  font-size: .85rem;
  letter-spacing: .08em;
}
.section-head__title {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 700;
  margin: .5rem 0 .75rem;
}
.section-head__lead {
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  color: var(--color-text-muted);
}

/* ---------- Para quién (fondo claro) ---------- */
.audience { padding: 5rem 2rem; background: var(--color-surface); }
.audience__grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.audience-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.75rem;
  transition: transform .25s ease, box-shadow .25s ease;
}
.audience-card:hover { transform: translateY(-4px); box-shadow: 0 14px 40px rgba(15, 23, 42, .08); }
.audience-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(99, 102, 241, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.audience-card__title { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.audience-card__text { color: var(--color-text-muted); font-size: .95rem; line-height: 1.6; }

/* ---------- Programas (fondo oscuro) ---------- */
.programs { padding: 5rem 2rem; background: var(--color-dark); color: #fff; }
.programs__grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.programs .section-head__lead { color: var(--color-text-soft); }
.program-card {
  background: var(--color-dark-soft);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  padding: 1.9rem;
  transition: border-color .25s ease, transform .25s ease;
}
.program-card:hover { border-color: var(--color-brand); transform: translateY(-4px); }
.program-card__tag {
  display: inline-flex;
  padding: .35rem .7rem;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.program-card__tag--curso { background: rgba(99, 102, 241, .15); color: #c7d2fe; }
.program-card__tag--taller { background: rgba(59, 130, 246, .15); color: #93c5fd; }
.program-card__tag--mentoring { background: rgba(16, 185, 129, .15); color: #6ee7b7; }
.program-card__title { font-size: 1.3rem; font-weight: 600; margin-bottom: .6rem; }
.program-card__text { color: var(--color-text-soft); font-size: .95rem; line-height: 1.6; margin-bottom: 1.25rem; }
.program-card__list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.program-card__item {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  color: #cbd5e1;
  font-size: .9rem;
}
.program-card__item .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; stroke: var(--color-indigo-soft); stroke-width: 2.5; }

/* ---------- Qué te llevas ---------- */
.takeaways { padding: 5rem 2rem; background: var(--color-surface); }
.takeaways__grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.takeaway {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: 1.25rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--color-border);
}
.takeaway__num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(99, 102, 241, .1);
  color: var(--color-brand-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
}
.takeaway__title { font-size: 1.02rem; font-weight: 600; margin-bottom: .25rem; }
.takeaway__text { color: var(--color-text-muted); font-size: .9rem; line-height: 1.55; }

/* ---------- Metodología ---------- */
.method {
  padding: 5rem 2rem;
  background: #fff;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.method__grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.method-step { text-align: center; }
.method-step__num {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  border: 2px solid var(--color-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-brand-strong);
  font-weight: 700;
  font-size: 1.2rem;
}
.method-step__title { font-size: 1.1rem; font-weight: 600; margin-bottom: .5rem; }
.method-step__text { color: var(--color-text-muted); font-size: .93rem; line-height: 1.6; }

/* ---------- Sobre Toni ---------- */
.about { padding: 5rem 2rem; background: var(--color-dark); color: #fff; }
.about__inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
}
.about__photo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fef9e7, #fef3c7);
  padding: 5px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.about__body { flex: 1; min-width: 280px; }
.about__eyebrow { color: var(--color-indigo-soft); font-weight: 600; font-size: .85rem; letter-spacing: .08em; }
.about__title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; margin: .5rem 0 1rem; }
.about__text { color: var(--color-text-soft); font-size: 1.02rem; line-height: 1.7; margin-bottom: 1rem; }
.about__text:last-child { margin-bottom: 0; }

/* ---------- FAQ ---------- */
.faq { padding: 5rem 2rem; background: var(--color-surface); }
.faq__list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.faq__item {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}
.faq__q {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after { content: "+"; color: var(--color-brand-strong); font-weight: 400; }
.faq__item[open] .faq__q::after { content: "−"; }
.faq__a { color: var(--color-text-muted); font-size: .95rem; line-height: 1.65; margin-top: .85rem; }

/* ---------- CTA final ---------- */
.cta-final {
  padding: 5rem 2rem;
  /* brand-a11y en el extremo claro: mantiene AA con texto blanco */
  background: linear-gradient(135deg, var(--color-brand-strong), var(--color-brand-a11y));
  color: #fff;
  text-align: center;
}
.cta-final__inner { max-width: 680px; margin: 0 auto; }
.cta-final__title {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 1rem;
  text-wrap: balance;
}
.cta-final__text { font-size: 1.15rem; line-height: 1.6; color: rgba(255, 255, 255, .92); margin-bottom: 2.25rem; }
.cta-final__actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.cta-final .btn { font-size: 1.05rem; padding: 1rem 1.8rem; }
.btn--light { background: #fff; color: var(--color-text); }
.btn--light:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }

/* ---------- Footer de página interior (oscuro) ---------- */
.page-footer {
  background: var(--color-dark);
  color: var(--color-text-soft);
  padding: 2.5rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.page-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.25rem;
}
.page-footer__link {
  color: #cbd5e1;
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s ease;
}
.page-footer__link:hover { color: #fff; }
.page-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}
.page-footer__legal .page-footer__link { font-size: .8rem; color: var(--color-text-soft); }
.page-footer__legal .page-footer__link:hover { color: #fff; }
.page-footer__copy { font-size: .82rem; color: var(--color-text-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .page-nav { padding: .85rem 1.25rem; }
  .page-nav__link { display: none; } /* en móvil queda marca + CTA */
  .hero { padding: 4rem 1.5rem 5rem; }
  .audience, .programs, .takeaways, .method, .about, .faq, .cta-final { padding-left: 1.5rem; padding-right: 1.5rem; }
}
