/* tutorials.css — Step-by-step tutorials page styles */

/* HERO & STATS */
.page-hero {
  padding: 7rem 0 3.5rem;
  background: linear-gradient(180deg, rgba(56,29,146,0.03) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.page-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}
.page-hero-content p {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2rem;
  font-size: 1.1rem;
  line-height: 1.7;
}
.hero-stats-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: center;
  background: var(--bg-card-main);
  border: 1px solid var(--border);
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-size: 0.9rem;
  box-shadow: var(--shadow-card);
}
.h-stat {
  color: var(--text-secondary);
}
.h-stat strong {
  color: var(--purple);
}

/* MAIN LAYOUT */
.tutorials-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: start;
}

/* SIDEBAR */
.tutorials-sidebar {
  position: sticky;
  top: 100px;
}
.sticky-widget {
  background: var(--bg-card-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}
.widget-title {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  color: var(--text-primary);
}
.tut-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tut-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition-fast);
}
.tut-nav-list a:hover {
  background: rgba(56,29,146,0.04);
  color: var(--text-primary);
}
.tut-nav-list a.active {
  background: rgba(56,29,146,0.06);
  border: 1px solid rgba(56,29,146,0.15);
  color: var(--purple);
}
.tut-no {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(56,29,146,0.05);
  color: var(--text-muted);
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
}
.tut-nav-list a.active .tut-no {
  background: rgba(56,29,146,0.12);
  color: var(--purple);
}

/* SIDEBAR AD */
.ads-sidebar-slot {
  margin-top: 1.5rem;
}

/* TUTORIAL CARDS */
.tutorials-main {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.tutorial-card {
  background: var(--bg-card-main);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  scroll-margin-top: 100px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}
.tutorial-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--border);
  transition: var(--transition);
}
.tutorial-card:hover {
  border-color: rgba(56,29,146,0.25);
  box-shadow: var(--shadow-card-hover);
}
.tutorial-card:hover::before {
  background: var(--grad-cyan-purple);
}

/* HEADER AREA */
.tut-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}
.difficulty-badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.diff-begin {
  background: rgba(16,185,129,0.12);
  color: var(--green);
  border: 1px solid rgba(16,185,129,0.2);
}
.diff-inter {
  background: rgba(249,115,22,0.12);
  color: var(--orange);
  border: 1px solid rgba(249,115,22,0.2);
}
.diff-adv {
  background: rgba(239,68,68,0.12);
  color: var(--red);
  border: 1px solid rgba(239,68,68,0.2);
}
.tut-title {
  font-size: 1.8rem;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.tut-desc {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}
.tut-requirements {
  background: rgba(56,29,146,0.03);
  border: 1px solid var(--border);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.tut-requirements strong {
  color: var(--text-primary);
  margin-right: 0.5rem;
}
.req-tag {
  background: rgba(56,29,146,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

/* TUTORIAL BODY / STEPS */
.tut-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}
.tut-body::after {
  content: '';
  position: absolute;
  top: 15px; bottom: 15px; left: 18px;
  width: 1px;
  background: rgba(56,29,146,0.08);
  z-index: 1;
}
.tut-step {
  display: flex;
  gap: 1.5rem;
  position: relative;
  z-index: 2;
}
.step-num {
  width: 36px; height: 36px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px var(--bg-card-main);
  transition: var(--transition-fast);
}
.tut-step:hover .step-num {
  border-color: var(--purple);
  color: #fff;
  background: var(--purple);
  box-shadow: 0 0 10px rgba(168,85,247,0.3), 0 0 0 5px var(--bg-card-main);
}
.step-content {
  flex: 1;
  padding-top: 0.25rem;
}
.step-content h4 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}
.step-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.step-content ul {
  list-style-type: none;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.step-content ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.25rem;
}
.step-content ul li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--purple);
}

/* CODE BLOCKS */
.step-content pre {
  margin: 1rem 0;
  background: #060913;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  overflow-x: auto;
  position: relative;
}
.step-content pre code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #c9d1d9;
  line-height: 1.5;
}

/* COPY BUTTON FOR CODE */
.copy-btn {
  position: absolute;
  top: 8px; right: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition-fast);
}
.step-content pre:hover .copy-btn {
  opacity: 1;
}
.copy-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* RESPONSIVE LAYOUT */
@media (max-width: 1024px) {
  .tutorials-layout {
    grid-template-columns: 1fr;
  }
  .tutorials-sidebar {
    display: none; /* Hide sticky sidebar navigation on tablet/mobile */
  }
}
@media (max-width: 768px) {
  .tutorial-card {
    padding: 1.5rem;
  }
  .tut-body::after {
    left: 14px;
  }
  .step-num {
    width: 28px; height: 28px;
    font-size: 0.8rem;
    box-shadow: 0 0 0 4px var(--bg-card-main);
  }
  .tut-step {
    gap: 1rem;
  }
  .step-content h4 {
    font-size: 1.05rem;
  }
}
