

/* =========================================
   HERO
========================================= */

.lesson-hero-placeholder {
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  background: linear-gradient(135deg, #f5f5f5, #e9e9e9);
}

.lesson-hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  margin-top: 20px;
}

.lesson-hero img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.lesson-hero.overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.05) 0%,
    rgba(0,0,0,0.55) 100%
  );
}

.lesson-title {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  z-index: 2;
}


/* =========================================
   DESCRIPTION
========================================= */

.lesson-description {
  border-radius: 16px;
  padding: 20px;
  background: var(--surface);
box-shadow: var(--shadow);
}

/* =========================================
   STEPS
========================================= */

.lesson-steps {
  display: flex;
  flex-direction: column;
}

.lesson-steps > *:first-child {
  margin-top: 0;
}

/* STEP CARD */

.lesson-step {
  background: var(--surface);
box-shadow: var(--shadow);
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.lesson-step.open {
  box-shadow: var(--shadow-lg);
}

/* HEADER */

.lesson-step-header {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
}

.step-number {
  width: 32px;
  height: 32px;
  min-width: 32px;

  border-radius: 50%;
  background: var(--surface-2);
color: var(--text-2);

  font-weight: 600;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  flex: 1;
  font-weight: 600;
  font-size: 16px;
}

.step-toggle {
  transition: transform 0.25s ease;
  font-size: 14px;
}

.lesson-step.open .step-toggle {
  transform: rotate(180deg);
}

/* CONTENT */

.lesson-step-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 20px;
}

.lesson-step.open .lesson-step-content {
  padding: 0 20px 20px;
  max-height: 2000px;
}

/* VIDEO */

.lesson-video {
  margin-top: 12px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: #000;
}

.lesson-video iframe {
  width: 100%;
  height: 100%;
}

/* TEXT */
.step-text {
  flex: 1;
  min-width: 0;

  font-size: 14px;
  line-height: 1.45;
  color: var(--text-2);
}
/* =========================================
   DRAFT BANNER
========================================= */

.draft-banner {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}

/* =========================================
   EMPTY STATE
========================================= */

.lesson-empty {
  text-align: center;
  padding: 60px 20px;
  font-size: 16px;
  opacity: 0.6;
}

/* =========================================
   MOBILE OPTIMIZATION
========================================= */

@media (max-width: 768px) {

  .lesson-hero img,
  .lesson-hero-placeholder {
    height: 220px;
  }

  .lesson-title {
    font-size: 20px;
    bottom: 16px;
    left: 16px;
  }

  .lesson-step-header {
    padding: 16px;
  }

  .lesson-step-content {
    padding: 0 16px;
  }

  .lesson-step.open .lesson-step-content {
    padding: 0 16px 16px;
  }
}

/* ОБЩИЙ СЕРЫЙ КОНТЕЙНЕР */
.dashboard-v2 {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 16px clamp(16px, 3vw, 32px) 96px;
  box-sizing: border-box;
}

/* БЕЛЫЙ БЛОК */
.lesson-container {
  background: var(--surface);
  border-radius: 18px;
  padding: 16px;
}

/* HERO */
.lesson-hero {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
}

.lesson-hero img {
  width: 100%;
  display: block;
  border-radius: 16px;
}

/* TITLE поверх картинки */
.lesson-title {
  font-size: 20px;
  margin: 12px 0 0;
}

/* Описание */
.lesson-description {
  margin: 16px 0;
}

.text-content ol,
.text-content ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.text-content {
  line-height: 1.7;
  var(--text)
}

.text-content p {
  margin: 0 0 12px;
}

.text-content ol,
.text-content ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.text-content li {
  margin-bottom: 6px;
}

.step-text {
  flex: 1;
  min-width: 0;

  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.text-content a {
  color: #1d9bf0;
  text-decoration: none;
  cursor: pointer;
}

.text-content a:hover {
  text-decoration: underline;
}

body[data-entity="lessons"] .tg-body.section-items {
  padding-left: 0;
  padding-right: 0;
}

body[data-entity="lessons"] .tg-body.section-items > * + * {
  margin-top: 16px;
}


.lessons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* с 650px — 3 в ряд */
@media (min-width: 650px) {
  .lessons-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* если хочешь ещё лучше — с 1100px можно 4 */
@media (min-width: 1100px) {
  .lessons-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* большой экран */
@media (min-width: 1500px) {
  .lessons-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.card-media__image {
  aspect-ratio: 1 / 1;
}

.lesson-card {
  background: var(--surface);
box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 500;
}

.app-gallery {
  display: grid;
  gap: 12px;
}

.app-gallery img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.recipes-preview {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.preview-card {
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
}

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

.review-card {
  background: #fff;
  padding: 14px;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.review-text {
  margin-bottom: 6px;
}

.review-author {
  font-size: 13px;
  opacity: 0.6;
}

.marketing-lessons-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.marketing-lesson-card {
  width: 100%;
}

.marketing-lesson-image {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
}



.marketing-lesson-image img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
}
.marketing-lesson-image::after {
display: none !important;
}

.lock-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  z-index: 2;
}

.marketing-lesson-title {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  z-index: 2;
}

/* =========================================
   SUBSCRIPTION PREMIUM
========================================= */

body[data-entity="subscription"] .premium-hero {
  background: linear-gradient(135deg, #d9cce0, #f6f4f9);
  padding: 40px 20px;
  border-radius: 24px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

body[data-entity="subscription"] .lesson-title {
  position: static;
  color: #111;
  font-size: 24px;
  margin-bottom: 8px;
}
.subscription-page .lesson-title {
  position: static;
  color: #111;
  font-size: 24px;
  margin-bottom: 8px;
}

.hero-subtitle {
  opacity: 0.7;
  margin-bottom: 20px;
}

.big-cta {
  padding: 14px 24px;
  font-size: 16px;
  border-radius: 14px;
  background: #4c6ef5;
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(76,110,245,0.35);
}

.glass {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(8px);
  background: var(--surface);
  color: var(--text);

}

[data-theme="dark"] .glass {

  background: var(--surface);
  color: var(--text);
}

.marketing-title {
  color: var(--text);
}

.recipes-subtitle,
.community-text {
  color: var(--text-muted);
}

[data-theme="dark"] .glass {

  background: #1b1c1e;

}

.btn-primary {
  background: #4c6ef5;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-weight: 600;
}

/* 3 карточки в ряд */


/* полный список */
.lessons-full-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 10px;
}

/* когда раскрыто */
.lessons-full-grid.open {
  display: grid;
}

/* кнопка */
.show-all-lessons-btn {
  margin-top: 18px;
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  background: linear-gradient(135deg, #4c6ef5, #7b8cff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(76,110,245,0.35);
}

.show-all-lessons-btn:active {
  transform: scale(0.98);
}

/* Заголовок */
.marketing-title {
  font-size: 18px;
  margin-bottom: 18px;
}

/* 3 карточки в ряд */


/* Полный список */
.lessons-full-grid {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.lessons-full-grid.open {
  display: grid;
}



.lessons-preview-grid,
.lessons-full-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.lessons-full-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.lessons-full-grid.open {
  display: grid;
}
.marketing-lesson-card {
  width: 100%;
}

.marketing-lesson-image img {
  height: 110px;
}

/* ===== APP MARKETING BLOCK ===== */

.marketing-app-block {
  padding: 20px;
  border-radius: 20px;
  margin-top: 16px;
}

.app-screens-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.app-screen {
  width: 100%;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.app-screen:active {
  transform: scale(0.97);
}

/* ===== IMAGE OVERLAY ===== */

.image-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.image-overlay-img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 20px;
}

.image-overlay {
  opacity: 0;
  transition: opacity .2s ease;
}

.image-overlay.show {
  opacity: 1;
}

.marketing-title {
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

.marketing-card {
  padding: 12px 18px 22px;
}
.marketing-card h3 {
  margin-top: 0;
}

.lesson-steps > .marketing-app-block:first-child,
.lesson-steps > .marketing-card:first-child {
  margin-top: 0;
}

.lesson-steps > * + * {
  margin-top: 18px;
}

.marketing-card {
  padding: 18px;
  border-radius: 22px;
}

.is-centered {
  text-align: center;
}

.sticky-cta {

  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 12px 16px 18px;

  backdrop-filter: blur(12px);

  background: rgba(255,255,255,0.85);

  border-top: 1px solid var(--border);

  z-index: 50;
  display: flex;
  justify-content: center;   /* 👈 центрируем */
}

[data-theme="dark"] .sticky-cta {

  background: rgba(18,18,20,0.85);

  border-top: 1px solid #2a2b2e;

}

.sticky-cta .big-cta {

  background: linear-gradient(
    135deg,
    #5b6ee1,
    #6f83ff
  );

  color: #fff;

  border-radius: 14px;

}

[data-theme="dark"] .sticky-cta .big-cta {

  background: linear-gradient(
    135deg,
    #3f4fc9,
    #5869ff
  );

}



/* ===== COMMUNITY BLOCK ===== */

.community-text {
  text-align: center;
  margin-top: 6px;
  opacity: 0.75;
  font-size: 15px;
}

.community-features {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
  opacity: 0.85;
}

/* ===== PAYMENT MODAL ===== */

.payment-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.payment-modal.open {
  display: flex;
}

.payment-modal-content {
  width: 90%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 24px;
  padding: 26px 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  text-align: center;
  animation: modalFade 0.2s ease;
}

.payment-title {
  margin: 0 0 22px;
  font-size: 18px;
  font-weight: 700;
}

.payment-btn {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 12px;
}

.payment-rf {
  background: #4c6ef5;
  color: #fff;
  box-shadow: 0 6px 18px rgba(76,110,245,0.35);
}

.payment-world {
  background: rgba(76,110,245,0.12);
  color: #4c6ef5;
}

@keyframes modalFade {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ===== STUDENT WORKS ===== */

.students-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.student-work {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.student-work:active {
  transform: scale(0.97);
}



/* ===== Адаптивная ширина картинки ===== */
body[data-entity="lessons"] .image-preview {
  width: 100%;
  max-width: 500px;    
  margin: 0 auto;
  display: block;
}

[data-theme="dark"] .step-number {

  background: var(--surface-2);

  color: var(--text);

}

[data-theme="dark"] .ingredient-line {
  border-bottom: 1px dotted rgba(255,255,255,0.15);
}

/* ===============================
   TG QUOTE — TELEGRAM STYLE
=============================== */

/* =========================
   TG QUOTE
========================= */
.tg-quote {
  position: relative;

  background: #EAF5E8;
  border-left: 4px solid #5FB760;

  padding: 18px 18px 18px 26px; /* увеличили слева */
  border-radius: 12px;

  font-size: 15px;
  line-height: 1.6;
  color: #111;

  margin: 16px 0 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}

/* декоративная кавычка */
.tg-quote::before {
  content: "“"; /* ← типографская кавычка */

  position: absolute;
  top: 10px;
  left: 12px;

  font-size: 28px;
  font-weight: 700;

  color: #5FB760;
  opacity: .25;

  pointer-events: none;
}

[data-theme="dark"] .tg-quote::before {

  color: var(--accent);

  opacity: 0.9;

}


/* DARK */

/* =========================
   DARK QUOTE
========================= */

[data-theme="dark"] .tg-quote {
  background: #2a2b2e;
  border-left: 4px solid #827d8f; /* цвет полоски */

  color: #e5e7eb; /* ← читаемый светлый текст */
  box-shadow: none; /* тень не нужна в dark */
}

[data-theme="dark"] .tg-quote::before {
  color: #827d8f; /* ← тот же цвет что и полоска */
  opacity: 0.35;  /* мягче, чем 0.9 */
}

/* =========================
   INGREDIENTS CARD
========================= */

.ingredients-block {
  border-radius: 16px;
  padding: 18px 20px;
  margin: 20px 0;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

/* LIGHT THEME */
body.light .ingredients-block {
  background: #ffffff;
  border: 1px solid #eeeeee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* DARK THEME */
body.dark .ingredients-block {
  background: #2a2b2e; /* ← твой цвет */
  border: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}

/* =========================
   INGREDIENTS FULLSCREEN
========================= */

.ingredients-fullscreen {
  position: fixed;
  inset: 0;
  background: var(--bg);

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;

  z-index: 99999;

  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ingredients-fullscreen.active {
  opacity: 1;
  pointer-events: auto;
}

.ingredients-fullscreen-content {
  max-width: 520px;
  margin: 0 auto;

  padding: 40px 24px 100px;

  font-size: 20px;
  line-height: 1.6;
}


.fullscreen-ingredient {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  cursor: pointer;
}

.fullscreen-ingredient input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  pointer-events: none; /* чекбокс сам не ловит клик */
}

.fullscreen-ingredient-body {
  flex: 1;
}

.fullscreen-ingredient-text {
  flex: 1;
  font-weight: 600;
}

.fullscreen-ingredient-amount {
  font-size: 16px;
  opacity: .7;
  margin-top: 4px;
}

/* блокируем скролл фона */
body.no-scroll {
  overflow: hidden;
}

.ingredients-close {
  position: sticky;
  top: 0;

  margin-left: auto;
  display: block;

  background: transparent;
  font-size: 22px;
  font-weight: 600;
  border: none;
  border-radius: 10px;

  padding: 8px 14px;
  cursor: pointer;

  margin-bottom: 20px;
}

.price-badge {
  position: absolute;
  top: 12px;
  left: 12px;

  background: rgba(0,0,0,.75);
  color: #fff;

  font-size: 13px;
  font-weight: 600;

  padding: 4px 8px;
  border-radius: 8px;
}

.step-text a {
  color: #1d9bf0;           /* такой же цвет, как в текстовом блоке */
  text-decoration: none;    /* без подчёркивания */
  cursor: pointer;
}

/* Ссылки в шагах ведут себя как обычный текст */
.step-text a {
  display: inline;       /* вместо block или inline-block */
  color: #1d9bf0;        /* цвет ссылки */
  text-decoration: none;  /* без подчеркивания */
  cursor: pointer;
}

.step-text a:hover {
  text-decoration: underline; /* подчёркивание при наведении */
}


.step-text a:hover {
    background: none !important;   /* убираем фон */
    box-shadow: none !important;   /* убираем тени */
    outline: none !important;      /* убираем outline */
    color: inherit;                /* сохраняем цвет текста */
    text-decoration: underline;    /* можно убрать подчеркивание, если нужно */
}

.lesson-telegram-message{
text-align:center;
padding:60px 20px;
max-width:500px;
margin:0 auto;
}

.lesson-telegram-icon{
font-size:42px;
margin-bottom:16px;
}

.lesson-telegram-title{
font-size:22px;
margin-bottom:12px;
}

.lesson-telegram-text{
opacity:0.7;
margin-bottom:24px;
}

.lesson-telegram-button{
display:inline-block;
background:#229ED9;
color:#fff;
padding:14px 24px;
border-radius:12px;
text-decoration:none;
font-weight:600;
}