/* LabAncestral · manuales.css
   Estilos exclusivos de la página Manuales. */

.mn-page {
  width: 100%;
  min-width: 0;
  overflow-x: hidden;
  background: #f6efe1;
  color: #152514;
  font-family: 'IBM Plex Sans', sans-serif;
}

.mn-page *,
.mn-page *::before,
.mn-page *::after {
  min-width: 0;
}

.mn-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

/* ── HERO ───────────────────────────────────────── */

.mn-hero {
  position: relative;
  padding: 70px 44px 58px;
  overflow: hidden;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.mn-breadcrumb {
  margin-bottom: 24px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .16em;
  overflow-wrap: normal;
}

.mn-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.mn-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 48px;
}

.mn-hero-copy {
  animation: mn-rise .7s ease both;
}

.mn-eyebrow {
  display: inline-block;
  padding: 6px 13px;
  margin-bottom: 20px;
  background: #ee9a1c;
  border-radius: 999px;
  color: #0e3d22;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.mn-hero h1 {
  max-width: 100%;
  margin: 0 0 22px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-size: 56px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.04;
  overflow-wrap: normal;
  word-break: normal;
}

.mn-hero h1 em {
  color: #18713a;
  font-style: italic;
  font-weight: 500;
}

.mn-hero-copy > p {
  max-width: 560px;
  margin: 0;
  color: #54503f;
  font-size: 17px;
  line-height: 1.66;
}

/* ── SECCIONES ──────────────────────────────────── */

.mn-section {
  width: 100%;
  padding: 78px 44px;
}

/* El lector manda: esta sección usa casi todo el ancho y alto de la ventana. */
.mn-list {
  padding: 44px 22px 56px;
  background: #f6efe1;
}

.mn-list .mn-container {
  max-width: 1680px;
}

.mn-list h2 {
  margin-bottom: 22px;
}

.mn-kicker {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.mn-kicker > span {
  display: block;
  width: 28px;
  height: 1px;
  flex: 0 0 28px;
  background: #c2b48f;
}

.mn-kicker--orange {
  color: #ee9a1c;
}

.mn-kicker--orange > span {
  background: #ee9a1c;
}

.mn-section h2,
.mn-cta h2 {
  max-width: 620px;
  margin: 0 0 40px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-size: 38px;
  font-weight: 300;
  line-height: 1.1;
}

/* ── LECTOR DE PDF (efecto libro) ───────────────── */

.mn-reader {
  position: relative;
  display: flex;
  flex-direction: column;
  height: clamp(560px, 90vh, 1180px);
  overflow: hidden;
  background: #f6efe1;
  border: 1px solid #e4d9c2;
  border-radius: 18px;
  box-shadow: 0 26px 48px -30px rgba(14, 61, 34, .45);
  color: #152514;
}

.mn-reader:focus-visible {
  outline: 2px solid #18713a;
  outline-offset: 3px;
}

.mn-reader__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  flex: none;
  padding: 11px 16px;
  background: #f6efe1;
  border-bottom: 1px solid #e4d9c2;
}

.mn-reader__pick {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 220px;
}

.mn-reader__pick-label {
  flex: none;
  color: #9a8f74;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mn-reader__pick select {
  min-width: 0;
  max-width: 320px;
  flex: 1;
  height: 36px;
  padding: 0 38px 0 14px;
  background-color: #fff;
  /* Flecha propia: la nativa cambia de forma en cada navegador. */
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2318713a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  border: 1px solid #e4d9c2;
  border-radius: 9px;
  color: #152514;
  font-family: 'Spectral', serif;
  font-size: 15.5px;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.mn-reader__pick select:hover {
  border-color: #18713a;
}

.mn-reader__pick select:focus-visible {
  outline: 2px solid #18713a;
  outline-offset: 1px;
}

/* Disposición de páginas: grupo segmentado, sólo uno activo. */
.mn-reader__modes {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 3px;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-radius: 9px;
}

.mn-reader__mode {
  height: 28px;
  flex: none;
  padding: 0 11px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #3d5240;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}

.mn-reader__mode:hover:not(.is-on) {
  background: #f6efe1;
}

.mn-reader__mode.is-on {
  background: #18713a;
  color: #f6efe1;
}

/* Cada trío de controles (paginado, zoom, giro) se mantiene unido al envolver. */
.mn-reader__group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.mn-reader__btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  background: #fff;
  border: 1px solid #e4d9c2;
  border-radius: 8px;
  color: #152514;
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.mn-reader__btn:hover:not(:disabled) {
  background: #f6efe1;
  border-color: #18713a;
}

.mn-reader__btn--sm {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.mn-reader__btn:disabled {
  opacity: .45;
  cursor: default;
}

.mn-reader__num {
  min-width: 84px;
  color: #3d5240;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.mn-reader__zoom {
  min-width: 42px;
  color: #6b7a68;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.mn-reader__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  height: 36px;
  padding: 0 16px;
  background: #18713a;
  border: 1px solid #18713a;
  border-radius: 8px;
  color: #f6efe1;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.mn-reader__download:hover {
  background: #0e3d22;
  border-color: #0e3d22;
}

.mn-reader__download--ghost {
  background: #fff;
  border-color: #e4d9c2;
  color: #18713a;
}

.mn-reader__download--ghost:hover {
  background: #f6efe1;
  border-color: #18713a;
  color: #0e3d22;
}

.mn-reader__stage {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 0;
  padding: 18px 16px;
  overflow: hidden;
  background: #0e3d22;
}

.mn-reader__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(14, 61, 34, .75);
}

.mn-reader__overlay--msg {
  display: none;
  padding: 24px;
  text-align: center;
  pointer-events: none;
}

.mn-reader__spinner {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(246, 239, 225, .25);
  border-top-color: #ee9a1c;
  border-radius: 50%;
  animation: mn-spin .8s linear infinite;
}

.mn-reader__sheet {
  width: 96px;
  height: 124px;
  margin: 0 auto 26px;
  background: linear-gradient(105deg, #f6efe1 0%, #fff 55%, #e4d9c2 100%);
  border-radius: 3px 8px 8px 3px;
  box-shadow: -3px 0 0 #e4d9c2, -6px 0 0 #cbbf9f, 0 24px 44px rgba(0, 0, 0, .35);
}

.mn-reader__msg {
  margin-bottom: 10px;
  color: #f6efe1;
  font-family: 'Spectral', serif;
  font-size: 27px;
}

.mn-reader__hint {
  color: #b9c8b4;
  font-size: 14px;
  line-height: 1.6;
}

.mn-reader__foot {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
  padding: 12px 26px 15px;
  background: #f6efe1;
  border-top: 1px solid #e4d9c2;
}

.mn-reader__count {
  min-width: 26px;
  color: #8a9487;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.mn-reader__foot input[type=range] {
  flex: 1;
  min-width: 60px;
  height: 12px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.mn-reader__foot input[type=range]::-webkit-slider-runnable-track {
  height: 2px;
  background: #e4d9c2;
  border-radius: 2px;
}

.mn-reader__foot input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  margin-top: -5px;
  background: #18713a;
  border-radius: 50%;
  cursor: pointer;
}

.mn-reader__foot input[type=range]::-moz-range-track {
  height: 2px;
  background: #e4d9c2;
  border-radius: 2px;
}

.mn-reader__foot input[type=range]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #18713a;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}

@keyframes mn-spin {
  to { transform: rotate(360deg); }
}

.mn-note {
  margin: 34px 0 0;
  color: #9a8f74;
  font-size: 14px;
  line-height: 1.6;
}

/* ── CÓMO USARLOS ───────────────────────────────── */

.mn-howto {
  background: #0e3d22;
  color: #eae3d2;
}

.mn-howto h2 {
  color: #fff;
}

.mn-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mn-step {
  padding: 26px;
  background: #0a3019;
  border: 1px solid #1f5a3e;
  border-radius: 14px;
}

.mn-step strong {
  display: block;
  margin-bottom: 10px;
  color: #7fae89;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  overflow-wrap: normal;
}

.mn-step p {
  margin: 0;
  color: #eae3d2;
  font-size: 15.5px;
  line-height: 1.55;
}

/* ── CTA ────────────────────────────────────────── */

.mn-cta {
  padding: 64px 44px;
  background: #f6efe1;
  border-top: 1px solid #e4d9c2;
  text-align: center;
}

.mn-cta__inner {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.mn-cta h2 {
  max-width: none;
  margin-bottom: 18px;
  font-size: 32px;
  line-height: 1.12;
}

.mn-cta > .mn-cta__inner > p {
  margin: 0 0 30px;
  color: #54503f;
  font-size: 16px;
  line-height: 1.66;
}

.mn-cta__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

.mn-button {
  display: inline-flex;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.mn-button--primary {
  background: #18713a;
  color: #fff;
}

.mn-button--secondary {
  color: #16331c;
  border: 1px solid #d8c9a8;
}

@keyframes mn-rise {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 920px) {
  .mn-hero-grid,
  .mn-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }

  .mn-hero-grid {
    gap: 38px;
  }
}

@media (max-width: 700px) {
  .mn-hero {
    padding: 50px 20px;
    background-position: 62% center;
  }

  .mn-breadcrumb {
    font-size: 10px;
    letter-spacing: .08em;
    line-height: 1.6;
  }

  .mn-hero h1 {
    font-size: clamp(38px, 12vw, 50px);
    line-height: 1.07;
  }

  .mn-hero-copy > p {
    font-size: 16px;
  }

  .mn-section {
    padding: 58px 20px;
  }

  .mn-section h2 {
    margin-bottom: 30px;
    font-size: clamp(30px, 9vw, 38px);
  }

  .mn-step {
    padding: 24px 22px;
  }

  .mn-list {
    padding: 40px 14px 48px;
  }

  .mn-reader {
    height: clamp(480px, 82vh, 760px);
  }

  .mn-reader__bar {
    gap: 8px 10px;
    padding: 10px 12px;
  }

  /* En pantalla angosta el selector se queda con su propia fila. */
  .mn-reader__pick {
    flex: 1 1 100%;
  }

  .mn-reader__pick-label {
    display: none;
  }

  .mn-reader__pick select {
    max-width: none;
    padding-right: 32px;
    background-position: right 10px center;
    font-size: 15px;
  }

  /* Doble página no cabe en un teléfono: el modo lo decide el lector. */
  .mn-reader__modes {
    display: none;
  }

  .mn-reader__download {
    height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
  }

  .mn-reader__num {
    min-width: 74px;
  }

  .mn-reader__stage {
    padding: 12px 10px;
  }

  .mn-reader__foot {
    padding: 10px 16px 13px;
  }

  .mn-cta {
    padding: 52px 20px;
  }

  .mn-cta h2 {
    font-size: clamp(26px, 8vw, 32px);
  }

  .mn-button {
    width: 100%;
  }
}
