/* ================================================
   WB-LoreNav.css
   Styles for the Worldbuilding & Lore landing page.
   Depends on variables defined in style.css.
   ================================================ */

/* -----------------------------------------------
   Page title
----------------------------------------------- */

.wblore-page-title {
  font-family: var(--heading-font);
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  color: var(--IB-text);
  margin: 0 0 1em;
}

/* -----------------------------------------------
   Group block
----------------------------------------------- */

.wblore-group {
  margin-bottom: 1em;
}

.wblore-group:last-child {
  margin-bottom: 0;
}

/* Group header banner */
.wblore-group-title {
  background: var(--sidebar-background-color);
  color: #f0eaff;
  font-family: var(--heading-font);
  font-size: 0.85em;
  font-weight: bold;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 10px 10px 0 0;
  border: var(--border);
  border-bottom: none;
}

/* -----------------------------------------------
   Card grid
----------------------------------------------- */

.wblore-cards {
  display: grid;
  border: var(--border);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  background: var(--content-background-color);
  grid-template-columns: repeat(3, 1fr);
}

/* -----------------------------------------------
   Individual card
----------------------------------------------- */

.wblore-card {
  background: var(--IB-bg-alt-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  gap: 5px;
  border-right: 1px solid rgba(61, 41, 90, 0.25);
  border-bottom: 1px solid rgba(61, 41, 90, 0.25);
  text-decoration: none;
  transition: background 0.15s ease, transform 0.08s ease;
  color: var(--IB-text);
}

.wblore-card:visited {
  color: var(--IB-text);
}

.wblore-card:hover,
.wblore-card:focus {
  background: var(--IB-bg-alt);
  color: var(--IB-text);
  text-decoration: none;
  transform: translateY(-1px);
}

.wblore-card:active {
  transform: translateY(0);
}

/* 2-column grid variant (e.g. Reference group) */
.wblore-cards.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* Span 2 columns (for odd-one-out cards) */
.wblore-card.span2 {
  grid-column: span 2;
}

/* No right border on last card in a row */
.wblore-card.no-right {
  border-right: none;
}

/* No bottom border on last row */
.wblore-card.no-bottom {
  border-bottom: none;
}

/* -----------------------------------------------
   Card content
----------------------------------------------- */

.wblore-card-icon {
  font-size: 1.8em;
  line-height: 1;
}

.wblore-card-name {
  font-family: var(--heading-font);
  font-size: 0.9em;
  font-weight: bold;
  color: var(--IB-text);
  text-align: center;
  line-height: 1.3;
}

.wblore-card-sub {
  font-family: var(--font);
  font-size: 0.78em;
  font-style: italic;
  color: var(--IB-text);
  text-align: center;
  line-height: 1.3;
  opacity: 0.8;
}

/* -----------------------------------------------
   Mobile: 2-column fallback
----------------------------------------------- */

@media (max-width: 800px) {
  .wblore-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .wblore-card.span2 {
    grid-column: span 2;
  }

  .wblore-card {
    border-right: 1px solid rgba(61, 41, 90, 0.25);
  }

  .wblore-card:nth-child(2n) {
    border-right: none;
  }
}