/* =========================================
   Summernote Content Styling
   Styles for rich HTML content rendered 
   from the CMS (Summernote output)
   ========================================= */



.cms-content {
    line-height: 1.85;
    color: #444;
    font-size: 0.95rem;
    padding: 1.25rem;
    text-align: justify !important;
}

/* -------- Word / MSO pasted content overrides -------- */

/* Bullet paragraphs — top-level (Word margin-left: 2cm) */
.cms-content p[style*="margin-left: 2cm"] {
    margin-left: 1rem !important;
    text-indent: 0 !important;
}

/* Bullet paragraphs — nested/sub-bullets "·" (margin-left: 71.45pt, text-indent: -28.9pt) */
.cms-content p[style*="margin-left: 71.45pt"][style*="-28.9pt"] {
    margin-left: 2rem !important;
    text-indent: 0 !important;
}

/* Sub-sub-bullets "o" (margin-left: 71.45pt, text-indent: -18pt) → deeper indent */
.cms-content p[style*="margin-left: 71.45pt"][style*="text-indent: -18pt"] {
    margin-left: 3rem !important;
    text-indent: 0 !important;
}

/* Regular paragraphs — keep first-line indent but reduce from Word's 35.45pt */
.cms-content p[style*="text-indent"]:not([style*="margin-left"]) {
    text-indent: 1.5em !important;
}

/* Mobile: override Summernote justify and reduce padding */
@media (max-width: 768px) {
    .cms-content {
        padding: 0.75rem;
    }

    .cms-content p,
    .cms-content li,
    .cms-content div,
    .cms-content span {
        text-align: left !important;
    }
}

/* First child — no top margin */
.cms-content > *:first-child {
    margin-top: 0;
}

/* Last child — no bottom margin */
.cms-content > *:last-child {
    margin-bottom: 0;
}

/* Paragraphs */
.cms-content p {
    margin-bottom: 0.85rem;
}

/* Bold / Strong emphasis */
.cms-content strong,
.cms-content b {
    color: #2d2d2d;
    font-weight: 600;
}

/* Headings inside CMS content */
.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5,
.cms-content h6 {
    color: #333;
    font-weight: 600;
    margin-top: 1.2rem;
    margin-bottom: 0.6rem;
}

/* -------- Lists -------- */
.cms-content ul,
.cms-content ol {
    padding-left: 0.75rem !important;
    margin-bottom: 1rem;
}

/* Override Summernote inline padding on nested lists */
.cms-content ul ul,
.cms-content ul ol,
.cms-content ol ul,
.cms-content ol ol {
    padding-left: 1rem !important;
}

.cms-content ul {
    list-style: none;
}

.cms-content ul > li {
    position: relative;
    padding-left: 0.9rem !important;
    margin-bottom: 0.5rem;
}

.cms-content ul > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color, #7c3aed);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

/* Nested lists (sub-bullets) — hollow circles */
.cms-content ul ul {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

.cms-content ul ul > li::before {
    background-color: transparent;
    border: 2px solid var(--primary-color, #7c3aed);
    box-shadow: none;
    width: 6px;
    height: 6px;
    top: 0.6em;
}

.cms-content ol > li {
    margin-bottom: 0.5rem;
}

/* -------- Links -------- */
.cms-content a {
    color: var(--primary-color, #7c3aed);
    text-decoration: none;
    border-bottom: 1px dashed rgba(124, 58, 237, 0.4);
    transition: border-color 0.2s, color 0.2s;
}

.cms-content a:hover {
    border-bottom-style: solid;
    border-bottom-color: var(--primary-color, #7c3aed);
}

/* -------- Tables -------- */
.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    border-radius: 6px;
    overflow: hidden;
}

.cms-content table th,
.cms-content table td {
    padding: 0.55rem 0.85rem;
    border: 1px solid #e5e2f0;
}

.cms-content table th {
    background-color: #f5f2fc;
    font-weight: 600;
    color: #333;
}

.cms-content table tr:nth-child(even) td {
    background-color: #faf9fe;
}

/* -------- Blockquotes -------- */
.cms-content blockquote {
    border-left: 4px solid var(--primary-color, #7c3aed);
    padding: 0.85rem 1.25rem;
    margin: 1.25rem 0;
    background: linear-gradient(135deg, #faf8ff 0%, #f5f0ff 100%);
    border-radius: 0 10px 10px 0;
    color: #555;
    font-style: italic;
}

/* -------- Horizontal rule -------- */
.cms-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color, #7c3aed), transparent);
    margin: 1.75rem 0;
    opacity: 0.3;
}

/* -------- Images -------- */
.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.75rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
