/* Page Content Styling for Rich Text Editor Output */

.prose,
.prose * {
    color: #374151 !important;
    max-width: none !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    line-height: 1.6 !important;
}

/* Headings */
.prose h1 {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    color: #047857 !important;
    border-bottom: 2px solid #047857 !important;
    padding-bottom: 0.5rem !important;
}

.prose h2 {
    font-size: 1.875rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1rem !important;
    color: #047857 !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding-bottom: 0.25rem !important;
}

.prose h3 {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-top: 1.25rem !important;
    margin-bottom: 0.75rem !important;
    color: #374151 !important;
}

.prose h4 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    color: #374151 !important;
}

.prose h5 {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    color: #374151 !important;
}

.prose h6 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin-top: 0.75rem !important;
    margin-bottom: 0.5rem !important;
    color: #374151 !important;
}

/* Paragraphs */
.prose p {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    line-height: 1.7 !important;
    text-align: justify !important;
    color: #374151 !important;
}

.prose p:first-child {
    margin-top: 0 !important;
}

.prose p:last-child {
    margin-bottom: 0 !important;
}

/* Lists */
.prose ul {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding-left: 1.5rem !important;
}

.prose ol {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
    padding-left: 1.5rem !important;
}

.prose li {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.6 !important;
    color: #374151 !important;
}

.prose ul li {
    list-style-type: disc !important;
}

.prose ol li {
    list-style-type: decimal !important;
}

.prose ul ul,
.prose ol ol,
.prose ul ol,
.prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Text Formatting */
.prose strong,
.prose b {
    font-weight: 600 !important;
    color: #047857 !important;
}

.prose em,
.prose i {
    font-style: italic !important;
}

.prose u {
    text-decoration: underline !important;
}

.prose s,
.prose strike {
    text-decoration: line-through !important;
}

/* Links */
.prose a {
    color: #047857;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #065f46;
}

/* Blockquotes */
.prose blockquote {
    border-left: 4px solid #047857;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    background-color: #f0fdf4;
    padding: 1rem;
    border-radius: 0.5rem;
    color: #374151;
}

.prose blockquote p {
    margin: 0;
}

/* Images */
.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.875rem;
}

.prose th,
.prose td {
    border: 1px solid #d1d5db;
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.prose th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.prose tr:nth-child(even) {
    background-color: #f9fafb;
}

.prose tr:hover {
    background-color: #f3f4f6;
}

/* Horizontal Rules */
.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2rem 0;
}

/* Code */
.prose code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
    color: #e11d48;
}

.prose pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.prose pre code {
    background-color: transparent;
    padding: 0;
    color: #374151;
}

/* Text Alignment */
.prose .text-left {
    text-align: left;
}

.prose .text-center {
    text-align: center;
}

.prose .text-right {
    text-align: right;
}

.prose .text-justify {
    text-align: justify;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose h4 {
        font-size: 1.125rem;
    }
    
    .prose p {
        text-align: left;
    }
    
    .prose table {
        font-size: 0.75rem;
    }
    
    .prose th,
    .prose td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .prose {
        color: #000;
    }
    
    .prose h1,
    .prose h2,
    .prose h3,
    .prose h4,
    .prose h5,
    .prose h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    .prose p,
    .prose li {
        orphans: 3;
        widows: 3;
    }
    
    .prose blockquote {
        page-break-inside: avoid;
    }
    
    .prose table {
        page-break-inside: avoid;
    }
}
