/* Root variables for colors */
:root {
  --primary: #1a73e8;
  --success: #28a745;
  --background: #f8f9fa;
  --text: #222;
}

/* General styles */
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  color: var(--text);
}

/* Navbar */
.navbar-brand span {
  font-weight: 600;
  font-size: 1.5rem;
  color: #000000;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 20px;
}
.sidebar .nav-link {
  color: var(--primary);
  padding: 0.5rem 0;
}
.sidebar .nav-link:hover {
  color: #000000;
  text-decoration: underline;
}

/* Table of Contents */
.toc .list-group-item {
  border: none;
  padding: 0.5rem 0;
}
.toc a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}
.toc a:hover {
  color: #000000;
  text-decoration: underline;
}

/* Content Links */
.content-link {
  position: relative;
  color: var(--primary);
  text-decoration: none;
}
.content-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background: var(--primary);
  transition: width 0.3s ease;
}
.content-link:hover::after {
  width: 100%;
}
.content-link:hover {
  color: #000000;
}

/* Step Card */
.step-card {
  background: var(--background);
  border-radius: 10px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.step-card.active-step {
  border-left: 4px solid var(--primary);
  background: #e8f0fe;
}

/* Step Icon */
.step-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f0fe;
  border-radius: 50%;
  margin-right: 1rem;
}
.step-icon.success {
  background: var(--success);
}
.step-icon img {
  width: 30px;
  height: 30px;
}

/* Centered Image and Caption */
.step-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  width: 100%;
}
.step-image img {
  width: 100%;
  max-width: 600px; /* Limit image width on desktop */
  height: auto;
  object-fit: contain;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}
.step-image p {
  text-align: center;
  max-width: 600px;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* Headings */
h2 {
  font-weight: 600;
  color: #000000;
  border-bottom: 2px solid #e8f0fe;
  padding-bottom: 0.5rem;
}
h5 {
  font-weight: 500;
  margin-bottom: 0.5rem;
}
p {
  margin-bottom: 0;
}

/* Back Button */
.back-button {
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 5px;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}
.back-button:hover {
  transform: scale(1.05);
}

/* Footer */
footer p {
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .step-icon {
    width: 40px;
    height: 40px;
  }
  .step-icon img {
    width: 24px;
    height: 24px;
  }
  .step-card {
    padding: 1rem;
  }
  .step-image img {
    max-width: 100%; /* Full width on tablet */
  }
  .step-image p {
    max-width: 100%;
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .step-image img {
    max-width: 100%; /* Full width on mobile */
  }
  .step-card {
    padding: 0.75rem;
  }
  .navbar-brand span {
    font-size: 1.2rem;
  }
  .step-image p {
    font-size: 0.8rem;
  }
}