/* ============================================================================
   La Hermandad RP - assets/guia-rol.css
   Estilos para la pagina estatica guia-de-rol.html (cabecera + layout wiki).
   Extraidos del propio bundle desplegado (main-*.js): son las mismas reglas
   que Angular inyecta en runtime para #sidebar/.navbar-logos/.logo_negro/
   .posicionamiento_lista y para el layout .wiki-*. wiki-theme.css (ya
   existente) se carga despues y anade los acabados finales, igual que en
   /normativa.
   ============================================================================ */

/* ---- Reset (el bundle lo aplica de forma global; aqui hace falta a mano) ---- */

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* El fondo oscuro de toda la pagina (no solo de las tarjetas) viene de aqui:
   sin esto, cualquier hueco sin una tarjeta encima (el final de la pagina,
   por ejemplo) se queda blanco. En Normativa esta regla la trae el propio
   componente Angular; aqui hace falta copiarla a mano. */
html,
body {
  background-color: #2a1a0e;
}

/* ---- Cabecera ---- */

#sidebar {
  background: #d58e4a;
  cursor: default;
  height: 100vh;
  left: 0;
  overflow-x: hidden;
  overflow-y: auto;
  position: fixed;
  text-align: right;
  top: 0;
  width: 18em;
  z-index: 10000;
}

#sidebar:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url(/assets/img/grain.png);
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

#sidebar > .inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  transform: translateY(0);
  transition: opacity 1s ease;
  min-height: 100%;
  opacity: 1;
  width: 100%;
}

#sidebar nav > ul {
  list-style: none;
  padding: 0;
}

#sidebar nav > ul > li {
  transform: translateY(0);
  transition:
    opacity 0.15s ease,
    transform 0.75s ease;
  margin: 1.5em 0 0;
  opacity: 1;
  padding: 0;
  position: relative;
}

#sidebar nav > ul > li:first-child {
  margin: 0;
}

#sidebar nav a {
  transition: color 0.2s ease;
  border: 0;
  color: #fff;
  display: block;
  font-size: 0.6em;
  letter-spacing: 0.25em;
  line-height: 1.75;
  outline: 0;
  padding: 1.35em 0;
  position: relative;
  text-decoration: none;
  text-transform: uppercase;
}

#sidebar nav a:before,
#sidebar nav a:after {
  border-radius: 0.2em;
  bottom: 0;
  content: "";
  height: 0.2em;
  position: absolute;
  right: 0;
  width: 100%;
}

#sidebar nav a:before {
  background: #594738;
}

#sidebar nav a:after {
  background-image: linear-gradient(to right, #5e42a6, #b74e91);
  transition: max-width 0.2s ease;
  max-width: 0;
}

#sidebar nav a:hover {
  color: #ffffff8c;
}

#sidebar nav a.active {
  color: #fff;
}

#sidebar nav a.active:after {
  max-width: 100%;
}

@media screen and (max-width: 30000px) {
  #sidebar {
    height: 3.5em;
    left: 0;
    line-height: 3.5em;
    overflow: hidden;
    padding: 0;
    text-align: center;
    top: 0;
    width: 100%;
  }
  #sidebar > .inner {
    flex-direction: row;
    align-items: center;
    padding: 0 24px;
    height: inherit;
    line-height: inherit;
  }
  #sidebar nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    height: inherit;
    line-height: inherit;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  #sidebar nav ul {
    display: flex;
    font-size: 21px;
    height: inherit;
    line-height: inherit;
    margin: 0;
  }
  #sidebar nav ul li {
    display: block;
    height: inherit;
    line-height: inherit;
    margin: 0 0 0 3em;
    padding: 0;
  }
  #sidebar nav a {
    height: inherit;
    line-height: inherit;
    padding: 0;
  }
  #sidebar nav a:after {
    background-image: none;
    background-color: #b74e91;
  }
}

@media screen and (max-width: 736px) {
  #sidebar {
    display: flex !important;
    height: 3.5em;
    overflow: visible;
  }
  #sidebar > .inner {
    padding: 0 12px;
    justify-content: space-between;
    align-items: center;
  }
  #sidebar nav {
    display: flex;
    align-items: center;
    flex: 1;
    height: 3.5em;
    line-height: 3.5em;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  #sidebar nav::-webkit-scrollbar {
    display: none;
  }
  .logo_negro {
    display: none;
  }
  .posicionamiento_lista {
    position: static !important;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    min-width: max-content;
    gap: 10px;
    margin-left: 10px;
    height: auto;
    line-height: normal;
    flex-shrink: 0;
  }
  .posicionamiento_lista li {
    height: auto;
    line-height: normal;
    margin: 0;
  }
  .posicionamiento_lista li a {
    font-size: 0.75em;
    letter-spacing: 0;
    height: auto;
    line-height: normal;
    padding: 0;
  }
  .navbar-logos {
    display: none !important;
  }
}

.navbar-logos {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
  margin-left: auto;
}

.navbar-logos img {
  height: 32px;
  filter: sepia(20%) contrast(1.1);
  transition:
    transform 0.2s ease,
    filter 0.2s ease;
  cursor: pointer;
}

.navbar-logos img:hover {
  transform: scale(1.05);
  filter: sepia(0%) contrast(1.2);
}

.logo_negro {
  position: static;
  height: 50px;
  width: auto;
  flex-shrink: 0;
  margin-right: 16px;
}

.posicionamiento_lista {
  position: static;
}

/* ---- Layout de Normativa / Guia ---- */

@font-face {
  font-family: red_dead_cuerpo;
  src: url(/assets/webfonts/HapnaSlabSerif-Medium.ttf) format("woff2");
}
@font-face {
  font-family: red_dead_titulos;
  src: url(/assets/webfonts/crock.ttf) format("woff2");
}
.wiki-page {
  display: flex;
  min-height: 100vh;
  padding-top: 3.5em;
}
.wiki-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: fixed;
  top: 3.5em;
  left: 0;
  height: calc(100vh - 3.5em);
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #4b3221;
  border-right: 2px solid rgba(208, 140, 75, 0.3);
  z-index: 50;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(208, 140, 75, 0.35) transparent;
}
.wiki-sidebar::-webkit-scrollbar {
  width: 4px;
}
.wiki-sidebar::-webkit-scrollbar-thumb {
  background: #d08c4b40;
  border-radius: 2px;
}
.wiki-search-wrap {
  margin-top: 6%;
  padding: 14px 12px 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #4b3221;
  border-bottom: 1px solid rgba(208, 140, 75, 0.2);
}
.wiki-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(208, 140, 75, 0.28);
  background: #ffffff0f;
  color: #f0e6d3;
  font-family: red_dead_cuerpo, serif;
  font-size: 0.84rem;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.wiki-search-input::placeholder {
  color: #f0e6d352;
}
.wiki-search-input:focus {
  border-color: #d08c4b99;
  background: #ffffff17;
}
.wiki-nav {
  flex: 1;
  padding: 6px 0 24px;
  display: flex;
  flex-direction: column;
}
.wiki-nav-all-btn {
  display: block;
  width: 100%;
  padding: 9px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(208, 140, 75, 0.15);
  color: #f0e6d3b8;
  font-family: red_dead_cuerpo, serif;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition:
    color 0.2s,
    background 0.2s;
  letter-spacing: 0.03em;
}
.wiki-nav-all-btn:hover {
  color: #d58e4a;
  background: #d08c4b12;
}
.wiki-nav-group {
  padding: 12px 0 4px;
}
.wiki-nav-group-label {
  display: block;
  padding: 0 16px 6px;
  font-family: red_dead_titulos, cursive;
  font-size: 0.58rem;
  color: #d08c4bb3;
  text-transform: uppercase;
  letter-spacing: 0.24em;
}
.wiki-nav-categories,
.wiki-nav-sections {
  list-style: none;
  padding: 0;
  margin: 0;
}
.wiki-cat-btn {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 7px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: #f0e6d3c7;
  font-family: red_dead_cuerpo, serif;
  font-size: 0.82rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
  line-height: 1.35;
}
.wiki-cat-btn:hover {
  color: #f0e6d3;
  background: #d08c4b14;
  border-left-color: #d08c4b52;
}
.wiki-cat-btn.active {
  color: #d58e4a;
  background: #d08c4b1c;
  border-left-color: #d58e4a;
  font-weight: 700;
}
.wiki-cat-icon {
  font-size: 0.95em;
  flex-shrink: 0;
  margin-top: 1px;
}
.wiki-sec-link {
  display: block;
  padding: 5px 16px 5px 30px;
  color: #f0e6d36b;
  font-family: red_dead_cuerpo, serif;
  font-size: 0.76rem;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
  line-height: 1.4;
  border-left: 2px solid transparent;
  margin-left: 14px;
}
.wiki-sec-link:hover {
  color: #d58e4a;
  border-left-color: #d08c4b52;
}
.wiki-main {
  margin-left: 260px;
  flex: 1;
  min-width: 0;
}
.wiki-banner {
  position: relative;
  height: 210px;
  overflow: hidden;
  border-bottom: 2px solid rgba(208, 140, 75, 0.22);
}
.wiki-banner-scene {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  filter: sepia(55%) brightness(0.52) contrast(1.1);
}
.banner-civil .wiki-banner-scene {
  background-image: url(/assets/img/fondo_montana.jpg);
}
.banner-sheriff .wiki-banner-scene {
  background-image: url(/assets/img/camino.jpg);
}
.banner-forajido .wiki-banner-scene {
  background-image: url(/assets/img/fondo_cactus.jpg);
}
.banner-medico .wiki-banner-scene {
  background-image: url(/assets/img/fondo_montana.jpg);
  background-position: center 60%;
}
.wiki-banner:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, #0c0602f0, #0c06029e 55%, #0c06020f);
  pointer-events: none;
  z-index: 1;
}
.wiki-banner-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 100%;
  padding: 0 32px 22px;
}
.wiki-banner-text {
  flex: 1;
}
.wiki-banner-tag {
  display: inline-block;
  font-family: red_dead_titulos, cursive;
  font-size: 0.58rem;
  color: #d08c4b9e;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  margin-bottom: 6px;
}
.wiki-banner-title {
  font-family: red_dead_titulos, cursive;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  color: #f5ece0;
  margin: 0 0 5px;
  font-weight: 400;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}
.wiki-banner-subtitle {
  font-family: red_dead_cuerpo, serif;
  font-size: 0.78rem;
  color: #d08c4bb8;
  margin: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.wiki-content {
  padding: 18px 48px 64px;
  max-width: 880px;
  color: #e8dccb;
  font-family: red_dead_cuerpo, serif;
}
.wiki-estado {
  padding: 120px 48px;
  text-align: center;
  color: #e8dccb;
  font-family: red_dead_cuerpo, serif;
}
.wiki-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: red_dead_titulos, cursive;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: #d58e4a;
  font-weight: 400;
  margin: 28px 0 13px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(208, 140, 75, 0.2);
}
.wiki-section-title:first-child {
  margin-top: 8px;
}
.wiki-section-line {
  display: inline-block;
  width: 4px;
  height: 1.1em;
  background: #d58e4a;
  border-radius: 2px;
  flex-shrink: 0;
}
.wiki-rule {
  margin-bottom: 14px;
  padding: 10px 15px 10px 13px;
  border-left: 2px solid rgba(208, 140, 75, 0.12);
  background: #ffffff04;
  border-radius: 0 4px 4px 0;
  transition:
    border-color 0.25s,
    background 0.25s;
}
.wiki-rule:hover {
  border-left-color: #d08c4b66;
  background: #ffffff08;
}
.wiki-rule-title {
  font-family: red_dead_cuerpo, serif;
  font-size: clamp(0.87rem, 1.15vw, 1rem);
  color: #c8a87a;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.4;
}
.wiki-rule-title.wiki-rule-sub {
  font-size: clamp(0.81rem, 0.95vw, 0.92rem);
  color: #c8a87aad;
  font-weight: 400;
  margin-left: 14px;
  padding-left: 10px;
  border-left: 2px solid rgba(208, 140, 75, 0.16);
}
.wiki-rule-body p {
  font-size: clamp(0.81rem, 0.9vw, 0.92rem);
  line-height: 1.72;
  color: #e8dccbdb;
  margin: 0 0 4px;
}
.wiki-rule-body p:last-child {
  margin-bottom: 0;
}
.wiki-rule-body p + p {
  padding-top: 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.032);
}
.wiki-sin-resultados {
  padding: 40px 0;
  color: #e8dccbb0;
  font-style: italic;
}
@media screen and (max-width: 1100px) {
  .wiki-sidebar {
    width: 230px;
  }
  .wiki-main {
    margin-left: 230px;
  }
  .wiki-content {
    padding: 16px 32px 48px;
  }
}
@media screen and (max-width: 768px) {
  .wiki-page {
    flex-direction: column;
  }
  .wiki-sidebar {
    width: 100%;
    position: static;
    height: auto;
    max-height: 250px;
    border-right: none;
    border-bottom: 2px solid rgba(208, 140, 75, 0.2);
  }
  .wiki-main {
    margin-left: 0;
  }
  .wiki-content {
    padding: 14px 18px 40px;
  }
  .wiki-banner {
    height: 130px;
  }
  .wiki-banner-title {
    font-size: 1.3rem;
  }
  .wiki-banner-inner {
    padding: 0 18px 14px;
  }
}
@media screen and (max-width: 480px) {
  .wiki-content {
    padding: 10px 12px 32px;
  }
  .wiki-rule {
    padding: 7px 10px;
  }
}
