/*
|--------------------------------------------------------------------------
| Individual lesson page
|--------------------------------------------------------------------------
*/

.lesson-page {
  width: min(940px, calc(100% - 32px));
  margin: 0 auto;
  padding: 52px 0 110px;
}

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

  margin-bottom: 30px;
  padding: 12px 16px;

  width: fit-content;

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

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

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

.lesson-breadcrumb a {
  color: var(--color-primary);
  font-weight: 750;
  text-decoration: none;
}

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

  padding: clamp(34px, 7vw, 74px);

  background:
    radial-gradient(
      circle at 90% 10%,
      rgba(255, 255, 255, 0.24),
      transparent 25%
    ),
    linear-gradient(
      135deg,
      #171b35,
      #4d3ae6 58%,
      #ff4f8b
    );

  border: 0;
  border-radius: var(--radius-large);

  color: #ffffff;

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

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

  position: absolute;
  right: -100px;
  bottom: -160px;

  width: 380px;
  height: 380px;

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

.lesson-header .lesson-card-meta span {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

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

  max-width: 820px;

  margin: 24px 0 22px;

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

.lesson-summary {
  position: relative;
  z-index: 2;

  max-width: 690px;
  margin: 0 0 24px;

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

.lesson-header .lesson-topic {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
}

.lesson-header .lesson-topic::before {
  color: #ffb7d1;
}

.lesson-contributor {
  position: relative;
  z-index: 2;

  margin: 28px 0 0;
  color: rgba(255, 255, 255, 0.68);
}

.lesson-contributor strong {
  color: #ffffff;
}

.lesson-content {
  margin-top: 28px;
  padding: 10px 36px 20px;

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

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

.lesson-content-section {
  position: relative;

  padding: 42px 0 42px 54px;

  border-bottom: 1px solid var(--color-border);
}

.lesson-content-section:last-child {
  border-bottom: 0;
}

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

  position: absolute;
  left: 0;
  top: 47px;

  width: 28px;
  height: 28px;

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

  border: 6px solid #eef1ff;
  border-radius: 50%;

  box-shadow:
    0 8px 18px rgba(91, 75, 255, 0.2);
}

.lesson-content-section h2 {
  margin: 0 0 18px;

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

.lesson-content-section p {
  margin: 0 0 17px;

  color: #4d5768;
  font-size: 1.04rem;
  line-height: 1.9;
}

.lesson-content-section p:last-child {
  margin-bottom: 0;
}

.lesson-safety-notice {
  position: relative;
  overflow: hidden;

  margin-top: 28px;
  padding: 28px 30px 28px 76px;

  background:
    linear-gradient(
      135deg,
      rgba(255, 190, 61, 0.19),
      rgba(255, 79, 139, 0.1)
    );

  border: 1px solid rgba(255, 190, 61, 0.32);
  border-radius: var(--radius-medium);
}

.lesson-safety-notice::before {
  content: "!";

  position: absolute;
  left: 24px;
  top: 27px;

  display: grid;
  place-items: center;

  width: 32px;
  height: 32px;

  background: var(--color-warning);
  border-radius: 50%;

  color: #352400;
  font-weight: 950;
}

.lesson-safety-notice strong {
  display: block;
  margin-bottom: 9px;

  font-size: 1rem;
}

.lesson-safety-notice p {
  margin: 0;

  color: #5d5660;
  line-height: 1.75;
}

.lesson-footer-action {
  margin-top: 34px;
}

.lesson-footer-action a,
.lesson-not-found a {
  display: inline-flex;
  align-items: center;

  padding: 14px 21px;

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

  border-radius: 999px;

  color: #ffffff;
  font-weight: 900;
  text-decoration: none;

  box-shadow:
    0 14px 34px rgba(91, 75, 255, 0.28);
}

.lesson-footer-action a::after {
  content: "→";
  margin-left: 9px;
}

.lesson-not-found {
  width: min(720px, calc(100% - 32px));
  margin: 70px auto;
  padding: 60px;

  background: rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-large);

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

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

  font-size: clamp(2.7rem, 7vw, 5rem);
  letter-spacing: -0.06em;
}

.lesson-not-found p {
  margin-bottom: 28px;

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

@media (max-width: 640px) {
  .lesson-header {
    padding: 42px 26px;
    border-radius: 26px;
  }

  .lesson-header h1 {
    font-size: clamp(3rem, 17vw, 4.8rem);
  }

  .lesson-content {
    padding: 4px 24px 16px;
  }

  .lesson-content-section {
    padding-left: 0;
  }

  .lesson-content-section::before {
    display: none;
  }

  .lesson-safety-notice {
    padding: 70px 24px 26px;
  }

  .lesson-safety-notice::before {
    left: 24px;
    top: 24px;
  }
}
