.richtext-wrapper {
    background-color: #0a0a23;
    color: #e5e7eb;
    font-family: system-ui, sans-serif;
    line-height: 1.6;
  }
  
  /* Typography */
  .richtext-wrapper h1,
  .richtext-wrapper h2,
  .richtext-wrapper h3,
  .richtext-wrapper h4,
  .richtext-wrapper h5,
  .richtext-wrapper h6 {
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 0.5em;
    line-height: 1.2;
  }
  
  .richtext-wrapper h1 { font-size: 2.25rem; }
  .richtext-wrapper h2 { font-size: 1.875rem; }
  .richtext-wrapper h3 { font-size: 1.5rem; }
  
  .richtext-wrapper p {
    margin-bottom: 1em;
    color: #cbd5e1;
  }
  
  /* Container */
  .richtext-wrapper .container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem;
  }
  
  /* Cards */
  .richtext-wrapper .card {
    background-color: #1c0b39;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    margin-bottom: 2rem;
  }
  
  /* Buttons */
  .richtext-wrapper .button {
    display: inline-block;
    background-color: #4f46e5;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.2s ease;
  }
  .richtext-wrapper .button:hover {
    background-color: #4338ca;
  }
  
  /* Tags */
  .richtext-wrapper .tag {
    display: inline-block;
    background-color: #1a103f;
    color: #c084fc;
    border: 1px solid #7e22ce;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    margin-right: 0.5rem;
  }
  
  /* Images */
  .richtext-wrapper img.responsive {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* RichText content */
  .richtext-wrapper .prose {
    max-width: 100%;
    width: 100%;
    color: #cbd5e1;
    line-height: 1.75;
  }
  
  .richtext-wrapper .prose > * + * {
    margin-top: 1.25em;
  }
  
  .richtext-wrapper .prose h1,
  .richtext-wrapper .prose h2,
  .richtext-wrapper .prose h3 {
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.25em;
  }
  
  .richtext-wrapper .prose h1 { font-size: 2rem; margin-top: 2rem; }
  .richtext-wrapper .prose h2 { font-size: 1.5rem; margin-top: 1.75rem; }
  .richtext-wrapper .prose h3 { font-size: 1.25rem; margin-top: 1.5rem; }
  
  .richtext-wrapper .prose p {
    margin-top: 1em;
    margin-bottom: 1em;
  }
  
  .richtext-wrapper .prose ul,
  .richtext-wrapper .prose ol {
    padding-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  
  .richtext-wrapper .prose ul {
    list-style-type: disc;
  }
  
  .richtext-wrapper .prose ol {
    list-style-type: decimal;
  }
  
  .richtext-wrapper .prose li {
    margin-bottom: 0.5rem;
  }
  
  .richtext-wrapper .prose a {
    color: #8b5cf6;
    text-decoration: none;
  }
  
  .richtext-wrapper .prose strong {
    font-weight: 600;
    color: #ffffff;
  }
  
  .richtext-wrapper .prose em {
    font-style: italic;
  }
  
  .richtext-wrapper .prose code {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 0.25em 0.5em;
    border-radius: 0.25em;
    font-family: monospace;
    color: #eab308;
  }
  
  .richtext-wrapper .prose pre {
    background-color: #1c0b39;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: #e5e7eb;
    font-size: 0.875rem;
  }
  
  /* Sidebar */
  .richtext-wrapper .sidebar {
    background-color: #111827;
    padding: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  /* Responsive */
  @media (min-width: 1024px) {
    .richtext-wrapper .lg-flex {
      display: flex;
    }
  
    .richtext-wrapper .lg-hidden {
      display: none;
    }
  }

/* Consistent spacing for headings inside Wagtail richtext */
.richtext h2 {
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;   /* pb-2 */
  margin-bottom: 1rem;      /* mb-4 */
  margin-top: 1.5rem;       /* mt-6 */
  font-weight: 700;         /* font-bold */
  font-size: 1.5rem;        /* text-2xl */
  line-height: 2rem;
}

.richtext h3 {
  color: #ffffff;
  margin-top: 1rem;         /* mt-4 */
  margin-bottom: 0.5rem;    /* mb-2 */
  font-weight: 600;         /* font-semibold */
  font-size: 1.25rem;       /* text-xl */
  line-height: 1.75rem;
}

.richtext h4 {
  color: #ffffff;
  margin-top: 0.75rem;      /* mt-3 */
  margin-bottom: 0.25rem;   /* mb-1 */
  font-weight: 600;         /* font-semibold */
  font-size: 1.125rem;      /* text-lg */
  line-height: 1.75rem;
}

.richtext p {
  margin-top: 0.75rem;      /* my-3 */
  margin-bottom: 0.75rem;
  color: #e5e7eb;           /* text-gray-200 */
  line-height: 1.625;       /* leading-relaxed */
}

.richtext ul,
.richtext ol {
  margin-top: 0.75rem;      /* my-3 */
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;     /* pl-6 */
  color: #e5e7eb;           /* text-gray-200 */
}

.richtext ul {
  list-style-type: disc;    /* list-disc */
  list-style-position: outside; /* list-outside */
}

.richtext ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.richtext blockquote {
  margin-top: 1rem;         /* my-4 */
  margin-bottom: 1rem;
  padding-left: 1rem;       /* pl-4 */
  border-left: 4px solid rgba(255, 255, 255, 0.2); /* border-l-4 border-white/20 */
  font-style: italic;
  color: #d1d5db;           /* text-gray-300 */
}


/* Make embeds (YouTube, Vimeo, etc.) responsive */
.embed-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1rem 0;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Universal Wagtail editor link styling */
.richtext a,
.richtext-wrapper .prose a {
  color: #8b5cf6; /* violet-600 */
  text-decoration-color: rgba(139, 92, 246, 0.4);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.richtext a:hover,
.richtext-wrapper .prose a:hover {
  color: #a78bfa; /* violet-500 */
  text-decoration: underline;
  text-decoration-color: rgba(167, 139, 250, 0.8);
}
