/* =====================================================================
   NEXOYOGA — Componentes reutilizables
   Botones · héroe · tarjetas · etiquetas · avisos · formularios · migas
   ===================================================================== */

/* --- Botones ------------------------------------------------------------ */
.btn {
  --btn-bg: var(--color-primary);
  --btn-fg: var(--color-on-primary);
  --btn-bd: var(--btn-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;                 /* objetivo táctil cómodo */
  padding: var(--space-3) var(--space-5);
  border: 2px solid var(--btn-bd);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: var(--fw-bold);
  font-size: var(--fs-base);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover {
  --btn-bg: var(--color-primary-hover);
  color: var(--btn-fg);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }

.btn--secondary { --btn-bg: var(--turq-strong); }
.btn--secondary:hover { --btn-bg: var(--turq-800); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--turq-strong);
  --btn-bd: currentColor;
}
.btn--outline:hover { --btn-bg: var(--turq-50); --btn-fg: var(--turq-800); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--turq-900); }
.btn--light:hover { --btn-bg: var(--turq-50); --btn-fg: var(--turq-900); }

.btn--sm { min-height: 38px; padding: var(--space-2) var(--space-4); font-size: var(--fs-sm); }
.btn--lg { min-height: 56px; padding: var(--space-4) var(--space-6); font-size: var(--fs-lg); }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* --- Héroe ---------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2rem + 6vw, 7rem);
  background:
    radial-gradient(60rem 30rem at 85% -10%, var(--turq-50), transparent 60%),
    radial-gradient(40rem 26rem at -10% 110%, var(--coral-50), transparent 60%),
    var(--surface);
}
/* La neurona como elemento gráfico autónomo (uso permitido por el manual) */
.hero::after {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -6rem;
  width: clamp(14rem, 30vw, 26rem);
  aspect-ratio: 1;
  background: url("/assets/brand/neurona.svg") center / contain no-repeat;
  opacity: .12;
  pointer-events: none;
}
.hero h1 { font-size: var(--fs-display); max-width: 20ch; }
.hero .lead { max-width: 58ch; margin-bottom: var(--space-6); }
.hero > * { position: relative; z-index: 1; }

/* --- Tarjetas ------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card:has(.card__link:hover) { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-3); }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
}
.card__title { margin: 0; font-size: var(--fs-h4); }
.card__text { margin: 0; color: var(--color-muted); font-size: var(--fs-sm); }
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-3);
}

/* Toda la tarjeta clicable con un solo enlace accesible */
.card__link { color: inherit; text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 3px solid var(--color-focus); outline-offset: 3px; }

.price {
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: var(--fw-black);
}
.price small { color: var(--color-muted); font-weight: var(--fw-regular); }

/* Ficha de profesor */
.teacher-card { text-align: center; }
.teacher-card .card__body { align-items: center; }
.avatar {
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--turq-500);
}

/* --- Etiquetas -------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  width: fit-content;
  padding: 2px var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--turq-50);
  color: var(--turq-800);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: .02em;
}
.badge--coral { background: var(--coral-50); color: var(--coral-strong); }
.badge--verified::before {
  content: "";
  width: .9em;
  aspect-ratio: 1;
  background: url("/assets/brand/neurona.svg") center / contain no-repeat;
}

/* --- Avisos ----------------------------------------------------------------- */
.callout {
  padding: var(--space-5);
  border-left: 4px solid var(--turq-500);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--turq-50);
}
.callout--coral { border-color: var(--coral-500); background: var(--coral-50); }
.callout > :last-child { margin-bottom: 0; }

/* --- Formularios -------------------------------------------------------------- */
.field { display: grid; gap: var(--space-2); margin-bottom: var(--space-4); }
.field label { color: var(--ink); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.field .hint { color: var(--color-muted); font-size: var(--fs-xs); }

.input, .select, .textarea {
  width: 100%;
  min-height: 48px;
  padding: var(--space-3) var(--space-4);
  border: 1.5px solid #CFC7BE;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.textarea { min-height: 140px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--turq-strong);
  box-shadow: 0 0 0 4px rgb(0 179 190 / .2);
}
.input[aria-invalid="true"] { border-color: var(--coral-strong); }

.check { display: flex; gap: var(--space-3); align-items: flex-start; font-size: var(--fs-sm); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--turq-strong); }

/* Captación de leads (muestra gratuita a cambio del email) */
.lead-box {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr minmax(280px, 380px);
  align-items: center;
  padding: clamp(1.5rem, 1rem + 2vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--turq-900);
  color: #E3F3F4;
}
.lead-box h2, .lead-box h3 { color: #fff; }
.lead-box .field label { color: #fff; }
@media (max-width: 760px) { .lead-box { grid-template-columns: 1fr; } }

/* --- Migas de pan -------------------------------------------------------------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  color: var(--color-muted);
  font-size: var(--fs-sm);
}
.breadcrumbs li + li::before { content: "/"; margin-right: var(--space-2); color: var(--line); }
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--turq-strong); text-decoration: underline; }

/* --- Héroe compacto (cabecera de índices) ------------------------------------ */
.hero--compact { padding-block: var(--space-7) var(--space-6); }
.hero--compact h1 { font-size: var(--fs-h1); max-width: none; }
.hero--compact .lead { margin-bottom: 0; }

/* --- Filtros tipo "chip" --------------------------------------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 38px;
  padding: var(--space-1) var(--space-4);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}
.chip span { color: var(--color-muted); font-weight: var(--fw-regular); }
.chip:hover { border-color: var(--turq-500); color: var(--turq-800); }
.chip[aria-current="page"] { border-color: var(--turq-strong); background: var(--turq-strong); color: #fff; }
.chip[aria-current="page"] span { color: var(--turq-100); }

.card__more { color: var(--coral-strong); font-size: var(--fs-sm); font-weight: var(--fw-bold); }

/* --- Paginación ------------------------------------------------------------------ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-7);
  color: var(--color-muted);
  font-size: var(--fs-sm);
}

/* --- Ventajas ------------------------------------------------------------------ */
.feature {
  padding: var(--space-5);
  border-top: 3px solid var(--coral-500);
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface-2);
}
.feature h3 { font-size: var(--fs-h4); }
.feature p { margin: 0; color: var(--color-muted); }

/* --- Pasos numerados (itinerario de formación) ------------------------------------ */
.steps {
  display: grid;
  gap: var(--space-4);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  counter-reset: none;
}
.steps__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-4);
  align-items: start;
  padding: var(--space-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.steps__num {
  display: grid;
  place-items: center;
  width: 44px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--turq-strong);
  color: #fff;
  font-weight: var(--fw-black);
}
.steps__item h3 { margin-bottom: var(--space-2); font-size: var(--fs-h4); }
.steps__item h3 .badge { vertical-align: middle; margin-left: var(--space-2); }
.steps__item p { margin: 0; color: var(--color-muted); }

/* --- Testimonios ------------------------------------------------------------------ */
.quote {
  margin: 0;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.quote blockquote {
  margin: 0 0 var(--space-4);
  color: var(--ink);
  font-size: var(--fs-lg);
  line-height: 1.5;
}
.quote blockquote::before { content: "“"; display: block; color: var(--coral-500); font-size: 3rem; line-height: .6; }
.quote figcaption { color: var(--color-muted); font-size: var(--fs-sm); }
