/* ==================================================================
   Portada de Erudid (front-page.php, page-inicio.php e index.php)
   Lo carga header.php solo cuando la barra es la del inicio.
   Todas las clases empiezan con "eh-" para no chocar con el resto del tema.
   ================================================================== */

body.eh-body {
  --eh-yellow: #FFC83D;
  --eh-yellow-deep: #F2A900;
  --eh-yellow-soft: #FFF4D1;
  --eh-yellow-light: #FFD970;
  --eh-ink: #14284B;
  --eh-text: #2A2838;
  --eh-muted: #77758A;
  --eh-line: #ECEAF3;
  --eh-bg: #FFFCF5;
  --eh-white: #FFFFFF;
  background: var(--eh-bg);
  color: var(--eh-text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

/* Por si Tailwind tarda en cargar: sin subrayados ni márgenes del navegador */
body.eh-body { margin: 0; }
.eh-body a.eh-logo, .eh-header a, .eh-card, .eh-card * { text-decoration: none; }
.eh-wrap h1, .eh-wrap h2, .eh-wrap h3, .eh-wrap p { margin-top: 0; margin-bottom: 0; }
.eh-hero h1 { margin: 20px auto 18px; }
.eh-courses h2 { margin: 6px 0; }
.eh-card p { margin-top: 8px; }
.eh-feature h2 { margin-bottom: 8px; }

.eh-display { font-family: "Bricolage Grotesque", "Plus Jakarta Sans", sans-serif; }
.eh-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Botones ---------- */
.eh-btn {
  height: 44px; padding: 0 20px; border: none; border-radius: 14px;
  background: var(--eh-yellow); color: var(--eh-ink);
  font-size: 14px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .18);
  transition: transform .12s, box-shadow .12s;
}
.eh-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(0, 0, 0, .18); }
.eh-btn:focus-visible { outline: 3px solid var(--eh-white); outline-offset: 2px; }
.eh-btn svg { width: 15px; height: 15px; }
.eh-btn--ink { background: var(--eh-ink); color: var(--eh-white); box-shadow: 4px 4px 0 rgba(20, 40, 75, .25); }

/* ---------- Barra superior ---------- */
.eh-header { background: var(--eh-ink); position: sticky; top: 0; z-index: 50; width: 100%; }
.eh-header .eh-wrap { height: 72px; display: flex; align-items: center; gap: 28px; }
.eh-logo { display: flex; align-items: center; flex-shrink: 0; }
.eh-logo img { display: block; height: 32px; width: auto; }
.eh-logo-fb { display: none; font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--eh-white); }
.eh-logo-fb i { font-style: normal; color: var(--eh-yellow); }
.eh-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.eh-nav a {
  font-size: 14px; font-weight: 600; color: #B3C0D8;
  padding: 8px 14px; border-radius: 12px;
  display: flex; align-items: center; gap: 7px; transition: all .15s;
}
.eh-nav a:hover { color: var(--eh-white); background: rgba(255, 255, 255, .08); }
.eh-nav a:focus-visible { outline: 2px solid var(--eh-yellow); outline-offset: 1px; }
.eh-nav svg { width: 16px; height: 16px; }

/* ---------- Presentación (hero) ---------- */
.eh-hero {
  margin-top: 32px; background: var(--eh-yellow); border-radius: 28px;
  padding: 64px 40px 60px; text-align: center; position: relative; overflow: hidden;
}
.eh-hero > * { position: relative; z-index: 1; }
.eh-hero .eh-blob { position: absolute; border-radius: 50%; z-index: 0; }
.eh-blob--1 { width: 280px; height: 280px; background: var(--eh-yellow-light); right: -70px; top: -110px; }
.eh-blob--2 { width: 180px; height: 180px; background: var(--eh-white); opacity: .35; left: -50px; bottom: -80px; }
.eh-blob--3 { width: 120px; height: 120px; background: var(--eh-yellow-light); left: 18%; top: -70px; }
.eh-hero .eh-star { position: absolute; color: var(--eh-ink); font-size: 20px; line-height: 1; }
.eh-star--a { right: 16%; top: 46px; }
.eh-star--b { left: 12%; bottom: 54px; font-size: 15px !important; }
.eh-tag {
  display: inline-block; background: var(--eh-white); color: var(--eh-ink);
  font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 999px;
}
.eh-hero h1 {
  font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -1.4px;
  color: var(--eh-ink); margin: 20px auto 18px; max-width: 760px;
}
.eh-hero h1 em {
  font-style: normal; background: var(--eh-ink); color: var(--eh-yellow);
  padding: 0 12px; border-radius: 12px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.eh-hero p { font-size: 16px; line-height: 1.65; color: #4A4430; max-width: 600px; margin: 0 auto; }

/* ---------- Cómo aprendes ---------- */
.eh-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; scroll-margin-top: 96px; }
.eh-feature {
  background: var(--eh-white); border: 2px solid var(--eh-line); border-radius: 24px; padding: 26px;
  transition: transform .15s, border-color .15s;
}
.eh-feature:hover { transform: translateY(-3px); border-color: var(--eh-yellow-deep); }
.eh-feature__ico {
  width: 46px; height: 46px; border-radius: 14px; background: var(--eh-yellow-soft); color: var(--eh-ink);
  display: grid; place-items: center; margin-bottom: 18px;
}
.eh-feature__ico svg { width: 20px; height: 20px; }
.eh-feature h2 { font-size: 16px; font-weight: 800; color: var(--eh-ink); margin-bottom: 8px; }
.eh-feature p { font-size: 14px; line-height: 1.6; color: var(--eh-muted); }

/* ---------- Cursos ---------- */
.eh-courses { padding: 64px 0 80px; scroll-margin-top: 72px; }
.eh-eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--eh-yellow-deep); }
.eh-courses h2 { font-size: 34px; font-weight: 800; letter-spacing: -.8px; color: var(--eh-ink); margin: 6px 0; line-height: 1.15; }
.eh-courses__lead { font-size: 15px; color: var(--eh-muted); }
.eh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }

.eh-card {
  background: var(--eh-white); border: 2px solid var(--eh-line); border-radius: 24px; overflow: hidden;
  display: flex; flex-direction: column; color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.eh-card:hover, .eh-card:focus-visible { transform: translateY(-3px); border-color: var(--eh-ink); box-shadow: 6px 6px 0 var(--eh-ink); outline: none; }
.eh-card__media {
  position: relative; margin: 10px 10px 0; border-radius: 18px; height: 170px; overflow: hidden;
  background: linear-gradient(135deg, var(--eh-ink) 0%, #1f3a6b 100%);
}
.eh-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.eh-card:hover .eh-card__media img { transform: scale(1.04); }
.eh-card__bars { position: absolute; right: 20px; bottom: 0; display: flex; align-items: flex-end; gap: 6px; opacity: .35; }
.eh-card__bars span { width: 14px; border-radius: 4px 4px 0 0; background: var(--eh-yellow); }
.eh-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 1; }
.eh-badge {
  background: var(--eh-yellow); color: var(--eh-ink); font-size: 11px; font-weight: 800;
  letter-spacing: .6px; text-transform: uppercase; padding: 5px 10px; border-radius: 8px;
}
.eh-badge--soft { background: var(--eh-white); }
.eh-card__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.eh-card h3 {
  font-size: 17px; font-weight: 800; line-height: 1.3; color: var(--eh-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.eh-card p {
  font-size: 13px; line-height: 1.55; color: var(--eh-muted); margin-top: 8px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.eh-card__meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--eh-muted); }
.eh-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.eh-card__meta svg { width: 15px; height: 15px; color: var(--eh-yellow-deep); }
.eh-card__foot {
  margin-top: auto; padding-top: 16px; border-top: 2px solid var(--eh-line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.eh-card__price { font-size: 17px; font-weight: 800; color: var(--eh-ink); }
.eh-card__spacer { height: 18px; flex-shrink: 0; }
.eh-card:hover .eh-btn { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(20, 40, 75, .25); }

.eh-empty {
  margin-top: 26px; border: 2px dashed var(--eh-line); border-radius: 24px; background: var(--eh-white);
  padding: 40px 24px; text-align: center;
}
.eh-empty strong { display: block; font-size: 16px; color: var(--eh-ink); }
.eh-empty span { display: block; margin-top: 4px; font-size: 14px; color: var(--eh-muted); }

/* ---------- Pie ---------- */
body.eh-body footer { border-top-color: var(--eh-line); }
body.eh-body footer a:hover { color: var(--eh-ink); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .eh-features, .eh-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .eh-wrap { padding: 0 16px; }
  .eh-header .eh-wrap { gap: 12px; }
  .eh-nav a.eh-hide-sm { display: none; }
  .eh-nav a span { display: none; }
  .eh-logo img { height: 28px; }
  .eh-hero { padding: 44px 22px 40px; margin-top: 20px; }
  .eh-hero h1 { font-size: 34px; letter-spacing: -.8px; }
  .eh-features, .eh-grid { grid-template-columns: 1fr; }
  .eh-courses h2 { font-size: 28px; }
  .eh-star--a { right: 8%; }
}
