/* Rich Content Styles for WYSIWYG Display */
/* This CSS ensures content created in the admin editor displays properly on the front-end */

.rich-content, 
.service-description, 
.job-description,
.blog-content,
.media-description,
.media-caption {
    line-height: 1.6;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Headings */
.rich-content h1, .rich-content h2, .rich-content h3, .rich-content h4, .rich-content h5, .rich-content h6,
.service-description h1, .service-description h2, .service-description h3, .service-description h4, .service-description h5, .service-description h6,
.job-description h1, .job-description h2, .job-description h3, .job-description h4, .job-description h5, .job-description h6,
.blog-content h1, .blog-content h2, .blog-content h3, .blog-content h4, .blog-content h5, .blog-content h6,
.media-description h1, .media-description h2, .media-description h3, .media-description h4, .media-description h5, .media-description h6 {
    color: #2c3e50;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
}

.rich-content h1, .service-description h1, .job-description h1, .blog-content h1, .media-description h1 { 
    font-size: 2em; 
    margin-top: 1em;
}

.rich-content h2, .service-description h2, .job-description h2, .blog-content h2, .media-description h2 { 
    font-size: 1.5em; 
}

.rich-content h3, .service-description h3, .job-description h3, .blog-content h3, .media-description h3 { 
    font-size: 1.3em; 
}

.rich-content h4, .service-description h4, .job-description h4, .blog-content h4, .media-description h4 { 
    font-size: 1.1em; 
}

.rich-content h5, .service-description h5, .job-description h5, .blog-content h5, .media-description h5 { 
    font-size: 1em; 
    font-weight: 700;
}

.rich-content h6, .service-description h6, .job-description h6, .blog-content h6, .media-description h6 { 
    font-size: 0.9em; 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
.rich-content p,
.service-description p,
.job-description p,
.blog-content p,
.media-description p {
    margin-bottom: 1em;
    line-height: 1.6;
}

/* Lists */
.rich-content ul, .rich-content ol,
.service-description ul, .service-description ol,
.job-description ul, .job-description ol,
.blog-content ul, .blog-content ol,
.media-description ul, .media-description ol {
    margin: 1em 0;
    padding-left: 2em;
    list-style-position: outside;
}

.rich-content ul,
.service-description ul,
.job-description ul,
.blog-content ul,
.media-description ul {
    list-style-type: disc;
}

.rich-content ol,
.service-description ol,
.job-description ol,
.blog-content ol,
.media-description ol {
    list-style-type: decimal;
}

.rich-content ul ul,
.service-description ul ul,
.job-description ul ul,
.blog-content ul ul,
.media-description ul ul {
    list-style-type: circle;
}

.rich-content ul ul ul,
.service-description ul ul ul,
.job-description ul ul ul,
.blog-content ul ul ul,
.media-description ul ul ul {
    list-style-type: square;
}

.rich-content li,
.service-description li,
.job-description li,
.blog-content li,
.media-description li {
    margin-bottom: 0.5em;
    display: list-item;
    list-style: inherit;
}

/* Remove any conflicting pseudo-elements */
.rich-content ol li::before,
.service-description ol li::before,
.job-description ol li::before,
.blog-content ol li::before,
.media-description ol li::before {
    content: none !important;
    display: none !important;
}

/* Links */
.rich-content a,
.service-description a,
.job-description a,
.blog-content a,
.media-description a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.rich-content a:hover,
.service-description a:hover,
.job-description a:hover,
.blog-content a:hover,
.media-description a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* Emphasis */
.rich-content strong,
.service-description strong,
.job-description strong,
.blog-content strong,
.media-description strong {
    font-weight: 700;
    color: #2c3e50;
}

.rich-content em,
.service-description em,
.job-description em,
.blog-content em,
.media-description em {
    font-style: italic;
}

.rich-content u,
.service-description u,
.job-description u,
.blog-content u,
.media-description u {
    text-decoration: underline;
}

.rich-content s,
.service-description s,
.job-description s,
.blog-content s,
.media-description s {
    text-decoration: line-through;
}

/* Blockquotes */
.rich-content blockquote,
.service-description blockquote,
.job-description blockquote,
.blog-content blockquote,
.media-description blockquote {
    border-left: 4px solid #3498db;
    margin: 1.5em 0;
    padding-left: 1.5em;
    padding-right: 1em;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

/* Tables */
.rich-content table,
.service-description table,
.job-description table,
.blog-content table,
.media-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rich-content table th, .rich-content table td,
.service-description table th, .service-description table td,
.job-description table th, .job-description table td,
.blog-content table th, .blog-content table td,
.media-description table th, .media-description table td {
    border: 1px solid #e9ecef;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.rich-content table th,
.service-description table th,
.job-description table th,
.blog-content table th,
.media-description table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
}

.rich-content table tr:nth-child(even),
.service-description table tr:nth-child(even),
.job-description table tr:nth-child(even),
.blog-content table tr:nth-child(even),
.media-description table tr:nth-child(even) {
    background-color: #f8f9fa;
}

/* Code */
.rich-content pre,
.service-description pre,
.job-description pre,
.blog-content pre,
.media-description pre {
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 1em;
    margin: 1em 0;
    overflow-x: auto;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
    line-height: 1.4;
}

.rich-content code,
.service-description code,
.job-description code,
.blog-content code,
.media-description code {
    background: #f4f4f4;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: 'Courier New', Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.rich-content pre code,
.service-description pre code,
.job-description pre code,
.blog-content pre code,
.media-description pre code {
    background: none;
    padding: 0;
}

/* Images */
.rich-content img,
.service-description img,
.job-description img,
.blog-content img,
.media-description img {
    max-width: 100%;
    height: auto;
    margin: 1em 0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Dividers */
.rich-content hr,
.service-description hr,
.job-description hr,
.blog-content hr,
.media-description hr {
    border: none;
    border-top: 2px solid #e9ecef;
    margin: 2em 0;
}

/* Special styling for media captions */
.media-caption.rich-content {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

.media-caption.rich-content p {
    margin-bottom: 0.5em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rich-content, 
    .service-description, 
    .job-description,
    .blog-content,
    .media-description {
        font-size: 0.95em;
    }
    
    .rich-content h1, .service-description h1, .job-description h1, .blog-content h1, .media-description h1 { 
        font-size: 1.8em; 
    }
    
    .rich-content h2, .service-description h2, .job-description h2, .blog-content h2, .media-description h2 { 
        font-size: 1.4em; 
    }
    
    .rich-content ul, .rich-content ol,
    .service-description ul, .service-description ol,
    .job-description ul, .job-description ol,
    .blog-content ul, .blog-content ol,
    .media-description ul, .media-description ol {
        padding-left: 1.5em;
    }
    
    .rich-content table, .rich-content table th, .rich-content table td,
    .service-description table, .service-description table th, .service-description table td,
    .job-description table, .job-description table th, .job-description table td,
    .blog-content table, .blog-content table th, .blog-content table td,
    .media-description table, .media-description table th, .media-description table td {
        padding: 8px 10px;
        font-size: 0.9em;
    }
    
    .rich-content pre,
    .service-description pre,
    .job-description pre,
    .blog-content pre,
    .media-description pre {
        font-size: 0.8em;
        padding: 0.8em;
    }
}

/* Print styles */
@media print {
    .rich-content, 
    .service-description, 
    .job-description,
    .blog-content,
    .media-description {
        color: #000;
    }
    
    .rich-content a,
    .service-description a,
    .job-description a,
    .blog-content a,
    .media-description a {
        color: #000;
        text-decoration: underline;
    }
    
    .rich-content img,
    .service-description img,
    .job-description img,
    .blog-content img,
    .media-description img {
        max-width: 100%;
        box-shadow: none;
    }
}
