/*
Versión: 0.26.0825.2
Fecha: 2026-08-25
Cambio:
- Unifica el panel editorial de Colecciones y evita su truncamiento en navegación móvil.
- Se agrega CSS global para header y footer reutilizables sin alterar el catálogo.
- Se agrega estilo para botón icon-only de compartir en header.
- Se agrega navegación móvil hamburguesa compacta y desplegable.
- Se agrega firma tipográfica RCM con nombre secundario en header.
- Se ajusta el menú a las nuevas anclas de catálogo, autor y LightCompass.
- Se integra header, navegación móvil y footer con la identidad carbón y niebla.
- Se estiliza el SVG inline que sustituye la fuente completa de iconos.
- Separa visualmente el enlace de Bitácora y su control de expansión accesible.
*/

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  width: 100%;
  padding: 20px 40px;
  color: var(--text-primary, #f2eee6);
  background: var(--bg-header, rgba(17, 18, 19, .96));
  backdrop-filter: blur(14px);
}

.header__inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.header__brand,
.header a {
  color: var(--text-primary, #f2eee6);
  text-decoration: none;
}

.header__brand-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.header__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  white-space: nowrap;
}

.header__brand-mark {
  font-family: "Cinzel", Georgia, "Times New Roman", serif;
  font-size: 1.24rem;
  font-weight: 600;
  letter-spacing: .28em;
  line-height: 1;
}

.header__brand-name {
  color: var(--text-secondary, #bdb8ae);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
}

.header__nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.header__toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  background: var(--surface-subtle);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, opacity .18s ease;
}

.header__toggle span {
  width: 17px;
  height: 1px;
  display: block;
  background: currentColor;
  transform-origin: center;
  transition: transform .2s ease, opacity .2s ease;
}

.header__toggle:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.header__nav a {
  margin-left: 20px;
  opacity: .8;
}

.header__nav a:hover {
  opacity: 1;
}

.header__collections { position: relative; margin-left: 20px; display: inline-flex; align-items: center; gap: 4px; }
.header__nav .header__collections-link { margin-left: 0; }
.header__collections-trigger { border: 0; margin: 0; padding: 4px 6px; color: var(--text-primary, #f2eee6); background: transparent; font: inherit; opacity: .8; cursor: pointer; }
.header__collections-trigger:hover, .header__collections-trigger:focus-visible { opacity: 1; }
.header__collections-menu { position: absolute; top: calc(100% + 14px); right: 0; z-index: 30; width: min(30rem, calc(100vw - 40px)); min-width: 22.5rem; margin: 0; padding: 10px; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--bg-panel, #1f2222); border: 1px solid rgba(165, 139, 98, .48); box-shadow: 0 12px 28px rgba(0,0,0,.38); }
.header__collections-menu[hidden] { display: none; }
.header__collections-menu li { min-width: 0; }
.header__collections-menu li a { display: grid; gap: 5px; height: 100%; margin: 0; padding: 12px; border: 1px solid transparent; color: var(--text-primary, #f2eee6); }
.header__collection-link:hover, .header__collection-link:focus-visible { border-color: rgba(165, 139, 98, .42); background: rgba(165, 139, 98, .08); outline: 0; }
.header__collection-name { font-size: .92rem; font-weight: 500; }
.header__collection-description { color: var(--text-secondary, #bdb8ae); font-size: .76rem; line-height: 1.45; }

.share-icon-button {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-primary);
  background: var(--surface-subtle);
  cursor: pointer;
  opacity: .82;
  transition: opacity .18s ease, background .18s ease, border-color .18s ease;
}

.share-icon-button:hover,
.share-icon-button.is-shared {
  opacity: 1;
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.share-icon {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 40px));
  margin: 80px auto 0;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer strong,
.footer span,
.footer a {
  display: block;
}

.footer strong {
  color: var(--text-primary);
  font-weight: 600;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  margin-top: 8px;
}

.footer a:hover {
  color: var(--text-primary);
}

@media (max-width: 760px) {
  .header {
    padding: 14px 18px;
  }

  .header__inner {
    position: relative;
    align-items: center;
    flex-direction: row;
    gap: 12px;
  }

  .header__brand-group {
    min-width: 0;
  }

  .header__brand {
    max-width: calc(100vw - 116px);
    overflow: hidden;
    text-overflow: ellipsis;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .header__brand-mark {
    font-size: 1.08rem;
    letter-spacing: .26em;
  }

  .header__brand-name {
    max-width: 176px;
    overflow: hidden;
    font-size: .66rem;
    letter-spacing: .02em;
    text-overflow: ellipsis;
  }

  .header__toggle {
    display: inline-flex;
    flex: 0 0 auto;
    margin-left: auto;
  }

  .header__nav {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(260px, calc(100vw - 36px));
    max-height: 0;
    overflow: hidden;
    display: grid;
    justify-content: stretch;
    gap: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--bg-modal);
    box-shadow: 0 24px 48px var(--shadow-deep);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: max-height .24s ease, opacity .2s ease, transform .2s ease, border-color .2s ease, padding .2s ease;
  }

  .header__nav a {
    margin: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }

  .header__nav a:last-child {
    border-bottom: 0;
  }

  .header__collections { width: 100%; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0; }
  .header__nav .header__collections-link { margin: 0; padding: 12px 14px; border-bottom: 1px solid var(--border); }
  .header__collections-trigger { display: block; width: 44px; padding: 12px; text-align: center; border-bottom: 1px solid var(--border); }
  .header__collections-menu { position: static; grid-column: 1 / -1; width: auto; min-width: 0; padding: 0 0 4px 12px; grid-template-columns: 1fr; background: transparent; border: 0; box-shadow: none; }
  .header__collections-menu li a { padding: 9px 12px; border-left: 1px solid rgba(165, 139, 98, .35); }

  .header.is-nav-open .header__nav {
    max-height: calc(100dvh - 92px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
    border-color: var(--border);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .header.is-nav-open .header__toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .header.is-nav-open .header__toggle span:nth-child(2) {
    opacity: 0;
  }

  .header.is-nav-open .header__toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}
