/*
|--------------------------------------------------------------------------
| Learn page
|--------------------------------------------------------------------------
*/

.learn-page {
  width: min(
    var(--page-width),
    calc(100% - 32px)
  );

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

.learn-header {
  position: relative;
  overflow: hidden;

  max-width: none;
  margin-bottom: 38px;
  padding: clamp(34px, 6vw, 72px);

  background:
    radial-gradient(
      circle at 85% 20%,
      rgba(255, 255, 255, 0.28),
      transparent 24%
    ),
    linear-gradient(
      135deg,
      #5b4bff 0%,
      #7f50ff 50%,
      #ff4f8b 100%
    );

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

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

.learn-header::before,
.learn-header::after {
  content: "";

  position: absolute;

  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.learn-header::before {
  right: -90px;
  top: -130px;

  width: 340px;
  height: 340px;
}

.learn-header::after {
  right: 90px;
  bottom: -150px;

  width: 260px;
  height: 260px;
}

.learn-header .eyebrow {
  color: rgba(255, 255, 255, 0.88);
}

.learn-header .eyebrow::before {
  background: #ffffff;
}

.learn-header h1 {
  position: relative;
  z-index: 2;

  max-width: 760px;
  margin: 18px 0 22px;

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

.learn-header > p:last-child {
  position: relative;
  z-index: 2;

  max-width: 650px;
  margin: 0;

  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.75;
}

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

  margin-bottom: 26px;
  padding: 18px 22px;

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

  box-shadow: var(--shadow-small);
  backdrop-filter: blur(18px);
}

.learn-toolbar p {
  margin: 0;

  color: var(--color-muted);
  font-weight: 800;
}

.learn-toolbar a {
  padding: 11px 17px;

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

  border-radius: 999px;

  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 850;
  text-decoration: none;

  box-shadow:
    0 12px 26px rgba(91, 75, 255, 0.24);
}

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

  gap: 24px;
}

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

  display: flex;
  flex-direction: column;

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

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.96),
      rgba(255, 255, 255, 0.82)
    );

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

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

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

.lesson-card::before {
  content: "";

  position: absolute;
  left: 0;
  top: 0;

  width: 100%;
  height: 7px;

  background:
    linear-gradient(
      90deg,
      var(--color-primary),
      var(--color-secondary),
      var(--color-accent)
    );
}

.lesson-card::after {
  content: "";

  position: absolute;
  right: -40px;
  bottom: -50px;

  width: 140px;
  height: 140px;

  background:
    radial-gradient(
      circle,
      rgba(91, 75, 255, 0.13),
      transparent 70%
    );

  border-radius: 50%;
}

.lesson-card:hover {
  transform: translateY(-8px) rotate(-0.4deg);

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

.lesson-card:nth-child(even):hover {
  transform: translateY(-8px) rotate(0.4deg);
}

.lesson-card-meta {
  position: relative;
  z-index: 2;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-card-meta span {
  padding: 7px 11px;

  background: rgba(91, 75, 255, 0.09);
  border: 1px solid rgba(91, 75, 255, 0.12);
  border-radius: 999px;

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

.lesson-card h2 {
  position: relative;
  z-index: 2;

  margin: 26px 0 15px;

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

.lesson-card h2 a {
  color: var(--color-ink);
  text-decoration: none;
}

.lesson-card > p {
  position: relative;
  z-index: 2;

  margin: 0 0 22px;

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

.lesson-topic-list {
  position: relative;
  z-index: 2;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lesson-topic {
  padding: 6px 9px;

  background: #f1f4fb;
  border-radius: 9px;

  color: #667085;
  font-size: 0.78rem;
  font-weight: 700;
}

.lesson-topic::before {
  content: "#";
  color: var(--color-secondary);
}

.lesson-card-link {
  position: relative;
  z-index: 2;

  display: inline-flex;
  align-items: center;

  width: fit-content;
  margin-top: auto;
  padding-top: 30px;

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

.lesson-card-link::after {
  content: "→";

  margin-left: 8px;

  transition: transform 160ms ease;
}

.lesson-card-link:hover::after {
  transform: translateX(5px);
}

.empty-state {
  padding: 70px 30px;

  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed rgba(91, 75, 255, 0.28);
  border-radius: var(--radius-large);

  text-align: center;
  box-shadow: var(--shadow-small);
}

@media (max-width: 640px) {
  .learn-page {
    padding-top: 40px;
  }

  .learn-header {
    padding: 42px 26px;
    border-radius: 26px;
  }

  .learn-header h1 {
    font-size: clamp(3rem, 18vw, 4.6rem);
  }

  .learn-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
