/* ─── Tutorial pages — extends style.css ────────────────────── */

/* ── Hub page ─────────────────────────────────────────────────── */
.tutorials-hub { max-width: 920px; margin: 0 auto; padding: 60px 2rem 80px; }
.tutorials-hub .section-header { margin-bottom: 2.5rem; }

.tutorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.tutorial-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.75rem; text-decoration: none; color: var(--text);
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: transform 0.2s, border-color 0.2s;
  position: relative; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.tutorial-card:hover { transform: translateY(-3px); border-color: rgba(91,60,196,0.4); }
.tcard-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 0.2rem; }
.tcard-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.05rem; font-weight: 600; }
.tcard-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.55; flex: 1; }
.tcard-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.5rem; }
.tcard-steps { font-size: 0.74rem; color: var(--muted); }
.tcard-badge {
  font-size: 0.68rem; padding: 2px 9px; border-radius: 999px; font-weight: 500;
}
.tcard-badge.free { color: #16a34a; background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.22); }
.tcard-badge.member { color: var(--accent); background: rgba(91,60,196,0.08); border: 1px solid rgba(91,60,196,0.25); }

/* ── Tutorial page shell ─────────────────────────────────────── */
.tutorial-page { max-width: 740px; margin: 0 auto; padding: 48px 2rem 80px; }

.tutorial-breadcrumb { font-size: 0.76rem; color: var(--muted); margin-bottom: 2rem; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tutorial-breadcrumb a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.tutorial-breadcrumb a:hover { color: var(--accent); }
.tutorial-breadcrumb .sep { opacity: 0.4; }

.tutorial-app-icon { font-size: 3rem; line-height: 1; margin-bottom: 1rem; }
.tutorial-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; margin-bottom: 0.7rem; line-height: 1.15; }
.tutorial-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 0.77rem; color: var(--muted); margin-bottom: 1.1rem; }
.tutorial-meta span { display: flex; align-items: center; gap: 5px; }
.tutorial-intro { font-size: 0.9rem; color: var(--muted); line-height: 1.7; margin-bottom: 2rem; }

/* Hero section */
.tutorial-hero { margin: 0 0 2rem; }
.tutorial-hero-icon { font-size: 3rem; line-height: 1; margin-bottom: 0.8rem; }
.tutorial-hero-sub { font-size: 0.95rem; color: var(--muted); line-height: 1.7; max-width: 560px; }
.tutorial-page h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 700; line-height: 1.2; margin: 0.5rem 0 0.8rem; }
.tutorial-page h2 { font-family: 'Plus Jakarta Sans', sans-serif; }
.tutorial-hero em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.member-indicator {
  display: none; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px; margin-bottom: 1.5rem;
  background: rgba(22,163,74,0.07); border: 1px solid rgba(22,163,74,0.22);
  font-size: 0.76rem; color: #16a34a;
}

/* Requirements */
.req-box {
  background: rgba(91,60,196,0.05); border: 1px solid rgba(91,60,196,0.18);
  border-radius: 12px; padding: 1.25rem 1.5rem; margin-bottom: 2.5rem;
}
.req-box h3 { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 0.75rem; }
.req-box ul { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.req-box li { font-size: 0.84rem; color: var(--muted); display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.req-box li::before { content: '✓'; color: var(--accent); flex-shrink: 0; }

/* Steps */
.steps-section-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1rem; }
.steps-list { display: flex; flex-direction: column; gap: 1rem; }

.step-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.4rem; display: flex; gap: 1.1rem; align-items: flex-start;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.step-card:hover { border-color: rgba(91,60,196,0.3); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(91,60,196,0.1); border: 1px solid rgba(91,60,196,0.28);
  display: grid; place-items: center;
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 0.9rem; font-weight: 700; color: var(--accent);
}
.step-body { flex: 1; min-width: 0; }
.step-title { font-size: 0.93rem; font-weight: 500; margin-bottom: 0.4rem; }
.step-desc { font-size: 0.83rem; color: var(--muted); line-height: 1.65; }

.step-screen {
  margin-top: 0.5rem;
  font-size: 0.74rem; color: var(--muted); font-style: italic;
  line-height: 1.5; opacity: 0.7;
  background: none; border: none; padding: 0; display: block;
}
.step-screen::before { content: none; }

/* Step screen with real screenshot */
.step-screen.has-img {
  display: block; padding: 0.75rem 0;
  background: none; border: none; opacity: 1; font-style: normal;
}
.step-screen.has-img::before { display: none; }
.step-screen.has-img img {
  width: auto; max-width: 260px; max-height: 360px;
  object-fit: contain; border-radius: 10px;
  display: block; margin: 0 auto;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
}
.step-screen.has-img .img-caption {
  display: block; text-align: center; font-size: 0.70rem;
  color: var(--muted); font-style: italic; margin-top: 6px; line-height: 1.4;
}

/* Two screenshots side by side */
.img-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.75rem; max-width: 500px; margin: 0 auto;
}
.img-pair > div { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.img-pair img {
  width: 100%; max-height: 300px; object-fit: contain;
  border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.img-pair .img-caption {
  font-size: 0.68rem; text-align: center; color: var(--muted); font-style: italic; line-height: 1.35;
}
@media(max-width:500px) {
  .img-pair { grid-template-columns: 1fr; max-width: 240px; }
  .step-screen.has-img img { max-width: 220px; max-height: 320px; }
}

.step-tip {
  margin-top: 0.7rem; padding: 0.55rem 0.85rem; border-radius: 7px;
  background: rgba(22,163,74,0.06); border-left: 2px solid rgba(22,163,74,0.35);
  font-size: 0.77rem; color: var(--muted); line-height: 1.5;
}

/* Paywall gate */
.paywall-gate { position: relative; margin-top: 1rem; }

.locked-steps {
  filter: blur(5px); pointer-events: none; user-select: none;
  transition: filter 0.4s ease;
}
.locked-steps.unlocked { filter: none; pointer-events: auto; user-select: auto; }

.paywall-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(to bottom, rgba(246,245,252,0) 0%, rgba(246,245,252,0.97) 35%);
  border-radius: 14px; padding: 2rem; text-align: center; gap: 0.9rem; z-index: 10;
}
.paywall-overlay h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.2rem; }
.paywall-overlay p { font-size: 0.83rem; color: var(--muted); max-width: 280px; line-height: 1.6; }

/* Pro tips */
.pro-tips {
  margin-top: 2.5rem; background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.4rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.pro-tips h3 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: 1rem; }
.pro-tips ul { list-style: none; display: flex; flex-direction: column; gap: 0.65rem; }
.pro-tips li { font-size: 0.83rem; color: var(--muted); display: flex; gap: 9px; line-height: 1.55; }

/* Sources */
.tutorial-sources {
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.74rem; color: var(--muted); line-height: 1.8;
}
.tutorial-sources a { color: rgba(91,60,196,0.7); text-decoration: none; transition: color 0.2s; }
.tutorial-sources a:hover { color: var(--accent); }

/* Tutorial nav bar */
.tutorial-nav-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 3rem; padding-top: 1.75rem; border-top: 1px solid var(--border);
  gap: 1rem; flex-wrap: wrap;
}
.tnav-link { font-size: 0.81rem; color: var(--muted); text-decoration: none; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }
.tnav-link:hover { color: var(--accent); }

/* ── Stage cards (3-stage layout) ────────────────────────────── */
.stages-list { display: flex; flex-direction: column; gap: 1rem; }

.stage-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.4rem;
  display: flex; flex-direction: column; gap: 0.8rem;
  transition: border-color 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.stage-card:hover { border-color: rgba(91,60,196,0.3); }

.stage-header { display: flex; gap: 1rem; align-items: flex-start; }
.stage-header > div { display: flex; flex-direction: column; gap: 0.25rem; }
.stage-title { font-size: 0.93rem; font-weight: 500; }
.stage-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.6; }

/* Stage image — full width, no overflow */
.stage-img { border-radius: 10px; overflow: hidden; }
.stage-img img {
  width: 100%; min-width: 280px; max-height: 300px;
  object-fit: contain; display: block;
  border-radius: 10px;
  box-shadow: 0 2px 14px rgba(0,0,0,0.08);
  cursor: zoom-in;
}
.stage-img .img-caption {
  display: block; text-align: center;
  font-size: 0.70rem; color: var(--muted);
  font-style: italic; margin-top: 6px; line-height: 1.4;
}
.stage-img.paired {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem;
}
.stage-img.paired > div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stage-img.paired > div img {
  width: 100%; max-height: 240px;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Stage detail bullets */
.stage-details {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 0.38rem;
}
.stage-details li {
  font-size: 0.82rem; color: var(--muted); line-height: 1.55;
  display: flex; gap: 7px; align-items: flex-start;
}
.stage-details li::before {
  content: '·'; color: var(--accent);
  font-size: 1.2rem; line-height: 1.1; flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media(max-width: 640px) {
  .tutorial-page { padding: 32px 1.2rem 60px; }
  .step-card { flex-direction: column; gap: 0.75rem; }
  .step-num { width: 30px; height: 30px; font-size: 0.82rem; }
  .tutorial-grid { grid-template-columns: 1fr; }
  .tutorials-hub { padding: 40px 1.2rem 60px; }
  .stage-img.paired { grid-template-columns: 1fr; }
  .stage-img img, .stage-img.paired > div img { max-height: 260px; }
  .img-pair { grid-template-columns: 1fr; max-width: 240px; }
}
