/* ════════════════════════════════════════════════════════════════
   ALPHA FITNESS — SECCIÓN E-BOOKS
   Estética alineada con el rediseño minimalista de COMBOS:
   superficies planas, bordes hairline, verde #39ff14 solo como acento
   funcional (tag de categoría + boton de descarga).
   ════════════════════════════════════════════════════════════════ */

#ebooksSection {
  display: none;            /* página aislada: se muestra solo via abrirEbooks() */
  background: #050505;
  padding: 26px 24px 90px;
  min-height: 100vh;
  min-height: 100dvh;
}
.ebooks-wrap { max-width: 1200px; margin: 0 auto; }

/* Botón volver: neutro, discreto (igual que combo) */
.ebooks-back {
  display: inline-flex; align-items: center; gap: 8px; background: transparent;
  color: #888; border: 1px solid #1e1e1e; padding: 8px 15px;
  border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 12.5px;
  letter-spacing: 0.3px; font-family: 'Raleway', sans-serif;
  transition: color .2s, border-color .2s; margin-bottom: 24px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ebooks-back:hover { color: #fff; border-color: #3a3a3a; }

/* Encabezado compacto */
.ebooks-head {
  text-align: left; margin-bottom: 28px; padding-bottom: 22px;
  border-bottom: 1px solid #141414;
}
.ebooks-head-text { max-width: 640px; }
.ebooks-kicker {
  color: #6a6a6a; font-weight: 700; font-size: 10px; letter-spacing: 3px;
  text-transform: uppercase; margin-bottom: 8px; font-family: 'Raleway', sans-serif;
}
.ebooks-head h2 {
  font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 600;
  line-height: 1.1; color: #fff; margin: 0 0 8px; letter-spacing: 0.4px;
}
.ebooks-head h2 span { color: #39ff14; font-style: italic; }
.ebooks-head p { color: #7e7e7e; font-size: 13px; margin: 0; line-height: 1.6; }

/* Grilla de e-books */
.ebooks-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}

.ebook-card {
  background: #0a0a0a; border: 1px solid #161616; border-radius: 16px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color .2s, transform .2s;
}
.ebook-card:hover { border-color: #2c2c2c; transform: translateY(-2px); }

/* Tapa: imagen real o ícono sobre fondo plano */
.ebook-card-cover {
  position: relative; height: 150px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #101010, #0b0b0b); overflow: hidden;
}
.ebook-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.ebook-card-icon { font-size: 42px; color: #2e2e2e; }
.ebook-card-tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  color: #cfcfcf; font-size: 10px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; padding: 5px 10px; border-radius: 999px;
  border: 1px solid #222;
}

.ebook-card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ebook-card-title {
  font-family: 'Raleway', sans-serif; color: #eee; font-size: 15px;
  font-weight: 700; margin: 0; line-height: 1.25;
}
.ebook-card-desc { color: #7e7e7e; font-size: 12.5px; line-height: 1.55; margin: 0; flex: 1; }

/* Botón de descarga: verde solo acá (acción principal) */
.ebook-card-btn {
  margin-top: 6px; width: 100%; background: #39ff14; color: #000; border: none;
  padding: 11px; border-radius: 10px; cursor: pointer; font-weight: 800; font-size: 12px;
  letter-spacing: 0.6px; text-transform: uppercase; font-family: 'Raleway', sans-serif;
  display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: opacity .2s, transform .2s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ebook-card-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.ebook-card-btn:active { transform: scale(0.98); }
/* Estado "Próximamente" (sin PDF aún): neutro y deshabilitado */
.ebook-card-btn.is-soon {
  background: #141414; color: #666; cursor: not-allowed;
}
.ebook-card-btn.is-soon:hover { opacity: 1; transform: none; }

/* Empty state */
.ebooks-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: #666; }
.ebooks-empty i { font-size: 30px; margin-bottom: 14px; color: #262626; display: block; }
.ebooks-empty p { font-size: 13.5px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
  #ebooksSection { padding: 20px 16px 70px; }
  .ebooks-back { margin-bottom: 20px; }
  .ebooks-head { margin-bottom: 20px; padding-bottom: 18px; }
  .ebooks-head h2 { font-size: 26px; }
  .ebooks-head p { font-size: 12.5px; }
  .ebooks-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ebook-card-cover { height: 120px; }
  .ebook-card-body { padding: 12px; }
  .ebook-card-title { font-size: 13.5px; }
}
