/* ====================== */
/* Elegant Article Layout */
/* ====================== */

.kb-article {
    background: #ffffff;
    padding: 40px;
    max-width: 1100px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

/* Article Title */
.kb-article h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #111;
    text-align: center;
    font-weight: bold;
}

/* Category & Meta */
.article-category {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1em;
    color: #e0dada;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.article-category i {
    color: #cad3d5;
}

.article-category a {
    text-decoration: none;
    font-weight: bold;
    color: #dce4e6;
    transition: color 0.3s ease;
}

.article-category a:hover {
    color: #2c3e50;
}

/* ===================== */
/* Article Content */
/* ===================== */

.kb-content {
    font-size: 1.1em;
    line-height: 1.7;
    color: #333;
    margin-bottom: 40px;
    padding: 15px 0;
}

/* Headers */
.kb-content h2, .kb-content h3, .kb-content h4 {
    font-weight: bold;
    margin-bottom: 12px;
    color: #1a1a1a;
    padding-bottom: 5px;
    border-bottom: 2px solid #f0f0f0;
}

/* Lists */
.kb-content ul, .kb-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.kb-content ul li {
    list-style: disc;
    margin-bottom: 6px;
}

.kb-content ol li {
    list-style: decimal;
    margin-bottom: 6px;
}

/* Blockquotes */
.kb-content blockquote {
    font-style: italic;
    color: #555;
    padding: 12px 18px;
    border-left: 4px solid #4ca1af;
    background: #f9f9f9;
    margin: 20px 0;
    border-radius: 6px;
}

/* Images */
.kb-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* ===================== */
/* Vote Section - Improved */
/* ===================== */

.vote-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 12px;
    background: #f7f7f7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Vote Buttons */
.vote-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #4ca1af;
}

.vote-btn:hover {
    background: #4ca1af;
    color: #fff;
    transform: scale(1.1);
}

.vote-count {
    font-size: 1em;
    font-weight: bold;
    color: #4ca1af;
}

/* ===================== */
/* Improved Similar Articles */
/* ===================== */

.similar-articles {
    margin-top: 30px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.similar-articles h2 {
    font-size: 1.6em;
    margin-bottom: 10px;
    color: #111;
    text-align: center;
}

.similar-articles-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
}

.similar-articles-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.similar-articles-list li:last-child {
    border-bottom: none;
}

.similar-articles-list li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.similar-articles-list li a {
    font-size: 1.1em;
    color: #4ca1af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.similar-articles-list li a:hover {
    color: #2c3e50;
}

/* ===================== */
/* Quill Editor Styling */
/* ===================== */

.ql-editor {
    font-size: 1.1em;
    line-height: 1.7;
}

/* Quill Headings */
.ql-editor h1 { font-size: 2.2em; font-weight: bold; }
.ql-editor h2 { font-size: 1.8em; font-weight: bold; }
.ql-editor h3 { font-size: 1.5em; font-weight: bold; }
.ql-editor h4 { font-size: 1.2em; font-weight: bold; }

/* Quill Code Block - Scrollable */
.ql-syntax {
    background: #282c34;
    color: #ffffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    max-height: 260px;
    line-height: 1.5;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scrollbar */
.ql-syntax::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.ql-syntax::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.ql-syntax::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ===================== */
/* Responsive Adjustments */
/* ===================== */

@media (max-width: 768px) {
    .kb-article {
        padding: 30px;
        max-width: 100%;
    }

    .kb-article h1 {
        font-size: 2em;
    }

    .vote-container {
        gap: 12px;
    }

    .vote-btn {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .similar-articles h2 {
        font-size: 1.5em;
    }
}
/* ====================== */
/* Category Articles Listing */
/* ====================== */

.recent-articles {
  background: #fff;
  padding: 50px 20px;
}

.recent-articles .section-header {
  font-size: 2em;
  font-weight: bold;
  margin-bottom: 30px;
  color: #212121;
  text-align: center;
}

/* Articles List - New Layout */
.articles-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}

/* Modern Article Card */
.article-card {
  background: #f9fafc;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Article Icon - First Letter */
.article-icon {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4em;
  font-weight: bold;
  color: white;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Dynamic Icon Colors */
.article-card[data-color="red"] .article-icon { background: #ff6b6b; }
.article-card[data-color="blue"] .article-icon { background: #4ca1af; }
.article-card[data-color="green"] .article-icon { background: #6bcf8f; }
.article-card[data-color="yellow"] .article-icon { background: #f4b400; }
.article-card[data-color="purple"] .article-icon { background: #8e44ad; }
.article-card[data-color="gray"] .article-icon { background: #95a5a6; }

/* Article Content */
.article-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Article Title */
.article-title {
  font-size: 1.4em;
  font-weight: bold;
  color: #212121;
  margin-bottom: 5px;
}

.article-title a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

.article-title a:hover {
  color: #4ca1af;
}

/* Article Excerpt */
.article-excerpt {
  font-size: 1em;
  color: #555;
  line-height: 1.6;
  margin-bottom: 8px;
}

/* Bottom Section */
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

/* Read More Button */
.read-more {
  display: inline-block;
  padding: 6px 12px;
  background: #4ca1af;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1em;
  font-weight: bold;
  transition: background 0.3s ease, transform 0.2s ease;
}

.read-more:hover {
  background: #2c3e50;
  transform: scale(1.05);
}

/* ===================== */
/* Voting System */
/* ===================== */
.vote-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vote-count {
  font-size: 1em;
  color: #4ca1af;
  font-weight: bold;
}

/* ===================== */
/* Responsive Design */
/* ===================== */
@media (max-width: 768px) {
  .article-card {
      flex-direction: row;
      align-items: center;
      padding: 18px;
  }

  .article-icon {
      width: 60px;
      height: 60px;
      font-size: 2em;
  }

  .article-footer {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
  }
}
