/**
 * Embeddable Bootstrap-Compatible Styles
 * 
 * Self-contained CSS for blog content fragments that work alongside Bootstrap 5.
 * Includes: Typography, Premium Components, RTL Support, Dark Mode
 * 
 * Usage: Include this file in your Bootstrap project when embedding blog fragments.
 */

/* ============================================
 * CSS CUSTOM PROPERTIES (Bootstrap-compatible)
 * ============================================ */

.blog-content-snippet,
.blog-toc-snippet {
  /* Material Design for Bootstrap (MDB) color variables */
  --bs-primary: #3b71ca;
  --bs-primary-rgb: 59, 113, 202;
  --bs-secondary: #9fa6b2;
  --bs-success: #14a44d;
  --bs-danger: #dc4c64;
  --bs-warning: #e4a11b;
  --bs-info: #54b4d3;
  --bs-light: #fbfbfb;
  --bs-dark: #332d2d;

  /* Body colors */
  --bs-body-color: #212529;
  --bs-body-bg: #fff;
  --bs-blockquote-bg: #fbfbfb;
  --bs-border-color: #dee2e6;
  --bs-border-color-translucent: rgba(0, 0, 0, 0.175);

  /* Typography */
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-font-family: "Cairo", "Roboto", "Helvetica Neue", Arial, sans-serif;

  /* Code */
  --bs-code-color: #7c3aed;
  --bs-code-bg: #f8f9fa;

  /* Links */
  --bs-link-color: #3b71ca;
  --bs-link-hover-color: #3061af;
}

/* Dark mode support (Bootstrap 5.3+ style) - Scoped to the snippets */
[data-bs-theme="dark"] .blog-content-snippet,
[data-bs-theme="dark"] .blog-toc-snippet,
.dark .blog-content-snippet,
.dark .blog-toc-snippet {
  --bs-body-color: #dee2e6;
  --bs-body-bg: #212529;
  --bs-blockquote-bg: #2c3136;
  --bs-border-color: #495057;
  --bs-border-color-translucent: rgba(255, 255, 255, 0.15);

  --bs-primary: #3b71ca;
  --bs-secondary: #9fa6b2;
  --bs-success: #14a44d;
  --bs-danger: #dc4c64;
  --bs-warning: #e4a11b;
  --bs-info: #54b4d3;
  --bs-light: #343a40;
  --bs-dark: #f8f9fa;

  --bs-code-color: #c4b5fd;
  --bs-code-bg: #1e293b;

  --bs-link-color: #6ea8fe;
  --bs-link-hover-color: #8bb9fe;
}

/* ============================================
 * BLOG CONTENT TYPOGRAPHY
 * ============================================ */

.blog-content-snippet,
.blog-toc-snippet {
  color: var(--bs-body-color);
  line-height: var(--bs-body-line-height);
  font-family: var(--bs-body-font-family);
}

.blog-content-snippet article {
  max-width: 65ch;
  font-size: 1.125rem;
  line-height: 1.75;
}

.blog-content-snippet h1,
.blog-content-snippet h2,
.blog-content-snippet h3,
.blog-content-snippet h4,
.blog-content-snippet h5,
.blog-content-snippet h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bs-body-color);
}

.blog-content-snippet h1 {
  font-size: 2.5rem;
}
.blog-content-snippet h2 {
  font-size: 2rem;
}
.blog-content-snippet h3 {
  font-size: 1.75rem;
}
.blog-content-snippet h4 {
  font-size: 1.5rem;
}
.blog-content-snippet h5 {
  font-size: 1.25rem;
}
.blog-content-snippet h6 {
  font-size: 1rem;
}

.blog-content-snippet p {
  margin-bottom: 1.25rem;
}

.blog-content-snippet a {
  color: var(--bs-link-color);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.blog-content-snippet a:hover {
  color: var(--bs-link-hover-color);
}

.blog-content-snippet strong {
  font-weight: 700;
  color: var(--bs-primary);
}

.blog-content-snippet em {
  font-style: italic;
}

/* Typography Utilities */
.blog-content-snippet .fw-light { font-weight: 300 !important; }
.blog-content-snippet .fw-normal { font-weight: 400 !important; }
.blog-content-snippet .fw-medium { font-weight: 500 !important; }
.blog-content-snippet .fw-semibold { font-weight: 600 !important; }
.blog-content-snippet .fw-bold { font-weight: 700 !important; }

/* Line Breaks */
.blog-content-snippet br {
  display: inline;
}

/* Lists */
.blog-content-snippet ul,
.blog-content-snippet ol {
  margin-bottom: 1.25rem;
  padding-left: 1.625rem;
}

.blog-content-snippet li {
  margin-bottom: 0.5rem;
}

/* Blockquotes */
.blog-content-snippet blockquote {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--bs-border-color);
  color: var(--bs-secondary);
  font-style: italic;
}

/* Code */
.blog-content-snippet code {
  background-color: var(--bs-code-bg);
  color: var(--bs-code-color);
  padding: 0.2em 0.4em;
  border-radius: 0.375rem;
  font-size: 0.875em;
  font-weight: 500;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.blog-content-snippet pre {
  background-color: var(--bs-light);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.blog-content-snippet pre code {
  background-color: transparent;
  color: var(--bs-body-color);
  padding: 0;
  font-size: 0.875rem;
}

/* Tables */
.blog-content-snippet table {
  width: 100%;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
  border: 1px solid var(--bs-border-color);
}

.blog-content-snippet thead {
  background-color: var(--bs-light);
  border-bottom: 2px solid var(--bs-border-color);
}

.blog-content-snippet th,
.blog-content-snippet td {
  padding: 0.75rem;
  border: 1px solid var(--bs-border-color);
  text-align: left;
}

.blog-content-snippet tbody tr:hover {
  background-color: var(--bs-light);
}

/* Horizontal rules */
.blog-content-snippet hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
}

/* Images */
.blog-content-snippet img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

/* Icons */
.blog-content-snippet i {
  display: inline-block;
}

/* ============================================
 * SPACING UTILITIES (Bootstrap-compatible)
 * ============================================ */

.blog-content-snippet .m-1 { margin: 0.25rem !important; }
.blog-content-snippet .m-2 { margin: 0.5rem !important; }
.blog-content-snippet .m-3 { margin: 1rem !important; }
.blog-content-snippet .m-4 { margin: 1.5rem !important; }
.blog-content-snippet .m-5 { margin: 3rem !important; }

.blog-content-snippet .mt-1 { margin-top: 0.25rem !important; }
.blog-content-snippet .mt-2 { margin-top: 0.5rem !important; }
.blog-content-snippet .mt-3 { margin-top: 1rem !important; }
.blog-content-snippet .mt-4 { margin-top: 1.5rem !important; }
.blog-content-snippet .mt-5 { margin-top: 3rem !important; }

.blog-content-snippet .mb-1 { margin-bottom: 0.25rem !important; }
.blog-content-snippet .mb-2 { margin-bottom: 0.5rem !important; }
.blog-content-snippet .mb-3 { margin-bottom: 1rem !important; }
.blog-content-snippet .mb-4 { margin-bottom: 1.5rem !important; }
.blog-content-snippet .mb-5 { margin-bottom: 3rem !important; }

.blog-content-snippet .ms-1 { margin-inline-start: 0.25rem !important; }
.blog-content-snippet .ms-2 { margin-inline-start: 0.5rem !important; }
.blog-content-snippet .ms-3 { margin-inline-start: 1rem !important; }
.blog-content-snippet .ms-4 { margin-inline-start: 1.5rem !important; }
.blog-content-snippet .ms-5 { margin-inline-start: 3rem !important; }

.blog-content-snippet .me-1 { margin-inline-end: 0.25rem !important; }
.blog-content-snippet .me-2 { margin-inline-end: 0.5rem !important; }
.blog-content-snippet .me-3 { margin-inline-end: 1rem !important; }
.blog-content-snippet .me-4 { margin-inline-end: 1.5rem !important; }
.blog-content-snippet .me-5 { margin-inline-end: 3rem !important; }

.blog-content-snippet .mx-1 { margin-left: 0.25rem !important; margin-right: 0.25rem !important; }
.blog-content-snippet .mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.blog-content-snippet .mx-3 { margin-left: 1rem !important; margin-right: 1rem !important; }
.blog-content-snippet .my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.blog-content-snippet .my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.blog-content-snippet .my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }

.blog-content-snippet .p-1 { padding: 0.25rem !important; }
.blog-content-snippet .p-2 { padding: 0.5rem !important; }
.blog-content-snippet .p-3 { padding: 1rem !important; }
.blog-content-snippet .p-4 { padding: 1.5rem !important; }
.blog-content-snippet .p-5 { padding: 3rem !important; }

.blog-content-snippet .px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.blog-content-snippet .px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.blog-content-snippet .px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.blog-content-snippet .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.blog-content-snippet .py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.blog-content-snippet .py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

/* MDB Blockquote Styles */
.blog-content-snippet blockquote.blockquote {
  padding: 0.5rem 1rem;
  border-left: 0.25rem solid #1266f1;
  background-color: var(--bs-blockquote-bg);
  margin-bottom: 1.5rem;
  border-radius: 0;
  box-shadow: none;
  font-style: normal;
  color: var(--bs-body-color);
}

[dir="rtl"] .blog-content-snippet blockquote.blockquote {
  border-left: none;
  border-right: 0.25rem solid #1266f1;
}

.blog-content-snippet blockquote.bq-primary { border-color: #1266f1 !important; }
.blog-content-snippet blockquote.bq-secondary { border-color: #b23cfd !important; }
.blog-content-snippet blockquote.bq-success { border-color: #00b74a !important; }
.blog-content-snippet blockquote.bq-danger { border-color: #f93154 !important; }
.blog-content-snippet blockquote.bq-warning { border-color: #ffa900 !important; }
.blog-content-snippet blockquote.bq-info { border-color: #39c0ed !important; }

.blog-content-snippet .bq-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  text-transform: none;
}

.blog-content-snippet blockquote.bq-primary .bq-title { color: #1266f1 !important; }
.blog-content-snippet blockquote.bq-secondary .bq-title { color: #b23cfd !important; }
.blog-content-snippet blockquote.bq-success .bq-title { color: #00b74a !important; }
.blog-content-snippet blockquote.bq-danger .bq-title { color: #f93154 !important; }
.blog-content-snippet blockquote.bq-warning .bq-title { color: #ffa900 !important; }
.blog-content-snippet blockquote.bq-info .bq-title { color: #39c0ed !important; }

.blog-content-snippet .blockquote-footer {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #757575;
}

.blog-content-snippet .blockquote-footer::before {
  content: "\2014 \00A0";
}

/* ============================================
 * TABLE OF CONTENTS
 * ============================================ */

.blog-toc-snippet nav {
  position: sticky;
  top: 2rem;
  max-height: calc(100vh - 4rem);
  overflow-y: auto;
  padding: 1.5rem;
  background-color: var(--bs-light);
  border-radius: 0.5rem;
  border: 1px solid var(--bs-border-color);
}

.blog-toc-snippet h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--bs-secondary);
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.blog-toc-snippet ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-toc-snippet li {
  margin-bottom: 0.5rem;
}

.blog-toc-snippet a {
  text-decoration: none;
  color: var(--bs-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
  display: block;
  padding: 0.25rem 0;
}

.blog-toc-snippet a:hover {
  color: var(--bs-primary);
}

/* ============================================
 * LAYOUT HELPERS (Side-by-side Sticky ToC)
 * ============================================ */

/* Wrapper to hold both fragments alongside each other on large screens */
.blog-embed-wrapper {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 992px) {
  .blog-embed-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .blog-embed-wrapper .blog-toc-snippet {
    width: 280px;
    flex-shrink: 0;
    order: 2; /* TOC on the right by default */
    position: sticky;
    top: 2rem;
  }

  .blog-embed-wrapper .blog-content-snippet {
    flex-grow: 1;
    min-width: 0;
    order: 1;
  }

  /* RTL Support for layout */
  [dir="rtl"] .blog-embed-wrapper {
    flex-direction: row-reverse;
  }
}

/* Optional: ToC on the left layout (if needed) */
.blog-toc-left .blog-toc-snippet {
  order: 1 !important;
}
.blog-toc-left .blog-content-snippet {
  order: 2 !important;
}

/* ============================================
 * PREMIUM COMPONENTS (Bootstrap-compatible)
 * ============================================ */

/* Accordion */
.premium-accordion-group {
  margin: 1.5rem 0;
}

.premium-accordion-item {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.premium-accordion-item.active {
  border-color: var(--bs-primary);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.premium-accordion-header {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--bs-body-color);
  transition: background-color 0.2s;
}

.premium-accordion-header:hover {
  background-color: var(--bs-light);
}

.premium-accordion-item.active .premium-accordion-header {
  color: var(--bs-primary);
}

.premium-accordion-icon {
  transition: transform 0.4s ease;
  color: var(--bs-secondary);
}

.premium-accordion-item.active .premium-accordion-icon {
  transform: rotate(180deg);
  color: var(--bs-primary);
}

.premium-accordion-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.premium-accordion-collapse.expanded {
  max-height: 1000px;
}

.premium-accordion-body {
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--bs-secondary);
  line-height: 1.7;
}

/* Carousel */
.premium-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  margin: 2.5rem 0;
  background: #000;
}

.premium-carousel-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

.premium-carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s;
}

.premium-carousel-item.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.premium-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.premium-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 2rem 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  z-index: 3;
}

.premium-carousel-caption h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.premium-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
}

.premium-carousel-nav:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.premium-carousel-nav.prev {
  left: 1.5rem;
}

.premium-carousel-nav.next {
  right: 1.5rem;
}

.premium-carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.75rem;
  z-index: 10;
}

.premium-carousel-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.premium-carousel-dot.active {
  background: white;
  transform: scale(1.3);
  width: 1.5rem;
  border-radius: 1rem;
}

/* Buttons */
.premium-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.premium-btn.btn-primary {
  background-color: var(--bs-primary);
  color: white;
  border-color: var(--bs-primary);
}

.premium-btn.btn-primary:hover {
  background-color: #3061af;
  border-color: #3061af;
  color: white;
}

.premium-btn.btn-secondary {
  background-color: var(--bs-secondary);
  color: white;
  border-color: var(--bs-secondary);
}

.premium-btn.btn-outline-primary {
  background-color: transparent;
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.premium-btn.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  color: white;
}

.premium-btn.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.premium-btn.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Badges */
.premium-badge {
  display: inline-block;
  padding: 0.35em 0.65em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}

.premium-badge.badge-primary {
  background-color: var(--bs-primary);
}
.premium-badge.badge-secondary {
  background-color: var(--bs-secondary);
}
.premium-badge.badge-success {
  background-color: var(--bs-success);
}
.premium-badge.badge-danger {
  background-color: var(--bs-danger);
}
.premium-badge.badge-warning {
  background-color: var(--bs-warning);
  color: #000;
}
.premium-badge.badge-info {
  background-color: var(--bs-info);
  color: #000;
}

/* Original Fancy Quote (Kept for compatibility) */
.premium-fancy-quote {
  position: relative;
  padding: 2rem;
  margin: 2rem 0;
  background: linear-gradient(135deg, var(--bs-light) 0%, var(--bs-body-bg) 100%);
  border-left: 4px solid var(--bs-primary);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.premium-fancy-quote-header {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--bs-primary);
}

.premium-fancy-quote-body {
  font-size: 1.125rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--bs-body-color);
}

.premium-fancy-quote-footer {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--bs-secondary);
  font-style: normal;
}

/* Streak (Full-width section) */
.premium-streak {
  width: 100%;
  padding: 4rem 2rem;
  margin: 3rem 0;
  background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
  color: white;
  text-align: center;
  border-radius: 1rem;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.premium-streak-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
}

.premium-streak-description {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Note / Callout */
.note {
  padding: 1.25rem;
  margin: 1.5rem 0;
  border: none;
  border-left: 0.25rem solid var(--bs-primary);
  border-radius: 0.25rem;
  background-color: var(--bs-light);
  color: var(--bs-body-color);
  position: relative;
}

.note > :first-child {
  margin-top: 0;
}
.note > :last-child {
  margin-bottom: 0;
}

.note.note-primary {
  border-left-color: var(--bs-primary) !important;
  background-color: rgba(59, 113, 202, 0.05) !important;
  color: #23447a !important;
}
.note.note-secondary {
  border-left-color: var(--bs-secondary) !important;
  background-color: rgba(159, 166, 178, 0.05) !important;
  color: #5f636a !important;
}
.note.note-success {
  border-left-color: var(--bs-success) !important;
  background-color: rgba(20, 164, 77, 0.05) !important;
  color: #0c622e !important;
}
.note.note-danger {
  border-left-color: var(--bs-danger) !important;
  background-color: rgba(220, 76, 100, 0.05) !important;
  color: #842e3c !important;
}
.note.note-warning {
  border-left-color: var(--bs-warning) !important;
  background-color: rgba(228, 161, 27, 0.05) !important;
  color: #896010 !important;
}
.note.note-info {
  border-left-color: var(--bs-info) !important;
  background-color: rgba(84, 180, 211, 0.05) !important;
  color: #326c7e !important;
}

/* Dark mode for notes */
[data-bs-theme="dark"] .note,
.dark .note {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--bs-body-color);
}
[data-bs-theme="dark"] .note.note-primary,
.dark .note.note-primary {
  color: #6db1ff !important;
}
[data-bs-theme="dark"] .note.note-success,
.dark .note.note-success {
  color: #75b798 !important;
}
[data-bs-theme="dark"] .note.note-danger,
.dark .note.note-danger {
  color: #ea868f !important;
}
[data-bs-theme="dark"] .note.note-warning,
.dark .note.note-warning {
  color: #ffda6a !important;
}
[data-bs-theme="dark"] .note.note-info,
.dark .note.note-info {
  color: #6edff6 !important;
}

/* RTL support for notes */
[dir="rtl"] .note {
  border-left: none;
  border-right: 0.25rem solid var(--bs-primary);
}

[dir="rtl"] .note.note-primary {
  border-right-color: var(--bs-primary) !important;
}
[dir="rtl"] .note.note-secondary {
  border-right-color: var(--bs-secondary) !important;
}
[dir="rtl"] .note.note-success {
  border-right-color: var(--bs-success) !important;
}
[dir="rtl"] .note.note-danger {
  border-right-color: var(--bs-danger) !important;
}
[dir="rtl"] .note.note-warning {
  border-right-color: var(--bs-warning) !important;
}
[dir="rtl"] .note.note-info {
  border-right-color: var(--bs-info) !important;
}

/* Audio/Video Players */
.premium-media-card,
.premium-video-wrapper {
  margin: 2rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
}

.premium-audio-element,
.premium-video-element {
  width: 100%;
  max-width: 100%;
  display: block;
  height: auto;
}

.premium-media-header {
  padding: 1rem;
  background-color: var(--bs-light);
  font-weight: 600;
  border-bottom: 1px solid var(--bs-border-color);
}

.premium-media-body {
  padding: 1rem;
  background-color: var(--bs-body-bg);
}

/* Checkbox */
.premium-checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0;
  cursor: pointer;
}

.premium-checkbox-box {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--bs-secondary);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  background-color: var(--bs-body-bg);
}

.premium-checkbox-box.checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: white;
}

.premium-checkbox-label {
  cursor: pointer;
  user-select: none;
  font-size: 1rem;
}

/* Animations */
.premium-animate .animate-fade-in {
  animation: fadeIn 0.6s ease-in;
}

.premium-animate .animate-slide-up {
  animation: slideUp 0.6s ease-out;
}

.premium-animate .animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ============================================
 * RTL SUPPORT
 * ============================================ */

[dir="rtl"] .blog-content-snippet ul,
[dir="rtl"] .blog-content-snippet ol {
  padding-left: 0;
  padding-right: 1.625rem;
}

[dir="rtl"] .blog-content-snippet blockquote {
  border-left: none;
  border-right: 4px solid var(--bs-border-color);
  padding-left: 0;
  padding-right: 1.5rem;
}

[dir="rtl"] .premium-fancy-quote {
  border-left: none;
  border-right: 4px solid var(--bs-primary);
}

[dir="rtl"] .blog-content-snippet th,
[dir="rtl"] .blog-content-snippet td {
  text-align: right;
}

/* ============================================
 * RESPONSIVE DESIGN
 * ============================================ */

@media (max-width: 768px) {
  .blog-content-snippet article {
    font-size: 1.25rem;
  }

  .blog-content-snippet h1 {
    font-size: 2rem;
  }
  .blog-content-snippet h2 {
    font-size: 1.75rem;
  }
  .blog-content-snippet h3 {
    font-size: 1.5rem;
  }

  .premium-carousel-nav {
    width: 2.5rem;
    height: 2.5rem;
  }

  .premium-carousel-nav.prev {
    left: 0.75rem;
  }

  .premium-carousel-nav.next {
    right: 0.75rem;
  }

  .premium-streak {
    padding: 3rem 1.5rem;
  }

  .premium-streak-title {
    font-size: 2rem;
  }

  .premium-streak-description {
    font-size: 1rem;
  }
}

/* ============================================
 * UTILITY CLASSES (Bootstrap-compatible)
 * ============================================ */

.blog-content-snippet .text-primary {
  color: var(--bs-primary) !important;
}
.blog-content-snippet .text-secondary {
  color: var(--bs-secondary) !important;
}
.blog-content-snippet .text-success {
  color: var(--bs-success) !important;
}
.blog-content-snippet .text-danger {
  color: var(--bs-danger) !important;
}
.blog-content-snippet .text-warning {
  color: var(--bs-warning) !important;
}
.blog-content-snippet .text-info {
  color: var(--bs-info) !important;
}

.blog-content-snippet .bg-primary {
  background-color: var(--bs-primary) !important;
}
.blog-content-snippet .bg-secondary {
  background-color: var(--bs-secondary) !important;
}
.blog-content-snippet .bg-light {
  background-color: var(--bs-light) !important;
}
.blog-content-snippet .bg-dark {
  background-color: var(--bs-dark) !important;
}

.blog-content-snippet .border {
  border: 1px solid var(--bs-border-color) !important;
}
.blog-content-snippet .border-0 {
  border: 0 !important;
}
.blog-content-snippet .rounded {
  border-radius: 0.375rem !important;
}
.blog-content-snippet .rounded-3 {
  border-radius: 0.5rem !important;
}

.blog-content-snippet .shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
.blog-content-snippet .shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Styling for unstyled lists with FontAwesome icons */

div.list-unstyled {
  margin: 1rem 0;
}

div.list-unstyled .list-item {
  margin-bottom: 0.5rem;
  padding-left: 0;
}

/* Optional: Add some spacing for the icon if needed */
div.list-unstyled .list-item i.fa,
div.list-unstyled .list-item i.fas,
div.list-unstyled .list-item i.far,
div.list-unstyled .list-item i.fal,
div.list-unstyled .list-item i.fab {
  margin-right: 0.5rem;
  width: 1.25em;
  text-align: center;
}
