/* =====================================================================
   Black Archlord — Triboots Episode 2 guide (season-2.php)
   Índice de capítulos a la izquierda y un capítulo (.season2-chapter) a la
   derecha. Los capítulos traen estilos en línea propios; aquí se adaptan al
   tema nuevo (por eso algunos !important). Mismo esquema que nw-heaven-hell.css.
   ===================================================================== */

.s2-tagline {
  margin: 0 0 10px;
  color: var(--nw-gold);
  font-family: var(--nw-font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.s2-guide {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding-bottom: 60px;
}

/* ---------- Índice ---------- */

.s2-nav {
  position: sticky;
  top: calc(var(--nw-header-h) + 16px);
  padding-bottom: 10px;
}

.s2-nav-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 18px 12px;
  border: 0;
  border-bottom: 1px solid var(--nw-line-soft);
  color: #fff;
  background: transparent;
  text-align: left;
  cursor: default;
}

.s2-nav-heading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--nw-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.s2-nav-heading i {
  color: var(--nw-gold);
  font-size: 14px;
}

.s2-nav-current,
.s2-nav-caret {
  display: none;
}

.s2-nav-list {
  display: grid;
  gap: 2px;
  padding: 10px 10px 0;
}

.s2-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  color: #d9ccc6;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.s2-nav-link i {
  width: 16px;
  color: var(--nw-gold-soft);
  font-size: 13px;
  text-align: center;
}

.s2-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.s2-nav-link.is-active {
  border-left-color: var(--nw-red-hot);
  color: #fff;
  background: linear-gradient(90deg, rgba(227, 52, 42, 0.22), rgba(227, 52, 42, 0.04));
}

.s2-nav-link.is-active i {
  color: var(--nw-red-hot);
}

/* ---------- Capítulos ---------- */

.season2-book-content {
  min-width: 0;
  scroll-margin-top: calc(var(--nw-header-h) + 16px);
}

.s2-guide .season2-chapter {
  position: relative;
  display: none;
  width: 100% !important;
  max-width: none !important;
  min-width: 0;
  margin: 0 !important;
  padding: 30px 34px !important;
  border: 1px solid var(--nw-frame) !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(20, 13, 14, 0.94), rgba(9, 7, 8, 0.94)) !important;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5) !important;
  color: #d9ccc6;
}

.s2-guide .season2-chapter.is-active {
  display: block;
  animation: s2-chapter-in 0.28s ease both;
}

/* esquinas doradas como .nw-panel */
.s2-guide .season2-chapter::before,
.s2-guide .season2-chapter::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--nw-gold);
  border-style: solid;
  opacity: 0.8;
  pointer-events: none;
}

.s2-guide .season2-chapter::before {
  top: -1px;
  left: -1px;
  border-width: 2px 0 0 2px;
}

.s2-guide .season2-chapter::after {
  right: -1px;
  bottom: -1px;
  border-width: 0 2px 2px 0;
}

@keyframes s2-chapter-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.s2-guide .season2-chapter h3,
.s2-guide .season2-chapter h4,
.s2-guide .season2-chapter h5 {
  font-family: var(--nw-font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.s2-guide .season2-chapter h3 {
  font-size: clamp(22px, 3vw, 30px) !important;
}

.s2-guide .season2-chapter > h3:first-child,
.s2-guide .season2-chapter .ref-section > h3:first-child {
  color: #fff !important;
}

.s2-guide .season2-chapter p,
.s2-guide .season2-chapter li,
.s2-guide .season2-chapter td {
  color: #d9ccc6;
}

.s2-guide .season2-chapter ul {
  padding-left: 22px;
}

/* El tema pone img { display:block }; el contenido usa imágenes en línea */
:where(.s2-guide .season2-chapter) img {
  display: inline;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.s2-guide .p-4 {
  padding: 1.5rem;
}

.s2-guide .season2-chapter table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--nw-line-soft) !important;
  background: rgba(6, 4, 5, 0.55) !important;
}

.s2-guide .season2-chapter th {
  border-color: var(--nw-line-soft) !important;
  color: var(--nw-gold) !important;
  background: rgba(120, 18, 12, 0.22) !important;
}

.s2-guide .season2-chapter td {
  border-color: var(--nw-line-soft) !important;
}

.s2-guide .zoom-img {
  border: 1px solid var(--nw-line-soft) !important;
  border-radius: 0 !important;
  background: rgba(0, 0, 0, 0.3);
  cursor: zoom-in;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.s2-guide .zoom-img:hover {
  border-color: var(--nw-frame) !important;
  transform: translateY(-2px);
}

/* Tarjetas en línea del contenido (fondo #0d0d0d / #111) */
.s2-guide .season2-chapter [style*="background:#0d0d0d"],
.s2-guide .season2-chapter [style*="background: #0d0d0d"],
.s2-guide .season2-chapter [style*="background:#111"]:not(button) {
  border-radius: 0 !important;
  background: linear-gradient(180deg, rgba(120, 18, 12, 0.1), rgba(6, 4, 5, 0.6) 60%) !important;
}

/* ---------- Refinería (pestañas de joyas) ---------- */

.s2-guide .refinery-wrapper {
  gap: 18px !important;
  max-width: 100%;
  margin-top: 0 !important;
}

.s2-guide .refinery-wrapper > * {
  min-width: 0;
}

.s2-guide .refinery-menu {
  flex: 0 0 220px;
  width: 220px !important;
}

.s2-guide .ref-btn {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: var(--nw-radius) !important;
  color: #e8dcd6 !important;
  background: linear-gradient(180deg, #1c1314, #120c0d) !important;
  font-family: var(--nw-font-body);
  font-size: 15px !important;
  font-weight: 600;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.s2-guide .ref-btn:hover,
.s2-guide .ref-btn:focus-visible {
  border-color: rgba(255, 90, 60, 0.6) !important;
  color: #fff !important;
  outline: none;
}

.s2-guide .ref-section {
  min-width: 0;
  border: 1px solid var(--nw-line-soft) !important;
  border-radius: 0 !important;
  background: rgba(6, 4, 5, 0.6) !important;
  box-shadow: none !important;
}

/* ---------- Yellow Options (lo pinta el script del capítulo) ---------- */

.s2-guide .yellow-options-intro {
  max-width: 820px;
  margin: 0 auto 24px !important;
  color: var(--nw-muted) !important;
  text-align: center;
}

.s2-guide .yellow-race-tabs,
.s2-guide .yellow-class-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px;
}

.s2-guide .yellow-class-tabs {
  margin-bottom: 24px;
}

.s2-guide button.yellow-tab {
  appearance: none;
  margin: 0;
  padding: 9px 16px;
  border: 1px solid var(--nw-frame);
  border-radius: var(--nw-radius);
  color: var(--nw-text);
  background: linear-gradient(180deg, rgba(30, 20, 18, 0.92), rgba(8, 6, 6, 0.92));
  font-family: var(--nw-font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.s2-guide .yellow-class-tabs button.yellow-tab {
  font-family: var(--nw-font-body);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.s2-guide button.yellow-tab:hover {
  border-color: var(--nw-gold);
}

.s2-guide button.yellow-tab.is-active {
  border-color: rgba(255, 140, 110, 0.65);
  color: #fff;
  background: linear-gradient(180deg, #ef3b2c 0%, #b8170f 55%, #8d0f09 100%);
  box-shadow: 0 0 16px rgba(227, 52, 42, 0.35);
}

.s2-guide .yellow-set-card {
  overflow: hidden;
  border: 1px solid var(--nw-line-soft);
  background: rgba(6, 4, 5, 0.55);
}

.s2-guide .yellow-set-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--nw-line);
}

.s2-guide .yellow-set-name {
  margin: 0 !important;
  color: #fff !important;
  font-family: var(--nw-font-display);
  font-size: 24px !important;
}

.s2-guide .yellow-set-class {
  color: var(--nw-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.s2-guide table.yellow-table {
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.s2-guide table.yellow-table th,
.s2-guide table.yellow-table td {
  padding: 14px 18px !important;
  vertical-align: top;
  background: transparent !important;
}

.s2-guide .yellow-piece-slot {
  display: block;
  margin-bottom: 4px;
  color: var(--nw-gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.s2-guide .yellow-piece-name {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.s2-guide .yellow-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.s2-guide .yellow-chip {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid rgba(224, 169, 106, 0.3);
  color: #f3d3a8;
  background: rgba(224, 169, 106, 0.08);
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- Visor de imagen ---------- */

.s2-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  cursor: zoom-out;
}

.s2-image-viewer img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  border: 1px solid var(--nw-frame);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
  object-fit: contain;
  cursor: default;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .s2-guide {
    grid-template-columns: 1fr;
  }

  .s2-nav {
    position: relative;
    top: auto;
    padding: 0;
  }

  .s2-nav-toggle {
    padding: 14px 16px;
    border-bottom: 0;
    cursor: pointer;
  }

  .s2-nav-current {
    display: block;
    min-width: 0;
    margin-left: auto;
    overflow: hidden;
    color: var(--nw-red-hot);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .s2-nav-caret {
    display: block;
    flex: 0 0 auto;
    color: var(--nw-muted);
    font-size: 12px;
    transition: transform 0.2s ease;
  }

  .s2-nav-list {
    display: none;
    padding-bottom: 12px;
    border-top: 1px solid var(--nw-line-soft);
  }

  .s2-nav.is-open .s2-nav-list {
    display: grid;
  }

  .s2-nav.is-open .s2-nav-caret {
    transform: rotate(180deg);
  }

  .s2-guide .season2-chapter {
    padding: 24px 22px !important;
  }

  .s2-guide .refinery-wrapper {
    flex-direction: column;
  }

  .s2-guide .refinery-menu {
    flex: 0 0 auto;
    width: 100% !important;
  }

  .s2-guide [style*="min-width:420px"],
  .s2-guide [style*="min-width:460px"],
  .s2-guide [style*="min-width:360px"] {
    min-width: 0 !important;
  }
}

@media (max-width: 640px) {
  .s2-guide .season2-chapter {
    padding: 20px 14px !important;
  }

  .s2-guide .ref-section {
    padding: 16px 12px !important;
  }

  .s2-guide .season2-chapter table {
    display: block;
    overflow-x: auto;
  }

  .s2-guide table.yellow-table th,
  .s2-guide table.yellow-table td {
    padding: 12px !important;
  }

  .s2-guide .yellow-chip {
    white-space: normal;
  }
}
