/* ========================================
   CSS VARIABLES FOR THEME SUPPORT
   ======================================== */

:root {
  /* Light theme colors (default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f3f4f6;
  --bg-tertiary: #f8fafc;
  --text-primary: #111827;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;
  --border-primary: #e5e7eb;
  --border-secondary: #e2e8f0;
  --border-tertiary: #d6d9dc;
  --link-color: #3b82f6;
  --link-hover: #2563eb;
  --code-bg: #f1f5f9;
  --code-text: #be123c;
  --pre-bg: #1e293b;
  --card-bg: #ffffff;
  --card-hover-border: #3b82f6;
  --nav-item-color: #6b7280;
  --footer-bg: #000000;
  --footer-text: #9ca3af;
}

/* Base body styles */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
}

.main-content-wrapper {
  flex: 1;
}

/* Navbar */

.navbar {
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border-primary);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 40px;
}

.navbar-logo {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.navbar-logo-img {
  height: 32px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.navbar-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.navbar-item {
  color: var(--nav-item-color);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.2s;
}

.navbar-item:hover {
  color: var(--text-primary);
}

/* Footer */

.footer {
  background-color: #000000;
  color: white;
  margin-top: auto;
}

.footer-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.footer-column h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
}

.footer-text {
  color: #9ca3af;
  font-size: 0.875rem;
  text-align: center;
  margin: 0;
}

/* Container */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.index-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero Title */

.hero-title {
  font-weight: 500;
}

/* ========================================
   INDEX/CATEGORY PAGE - TUTORIAL GRID CARDS
   ======================================== */

/* Tutorials Grid - Responsive Layout */

.tutorials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Mobile: 2 cards per row */
  gap: 1rem;
}

/* Mobile: 2 cards per row on all mobile devices */

@media (max-width: 639px) {
  .tutorials-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* Tablet: 2 cards per row */

@media (min-width: 640px) and (max-width: 1023px) {
  .tutorials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Desktop: 3 cards per row */

@media (min-width: 1024px) and (max-width: 1279px) {
  .tutorials-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Large Desktop: 4 cards per row */

@media (min-width: 1280px) {
  .tutorials-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Category Detail */

.category-detail-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Categories Page */

.categories-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 4rem 1rem;
}

/* Category Grid - Responsive Layout */

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Mobile: 2 cards per row */
  gap: 1rem;
}

/* Mobile: 2 cards per row on all mobile devices */

@media (max-width: 639px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }
}

/* Tablet: 2 cards per row */

@media (min-width: 640px) and (max-width: 1023px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Desktop and above: 4 cards per row */

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }
}

/* Tutorial Card - Index/Category Pages */

.tutorial-card {
  display: flex;
  flex-direction: column;
  background-color: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
}

.tutorial-card:hover {
  opacity: 0.9;
}

/* Tutorial Image - Default (Desktop/Tablet) */

.tutorial-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  /* Rounded corners on all 4 sides */
  transition: background-color 0.3s ease;
}

.tutorial-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
  border-radius: 0.5rem;
  /* Rounded corners on all 4 sides */
}

/* Mobile: 1:1 square aspect ratio for tutorial card images */

@media (max-width: 639px) {
  .tutorial-image {
    height: 0;
    padding-bottom: 100%;
    /* 1:1 square aspect ratio */
  }
}

/* Tablet: Keep fixed 200px height */

@media (min-width: 640px) and (max-width: 1023px) {
  .tutorial-image {
    height: 200px;
  }
}

/* Desktop: Keep fixed 200px height */

@media (min-width: 1024px) {
  .tutorial-image {
    height: 200px;
  }
}

.tutorial-content {
  padding: 1rem;
  background-color: var(--card-bg);
  flex: 1;
  min-height: 4rem;
  transition: background-color 0.3s ease;
}

.tutorial-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  transition: color 0.3s ease;
}

/* Article Three Column Layout */

.article-three-column-layout {
  display: grid;
  grid-template-columns: 150px 1fr 348px;
  gap: 0;
  width: 100%;
  max-width: 2400px;
  margin: 0 auto;
  background-color: var(--card-bg);
  transition: background-color 0.3s ease;
}

.article-left-sidebar {
  width: 150px;
  padding: 0.5rem 1rem 2rem 1.5rem;
}

.article-main-content {
  padding: 0.5rem 3rem 2rem 3rem;
  min-width: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-right-sidebar {
  width: 348px;
  padding: 0.5rem 1.5rem 2rem 1rem;
}

@media (max-width: 1024px) {
  .article-three-column-layout {
    grid-template-columns: 1fr;
  }

  .article-left-sidebar,
  .article-right-sidebar {
    display: none;
  }

  .article-main-content {
    padding: 1.5rem;
  }
}

/* Breadcrumb */

.article-breadcrumb {
  margin-bottom: 0;
}

.breadcrumb-list,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px !important;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  font-size: 12px !important;
}

.breadcrumb-item::after {
  content: "›";
  margin: 0 0.5rem;
  color: #94a3b8;
}

.breadcrumb-item:last-child::after {
  content: "";
  margin: 0;
}

.breadcrumb-item a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.breadcrumb-item-active,
.breadcrumb-item.active {
  color: var(--text-tertiary);
}

/* Article Header */

.article-header {
  margin-bottom: 2rem;
  margin-top: -0.5rem;
}

.article-title {
  font-size: 30px !important;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 0.75rem 0 !important;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

/* Legacy class name for backwards compatibility with old static files */

.article-page-title {
  font-size: 30px !important;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 0.75rem 0 !important;
  letter-spacing: -0.025em;
  transition: color 0.3s ease;
}

.article-subtitle {
  font-size: 1rem;
  color: var(--text-tertiary);
  line-height: 1.6;
  margin: 0;
  transition: color 0.3s ease;
}

/* Article Content */

.article-content {
  margin-top: 2rem;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.75;
  max-height: 2600px;
  overflow: hidden;
  transition: color 0.3s ease;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.article-content p {
  margin-bottom: 1rem;
}

.article-content pre {
  background-color: var(--pre-bg);
  border-radius: 0.75rem;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
  transition: background-color 0.3s ease;
}

.article-content code {
  background-color: var(--code-bg);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: var(--code-text);
  font-family: 'Monaco', 'Courier New', monospace;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.article-content pre code {
  background-color: transparent;
  padding: 0;
  color: #e2e8f0;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

/* Article Navigation Buttons */

.article-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-secondary);
  transition: border-color 0.3s ease;
}

.nav-button {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.06);
}

.nav-button:hover {
  background-color: var(--bg-secondary);
  border-color: var(--card-hover-border);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
  transform: translateY(-2px);
}

.nav-prev {
  text-align: left;
}

.nav-next {
  text-align: right;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  transition: color 0.3s ease;
}

.nav-button:hover .nav-label {
  color: var(--link-color);
}

.nav-button:hover .nav-title {
  color: var(--link-color);
}

.nav-placeholder {
  flex: 1;
}

/* Related Articles */

.related-articles-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .related-articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-articles-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Removed related-article-card overrides to match index page styling */

/* Article Tags */

.article-tags {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-secondary);
  transition: border-color 0.3s ease;
}

.tags-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-secondary);
  border-radius: 9999px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
}

.tag-pill:hover {
  background-color: var(--bg-tertiary);
  border-color: var(--link-color);
  color: var(--link-color);
}

/* Sidebar Ad */

.sidebar-ad {
  width: 100%;
  margin-bottom: 2rem;
}

.ad-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  text-align: center;
  margin-bottom: 0.5rem;
}

.ad-placeholder {
  max-width: 300px;
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  border: 1px solid var(--border-secondary);
  border-radius: 0.5rem;
  background-color: var(--bg-tertiary);
  transition: all 0.3s ease;
}

/* Sidebar Related Articles */

.sidebar-related {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

/* Simple related item - just image and title */

.related-item {
  display: block;
  text-decoration: none;
  transition: opacity 0.2s;
}

.related-item:hover {
  opacity: 0.8;
}

.related-item .related-image {
  width: 100%;
  height: 80px;
  overflow: hidden;
  background-color: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  transition: background-color 0.3s ease;
}

.related-item .related-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.related-placeholder {
  font-size: 1.5rem;
}

.related-item .related-title {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  transition: color 0.3s ease;
}

/* Legacy card styles for right sidebar if needed */

.related-card {
  display: block;
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.related-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.related-card .related-image {
  width: 100%;
  height: 7rem;
  overflow: hidden;
  background-color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-card .related-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.related-card .related-content {
  padding: 0.75rem 1rem;
}

.related-card .related-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin: 0;
  line-height: 1.4;
}

.sidebar-related-image {
  width: 250px;
  height: 175px;
  overflow: hidden;
}

.sidebar-related-image img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.sidebar-related-content {
  padding: 0.75rem;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-related-card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  text-align: center;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Content Blocks */

.content-block-html,
.content-block-text-card {
  margin-bottom: 1.5rem;
  max-width: 100%;
}

.content-block-html img,
.content-block-text-card img {
  max-width: 100%;
  height: auto;
}

.content-block-code {
  margin-bottom: 1.5rem;
}

.content-block-code pre {
  background-color: #2d2d2d;
  border: 1px solid #555555;
  border-radius: 0.375rem;
  padding: 1rem;
  overflow-x: auto;
}

.content-block-code code {
  font-size: 0.875rem;
}

/* ========================================
   ARTICLE CONTENT PAGE - HORIZONTAL CARDS
   ======================================== */

/* Horizontal Card - Desktop/Tablet (side-by-side layout) */

.content-block-horizontal-card {
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  max-width: 100%;
  overflow: hidden;
}

.content-block-horizontal-card .card-image {
  flex: 0 0 300px;
  min-width: 0;
  max-width: 300px;
}

.content-block-horizontal-card .card-image img {
  width: 100%;
  height: auto;
  max-height: 200px;
  -o-object-fit: cover;
     object-fit: cover;
  display: block;
  border-radius: 0.375rem;
}

.content-block-horizontal-card .card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.content-block-horizontal-card .card-text h3 {
  font-size: 17px !important;
  font-weight: 700;
  margin-top: 0 !important;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.content-block-horizontal-card .card-text div {
  font-size: 1rem;
  line-height: 1.75;
  color: #475569;
}

/* Mobile: Horizontal cards become vertical (stacked) */

@media (max-width: 639px) {
  .content-block-horizontal-card {
    flex-direction: column;
    gap: 0.75rem;
  }

  .content-block-horizontal-card .card-image {
    flex: 1 1 auto;
    width: 100%;
  }

  .content-block-horizontal-card .card-text {
    flex: 1 1 auto;
    width: 100%;
  }
}

/* Tablet: Keep horizontal layout */

@media (min-width: 640px) and (max-width: 1023px) {
  .content-block-horizontal-card {
    flex-direction: row;
  }
}

/* Desktop: Keep horizontal layout */

@media (min-width: 1024px) {
  .content-block-horizontal-card {
    flex-direction: row;
  }
}

/* ========================================
   ARTICLE CONTENT PAGE - VERTICAL CARDS
   ======================================== */

/* Vertical Card - All devices (always stacked) */

.content-block-vertical-card {
  margin-bottom: 1.5rem;
}

.content-block-vertical-card .card-image {
  width: 100%;
  margin-bottom: 0.75rem;
}

.content-block-vertical-card .card-image img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0.375rem;
}

.content-block-vertical-card .card-text h3 {
  font-size: 17px !important;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: #1e293b;
}

.content-block-vertical-card .card-text div {
  font-size: 1rem;
  line-height: 1.75;
  color: #475569;
}

/* Mobile: Vertical cards stay vertical */

@media (max-width: 639px) {
  .content-block-vertical-card {
    margin-bottom: 1.5rem;
  }
}

/* Tablet: Vertical cards stay vertical */

@media (min-width: 640px) and (max-width: 1023px) {
  .content-block-vertical-card {
    margin-bottom: 1.5rem;
  }
}

/* Desktop: Vertical cards stay vertical */

@media (min-width: 1024px) {
  .content-block-vertical-card {
    margin-bottom: 1.5rem;
  }
}

/* ========================================
   ARTICLE CONTENT PAGE - OTHER CARD TYPES
   ======================================== */

.content-block-bold-card {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f3f4f6;
  border-radius: 0.375rem;
}

.content-block-bold-card .bold-card-content {
  font-weight: 700;
}

.content-block-image-caption {
  margin-bottom: 1.5rem;
}

.content-block-image-caption img {
  width: 100%;
  height: auto;
}

.content-block-image-caption figcaption {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
  text-align: center;
}

/* Typography in white background sections */

.bg-white.text-black h1,
.bg-white.text-black h2,
.bg-white.text-black h3,
.bg-white.text-black h4,
.bg-white.text-black h5,
.bg-white.text-black h6 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
  margin: 1.5rem 0 0.75rem 0;
}

.bg-white.text-black h1 {
  margin: 0.5rem 0 1rem 0;
}

.bg-white.text-black h2 {
  margin: 1.75rem 0 0.875rem 0;
}

.bg-white.text-black p {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.bg-white.text-black ul,
.bg-white.text-black ol {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.bg-white.text-black li {
  font-size: 15px;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.bg-white.text-black strong,
.bg-white.text-black b {
  font-weight: 700;
}

/* Code highlighting */

.bg-white.text-black pre code.hljs .hljs-keyword {
  color: #ff6ac1;
  font-weight: bold;
}

.bg-white.text-black pre code.hljs .hljs-string {
  color: #a8ff60;
  font-weight: bold;
}

.bg-white.text-black pre code.hljs .hljs-number {
  color: #96cbfe;
  font-weight: bold;
}

.bg-white.text-black pre code.hljs .hljs-function {
  color: #ffd700;
  font-weight: bold;
}

.bg-white.text-black pre code.hljs .hljs-comment {
  color: #7c7c7c;
  font-weight: normal;
}

/* Pagination */

.pagination {
  display: flex;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  gap: 0.5rem;
}

.page-item {
  display: inline-block;
}

.page-link {
  padding: 0.5rem 0.75rem;
  background-color: white;
  border: 1px solid #d1d5db;
  color: #374151;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
}

.page-link:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.page-item.active .page-link {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
}

.page-item.disabled .page-link {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Typography sizes */

.display-6 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.h4 {
  font-size: 1.5rem;
  font-weight: 500;
}

/* Text colors */

.text-dark {
  color: #1f2937;
}

.text-blue {
  color: #2563eb;
}

/* Buttons */

.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-weight: 400;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
  font-size: 1rem;
  line-height: 1.5;
}

.btn-outline-dark {
  color: #111827;
  border-color: #111827;
  background-color: transparent;
}

.btn-outline-dark:hover {
  color: white;
  background-color: #111827;
  border-color: #111827;
}

/* Utility classes */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.w-15 {
  width: 15%;
}

.hr,
hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.my-4 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-5 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.pt-4 {
  padding-top: 1.5rem;
}

.pt-5 {
  padding-top: 3rem;
}

.pb-5 {
  padding-bottom: 3rem;
}

.pb-0 {
  padding-bottom: 0;
}

.border {
  border-width: 1px;
}

.border-3 {
  border-width: 3px;
}

.border-6 {
  border-width: 6px;
}

.border-dark {
  border-color: #111827;
}

.border-blue {
  border-color: #2563eb;
}

.text-light {
  color: #6b7280;
}

.bg-light {
  background-color: #f3f4f6;
}

.small {
  font-size: 0.875rem;
}

.lead {
  font-size: 1.25rem;
  font-weight: 300;
}

.display-5 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.font-serif {
  font-family: Georgia, 'Times New Roman', serif;
}

.text-muted {
  color: #6b7280;
}

.text-center {
  text-align: center;
}

/* Bootstrap grid compatibility */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -0.75rem;
  margin-left: -0.75rem;
}

.col,
.col-lg-8,
.col-xl-7,
.col-xxl-8,
.col-xxl-10 {
  position: relative;
  width: 100%;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.col {
  flex: 1 0 0%;
}

.justify-content-center {
  justify-content: center;
}

@media (min-width: 1024px) {
  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }

  .col-lg-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
}

@media (min-width: 1280px) {
  .col-xl-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }

  .col-xl-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
}

@media (min-width: 1536px) {
  .col-xxl-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }

  .col-xxl-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
}

/* Background and text utilities */

.bg-white {
  background-color: white;
}

.text-black {
  color: black;
}

/* Responsive utilities */

@media (max-width: 767px) {
  .article-three-column-layout {
    grid-template-columns: 1fr !important;
  }

  .article-left-sidebar,
  .article-right-sidebar {
    display: none !important;
  }

  .tutorials-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Make images responsive on tablet and mobile */

  .tutorial-image {
    width: 100%;
    height: auto;
    padding-bottom: 80%;
  }

  @supports (aspect-ratio: 5 / 4) {
    .tutorial-image {
      aspect-ratio: 5 / 4;
      padding-bottom: 0;
      height: auto;
    }
  }

  .tutorial-content {
    padding: 0.75rem;
  }

  .tutorial-title {
    font-size: 0.875rem;
    line-height: 1.3;
  }
}

@media (max-width: 480px) {
  .tutorials-grid,
  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
  }

  .index-container,
  .category-detail-container {
    padding: 1.5rem 0.75rem;
  }

  .tutorial-card {
    max-width: 100%;
  }

  /* Make images responsive on mobile */

  .tutorial-image {
    width: 100%;
    height: auto;
    padding-bottom: 80%;
  }

  @supports (aspect-ratio: 5 / 4) {
    .tutorial-image {
      aspect-ratio: 5 / 4;
      padding-bottom: 0;
      height: auto;
    }
  }

  .tutorial-content {
    padding: 0.875rem;
  }

  .tutorial-title {
    font-size: 1rem;
    line-height: 1.35;
  }
}
