/* =========================
   Blog Section Gradient Background
========================= */

/* =========================
     Breadcrumb Custom
  ========================= */
.breadcrumb-custom {
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #6c757d;
}

body.dark-mode .breadcrumb-custom {
  color: #ddd;
}

/* =========================
     Recommended Blogs
  ========================= */
.recommended-section {
  border-radius: 0.5rem;
}

.recommended-item {
  background: rgba(255, 255, 255, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: #212529;
}

.recommended-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.recommended-img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 0.5rem;
}

.blog-content img {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 2rem 0;
  transition: transform 0.4s ease;
}

.blog-content img:hover {
  transform: scale(1.05);
}

/* Code block styling */
pre {
  position: relative; /* for the copy button */
  background-color: #f5f5f5; /* light background for code */
  border: 1px solid #ddd; /* subtle border */
  border-radius: 8px; /* rounded corners */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* slight shadow */
  overflow: auto; /* scroll if long code */
  margin-bottom: 1rem; /* spacing between blocks */
}

/* Dark mode version (if using .dark-mode on body) */
body.dark-mode pre {
  background-color: #1e1e1e;
  border: 1px solid #444;
  color: #f5f5f5;
}

/* Copy button (top right) */
.copy-code-btn {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  background: #4a4a4a;
  color: #fff;
}

/* Language label on code blocks */
.code-lang-label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  pointer-events: none;
  background: #555; /* fallback */
}

/* Adjust pre padding to leave space for label + copy button */
pre {
  position: relative;
  padding-top: 2.5rem;
}

/* Optional: dark mode adjustments */
body.dark-mode .code-lang-label {
  opacity: 0.9;
}

/* Language-specific colors */
.lang-python {
  background-color: #3776ab;
}
.lang-javascript {
  background-color: #f7df1e;
  color: #000;
}
.lang-html {
  background-color: #e34c26;
}
.lang-css {
  background-color: #264de4;
}
.lang-shell {
  background-color: #3e3e3e;
}
.lang-cpp {
  background-color: #00599c;
}
.lang-java {
  background-color: #b07219;
}
.lang-plaintext {
  background-color: #777;
}
.lang-code {
  background-color: #555;
}

/* =========================
     Blog Cards / Recommended Cards
  ========================= */

/* =========================
     Responsive Adjustments
  ========================= */
@media (max-width: 767px) {
  .blog-content {
    font-size: 1rem;
    line-height: 1.7;
  }
}
