/* =============================================
   G Industries — Tutorial Page Stylesheet
   ============================================= */

/* ============================================
   TUTORIAL HERO
   ============================================ */
.tutorial-hero {
  position: relative;
  min-height: 52vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.tutorial-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--navy) 0%, var(--teal-dark) 60%, var(--teal-mid) 100%);
  z-index: 0;
}

.tutorial-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 75% 30%, rgba(196,160,64,0.12) 0%, transparent 50%),
    radial-gradient(circle at 20% 80%, rgba(158,80,64,0.10) 0%, transparent 45%);
}

.tutorial-hero-content {
  position: relative;
  z-index: 1;
  padding-top: 124px;
  max-width: 720px;
}

.tutorial-back-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.60);
  letter-spacing: 0.04em;
  margin-bottom: 28px;
  transition: color var(--transition);
}

.tutorial-back-link:hover { color: var(--gold); }

.tutorial-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 28px;
}

.tutorial-meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,0.60);
}

.tutorial-meta-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ============================================
   TUTORIAL LAYOUT (sidebar + content)
   ============================================ */
.tutorial-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 64px;
  padding-top: 72px;
  padding-bottom: 96px;
  align-items: start;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.tutorial-toc {
  position: sticky;
  top: 124px;
}

.toc-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  counter-reset: toc;
  padding: 0;
  border-left: 2px solid rgba(45,61,74,0.10);
}

.toc-list li {
  counter-increment: toc;
  padding-left: 14px;
}

.toc-list a {
  font-size: 0.855rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
  display: block;
  padding: 3px 0;
}

.toc-list a:hover { color: var(--teal-dark); }

.toc-list li.toc-active a {
  color: var(--navy);
  font-weight: 600;
  background: rgba(196,160,64,0.15);
  border-radius: 4px;
  padding: 3px 8px;
  margin-left: -8px;
}

/* ============================================
   TUTORIAL CONTENT
   ============================================ */
.tutorial-section {
  margin-bottom: 0;
  border-bottom: 1px solid rgba(45,61,74,0.10);
}

.tutorial-section:last-child { border-bottom: none; }

/* ============================================
   ACCORDION
   ============================================ */
.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 20px 0;
  margin: 0;
  gap: 12px;
}

.accordion-header:hover { color: var(--gold); }

.accordion-chevron {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--teal-mid);
  transition: transform 0.25s ease;
}

.accordion-section.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  overflow: hidden;
  height: 0;
  transition: height 0.3s ease;
}

.accordion-body-inner {
  padding-bottom: 32px;
}

.tutorial-content h2 {
  font-family: 'Tomorrow', sans-serif;
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(45,61,74,0.10);
}

.tutorial-content h2 a {
  color: var(--teal-dark);
  transition: color var(--transition);
}

.tutorial-content h2 a:hover { color: var(--gold); }

.tutorial-content p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 16px;
}

.tutorial-content ul,
.tutorial-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tutorial-content ul { list-style: disc; }
.tutorial-content ol { list-style: decimal; }

.tutorial-content li {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Callouts */
.tutorial-callout {
  background: rgba(92,138,142,0.10);
  border-left: 3px solid var(--teal-mid);
  border-radius: 0 6px 6px 0;
  padding: 16px 20px;
  margin: 24px 0;
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.tutorial-callout strong { color: var(--teal-dark); }

.tutorial-callout--success {
  background: rgba(45,122,74,0.08);
  border-left-color: #2d7a4a;
}

.tutorial-callout--success strong { color: #2d7a4a; }

.tutorial-callout--warning {
  background: rgba(180,40,40,0.07);
  border-left-color: #b42828;
}

.tutorial-callout--warning strong { color: #b42828; }

/* Image placeholder */
.tutorial-img-placeholder {
  width: 25%;
  aspect-ratio: 16 / 7;
  background: linear-gradient(135deg, var(--cream) 0%, rgba(92,138,142,0.15) 100%);
  border: 1px dashed rgba(45,61,74,0.20);
  border-radius: 8px;
  margin: 24px auto;
}

/* Tutorial images */
.tutorial-img-row {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 24px 0;
  overflow: visible;
}

.tutorial-img-row .tutorial-img {
  margin: 0;
}

.tutorial-img {
  width: 25%;
  border-radius: 8px;
  margin: 24px auto;
  display: block;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: zoom-in;
  position: relative;
  z-index: 0;
}

.tutorial-img:hover {
  transform: scale(1.4);
  box-shadow: 0 8px 32px rgba(45,61,74,0.22);
  z-index: 10;
}

/* Tables */
.tutorial-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.92rem;
}

.tutorial-table th,
.tutorial-table td {
  text-align: left;
  padding: 10px 14px;
  border: 1px solid rgba(45,61,74,0.15);
}

.tutorial-table thead tr {
  background: var(--navy);
  color: var(--white);
}

.tutorial-table tbody tr:nth-child(even) {
  background: rgba(45,61,74,0.04);
}

.tutorial-table code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.88em;
  background: rgba(45,61,74,0.08);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Footer note */
.tutorial-footer-note {
  margin-top: 40px;
  font-size: 0.85rem;
  color: var(--text-muted, #6b7280);
}

/* PDF download link */
.tutorial-pdf-download {
  padding: 20px 0 24px;
  border-bottom: 1px solid rgba(45,61,74,0.10);
  margin-bottom: 0;
}

/* Next steps links */
.tutorial-next-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .tutorial-layout {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 48px;
  }

  .tutorial-toc {
    position: static;
    border: 1px solid rgba(45,61,74,0.10);
    border-radius: 8px;
    padding: 20px 24px;
    background: var(--white);
  }
}

@media (max-width: 600px) {
  .tutorial-meta { gap: 16px; }
}
