/*
|--------------------------------------------------------------------------
| BeginnerSkate topic pages
|--------------------------------------------------------------------------
*/

.topics-page,
.individual-topic-page,
.topic-not-found {
  width: min(
    var(--page-width),
    calc(100% - 32px)
  );

  margin: 0 auto;
  padding: 64px 0 110px;
}

.topics-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;

  padding: clamp(36px, 7vw, 72px);

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(255, 255, 255, 0.22),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #202b63,
      #5b4bff 52%,
      #18c6a3
    );

  border-radius: var(--radius-large);
  color: #ffffff;

  box-shadow: var(--shadow-large);
}

.topics-hero h1 {
  max-width: 800px;
  margin: 16px 0 20px;

  font-size: clamp(3rem, 8vw, 6.4rem);
  line-height: 0.89;
  letter-spacing: -0.075em;
}

.topics-hero p:last-child {
  max-width: 700px;
  margin: 0;

  color: rgba(255, 255, 255, 0.78);
  line-height: 1.75;
}

.topics-hero .eyebrow {
  color: rgba(255, 255, 255, 0.84);
}

.topics-hero .eyebrow::before {
  background: #ffffff;
}

.topics-hero-stat {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;

  min-width: 170px;
  padding: 24px;

  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-medium);

  backdrop-filter: blur(16px);
}

.topics-hero-stat strong {
  font-size: 2.6rem;
}

.topics-hero-stat span {
  color: rgba(255, 255, 255, 0.72);
}

.topics-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  margin: 28px 0;
  padding: 18px 22px;

  background: rgba(255, 255, 255, 0.87);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-small);
}

.topics-toolbar p {
  margin: 0;
  color: var(--color-muted);
}

.topics-toolbar a {
  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
}

.topic-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(260px, 1fr));

  gap: 22px;
}

.topic-card {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  min-height: 300px;
  padding: 28px;

  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-medium);

  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.topic-card:hover {
  transform: translateY(-7px);

  box-shadow:
    0 30px 65px
    rgba(54, 64, 126, 0.2);
}

.topic-card-count {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  background:
    linear-gradient(
      135deg,
      var(--color-primary),
      var(--color-accent)
    );

  border-radius: 16px;

  color: #ffffff;
  font-weight: 900;
}

.topic-card h2 {
  margin: 24px 0 18px;

  font-size: 1.65rem;
  letter-spacing: -0.035em;
}

.topic-card h2 a {
  text-decoration: none;
}

.topic-card-metrics {
  display: grid;
  gap: 8px;

  color: var(--color-muted);
  font-size: 0.85rem;
}

.topic-card-link {
  margin-top: auto;
  padding-top: 25px;

  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
}

.topic-card-link::after {
  content: "→";
  margin-left: 8px;
}

.topic-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;

  width: fit-content;
  margin-bottom: 28px;
  padding: 11px 15px;

  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;

  color: var(--color-muted);
  font-size: 0.8rem;

  box-shadow: var(--shadow-small);
}

.topic-breadcrumb a {
  color: var(--color-primary);
  text-decoration: none;
}

.individual-topic-hero {
  padding: clamp(36px, 7vw, 72px);

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(255, 255, 255, 0.18),
      transparent 30%
    ),
    linear-gradient(
      140deg,
      #111426,
      #4338ca 55%,
      #18a88e
    );

  border-radius: var(--radius-large);
  color: #ffffff;

  box-shadow: var(--shadow-large);
}

.individual-topic-hero h1 {
  margin: 16px 0 20px;

  font-size: clamp(3rem, 8vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.individual-topic-hero > p:last-of-type {
  max-width: 700px;

  color: rgba(255, 255, 255, 0.76);
  line-height: 1.75;
}

.individual-topic-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;

  margin-top: 30px;
}

.individual-topic-stats span {
  display: grid;
  gap: 3px;

  min-width: 130px;
  padding: 16px;

  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;

  color: rgba(255, 255, 255, 0.7);
}

.individual-topic-stats strong {
  color: #ffffff;
  font-size: 1.5rem;
}

.topic-content-section {
  margin-top: 50px;
}

.topic-content-section > header {
  margin-bottom: 22px;
}

.topic-content-section h2 {
  margin: 10px 0 0;

  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.05em;
}

.topic-content-grid {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));

  gap: 20px;
}

.topic-content-card {
  display: flex;
  flex-direction: column;

  min-height: 280px;
  padding: 26px;

  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-medium);

  box-shadow: var(--shadow-medium);
}

.topic-content-type {
  width: fit-content;
  padding: 6px 10px;

  background: rgba(91, 75, 255, 0.1);
  border-radius: 999px;

  color: var(--color-primary);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topic-content-type[data-content-type="advice"] {
  background: rgba(24, 198, 163, 0.12);
  color: #087d68;
}

.topic-content-type[data-content-type="question"] {
  background: rgba(255, 79, 139, 0.1);
  color: #c22861;
}

.topic-content-card h2 {
  margin: 22px 0 14px;

  font-size: 1.45rem;
  line-height: 1.2;
}

.topic-content-card h2 a {
  text-decoration: none;
}

.topic-content-card p {
  margin: 0;

  color: var(--color-muted);
  line-height: 1.7;
}

.topic-content-link {
  margin-top: auto;
  padding-top: 24px;

  color: var(--color-primary);
  font-weight: 900;
  text-decoration: none;
}

.topic-not-found h1 {
  margin: 14px 0 18px;

  font-size: clamp(3rem, 8vw, 5.5rem);
  letter-spacing: -0.06em;
}

.topic-not-found > p:last-of-type {
  max-width: 620px;
  margin-bottom: 28px;

  color: var(--color-muted);
  line-height: 1.75;
}

@media (max-width: 720px) {
  .topics-hero,
  .topics-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topics-hero-stat {
    width: 100%;
  }

  .individual-topic-hero {
    padding: 42px 25px;
  }
}
