/* ═══════════════════════════════════════════════════════════════════ */
/* 1. BASE TYPOGRAPHY & LAYOUT                                       */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.8;
  color: #475569; 
  word-wrap: break-word;
  overflow-wrap: break-word;
  
  /* Reset Quill's specific editor sizing */
  padding: 0;
  height: auto;
  overflow: visible;
}

/* Reset default margins for the first and last elements to prevent awkward gaps inside cards */
.rich-text-content.ql-editor > *:first-child { margin-top: 0 !important; }
.rich-text-content.ql-editor > *:last-child { margin-bottom: 0 !important; }

/* ═══════════════════════════════════════════════════════════════════ */
/* 2. HEADINGS                                                       */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor h1,
.rich-text-content.ql-editor h2,
.rich-text-content.ql-editor h3,
.rich-text-content.ql-editor h4,
.rich-text-content.ql-editor h5,
.rich-text-content.ql-editor h6 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  color: #0D1C42; /* Your Navy */
  line-height: 1.3;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.rich-text-content.ql-editor h1 { font-size: 1.5rem; border-bottom: 1px solid #e2e8f0; padding-bottom: 0.5rem; }
.rich-text-content.ql-editor h2 { font-size: 1.25rem; }
.rich-text-content.ql-editor h3 { font-size: 1.125rem; }
.rich-text-content.ql-editor h4 { font-size: 1rem; }
.rich-text-content.ql-editor h5 { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; }
.rich-text-content.ql-editor h6 { font-size: 0.875rem; color: #64748b; }

/* ═══════════════════════════════════════════════════════════════════ */
/* 3. PARAGRAPHS & INLINE TEXT                                       */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor p {
  margin-bottom: 1.2em;
}

.rich-text-content.ql-editor strong,
.rich-text-content.ql-editor b {
  color: #0D1C42;
  font-weight: 700;
}

.rich-text-content.ql-editor em,
.rich-text-content.ql-editor i {
  font-style: italic;
  color: #334155;
}

.rich-text-content.ql-editor u {
  text-decoration-color: #E31E26;
  text-underline-offset: 3px;
}

.rich-text-content.ql-editor s,
.rich-text-content.ql-editor strike {
  text-decoration-color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 4. HYPERLINKS                                                     */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor a {
  color: #E31E26; /* Your Red */
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.rich-text-content.ql-editor a:hover {
  color: #B8141A; /* Darker Red */
  border-bottom-color: #B8141A;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 5. LISTS (Bullets, Numbers, & Checkboxes)                         */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor ul,
.rich-text-content.ql-editor ol {
  margin-top: 0.8em;
  margin-bottom: 1.2em;
  padding-left: 1.5rem;
}

.rich-text-content.ql-editor li {
  margin-bottom: 0.6em;
  padding-left: 0.25rem;
}

/* Style the native HTML bullets/numbers */
.rich-text-content.ql-editor ul > li::marker,
.rich-text-content.ql-editor ol > li::marker {
  color: #E31E26; /* Your Red */
  font-weight: 700;
}

/* Nested lists */
.rich-text-content.ql-editor ul ul,
.rich-text-content.ql-editor ol ol,
.rich-text-content.ql-editor ul ol,
.rich-text-content.ql-editor ol ul {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

/* Quill Checkbox Lists specific styling */
.rich-text-content.ql-editor li[data-list="checked"] {
  text-decoration: line-through;
  color: #94a3b8;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 6. BLOCKQUOTES                                                    */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor blockquote {
  border-left: 4px solid #E31E26;
  padding: 1rem 1.25rem;
  margin: 1.5em 0;
  color: #475569;
  font-style: italic;
  background-color: #F8FAFC;
  border-radius: 0 8px 8px 0;
}

.rich-text-content.ql-editor blockquote p:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 7. CODE & PRE-FORMATTED TEXT                                      */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor code {
  background-color: #F1F5F9;
  color: #B8141A;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85em;
}

.rich-text-content.ql-editor pre {
  background-color: #0D1C42; /* Navy */
  color: #E2E8F0;
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.875em;
  margin: 1.5em 0;
  line-height: 1.6;
}

.rich-text-content.ql-editor pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 8. MEDIA (Images, Videos, Iframes)                                */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor img,
.rich-text-content.ql-editor video,
.rich-text-content.ql-editor iframe {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5em 0;
  display: block;
}

.rich-text-content.ql-editor img {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 9. TABLES                                                         */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.875rem;
}

.rich-text-content.ql-editor th,
.rich-text-content.ql-editor td {
  border: 1px solid #E2E8F0;
  padding: 0.75rem 1rem;
  text-align: left;
}

.rich-text-content.ql-editor th {
  background-color: #F8FAFC;
  font-weight: 600;
  color: #0D1C42;
}

.rich-text-content.ql-editor tr:nth-child(even) {
  background-color: #F8FAFC;
}

/* ═══════════════════════════════════════════════════════════════════ */
/* 10. QUILL UTILITIES & ALIGNMENT                                   */
/* ═══════════════════════════════════════════════════════════════════ */
.rich-text-content.ql-editor .ql-align-center { text-align: center; }
.rich-text-content.ql-editor .ql-align-right { text-align: right; }
.rich-text-content.ql-editor .ql-align-justify { text-align: justify; }

.rich-text-content.ql-editor .ql-size-small { font-size: 0.85em; }
.rich-text-content.ql-editor .ql-size-large { font-size: 1.25em; }
.rich-text-content.ql-editor .ql-size-huge { font-size: 1.5em; }

/* Custom Fonts */
.rich-text-content.ql-editor .ql-font-inter { font-family: 'Inter', sans-serif; }
.rich-text-content.ql-editor .ql-font-playfair { font-family: 'Playfair Display', serif; }
.rich-text-content.ql-editor .ql-font-dmsans { font-family: 'DM Sans', sans-serif; }
.rich-text-content.ql-editor .ql-font-mono { font-family: 'JetBrains Mono', monospace; }
.rich-text-content.ql-editor .ql-font-serif { font-family: Georgia, serif; }
.rich-text-content.ql-editor .ql-font-sans { font-family: system-ui, sans-serif; }

/* Indentation (Quill specific) */
.rich-text-content.ql-editor .ql-indent-1 { padding-left: 3em; }
.rich-text-content.ql-editor .ql-indent-2 { padding-left: 6em; }
.rich-text-content.ql-editor .ql-indent-3 { padding-left: 9em; }
.rich-text-content.ql-editor .ql-indent-4 { padding-left: 12em; }
.rich-text-content.ql-editor .ql-indent-5 { padding-left: 15em; }