/* ============================================================
   CMS rich content — preserve admin WYSIWYG formatting
   Inline styles (font-size, color, font-family, text-align, etc.)
   must win over site defaults. Do not use !important on those.
   ============================================================ */

.cms-rich-content {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.cms-rich-content > *:first-child {
    margin-top: 0;
}

.cms-rich-content > *:last-child {
    margin-bottom: 0;
}


.cms-rich-content h1,
.cms-rich-content h2,
.cms-rich-content h3,
.cms-rich-content h4,
.cms-rich-content h5,
.cms-rich-content h6 {
    margin: 1.35rem 0 0.75rem;
    line-height: 1.3;
    font-weight: 700;
}

.cms-rich-content h1 { font-size: 2rem; }
.cms-rich-content h2 { font-size: 1.65rem; }
.cms-rich-content h3 { font-size: 1.4rem; }
.cms-rich-content h4 { font-size: 1.2rem; }
.cms-rich-content h5 { font-size: 1.05rem; }
.cms-rich-content h6 { font-size: 1rem; }

.cms-rich-content ul,
.cms-rich-content ol {
    margin: 0 0 1rem;
    padding-left: 1.5rem;
}

.cms-rich-content ul { list-style: disc; }
.cms-rich-content ol { list-style: decimal; }

.cms-rich-content li {
    margin-bottom: 0.4rem;
}

.cms-rich-content blockquote {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-left: 4px solid #cfd8d2;
    background: #f7faf8;
    color: inherit;
}

.cms-rich-content a {
    color: #169344;
    text-decoration: underline;
}

.cms-rich-content a:hover {
    color: #117737;
}

.cms-rich-content img {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.cms-rich-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.cms-rich-content table td,
.cms-rich-content table th {
    border: 1px solid #d7e2da;
    padding: 0.5rem 0.65rem;
    vertical-align: top;
}

.cms-rich-content hr {
    margin: 1.5rem 0;
    border: 0;
    border-top: 1px solid #d7e2da;
}

.cms-rich-content--preview {
    min-height: 200px;
}

/* Soft shell for pages that dump full CMS HTML (optional wrapper) */
.cms-rich-shell {
    padding: 48px 0 80px;
    background: #f7faf8;
}

.cms-rich-shell__inner {
    max-width: 920px;
    margin: 0 auto;
}

@media (max-width: 767.98px) {
    .cms-rich-shell {
        padding: 28px 0 56px;
    }

    .cms-rich-shell__inner {
        padding: 22px 16px;
        border-radius: 12px;
    }

    .cms-rich-content h1 { font-size: 1.65rem; }
    .cms-rich-content h2 { font-size: 1.4rem; }
}
