/* Topic hub pages */

body.topics-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topic-hero {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.1);
  background:
    radial-gradient(ellipse 70% 50% at 80% 0%, rgba(56, 189, 248, 0.08), transparent),
    var(--bg);
}

.topic-hero-inner {
  max-width: var(--container-max, 1400px);
  margin: 0 auto;
  padding-inline: var(--gutter, clamp(16px, 2vw, 24px));
}

.topic-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(56, 189, 248, 0.1);
  color: var(--cyan);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.topic-hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  margin-bottom: 12px;
}

.topic-hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 680px;
  line-height: 1.6;
}

.topic-main {
  max-width: var(--container-max, 1400px);
  margin: 0 auto;
  padding: 32px var(--gutter, clamp(16px, 2vw, 24px)) 48px;
  flex: 1;
}

.topic-path {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.topic-path-card {
  flex: 1;
  min-width: 200px;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: var(--radius-md, 14px);
  background: linear-gradient(165deg, rgba(20, 33, 58, 0.5), rgba(10, 17, 31, 0.4));
  text-decoration: none;
  transition: all 0.25s ease;
}

.topic-path-card:hover {
  border-color: rgba(56, 189, 248, 0.28);
  transform: translateY(-2px);
}

.topic-path-card b {
  display: block;
  color: var(--text);
  font-size: 15px;
  margin-bottom: 4px;
}

.topic-path-card span {
  color: var(--muted);
  font-size: 13px;
}

.topic-list {
  display: grid;
  gap: 12px;
}

.topic-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(56, 189, 248, 0.1);
  border-radius: var(--radius-md, 14px);
  background: rgba(15, 23, 42, 0.45);
  text-decoration: none;
  transition: all 0.2s ease;
}

.topic-item:hover {
  border-color: rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.65);
}

.topic-num {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.topic-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  color: var(--text);
}

.topic-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.topic-arrow {
  color: var(--cyan);
  font-size: 18px;
  opacity: 0.7;
}

.topic-grid-hubs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.topic-hub-card {
  padding: 24px;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: var(--radius-lg, 20px);
  background: linear-gradient(165deg, rgba(20, 33, 58, 0.6), rgba(10, 17, 31, 0.5));
  text-decoration: none;
  transition: all 0.25s ease;
}

.topic-hub-card:hover {
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.08);
}

.topic-hub-card .hub-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.topic-hub-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text);
}

.topic-hub-card p {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.topic-hub-card .hub-count {
  font-size: 12px;
  color: var(--cyan);
  font-weight: 600;
}

@media (max-width: 640px) {
  .topic-item {
    grid-template-columns: auto 1fr;
  }

  .topic-arrow {
    display: none;
  }
}
