/* ═══════════════════════════════════════
   CERT OVERVIEW PAGE
═══════════════════════════════════════ */

.cert-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg2);
  border: 1px solid color-mix(in srgb, var(--cert-color) 30%, transparent);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.cert-hero-badge {
  font-size: 40px;
  line-height: 1;
  flex-shrink: 0;
}

.cert-hero-name {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--cert-color);
  margin-bottom: 6px;
}

.cert-hero-desc {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.6;
}

/* ── resource tiles (ns-map-btn pattern) ── */
.cert-resources {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.cert-resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 12px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  min-width: 90px;
  transition: border-color 0.15s, background 0.15s;
}

.cert-resource-card:hover {
  border-color: var(--cert-color);
  background: color-mix(in srgb, var(--cert-color) 10%, transparent);
}

.cert-resource-icon { font-size: 20px; line-height: 1; }

.cert-resource-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cert-resource-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text2);
  font-family: 'JetBrains Mono', monospace;
}

.cert-resource-desc {
  font-size: 9.5px;
  color: var(--text3);
  line-height: 1.4;
}

.cert-resource-arrow { display: none; }

.cert-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text3);
  margin-bottom: 36px;
}

/* ── exam block ── */
.exam-block {
  margin-bottom: 36px;
}

.exam-label {
  font-family: 'Unbounded', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text3);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── accordion topic ── */
.cert-topic {
  border: 1px solid var(--border);
  border-radius: 7px;
  margin-bottom: 6px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.cert-topic.open {
  border-color: var(--accent);
}

.cert-topic-head {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: var(--bg2);
  border: none;
  padding: 13px 16px;
  cursor: pointer;
  text-align: left;
  font-family: 'JetBrains Mono', monospace;
  transition: background 0.15s;
}

.cert-topic-head:hover {
  background: var(--bg3);
}

.cert-topic.open .cert-topic-head {
  background: var(--bg3);
}

/* Topics without posts — non-interactive */
.cert-topic:not(.has-posts) .cert-topic-head {
  cursor: default;
  pointer-events: none;
}
.cert-topic:not(.has-posts) .cert-topic-head:hover {
  background: var(--bg2);
}
.cert-topic:not(.has-posts) .topic-chevron {
  opacity: 0.25;
}

.topic-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  min-width: 32px;
}

.topic-title {
  font-size: 12.5px;
  color: var(--text);
  flex: 1;
}

.topic-meta {
  font-size: 11px;
  color: var(--text3);
}

.topic-empty {
  color: var(--text3);
  opacity: 0.5;
}

.topic-chevron {
  font-size: 16px;
  color: var(--text3);
  transition: transform 0.2s;
  line-height: 1;
}

.cert-topic.open .topic-chevron {
  transform: rotate(90deg);
}

/* ── accordion body ── */
.cert-topic-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.cert-post-link {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px 12px 48px;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.cert-post-link:last-child {
  border-bottom: none;
}

.cert-post-link:hover {
  background: var(--bg3);
}

.cert-post-title {
  font-size: 12.5px;
  color: var(--accent);
}

.cert-post-desc {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
}

/* ── no content ── (styles moved to global.css) ── */

/* ── responsive ── */
@media (max-width: 600px) {
  .cert-hero {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .cert-hero-badge { font-size: 28px; }
  .cert-hero-name { font-size: 17px; }
  .cert-hero-desc { font-size: 11.5px; }

  /* Credly badge: hide on mobile to avoid layout break */
  .credly-wrap { display: none; }

  .cert-stats {
    flex-wrap: wrap;
    gap: 6px;
  }

  .cert-resources { flex-wrap: wrap; }
  .cert-resource-card { flex: 1 1 120px; }

  .cert-topic-head {
    gap: 8px;
    padding: 11px 12px;
  }
  .topic-num { min-width: 26px; font-size: 10px; }
  .topic-title { font-size: 12px; }
  .topic-meta { font-size: 10px; }

  .cert-post-link { padding: 10px 12px; }
  .cert-post-title { font-size: 12px; }
  .cert-post-desc { font-size: 10.5px; }

  .exam-label { font-size: 10px; }
}
