/* MC-WORLD: portadas fotográficas y enlaces superiores siempre visibles. */

/* Las secciones caben en varias filas cuando la ventana es más estrecha. */
header {
  height: auto;
  min-height: 96px;
  padding: 18px max(4vw, 24px);
  gap: 24px;
}

header .brand {
  flex-shrink: 0;
}

header nav,
header nav.open {
  display: flex;
  position: static;
  flex: 1 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 22px;
  width: auto;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

header nav a {
  display: inline-block;
  font-size: 13px;
  line-height: 1.6;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

header nav a[aria-current="page"] {
  border-bottom-color: var(--mcw-copper);
}

/* El portal vuelve a la derecha; la zona de lectura permanece a la izquierda. */
.hero {
  background-position: calc(50% + clamp(140px, 21vw, 360px)) center;
}

.hero-shade {
  background:
    linear-gradient(90deg, #10191b 0%, rgba(16, 25, 27, .93) 26%, rgba(16, 25, 27, .48) 51%, rgba(16, 25, 27, .05) 76%),
    linear-gradient(0deg, #10191b 0%, transparent 22%);
}

/* Una escena propia abre cada sección y cada ficha de la biblioteca. */
.page-cover {
  min-height: 420px;
  padding: 64px max(6vw, 24px);
  align-items: flex-end;
  border-bottom: 1px solid #466779;
}

.page-cover > div {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.page-cover::before {
  opacity: .88;
  background-position: center 52%;
}

.page-cover::after {
  background:
    linear-gradient(90deg, rgba(16, 25, 27, .94), rgba(16, 25, 27, .68) 43%, rgba(16, 25, 27, .13)),
    linear-gradient(0deg, rgba(16, 25, 27, .6), transparent 60%);
}

.page-cover h1 {
  max-width: 22ch;
  font-size: clamp(34px, 4.5vw, 64px);
  line-height: 1.12;
  text-wrap: balance;
}

.page-cover p {
  max-width: 58ch;
}

.page-cover .back-home {
  margin-bottom: 24px;
}

.wiki-side {
  top: 140px;
  max-height: calc(100vh - 165px);
}

html {
  scroll-padding-top: 145px;
}

@media (max-width: 1100px) {
  header {
    flex-wrap: wrap;
    gap: 14px;
  }

  header nav,
  header nav.open {
    flex-basis: 100%;
    justify-content: flex-start;
    gap: 8px 22px;
  }

  .wiki-side {
    position: static;
    max-height: none;
  }
}

@media (max-width: 700px) {
  /* En móvil todos los destinos se ven sin abrir un botón ni desbordar la pantalla. */
  header {
    position: relative;
    padding: 16px 6%;
    gap: 16px;
  }

  header nav,
  header nav.open {
    gap: 8px 18px;
  }

  header nav a {
    font-size: 12px;
  }

  .hero {
    background-position: calc(50% + 22vw) center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(16, 25, 27, .95), rgba(16, 25, 27, .69) 60%, rgba(16, 25, 27, .3)),
      linear-gradient(0deg, #10191b, transparent 30%);
  }

  .page-cover {
    min-height: 350px;
    padding: 42px 6%;
  }

  .page-cover h1 {
    font-size: clamp(32px, 7vw, 44px);
  }

  .page-cover::after {
    background: linear-gradient(90deg, rgba(16, 25, 27, .94), rgba(16, 25, 27, .5));
  }

  html {
    scroll-padding-top: 24px;
  }
}
