/* ============================================
   ICED FOX TUTORIALS - Hybrid Design System
   Dark Iced Fox base + Modern premium touches
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Iced Fox core palette */
  --ifs-green: #4CAF50;
  --ifs-green-light: #66BB6A;
  --ifs-green-dark: #2E7D32;
  --ifs-green-glow: rgba(76, 175, 80, 0.25);
  --ifs-orange: #ff7f50;
  --ifs-orange-light: #ff9a76;
  --ifs-orange-glow: rgba(255, 127, 80, 0.2);
  --ifs-gold: #FFD700;
  --ifs-gold-glow: rgba(255, 215, 0, 0.2);
  --ifs-red: #ef5350;
  --ifs-blue: #42A5F5;

  /* Backgrounds - Iced Fox dark tones */
  --bg-body: #2f2f2f;
  --bg-dark: #242424;
  --bg-darker: #1a1a1a;
  --bg-card: #2a2a2a;
  --bg-card-hover: #323232;
  --bg-surface: #353535;
  --bg-elevated: #3d3d3d;

  /* Text */
  --text-primary: #f1f1f1;
  --text-secondary: #cdcdcd;
  --text-muted: #8a8a8a;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-green: rgba(76, 175, 80, 0.35);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 50px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-green: 0 0 20px var(--ifs-green-glow);
  --shadow-orange: 0 0 20px var(--ifs-orange-glow);

  /* Transitions */
  --t-fast: 0.25s ease;
  --t-smooth: 0.4s ease;
}

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

li { list-style: none; }

/* === Ambient glow (subtle, not overwhelming) === */
.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% 10%, rgba(76, 175, 80, 0.06), transparent),
    radial-gradient(ellipse 50% 35% at 85% 80%, rgba(255, 127, 80, 0.04), transparent);
}

/* === Layout === */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

.container-narrow {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 2;
}

@media (min-width: 2200px) {
  .container { max-width: 1700px; }
  .container-narrow { max-width: 1260px; }
}

@media (min-width: 2560px) {
  .container { max-width: 1900px; padding: 0 60px; }
  .container-narrow { max-width: 1400px; padding: 0 60px; }
}

/* ================================
   NAVIGATION
   ================================ */
.nav-tutorials {
  position: fixed;
  top: 0;
  width: 100%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 36, 36, 0.4);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: all var(--t-smooth);
  border-bottom: 1px solid transparent;
}

.nav-tutorials.scrolled {
  height: 58px;
  background: rgba(36, 36, 36, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95%;
  max-width: 1600px;
}

@media (min-width: 2200px) {
  .nav-inner { max-width: 1800px; }
}

@media (min-width: 2560px) {
  .nav-inner { max-width: 2000px; }
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text-primary);
  transition: opacity var(--t-fast);
}

.nav-brand:hover { opacity: 0.85; }

.nav-brand img {
  height: 44px;
  width: auto;
  opacity: 0.82;
  filter: brightness(1.05) saturate(0.75);
  transition: all var(--t-smooth);
}

.nav-brand:hover img {
  opacity: 0.95;
  filter: brightness(1.05) saturate(0.85);
}

.nav-brand span {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--t-fast);
  position: relative;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.nav-links a.active {
  color: var(--ifs-orange);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--ifs-orange);
  border-radius: 2px;
}

/* "Back to Site" link */
.nav-link-home {
  opacity: 0.6;
  font-size: 0.82rem !important;
}

.nav-link-home:hover { opacity: 1; }

.nav-search {
  position: relative;
}

.nav-search input {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 36px;
  color: var(--text-primary);
  font-size: 0.84rem;
  width: 190px;
  transition: all var(--t-fast);
  outline: none;
  font-family: inherit;
}

.nav-search input:focus {
  border-color: var(--ifs-green);
  box-shadow: 0 0 0 3px var(--ifs-green-glow);
  width: 240px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-search input::placeholder { color: var(--text-muted); }

.nav-search > i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  z-index: 2;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 1000;
}

.search-results.active { display: block; }

.search-result-item {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--t-fast);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
  background: rgba(76, 175, 80, 0.08);
}

.search-result-title {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.search-result-title mark {
  background: rgba(76, 175, 80, 0.3);
  color: var(--ifs-green);
  border-radius: 2px;
  padding: 0 2px;
}

.search-result-desc {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.search-no-results {
  padding: 20px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.search-no-results i { margin-right: 6px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ================================
   HERO
   ================================ */
.hero-tutorials {
  padding: 130px 0 70px;
  text-align: center;
  position: relative;
  background:
    linear-gradient(170deg, rgba(76, 175, 80, 0.08) 0%, transparent 40%),
    linear-gradient(200deg, rgba(255, 127, 80, 0.05) 0%, transparent 35%),
    var(--bg-dark);
  overflow: hidden;
}

.hero-tutorials::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, var(--bg-body), transparent);
  z-index: 1;
}

.hero-tutorials > * {
  position: relative;
  z-index: 2;
}

.hero-icon-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 28px;
}

.hero-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--t-smooth);
}

.hero-icon.accent {
  width: 56px;
  height: 56px;
  font-size: 1.35rem;
  background: rgba(76, 175, 80, 0.1);
  border-color: rgba(76, 175, 80, 0.3);
  color: var(--ifs-green-light);
  box-shadow: 0 0 20px rgba(76, 175, 80, 0.1);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.25);
  padding: 7px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ifs-green-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 22px;
}

.hero-badge i { font-size: 0.7rem; }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.hero-title .highlight-green {
  color: var(--ifs-green-light);
}

.hero-title .highlight-orange {
  background: linear-gradient(135deg, var(--ifs-orange), var(--ifs-orange-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 36px;
  font-weight: 400;
  line-height: 1.75;
}

@media (min-width: 2200px) {
  .hero-subtitle { max-width: 800px; font-size: 1.2rem; }
  .hero-title { font-size: 4rem; }
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-medium);
  padding: 20px 32px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
}

.hero-stat:hover {
  border-color: var(--ifs-green);
  background: rgba(76, 175, 80, 0.06);
  box-shadow: var(--shadow-green);
  transform: translateY(-4px);
}

.hero-stat-number {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ifs-green-light);
  display: block;
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 2px;
}

/* ================================
   CATEGORY PILLS
   ================================ */
.category-section {
  padding: 36px 0 0;
}

.category-pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  backdrop-filter: blur(4px);
}

.pill i {
  font-size: 0.85rem;
  opacity: 0.7;
}

.pill:hover,
.pill.active {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--border-green);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}

.pill:hover i,
.pill.active i {
  opacity: 1;
  color: var(--ifs-green);
}

/* ================================
   TUTORIAL CARDS
   ================================ */
.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

@media (min-width: 1600px) {
  .tutorials-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 28px;
  }
}

@media (min-width: 2200px) {
  .tutorials-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
  }
}

.tutorial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tutorial-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ifs-green), var(--ifs-orange));
  opacity: 0;
  transition: opacity var(--t-fast);
  z-index: 3;
}

.tutorial-card:hover::before {
  opacity: 1;
}

.tutorial-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-green);
  box-shadow:
    0 0 20px var(--ifs-green-glow),
    0 20px 40px rgba(0, 0, 0, 0.35);
}

.tutorial-card:hover .card-thumb img {
  transform: scale(1.06);
}

.card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-darker);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-thumb .card-category {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ifs-green-light);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.card-thumb .card-category i { margin-right: 4px; }

.card-thumb .card-duration {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.card-thumb .card-duration i { margin-right: 3px; font-size: 0.65rem; }

.card-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
  transition: color var(--t-fast);
}

.tutorial-card:hover .card-body h3 {
  color: var(--ifs-green-light);
}

.card-body p {
  color: var(--text-secondary);
  font-size: 0.87rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.card-meta-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.card-meta-left i { color: var(--ifs-orange); font-size: 0.72rem; }

.card-difficulty {
  padding: 3px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-difficulty.beginner {
  background: rgba(76, 175, 80, 0.1);
  color: var(--ifs-green-light);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.card-difficulty.intermediate {
  background: rgba(255, 215, 0, 0.08);
  color: var(--ifs-gold);
  border: 1px solid rgba(255, 215, 0, 0.2);
}

.card-difficulty.advanced {
  background: rgba(239, 83, 80, 0.1);
  color: var(--ifs-red);
  border: 1px solid rgba(239, 83, 80, 0.2);
}

/* Featured card */
.tutorial-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-color: var(--border-green);
  background: linear-gradient(135deg, var(--bg-card), rgba(76, 175, 80, 0.03));
}

.tutorial-card.featured::before {
  opacity: 1;
}

.tutorial-card.featured .card-thumb {
  aspect-ratio: auto;
  min-height: 280px;
}

.tutorial-card.featured .card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 50%, rgba(42, 42, 42, 0.4) 100%);
  z-index: 1;
  pointer-events: none;
}

.tutorial-card.featured .card-body {
  padding: 30px;
  justify-content: center;
}

.tutorial-card.featured .card-body h3 {
  font-size: 1.35rem;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ifs-gold);
  margin-bottom: 10px;
}

.featured-label i {
  animation: goldPulse 2.5s ease-in-out infinite;
}

@keyframes goldPulse {
  0%, 100% { filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.5)); }
  50% { filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.9)); }
}

/* ================================
   ARTICLE HERO
   ================================ */
.article-hero {
  padding: 120px 0 56px;
  background:
    linear-gradient(170deg, rgba(76, 175, 80, 0.05) 0%, transparent 30%),
    var(--bg-dark);
  margin-bottom: 40px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-size: 0.83rem;
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--t-fast);
}

.breadcrumbs a:hover { color: var(--ifs-orange); }

.breadcrumbs .separator {
  color: var(--text-muted);
  opacity: 0.35;
  font-size: 0.6rem;
}

.breadcrumbs .current {
  color: var(--text-secondary);
  font-weight: 500;
}

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 13px;
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ifs-green-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.article-tag i { font-size: 0.65rem; }

.article-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.article-excerpt {
  font-size: 1.08rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  max-width: 680px;
}

.article-info-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-top: none;
  border-bottom: none;
  margin-bottom: 32px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--ifs-green);
  border-radius: var(--radius-sm);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.info-item i { color: var(--ifs-green); font-size: 0.85rem; }
.info-item strong { color: var(--text-secondary); font-weight: 600; }

/* ================================
   ARTICLE CONTENT
   ================================ */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 48px;
  align-items: start;
}

@media (min-width: 1600px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    gap: 56px;
  }
}

.article-content { min-width: 0; }

.article-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 42px 0 14px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  scroll-margin-top: 90px;
  padding-left: 14px;
  border-left: 3px solid var(--ifs-green);
}

.article-content h2:first-child { margin-top: 0; }

.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--ifs-orange);
  scroll-margin-top: 90px;
}

.article-content p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 18px;
}

.article-content a {
  color: var(--ifs-orange);
  text-decoration: underline;
  text-decoration-color: rgba(255, 127, 80, 0.25);
  text-underline-offset: 3px;
  transition: all var(--t-fast);
}

.article-content a:hover {
  color: var(--ifs-green-light);
  text-decoration-color: var(--ifs-green-light);
}

.article-content ul,
.article-content ol {
  margin: 12px 0 20px 20px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.article-content li::marker { color: var(--ifs-green); }
.article-content strong { color: var(--text-primary); font-weight: 600; }

.article-content img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 20px 0;
  border: 1px solid var(--border-subtle);
}

/* --- Steps --- */
.step-block {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 22px 22px 72px;
  margin: 20px 0;
  position: relative;
  transition: all var(--t-fast);
}

.step-block + .step-block::after {
  content: '';
  position: absolute;
  left: 37px;
  top: -20px;
  width: 2px;
  height: 20px;
  background: rgba(76, 175, 80, 0.15);
}

.step-block:hover {
  border-color: var(--border-green);
  box-shadow: var(--shadow-green);
}

.step-number {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--ifs-green), var(--ifs-green-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: white;
  box-shadow: 0 3px 12px var(--ifs-green-glow);
}

.step-block h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-block p { margin-bottom: 0; color: var(--text-secondary); }

/* --- Callouts --- */
.callout {
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin: 20px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border-left: 4px solid transparent;
}

.callout-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 2px; }

.callout-content {
  font-size: 0.91rem;
  line-height: 1.7;
}

.callout-content strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.callout.tip {
  background: rgba(76, 175, 80, 0.06);
  border: 1px solid rgba(76, 175, 80, 0.15);
  border-left: 4px solid var(--ifs-green);
}
.callout.tip .callout-icon { color: var(--ifs-green); }
.callout.tip .callout-content strong { color: var(--ifs-green); }

.callout.warning {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-left: 4px solid var(--ifs-gold);
}
.callout.warning .callout-icon { color: var(--ifs-gold); }
.callout.warning .callout-content strong { color: var(--ifs-gold); }

.callout.info {
  background: rgba(66, 165, 245, 0.05);
  border: 1px solid rgba(66, 165, 245, 0.12);
  border-left: 4px solid var(--ifs-blue);
}
.callout.info .callout-icon { color: var(--ifs-blue); }
.callout.info .callout-content strong { color: var(--ifs-blue); }

.callout .callout-content { color: var(--text-secondary); }

/* --- Code --- */
.code-block {
  background: var(--bg-darker);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin: 16px 0;
  overflow: hidden;
  transition: border-color var(--t-fast);
}

.code-block:hover {
  border-color: var(--border-medium);
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
}

.code-block-lang {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ifs-green);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.code-block-lang i { margin-right: 4px; }

.code-block-copy {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: all var(--t-fast);
}

.code-block-copy:hover {
  background: rgba(76, 175, 80, 0.1);
  color: var(--text-primary);
  border-color: var(--ifs-green);
}

.code-block pre {
  padding: 14px 16px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-content code {
  background: rgba(76, 175, 80, 0.08);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84em;
  color: var(--ifs-green-light);
  border: 1px solid rgba(76, 175, 80, 0.12);
}

/* --- TOC Sidebar --- */
.toc-sidebar {
  position: sticky;
  top: 85px;
}

.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  border-top: 3px solid var(--ifs-green);
}

.toc-card h4 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.toc-card h4 i { margin-right: 5px; color: var(--ifs-orange); }

.toc-list { list-style: none; }
.toc-list li { margin-bottom: 2px; }

.toc-list a {
  display: block;
  padding: 6px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--t-fast);
  line-height: 1.35;
}

.toc-list a:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--ifs-green);
}

.toc-list a.active {
  color: var(--ifs-green-light);
  background: rgba(76, 175, 80, 0.08);
  border-left-color: var(--ifs-green);
}

/* Share */
.share-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 14px;
  text-align: center;
  border-top: 3px solid var(--ifs-orange);
}

.share-card h4 {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.share-card h4 i { margin-right: 5px; }

.share-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all var(--t-fast);
}

.share-btn:hover {
  background: rgba(76, 175, 80, 0.1);
  border-color: var(--ifs-green);
  color: var(--ifs-green);
  transform: translateY(-2px);
}

/* ================================
   FAQ
   ================================ */
.faq-section { margin: 44px 0; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color var(--t-fast);
}

.faq-item:hover { border-color: var(--border-green); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.93rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--t-fast);
}

.faq-question:hover { color: var(--ifs-orange); }

.faq-toggle {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
  color: var(--ifs-green);
}

.faq-item.open .faq-toggle { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer-inner {
  padding: 0 20px 16px;
  color: var(--text-secondary);
  font-size: 0.91rem;
  line-height: 1.7;
}

.faq-item.open .faq-answer { max-height: 2000px; }

/* ================================
   NEWSLETTER
   ================================ */
.newsletter-cta {
  background:
    linear-gradient(135deg, rgba(76, 175, 80, 0.06), rgba(255, 127, 80, 0.04)),
    var(--bg-card);
  border: 1px solid var(--border-green);
  border-radius: var(--radius-xl);
  padding: 42px;
  text-align: center;
  margin: 48px 0;
  position: relative;
  overflow: hidden;
}

.newsletter-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ifs-green), var(--ifs-orange));
}

.newsletter-cta h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.newsletter-cta h3 i { margin-right: 8px; color: var(--ifs-green); }

.newsletter-cta p {
  color: var(--text-secondary);
  margin-bottom: 22px;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all var(--t-fast);
}

.newsletter-form input:focus {
  border-color: var(--ifs-green);
  box-shadow: 0 0 0 3px var(--ifs-green-glow);
}

.newsletter-form input::placeholder { color: var(--text-muted); }

.btn-primary {
  padding: 12px 26px;
  background: linear-gradient(135deg, var(--ifs-green), var(--ifs-green-dark));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--ifs-green-glow);
}

.btn-primary i { margin-right: 5px; }

/* ================================
   RELATED
   ================================ */
.related-section { margin: 48px 0; }

.related-section h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 22px;
  letter-spacing: -0.01em;
}

.related-section h2 i { color: var(--ifs-orange); }

/* ================================
   FOOTER
   ================================ */
.footer-tutorials {
  background: var(--bg-dark);
  padding: 32px 0 24px;
  border-top: none;
  margin-top: 60px;
  position: relative;
}

.footer-tutorials::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ifs-green), var(--ifs-orange), var(--ifs-green));
  opacity: 0.5;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.footer-brand img {
  height: 38px;
  width: auto;
  opacity: 0.72;
  filter: brightness(1.05) saturate(0.7);
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 500;
  transition: color var(--t-fast);
}

.footer-links a:hover { color: var(--ifs-orange); }
.footer-links a i { margin-right: 4px; }

.footer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

.footer-social a {
  color: var(--text-muted);
  font-size: 1.15rem;
  transition: all var(--t-fast);
  text-decoration: none;
}

.footer-social a:hover {
  transform: translateY(-2px);
}
.footer-social a[aria-label="Discord"]:hover { color: #5865F2; }
.footer-social a[aria-label="YouTube"]:hover { color: #FF0000; }
.footer-social a[aria-label="TikTok"]:hover { color: #f1f1f1; }
.footer-social a[aria-label="Instagram"]:hover { color: #E4405F; }

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.76rem;
  margin-top: 14px;
}

/* ================================
   SCROLL PROGRESS
   ================================ */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ifs-green), var(--ifs-green-light), var(--ifs-orange));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px var(--ifs-green-glow);
}

/* ================================
   BACK TO TOP
   ================================ */
.back-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-green);
  color: var(--ifs-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  z-index: 100;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--ifs-green);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 20px var(--ifs-green-glow);
}

/* ================================
   ANIMATIONS
   ================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: none; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: none; }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 1024px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc-sidebar { display: none; }
  .tutorial-card.featured { grid-template-columns: 1fr; }
  .tutorial-card.featured .card-thumb { min-height: 200px; }
}

@media (max-width: 768px) {
  .nav-links {
    flex-direction: column;
    background: rgba(30, 30, 30, 0.97);
    backdrop-filter: blur(16px);
    padding: 16px;
    display: none;
    position: absolute;
    top: 58px;
    left: 0;
    right: 0;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
  }

  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
  .nav-search { display: none; }

  .hero-tutorials { padding: 110px 0 50px; }
  .hero-icon-row { gap: 12px; }
  .hero-icon { width: 40px; height: 40px; font-size: 0.95rem; }
  .hero-icon.accent { width: 46px; height: 46px; font-size: 1.15rem; }
  .hero-title { font-size: 2rem; }

  .hero-stats {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .hero-stat { width: 220px; }

  .tutorials-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 1.6rem; }
  .article-info-bar { gap: 12px; }
  .step-block { padding: 18px 16px 18px 62px; }

  .newsletter-cta { padding: 28px 18px; }
  .newsletter-form { flex-direction: column; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; gap: 14px; }

  .nav-tutorials { height: 52px; }
  .nav-tutorials.scrolled { height: 48px; }
}

@media (max-width: 480px) {
  .category-pills {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-pills::-webkit-scrollbar { display: none; }
  .pill { flex-shrink: 0; }
}

/* Selection */
::selection {
  background: rgba(76, 175, 80, 0.25);
  color: var(--text-primary);
}

/* Scrollbar */
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--ifs-green); }
