/* Blog Content Styling */
.singleContent {
  font-family: "Poppins", sans-serif;
  line-height: 1.7;
  color: var(--text);
  max-width: 100%;
}

/* Typography */
.singleContent h1 {
  font-size: 2.2rem;
  margin: 1.5rem 0 1rem;
  font-weight: 700;
}

.singleContent h2 {
  font-size: 1.8rem;
  margin: 1.5rem 0 1rem;
  font-weight: 600;
}

.singleContent h3 {
  font-size: 1.5rem;
  margin: 1.2rem 0 0.8rem;
  font-weight: 600;
}

.singleContent h4 {
  font-size: 1.3rem;
  margin: 1rem 0 0.6rem;
  font-weight: 600;
}

.singleContent p {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  line-height: 1.7;
  text-align: justify;
}

.singleContent ul, 
.singleContent ol {
  margin: 1rem 0 1.2rem 1.5rem;
  font-size: 1.1rem;
}

.singleContent li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.singleContent a {
  color: #3498db;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.singleContent a:hover {
  border-bottom-color: #3498db;
}

.singleContent blockquote {
  border-left: 4px solid var(--bgSoft);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  background-color: rgba(var(--bg-rgb), 0.5);
  font-style: italic;
}

.singleContent img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  margin: 1.5rem 0;
}

/* Code Blocks */
.singleContent pre {
  background-color: #1e293b;
  border-radius: 5px;
  padding: 1rem;
  padding-top: 2.5rem; /* Extra space for copy button */
  margin: 1.5rem 0;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e2e8f0;
  max-width: 100%;
  position: relative; /* For positioning the copy button */
}

.singleContent code {
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.9rem;
  background-color: rgba(var(--bgSoft), 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  color: #e2e8f0;
}

.singleContent pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
}

/* Tables */
.singleContent table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 1rem;
}

.singleContent th,
.singleContent td {
  padding: 0.75rem;
  border: 1px solid var(--bgSoft);
  text-align: left;
}

.singleContent th {
  background-color: var(--bgSoft);
  font-weight: 600;
}

.singleContent tr:nth-child(even) {
  background-color: rgba(var(--bg-rgb), 0.5);
}

/* Right Sidebar Styling */
.rightBar {
  position: sticky;
  top: 120px;
  padding: 1rem;
  width: 300px; /* Fixed width for sidebar */
  max-width: 100%;
}

.rightBarSection {
  background-color: var(--bgSoft);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
}

.rightBarTitle {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text);
}

.tableOfContents {
  font-size: 0.95rem;
}

.tableOfContents ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.tableOfContents li {
  margin-bottom: 0.5rem;
  padding-left: 1rem;
  position: relative;
}

.tableOfContents li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--textSoft);
}

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

.tableOfContents a:hover {
  color: var(--textSoft);
}

.shareButtons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.shareButton {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg);
  border-radius: 5px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s;
}

.shareButton:hover {
  transform: translateY(-2px);
  background-color: var(--bg);
  opacity: 0.9;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--bgSoft);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--textSoft);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--bgSoft) var(--bg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .singleContent h1 {
    font-size: 1.8rem;
  }
  
  .singleContent h2 {
    font-size: 1.5rem;
  }
  
  .singleContent h3 {
    font-size: 1.3rem;
  }
  
  .singleContent p,
  .singleContent ul,
  .singleContent ol {
    font-size: 1rem;
  }
  
  .singleBottom {
    flex-direction: column;
  }
  
  .singleContent {
    max-width: 100%;
  }
  
  .rightBar {
    position: static;
    margin-top: 2rem;
    width: 100%;
  }
}
