/* ============================================
   Ryan Warner - Custom Style Guide
   Reusable Components & Variables
   ============================================ */
/* ============================================
   Base & Font Family Switching
   ============================================ */

:root {
  /* Font Families */
  --font-primary: 'Jost', sans-serif;
  --font-rtl: 'Vazirmatn', 'Jost', sans-serif;
  
  /* Colors */
  --glow10: #B0FBBC;
  --glow20: #82F9A1;
  --text10: #ECF8FF;
  --text20: #C9E2F0;
  --blue10: #111A20;
  --blue20: #1C2C35;
  --blue30: #243B4A;
  --blue40: #416883;
  --blue50: #5E8CA7;
}

body {
  background-color: var(--blue10);
  color: var(--text10);
  font-family: var(--font-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: font-family 0.3s ease;
}

/* RTL: Switch to Vazirmatn */
[dir="rtl"] body {
  font-family: var(--font-rtl);
  line-height: 1.8; /* خطوط فارسی کمی فاصله بیشتر نیاز دارند */
}

/* RTL Typography Adjustments */
[dir="rtl"] h1, [dir="rtl"] .h1,
[dir="rtl"] h2, [dir="rtl"] .h2,
[dir="rtl"] h3, [dir="rtl"] .h3 {
  letter-spacing: 0; /* حروف فارسی نیاز به letter-spacing منفی ندارند */
}

[dir="rtl"] .lead {
  line-height: 1.9;
}

/* Typography */
h1, .h1 { font-weight: 700; letter-spacing: -0.02em; }
h2, .h2 { font-weight: 600; letter-spacing: -0.01em; }
h3, .h3 { font-weight: 600; }
.lead { color: var(--text20); font-size: 1.125rem; }

/* Links */
a {
  color: var(--glow20);
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover { color: var(--glow10); }

/* Navbar */
.navbar-rw {
  padding: 1.5rem 0;
}
.navbar-rw .navbar-brand {
  color: var(--text10);
  font-size: 1.25rem;
  font-weight: 700;
}
.navbar-rw .nav-link {
  color: var(--text20);
  font-weight: 500;
  margin-left: 2rem;
  padding: 0 !important;
  transition: color 0.2s ease;
}
.navbar-rw .nav-link:hover,
.navbar-rw .nav-link.active {
  color: var(--glow10);
}

/* Buttons */
.btn-rw {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-rw-glow {
  background-color: var(--glow20);
  color: var(--blue10);
}
.btn-rw-glow:hover {
  background-color: var(--glow10);
  color: var(--blue10);
}
.btn-rw-outline-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: 1px solid var(--blue50);
  color: var(--text10);
  background: transparent;
  transition: all 0.2s ease;
}
.btn-rw-outline-light:hover {
  border-color: var(--glow10);
  color: var(--glow10);
}

/* Tags / Badges */
.tag-rw {
  display: inline-block;
  background-color: var(--blue30);
  color: var(--text10);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Footer */
.footer-rw {
  border-top: 1px solid var(--blue30);
  padding: 2rem 0;
  color: var(--text20);
  font-size: 0.875rem;
}
.footer-rw a { color: var(--glow20); }
.footer-rw a:hover { color: var(--glow10); }

/* Utility Classes */
.text-glow10 { color: var(--glow10) !important; }
.text-glow20 { color: var(--glow20) !important; }
.text-text10 { color: var(--text10) !important; }
.text-text20 { color: var(--text20) !important; }
.bg-blue10 { background-color: var(--blue10) !important; }
.bg-blue20 { background-color: var(--blue20) !important; }
.bg-blue30 { background-color: var(--blue30) !important; }

/* ============================================
   Reusable Components (Home + Shared)
   ============================================ */

/* Social / External Links */
.link-twitter { color: #1DA1F2; text-decoration: underline; text-underline-offset: 3px; }
.link-twitter:hover { opacity: 0.8; }

.link-github { color: var(--text10); text-decoration: underline; text-underline-offset: 3px; }
.link-github:hover { color: var(--glow10); }

.link-dribbble { color: #EA4C89; text-decoration: underline; text-underline-offset: 3px; }
.link-dribbble:hover { opacity: 0.8; }

/* Article List */
.article-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.article-icon {
  font-size: 1.25rem;
  width: 1.5rem;
  text-align: center;
  flex-shrink: 0;
}
.article-meta {
  color: var(--text20);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Project Cards */
.project-card {
  background-color: var(--blue20);
  border-radius: 0.5rem;
  padding: 2rem;
  height: 100%;
  border-left: 4px solid var(--glow20);
}
.project-card-orange {
  border-left-color: #FF8E53;
}
.project-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text10);
}
.project-desc {
  color: var(--text20);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.btn-rw-outline {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--blue50);
  color: var(--text10);
  border-radius: 0.375rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.btn-rw-outline:hover {
  border-color: var(--glow10);
  color: var(--glow10);
}

/* CTA Section */
.cta-section {
  background-color: var(--blue20);
  padding: 5rem 0;
  text-align: center;
}
.cta-title {
  color: var(--glow20);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.cta-text {
  color: var(--text20);
  max-width: 500px;
  margin: 0 auto 2rem;
}

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1.5rem;
}
.social-icon {
  color: var(--text20);
  font-size: 1.25rem;
  transition: color 0.2s ease;
}
.social-icon:hover {
  color: var(--glow10);
}

/* Section Header */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2rem;
}
.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.link-arrow {
  color: var(--text20);
  font-size: 0.875rem;
  text-decoration: none;
}
.link-arrow:hover {
  color: var(--glow10);
}
/* ============================================
   Articles Page Components
   ============================================ */

.article-card {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--blue30);
}
.article-card:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.article-date {
  color: var(--text20);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
  display: block;
  font-weight: 500;
}
.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text10);
  margin-bottom: 1rem;
  line-height: 1.3;
}
.article-excerpt {
  color: var(--text20);
  margin-bottom: 1.25rem;
  line-height: 1.7;
  max-width: 700px;
}
.article-link {
  color: var(--glow20);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.article-link:hover {
  color: var(--glow10);
}
/* ============================================
   Language Switcher & RTL Support
   ============================================ */

/* Language Dropdown */
.lang-dropdown .dropdown-toggle {
  background: transparent;
  border: 1px solid var(--blue50);
  color: var(--text10);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.lang-dropdown .dropdown-toggle:hover,
.lang-dropdown .dropdown-toggle:focus {
  border-color: var(--glow10);
  color: var(--glow10);
  background: transparent;
}
.lang-dropdown .dropdown-toggle::after {
  margin-left: 0;
}
.lang-dropdown .dropdown-menu {
  background-color: var(--blue20);
  border: 1px solid var(--blue30);
  border-radius: 0.5rem;
  min-width: 8rem;
  padding: 0.5rem 0;
}
.lang-dropdown .dropdown-item {
  color: var(--text10);
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
}
.lang-dropdown .dropdown-item:hover,
.lang-dropdown .dropdown-item:focus {
  background-color: var(--blue30);
  color: var(--glow10);
}
.lang-dropdown .dropdown-item.active {
  background-color: var(--blue30);
  color: var(--glow20);
}

/* RTL Base Styles */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .navbar-rw .nav-link {
  margin-left: 0;
  margin-right: 2rem;
}

[dir="rtl"] .ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

[dir="rtl"] .ms-1 {
  margin-right: 0.25rem !important;
  margin-left: 0 !important;
}

[dir="rtl"] .ms-lg-3 {
  margin-right: 1rem !important;
  margin-left: 0 !important;
}

[dir="rtl"] .me-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

[dir="rtl"] .social-icons {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-rw .container {
  flex-direction: row-reverse;
}

[dir="rtl"] .text-md-start {
  text-align: right !important;
}

[dir="rtl"] .dropdown-toggle::after {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* RTL Project Cards */
[dir="rtl"] .project-card {
  border-left: none;
  border-right: 4px solid var(--glow20);
}

[dir="rtl"] .project-card-orange {
  border-right-color: #FF8E53;
}

/* RTL Navbar Toggler */
[dir="rtl"] .navbar-toggler {
  margin-right: auto;
  margin-left: 0;
}

/* RTL Hero Links */
[dir="rtl"] .lead a {
  display: inline-block;
}

/* Smooth transition for direction change */
html {
  transition: all 0.3s ease;
}
/* ============================================
   Search Result Page Components
   ============================================ */

.search-layout {
  display: flex;
  gap: 3rem;
}
.search-sidebar {
  width: 220px;
  flex-shrink: 0;
}
.search-content {
  flex: 1;
}
.filter-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text20);
  margin-bottom: 1.25rem;
}
.filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.filter-list li {
  margin-bottom: 0.75rem;
}
.filter-list a {
  color: var(--text20);
  font-size: 0.9375rem;
  transition: color 0.2s ease;
}
.filter-list a:hover,
.filter-list a.active {
  color: var(--glow10);
}
.result-card {
  background-color: var(--blue20);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.result-card-video {
  border-left: 4px solid var(--glow20);
}
.result-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}
.result-body {
  flex: 1;
}
.result-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text10);
  margin-bottom: 0.5rem;
}
.result-excerpt {
  color: var(--text20);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}
.result-meta {
  color: var(--blue50);
  font-size: 0.875rem;
}
.result-link {
  color: var(--glow20);
  font-weight: 600;
  font-size: 0.9375rem;
}
.result-link:hover {
  color: var(--glow10);
}
.video-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--blue30);
  color: var(--text10);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.author-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--blue30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--glow20);
}
.author-info {
  line-height: 1.3;
}
.author-name {
  font-weight: 600;
  color: var(--text10);
}
.author-handle {
  font-size: 0.875rem;
  color: var(--text20);
}

/* ============================================
   Feedback Page Components
   ============================================ */

.feedback-hero {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.feedback-hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.feedback-hero p {
  color: var(--text20);
  font-size: 1.125rem;
  line-height: 1.7;
}
.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}
.feedback-card {
  background-color: var(--blue20);
  border-radius: 0.5rem;
  padding: 2rem;
}
.feedback-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text10);
}
.feedback-card p {
  color: var(--text20);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.feedback-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feedback-card ul li {
  color: var(--text20);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
  position: relative;
}
.feedback-card ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--glow20);
  font-weight: 700;
}
.price-tag {
  font-size: 2rem;
  font-weight: 700;
  color: var(--glow20);
  margin: 1rem 0;
}
.quote-block {
  border-left: 4px solid var(--glow20);
  padding-left: 1.5rem;
  margin: 3rem 0;
  color: var(--text20);
  font-style: italic;
  font-size: 1.125rem;
}
.cta-box {
  background-color: var(--blue20);
  border-radius: 0.5rem;
  padding: 2.5rem;
  text-align: center;
  margin-bottom: 2rem;
}
.cta-box h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.cta-box p {
  color: var(--text20);
  margin-bottom: 1.5rem;
}

/* RTL adjustments for new components */
[dir="rtl"] .search-layout {
  flex-direction: row-reverse;
}
[dir="rtl"] .result-card-video {
  border-left: none;
  border-right: 4px solid var(--glow20);
}
[dir="rtl"] .quote-block {
  border-left: none;
  border-right: 4px solid var(--glow20);
  padding-left: 0;
  padding-right: 1.5rem;
}
[dir="rtl"] .feedback-card ul li {
  padding-left: 0;
  padding-right: 1.25rem;
}
[dir="rtl"] .feedback-card ul li::before {
  left: auto;
  right: 0;
}
/* ============================================
   Article Detail / Single Post Page
   ============================================ */

/* Breadcrumb */
.breadcrumb-rw {
  background: transparent;
  padding: 0;
  margin-bottom: 2rem;
  font-size: 0.875rem;
}
.breadcrumb-rw a {
  color: var(--text20);
}
.breadcrumb-rw a:hover {
  color: var(--glow10);
}
.breadcrumb-rw .active {
  color: var(--glow20);
}

/* Article Hero Image */
.article-hero {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 0.75rem;
  margin-bottom: 2.5rem;
  border: 1px solid var(--blue30);
}

/* Article Header */
.article-header {
  margin-bottom: 3rem;
}
.article-category {
  display: inline-block;
  background-color: var(--glow20);
  color: var(--blue10);
  padding: 0.25rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
.article-headline {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text20);
  font-size: 0.9375rem;
  flex-wrap: wrap;
}
.article-meta-bar i {
  color: var(--glow20);
  margin-right: 0.4rem;
}

/* Article Body Typography */
.article-body {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text20);
}
.article-body h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text10);
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--blue30);
}
.article-body h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text10);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}
.article-body p {
  margin-bottom: 1.75rem;
}
.article-body a {
  color: var(--glow20);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.article-body a:hover {
  color: var(--glow10);
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.75rem;
  padding-left: 1.5rem;
}
.article-body li {
  margin-bottom: 0.75rem;
}
.article-body blockquote {
  border-left: 4px solid var(--glow20);
  background-color: var(--blue20);
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--text10);
}
.article-body blockquote p:last-child {
  margin-bottom: 0;
}
.article-body code {
  background-color: var(--blue30);
  color: var(--glow10);
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.95em;
}
.article-body pre {
  background-color: var(--blue20);
  border: 1px solid var(--blue30);
  border-radius: 0.5rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.75rem;
}
.article-body pre code {
  background: none;
  padding: 0;
  color: var(--text10);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.article-body img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin: 2rem 0;
  border: 1px solid var(--blue30);
}
.article-body figure {
  margin: 2.5rem 0;
}
.article-body figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--blue50);
  margin-top: 0.75rem;
}
.article-body hr {
  border-color: var(--blue30);
  margin: 3rem 0;
  opacity: 1;
}

/* Tags */
.article-tags {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--blue30);
}
.article-tags-label {
  font-weight: 600;
  color: var(--text10);
  margin-right: 0.75rem;
  font-size: 0.9375rem;
}
.article-tag {
  display: inline-block;
  background-color: var(--blue30);
  color: var(--text10);
  padding: 0.375rem 0.875rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}
.article-tag:hover {
  background-color: var(--glow20);
  color: var(--blue10);
}

/* Author Box */
.author-box {
  background-color: var(--blue20);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-top: 3rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
  border: 1px solid var(--blue30);
}
.author-box-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--glow20), var(--glow10));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: var(--blue10);
  flex-shrink: 0;
}
.author-box-info h4 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text10);
}
.author-box-info p {
  color: var(--text20);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}
.author-box-social a {
  color: var(--text20);
  margin-right: 1rem;
  font-size: 1.125rem;
  transition: color 0.2s ease;
}
.author-box-social a:hover {
  color: var(--glow10);
}

/* Share Buttons */
.share-bar {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.share-label {
  font-weight: 600;
  color: var(--text10);
  font-size: 0.9375rem;
}
.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--blue30);
  color: var(--text10);
  border: none;
  transition: all 0.2s ease;
}
.share-btn:hover {
  background-color: var(--glow20);
  color: var(--blue10);
}

/* Related Articles */
.related-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--blue30);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.related-card {
  background-color: var(--blue20);
  border-radius: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--blue30);
  transition: border-color 0.2s ease;
}
.related-card:hover {
  border-color: var(--glow20);
}
.related-card-date {
  font-size: 0.875rem;
  color: var(--blue50);
  margin-bottom: 0.75rem;
}
.related-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text10);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
.related-card-excerpt {
  font-size: 0.9375rem;
  color: var(--text20);
  line-height: 1.6;
}

/* RTL Article */
[dir="rtl"] .article-meta-bar i {
  margin-right: 0;
  margin-left: 0.4rem;
}
[dir="rtl"] .article-body ul,
[dir="rtl"] .article-body ol {
  padding-left: 0;
  padding-right: 1.5rem;
}
[dir="rtl"] .article-body blockquote {
  border-left: none;
  border-right: 4px solid var(--glow20);
  border-radius: 0.5rem 0 0 0.5rem;
}
[dir="rtl"] .article-tags-label {
  margin-right: 0;
  margin-left: 0.75rem;
}
[dir="rtl"] .article-tag {
  margin-right: 0;
  margin-left: 0.5rem;
}
[dir="rtl"] .author-box {
  flex-direction: row-reverse;
}
[dir="rtl"] .author-box-social a {
  margin-right: 0;
  margin-left: 1rem;
}
/* ============================================
   Comments Section
   ============================================ */

.comments-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--blue30);
}
.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text10);
}
.comments-count {
  color: var(--blue50);
  font-weight: 500;
}

/* Comment Form */
.comment-form {
  background-color: var(--blue20);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid var(--blue30);
}
.comment-form h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text10);
}
.comment-form .form-control,
.comment-form .form-select {
  background-color: var(--blue10);
  border: 1px solid var(--blue30);
  color: var(--text10);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.comment-form .form-control:focus,
.comment-form .form-select:focus {
  border-color: var(--glow20);
  box-shadow: 0 0 0 0.2rem rgba(130, 249, 161, 0.15);
  background-color: var(--blue10);
  color: var(--text10);
}
.comment-form .form-label {
  color: var(--text20);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Comment List */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}
.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue40), var(--blue50));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text10);
  font-size: 1rem;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
}
.comment-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.comment-author {
  font-weight: 700;
  color: var(--text10);
  font-size: 1rem;
}
.comment-badge {
  background-color: var(--glow20);
  color: var(--blue10);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  text-transform: uppercase;
}
.comment-date {
  color: var(--blue50);
  font-size: 0.875rem;
}
.comment-text {
  color: var(--text20);
  line-height: 1.7;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}
.comment-actions {
  display: flex;
  gap: 1rem;
}
.comment-actions a {
  color: var(--blue50);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
.comment-actions a:hover {
  color: var(--glow10);
}

/* Nested / Reply Comments */
.comment-replies {
  margin-top: 1.5rem;
  margin-left: 1.5rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--blue30);
  list-style: none;
}
.comment-replies .comment-item:last-child {
  margin-bottom: 0;
}

/* ============================================
   RTL Comments - Complete Right-to-Left Layout
   ============================================ */

[dir="rtl"] .comment-item {
  flex-direction: row;
}

[dir="rtl"] .comment-avatar {
  margin-left: 1rem;
  margin-right: 0;
}

[dir="rtl"] .comment-header {
  flex-direction: row;
}

[dir="rtl"] .comment-text {
  text-align: right;
}

[dir="rtl"] .comment-actions {
  flex-direction: row;
}

[dir="rtl"] .comment-actions a i,
[dir="rtl"] .comment-form button i {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .comment-replies {
  margin-left: 0;
  margin-right: 1.5rem;
  padding-left: 0;
  padding-right: 1.5rem;
  border-left: none;
  border-right: 2px solid var(--blue30);
}

[dir="rtl"] .comment-replies .comment-item {
  flex-direction: row;
}

/* RTL Comment Form labels & inputs alignment */
[dir="rtl"] .comment-form .row {
  text-align: right;
}

[dir="rtl"] .comment-form .form-label {
  text-align: right;
  display: block;
}
/* ============================================
   Error Pages (404, 500, 401, 403...)
   ============================================ */

.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
}
.error-code {
  font-size: clamp(5rem, 12vw, 8rem);
  font-weight: 800;
  color: var(--glow20);
  line-height: 1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.04em;
}
.error-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text10);
  margin-bottom: 1rem;
}
.error-desc {
  color: var(--text20);
  font-size: 1.125rem;
  margin-bottom: 2.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}
.error-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* RTL: flip back arrow icon */
[dir="rtl"] .error-btn i {
  transform: scaleX(-1);
}

.article-categories .badge {
    font-size: 0.875rem;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    transition: all 0.2s ease;
}
.article-categories .badge:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

/* ===== Project Card Button ===== */
.project-card .btn-success {
    background-color: var(--glow20);
    border-color: var(--glow20);
    color: var(--blue10);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}
.project-card .btn-success:hover {
    background-color: var(--glow10);
    border-color: var(--glow10);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(130, 249, 161, 0.3);
}
.project-card .btn-success i {
    margin-right: 0.5rem;
}