/* ==================================================================
   Manual Práctico de Extranjería · cubiertas de las obras (portal y biblioteca)
   Imagen (subida o página del PDF) o cubierta tipográfica con las
   paletas de la editorial: noche (como la cubierta real del Manual:
   azul noche texturizado, oro ámbar y banda de siluetas), bermellón
   del logotipo, marfil, jade, tinta y granate.
   ================================================================== */
.cubierta {
  --c-fondo: #0C1628; --c-tinta: #F3EBDD; --c-oro: #E19A2F; --c-linea: rgba(225, 154, 47, 0.5); --c-sil: #8FA0BC;
  position: relative; display: block; width: 100%; aspect-ratio: 0.708; overflow: hidden;
  border-radius: 3px 7px 7px 3px; background: var(--c-fondo); color: var(--c-tinta);
  container-type: inline-size; isolation: isolate;
  box-shadow: inset 4px 0 6px -3px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.cubierta::after { /* lomo y brillo del papel */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0, rgba(255, 255, 255, 0.12) 1.6%, rgba(0, 0, 0, 0.06) 3.2%, transparent 6%),
              linear-gradient(115deg, rgba(255, 255, 255, 0.10), transparent 40%);
}
.cubierta.imagen { background: #EDE6D8; }
.cubierta.imagen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cubierta.con-sombra { box-shadow: 0 30px 60px -28px rgba(6, 10, 20, 0.65), 0 12px 24px -16px rgba(6, 10, 20, 0.5), inset 4px 0 6px -3px rgba(0, 0, 0, 0.35); }

.cubierta.tipografica { font-family: 'Spectral', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'PingFang SC', 'Microsoft YaHei', Georgia, serif; }
.cub-marco {
  position: absolute; inset: 5.5cqw; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center;
  border: 0.45cqw solid var(--c-linea); padding: 7cqw 6cqw 5cqw;
}
.cub-marco::before { content: ''; position: absolute; inset: 1.4cqw; border: 0.25cqw solid var(--c-linea); opacity: 0.6; pointer-events: none; }
.cub-editorial { font-family: 'Spectral', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'PingFang SC', 'Microsoft YaHei', Georgia, serif; font-size: 3.4cqw; letter-spacing: 0.3em; white-space: nowrap; text-transform: uppercase; color: var(--c-oro); font-weight: 600; }
.cub-titulo {
  margin-top: auto; font-size: 10.6cqw; line-height: 1.08; font-weight: 500; color: var(--c-oro); letter-spacing: 0.005em;
  text-wrap: balance; overflow-wrap: anywhere; hyphens: auto;
}
.cubierta.t-m .cub-titulo { font-size: 9.2cqw; }
.cubierta.t-l .cub-titulo { font-size: 7.8cqw; }
.cubierta.t-xl .cub-titulo { font-size: 6.5cqw; }
.cubierta[lang^='zh'] .cub-titulo { font-size: 10.5cqw; line-height: 1.25; letter-spacing: 0.06em; font-weight: 700; }
.cub-sub { margin-top: 4cqw; font-size: 5.4cqw; font-style: italic; line-height: 1.2; color: var(--c-tinta); opacity: 0.92; text-wrap: balance; }
.cubierta[lang^='zh'] .cub-sub { font-style: normal; letter-spacing: 0.18em; font-size: 4.6cqw; }
.cub-sub::before { content: ''; display: block; width: 14cqw; height: 0.4cqw; margin: 0 auto 4cqw; background: var(--c-oro); opacity: 0.8; }
.cub-pie { margin-top: auto; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 3cqw; padding-bottom: 14cqw; }
.cub-autor { font-family: 'Spectral', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', 'PingFang SC', 'Microsoft YaHei', Georgia, serif; font-size: 3.4cqw; letter-spacing: 0.08em; text-align: left; line-height: 1.35; opacity: 0.85; }
.cub-sello {
  flex: none; display: grid; place-items: center; width: 10cqw; height: 10cqw; border-radius: 1.2cqw;
  background: #B3121B; color: #FBEFD8; font-family: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif; font-weight: 700;
  font-size: 3.7cqw; line-height: 1; writing-mode: vertical-rl; letter-spacing: 0.05em; transform: rotate(-4deg); box-shadow: 0 0 0 0.4cqw rgba(0, 0, 0, 0.12);
}
.cub-siluetas { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 17%; z-index: 1; fill: var(--c-sil); opacity: 0.55; }

.cubierta.p-bermellon { --c-fondo: linear-gradient(160deg, #B3121B, #7E0C13); --c-tinta: #FFF3DD; --c-oro: #F2CF7E; --c-linea: rgba(242, 207, 126, 0.6); --c-sil: #FFD9A0; }
.cubierta.p-bermellon .cub-sello { background: #F2CF7E; color: #7E0C13; }
.cubierta.p-marfil { --c-fondo: linear-gradient(160deg, #FBF6EC, #EFE5D2); --c-tinta: #2A2117; --c-oro: #A3201F; --c-linea: rgba(163, 32, 31, 0.45); --c-sil: #B08C4D; }
.cubierta.p-jade { --c-fondo: linear-gradient(160deg, #1F4D43, #12302A); --c-tinta: #EEF3EA; --c-oro: #E2C276; --c-linea: rgba(226, 194, 118, 0.55); --c-sil: #9FC7B6; }
.cubierta.p-tinta { --c-fondo: linear-gradient(160deg, #1D1A17, #0C0B0A); --c-tinta: #EFE8DC; --c-oro: #D7B266; --c-linea: rgba(215, 178, 102, 0.5); --c-sil: #8C8476; }
.cubierta.p-granate { --c-fondo: linear-gradient(160deg, #5B1426, #330A15); --c-tinta: #FBEFE6; --c-oro: #E8C07A; --c-linea: rgba(232, 192, 122, 0.55); --c-sil: #D9A0AE; }
.cubierta.p-noche { --c-fondo: url('../img/textura-noche.webp') 0 0 / 60% repeat, linear-gradient(180deg, #0C1628 0%, #101E34 60%, #0D1728 100%); }
/* Como la cubierta del Manual: banda de siluetas caminantes en la parte baja */
.cubierta.p-noche .cub-siluetas { display: none; }
.cubierta.p-noche::before { content: ''; position: absolute; left: 0; right: 0; bottom: 7%; height: 26%; z-index: 1; background: url('../img/siluetas-banda.webp') center bottom / auto 100% repeat-x; opacity: 0.95; -webkit-mask-image: linear-gradient(180deg, transparent, #000 32%); mask-image: linear-gradient(180deg, transparent, #000 32%); }
.cubierta.p-noche .cub-pie { padding-bottom: 33cqw; }
.cubierta.p-noche .cub-marco { border-color: transparent; }
.cubierta.p-noche .cub-marco::before { display: none; }
.cubierta.p-noche .cub-titulo { font-weight: 500; }

.cubierta.hueco { display: grid; place-items: center; background: repeating-linear-gradient(135deg, transparent 0 10px, rgba(185, 138, 46, 0.08) 10px 11px); border: 1.5px dashed rgba(185, 138, 46, 0.5); box-shadow: none; color: #9A7A3A; font-family: 'Spectral', Georgia, serif; font-size: 20px; text-align: center; padding: 20px; }
.cubierta.hueco::after { display: none; }
