/* ===================================================================
   RICH TEXT GLOBAL STYLES
   Consistent styling for all rich text content across the project
   ================================================================= */

/* Base rich text container */
.rich-text,
.rich-text-block,
.project-description,
.prose {
    color: inherit;
    line-height: 1.75;
    max-width: none;
}

/* Paragraph styling */
.rich-text p,
.rich-text-block p,
.project-description p,
.prose p {
    margin: 0 0 1.5em 0;
}

.rich-text p:last-child,
.rich-text-block p:last-child,
.project-description p:last-child,
.prose p:last-child {
    margin-bottom: 0;
}

/* Empty line paragraphs */
.rich-text p.empty-line,
.rich-text-block p.empty-line,
.project-description p.empty-line,
.prose p.empty-line {
    margin: 0;
    height: 1.5em;
}

/* Heading styling */
.rich-text h1,
.rich-text-block h1,
.project-description h1,
.prose h1 {
    color: inherit;
    font-weight: 700;
    margin-top: 0 !important;
    margin-bottom: 0.5em !important;
    font-size: 2.25em;
    line-height: 1.1111111;
}

.rich-text h2,
.rich-text-block h2,
.project-description h2,
.prose h2 {
    color: inherit;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em !important;
    font-size: 1.875em;
    line-height: 1.3333333;
}

.rich-text h3,
.rich-text-block h3,
.project-description h3,
.prose h3 {
    color: inherit;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 0.5em !important;
    font-size: calc(var(--typo-size-small) + 5px) !important;
    line-height: 1.6;
}

.rich-text h4,
.rich-text-block h4,
.project-description h4,
.prose h4 {
    color: inherit;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    font-size: 1.25em;
    line-height: 1.5;
}

.rich-text h5,
.rich-text-block h5,
.project-description h5,
.prose h5,
.rich-text h6,
.rich-text-block h6,
.project-description h6,
.prose h6 {
    color: inherit;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
}

/* Bold and italic */
.rich-text strong,
.rich-text-block strong,
.project-description strong,
.prose strong,
.rich-text b,
.rich-text-block b,
.project-description b,
.prose b {
    color: inherit;
    font-weight: var(--font-weight-bold, 700);
}

/* Link styling */
.rich-text a,
.rich-text-block a,
.project-description a,
.prose a {
    color: inherit;
    text-decoration: underline;
    font-weight: inherit;
}

/* Links inside bold/strong */
.rich-text strong a,
.rich-text-block strong a,
.project-description strong a,
.prose strong a,
.rich-text b a,
.rich-text-block b a,
.project-description b a,
.prose b a {
    font-weight: var(--font-weight-bold, 700) !important;
}

/* Links inside italic/em */
.rich-text em a,
.rich-text-block em a,
.project-description em a,
.prose em a,
.rich-text i a,
.rich-text-block i a,
.project-description i a,
.prose i a {
    font-style: italic !important;
}

/* Links inside both bold and italic */
.rich-text strong em a,
.rich-text-block strong em a,
.project-description strong em a,
.prose strong em a,
.rich-text em strong a,
.rich-text-block em strong a,
.project-description em strong a,
.prose em strong a {
    font-weight: var(--font-weight-bold, 700) !important;
    font-style: italic !important;
}

/* Lists */
.rich-text ul,
.rich-text-block ul,
.project-description ul,
.prose ul,
.rich-text ol,
.rich-text-block ol,
.project-description ol,
.prose ol {
    list-style-position: inside;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.rich-text ul,
.rich-text-block ul,
.project-description ul,
.prose ul {
    list-style-type: disc;
}

.rich-text ol,
.rich-text-block ol,
.project-description ol,
.prose ol {
    list-style-type: decimal;
}

.rich-text li,
.rich-text-block li,
.project-description li,
.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* Blockquotes */
.rich-text blockquote,
.rich-text-block blockquote,
.project-description blockquote,
.prose blockquote {
    font-weight: var(--font-weight-primary, 400);
    font-style: italic;
    color: inherit;
    border-left: 0.25rem solid currentColor;
    opacity: 0.8;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

/* Code blocks */
.rich-text code,
.rich-text-block code,
.project-description code,
.prose code {
    color: inherit;
    font-weight: 600;
    font-size: 0.875em;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.125em 0.25em;
    border-radius: 0.25em;
}

/* Horizontal rules */
.rich-text hr,
.rich-text-block hr,
.project-description hr,
.prose hr {
    border-color: currentColor;
    opacity: 0.2;
    border-top-width: 1px;
    margin-top: 3em;
    margin-bottom: 3em;
}
