/* === Code Snippets Section === */
#codeSnippets {
  padding: 60px 20px;
  background-color: #fdfdfd;
}

#codeSnippets h2 {
  font-size: 2.5rem;
  color: #222;
  text-align: center;
  margin-bottom: 2.5rem;
}

/* Snippet Cards */
.snippet {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.snippet-group {
  margin-top: 3rem;
}

.snippet-description {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
  max-width: 800px;
}

.snippet:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.snippet h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
}

/* Code Styling */
pre {
  margin: 0;
  padding: 1.5rem;
  background-color: #f1f3f5;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.95rem;
  font-family: 'Fira Code', Consolas, monospace;
  line-height: 1.6;
  box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.05);
}

code {
  display: block;
  color: #2e2e2e;
}
@media (max-width: 768px) {
  #codeSnippets {
    padding: 3.5rem 1rem;
  }

  #codeSnippets h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
  }

  .snippet {
    padding: 1.5rem;
    border-radius: 8px;
  }

  .snippet h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }

  pre {
    padding: 1.2rem;
    font-size: 0.9rem;
    line-height: 1.5;
  }
}

@media (max-width: 480px) {
  .snippet {
    margin-bottom: 1.5rem;
  }

  pre {
    font-size: 0.85rem;
    word-wrap: break-word;
    white-space: pre-wrap; /* wrap long lines on mobile */
  }
}
