/* Quill Editor Content Styles for Frontend Display */
/* This stylesheet ensures proper display of all Quill editor formatting on the website */

/* Base content container with overflow protection */
.content {
    font-family: inherit;
    line-height: 1.6;
    color: inherit;
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* Remove overflow-x: auto as it can cause scrolling issues */
    max-width: 100%;
}

/* Ensure blog containers also handle overflow properly */
.blogContainer, .blogMainContainer {
    /* Remove overflow-x: auto to prevent scrolling issues */
    max-width: 100%;
    position: relative;
}

/* Headers */
.content h1, .content .ql-size-huge {
    font-size: 2.5em;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.2;
    color: #000;
}

.content h2, .content .ql-size-large {
    font-size: 2em;
    font-weight: 600;
    margin: 1.3rem 0 0.8rem 0;
    line-height: 1.3;
    color: #000;
}

.content h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin: 1.2rem 0 0.6rem 0;
    line-height: 1.4;
    color: #000;
}

.content h4 {
    font-size: 1.25em;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #000;
}

/* Paragraphs */
.content p {
    margin: 0 0 1rem 0;
    color: inherit;
}

.content p:last-child {
    margin-bottom: 0;
}

/* Links */
.content a {
    color: #2980b9;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.content a:hover {
    color: #2980b9;
    text-decoration: none;
}

/* Lists - Unordered (Bullet Points) */
.content ul,
.blogContainer ul,
.content .ql-editor ul,
.content ol li[data-list="bullet"],
.blogContainer ol li[data-list="bullet"] {
    margin: 1rem 0 !important;
    padding-left: 2rem !important;
    list-style: disc !important;
    list-style-type: disc !important;
    list-style-position: outside !important;
}

.content ul > li,
.blogContainer ul > li,
.content .ql-editor ul > li,
.content ol > li[data-list="bullet"],
.blogContainer ol > li[data-list="bullet"] {
    margin: 0.5rem 0 !important;
    padding-left: 0.25rem !important;
    color: #000 !important;
    font-weight: normal !important;
    font-size: 1em !important;
    list-style: disc !important;
    list-style-type: disc !important;
    display: list-item !important;
}

/* Hide Quill UI elements */
.content .ql-ui,
.blogContainer .ql-ui {
    display: none !important;
}

/* Bold and larger bullet points */
.content ul li::marker {
    font-weight: bold;
    font-size: 1.2em;
    color: #2980b9;
}

.content ul ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    list-style-type: circle !important;
}

.content ul ul li {
    list-style-type: circle !important;
}

.content ul ul ul {
    list-style-type: square !important;
}

.content ul ul ul li {
    list-style-type: square !important;
}

/* Lists - Ordered (Numbered) */
.content ol,
.blogContainer ol,
.content .ql-editor ol {
    margin: 1rem 0 !important;
    padding-left: 2rem !important;
    list-style: decimal !important;
    list-style-type: decimal !important;
    list-style-position: outside !important;
    counter-reset: list-counter;
}

.content ol > li,
.blogContainer ol > li,
.content .ql-editor ol > li {
    margin: 0.5rem 0 !important;
    padding-left: 0.25rem !important;
    color: #000 !important;
    font-weight: normal !important;
    font-size: 1em !important;
    list-style: decimal !important;
    list-style-type: decimal !important;
    display: list-item !important;
}

/* Bold and larger numbers */
.content ol li::marker {
    font-weight: bold;
    font-size: 1.1em;
    color: #2980b9;
}

.content ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    list-style-type: lower-alpha;
}

.content ol ol ol {
    list-style-type: lower-roman;
}

/* Nested list spacing */
.content li > ul,
.content li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* Blockquotes - Enhanced Design */
.content blockquote, .content .ql-blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.5rem 2rem 1.5rem 3.5rem;
    border-left: 5px solid #2980b9;
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.08) 0%, rgba(41, 128, 185, 0.02) 100%);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #333;
    font-size: 1.1em;
    line-height: 1.7;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Add decorative quote mark */
.content blockquote::before, .content .ql-blockquote::before {
    content: '"';
    position: absolute;
    left: 0.75rem;
    top: 0.5rem;
    font-size: 3.5rem;
    font-weight: 700;
    color: #2980b9;
    opacity: 0.3;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Hover effect */
.content blockquote:hover, .content .ql-blockquote:hover {
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.2) 0%, rgba(41, 128, 185, 0.08) 100%);
    box-shadow: 0 6px 20px rgba(41, 128, 185, 0.15);
    transform: translateX(3px);
}

.content blockquote p, .content .ql-blockquote p {
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.content blockquote p:last-child, .content .ql-blockquote p:last-child {
    margin-bottom: 0;
}

/* Citation/Author styling */
.content blockquote cite, .content .ql-blockquote cite,
.content blockquote footer, .content .ql-blockquote footer {
    display: block;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(41, 128, 185, 0.3);
    font-size: 0.9em;
    color: #2980b9;
    font-style: normal;
    font-weight: 600;
    text-align: right;
}

/* Add dash before author name */
.content blockquote cite::before, .content .ql-blockquote cite::before,
.content blockquote footer::before, .content .ql-blockquote footer::before {
    content: '— ';
    color: #2980b9;
    font-weight: normal;
}

/* Multiple paragraph quotes */
.content blockquote p + p, .content .ql-blockquote p + p {
    margin-top: 1rem;
}

/* Nested blockquotes */
.content blockquote blockquote, .content .ql-blockquote blockquote {
    margin: 1rem 0;
    padding-left: 2rem;
    border-left-width: 3px;
    background: rgba(41, 128, 185, 0.05);
}

.content blockquote blockquote::before {
    display: none;
}

/* Code blocks */
.content pre, .content .ql-code-block {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    color: #333;
}

.content code {
    padding: 0.2em 0.4em;
    background: #f0f0f0;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.85em;
    color: #d14;
}

.content pre code {
    padding: 0;
    background: none;
    border-radius: 0;
}

/* Text formatting */
.content strong, .content b, .content .ql-bold {
    font-weight: 700;
    color: #000;
}

.content em, .content i, .content .ql-italic {
    font-style: italic;
}

.content u, .content .ql-underline {
    text-decoration: underline;
}

.content s, .content strike, .content .ql-strike {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Text alignment */
.content .ql-align-center {
    text-align: center;
}

.content .ql-align-right {
    text-align: right;
}

.content .ql-align-justify {
    text-align: justify;
}

/* Indentation */
.content .ql-indent-1 {
    padding-left: 3em;
}

.content .ql-indent-2 {
    padding-left: 6em;
}

.content .ql-indent-3 {
    padding-left: 9em;
}

.content .ql-indent-4 {
    padding-left: 12em;
}

.content .ql-indent-5 {
    padding-left: 15em;
}

.content .ql-indent-6 {
    padding-left: 18em;
}

.content .ql-indent-7 {
    padding-left: 21em;
}

.content .ql-indent-8 {
    padding-left: 24em;
}

/* Text colors from Quill */
.content .ql-color-red { color: #e74c3c; }
.content .ql-color-orange { color: #f39c12; }
.content .ql-color-yellow { color: #f1c40f; }
.content .ql-color-green { color: #27ae60; }
.content .ql-color-blue { color: #3498db; }
.content .ql-color-purple { color: #8e44ad; }

/* Background colors from Quill */
.content .ql-bg-red { background-color: rgba(231, 76, 60, 0.2); padding: 0.1em 0.2em; }
.content .ql-bg-orange { background-color: rgba(243, 156, 18, 0.2); padding: 0.1em 0.2em; }
.content .ql-bg-yellow { background-color: rgba(241, 196, 15, 0.2); padding: 0.1em 0.2em; }
.content .ql-bg-green { background-color: rgba(39, 174, 96, 0.2); padding: 0.1em 0.2em; }
.content .ql-bg-blue { background-color: rgba(52, 152, 219, 0.2); padding: 0.1em 0.2em; }
.content .ql-bg-purple { background-color: rgba(142, 68, 173, 0.2); padding: 0.1em 0.2em; }

/* Font sizes from Quill */
.content .ql-size-small {
    font-size: 0.75em;
}

.content .ql-size-large {
    font-size: 1.5em;
}

.content .ql-size-huge {
    font-size: 2.5em;
}

/* Tables (if used with Quill) */
.content table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.content table thead {
    background: rgba(41, 128, 185, 0.2);
}

.content table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #2980b9;
    border-bottom: 2px solid rgba(41, 128, 185, 0.3);
}

.content table td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content table tr:last-child td {
    border-bottom: none;
}

.content table tr:hover {
    background: rgba(41, 128, 185, 0.05);
}

/* Images - Force responsive behavior to prevent layout breaking */
.content img,
.blogContainer img,
.blogMainContainer img,
.main img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 1.5rem auto;
    display: block;
    border-radius: 0;
    object-fit: contain;
    /* Prevent images from creating horizontal scroll */
    box-sizing: border-box;
}

/* Specific fix for inline images in paragraphs */
.content p img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 1rem auto !important;
}

/* Global image constraint - prevent ANY image from breaking layout */
img {
    max-width: 100% !important;
    height: auto !important;
    /* Ensure images don't cause overflow */
    box-sizing: border-box;
}

.content .ql-align-center img {
    margin-left: auto;
    margin-right: auto;
}

.content .ql-align-right img {
    margin-left: auto;
    margin-right: 0;
}

/* Horizontal rule */
.content hr {
    margin: 2rem 0;
    border: none;
    border-top: 2px solid rgba(41, 128, 185, 0.3);
}

/* Video embeds */
.content .ql-video {
    display: block;
    max-width: 100%;
    margin: 1.5rem 0;
}

.content iframe {
    max-width: 100%;
    border-radius: 8px;
}

/* Special classes for CTA elements */
.content .cta-placeholder {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(41, 128, 185, 0.1), rgba(41, 128, 185, 0.05));
    border: 2px solid #2980b9;
    border-radius: 12px;
    text-align: center;
}

/* Fix for main layout containers to ensure proper scrolling */
.main, .mainInnerContainer, .mainRowFirst {
    overflow: visible !important;
    position: relative;
}

/* Ensure blogMainContainer doesn't restrict height */
.blogMainContainer {
    min-height: 100vh;
    overflow: visible !important;
}

/* Remove gray background from blog image containers */
.blogImageL {
    background-color: transparent !important;
}

/* Ensure header images fill their container */
.blogImageL img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}

/* Fix any potential z-index issues with images */
.content img {
    position: relative;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content h1, .content .ql-size-huge {
        font-size: 2em;
    }
    
    .content h2, .content .ql-size-large {
        font-size: 1.5em;
    }
    
    .content h3 {
        font-size: 1.25em;
    }
    
    .content ul, .content ol {
        padding-left: 1.5rem;
    }
    
    .content blockquote, .content .ql-blockquote {
        padding: 1.25rem 1.5rem 1.25rem 2.75rem;
        margin: 1.5rem 0;
    }
    
    .content blockquote::before, .content .ql-blockquote::before {
        font-size: 2.5rem;
        left: 0.5rem;
        top: 0.25rem;
    }
    
    .content .ql-indent-1 { padding-left: 2em; }
    .content .ql-indent-2 { padding-left: 4em; }
    .content .ql-indent-3 { padding-left: 6em; }
    .content .ql-indent-4 { padding-left: 8em; }
    .content .ql-indent-5 { padding-left: 10em; }
    .content .ql-indent-6 { padding-left: 12em; }
    .content .ql-indent-7 { padding-left: 14em; }
    .content .ql-indent-8 { padding-left: 16em; }
}

/* Print styles */
@media print {
    .content {
        color: #000;
    }
    
    .content h1, .content h2, .content h3, .content h4 {
        color: #000;
        page-break-after: avoid;
    }
    
    .content a {
        color: #000;
        text-decoration: underline;
    }
    
    .content blockquote {
        border-left-color: #000;
        background: #f5f5f5;
    }
}