/**
 * CMS Content Styles
 * These styles are scoped under .cms-content to avoid affecting other elements
 */

.cms-content {
    line-height: 1.75;
    color: #374151; /* gray-700 */
}

/* Headings */
.cms-content h1 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    color: #111827; /* gray-900 */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cms-content h2 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;
    color: #111827; /* gray-900 */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.cms-content h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600;
    color: #111827; /* gray-900 */
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.cms-content h4 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    color: #111827; /* gray-900 */
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.cms-content h5,
.cms-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827; /* gray-900 */
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

/* First heading should not have top margin */
.cms-content > h1:first-child,
.cms-content > h2:first-child,
.cms-content > h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.cms-content p {
    margin-bottom: 1rem;
    color: #374151; /* gray-700 */
}

.cms-content p.lead {
    font-size: 1.125rem; /* text-lg */
    color: #374151;
    margin-bottom: 2rem;
}

/* Links */
.cms-content a {
    color: #dc2626; /* red-600 */
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.cms-content a:hover {
    color: #b91c1c; /* red-700 */
    text-decoration: underline;
}

/* Lists */
.cms-content ul,
.cms-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    color: #374151; /* gray-700 */
}

.cms-content ul {
    list-style-type: disc;
}

.cms-content ol {
    list-style-type: decimal;
}

.cms-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

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

/* Nested lists */
.cms-content ul ul,
.cms-content ol ol,
.cms-content ul ol,
.cms-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Strong and emphasis */
.cms-content strong,
.cms-content b {
    font-weight: 600;
    color: #111827; /* gray-900 */
}

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

/* Blockquotes */
.cms-content blockquote {
    border-left: 4px solid #dc2626; /* red-600 */
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563; /* gray-600 */
}

/* Code */
.cms-content code {
    background-color: #f3f4f6; /* gray-100 */
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

.cms-content pre {
    background-color: #1f2937; /* gray-800 */
    color: #f9fafb; /* gray-50 */
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.cms-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* Horizontal rule */
.cms-content hr {
    border: none;
    border-top: 1px solid #e5e7eb; /* gray-200 */
    margin: 2rem 0;
}

/* Tables */
.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.cms-content th,
.cms-content td {
    border: 1px solid #e5e7eb; /* gray-200 */
    padding: 0.75rem 1rem;
    text-align: left;
}

.cms-content th {
    background-color: #f9fafb; /* gray-50 */
    font-weight: 600;
    color: #111827; /* gray-900 */
}

.cms-content tr:nth-child(even) {
    background-color: #f9fafb; /* gray-50 */
}

/* Images */
.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

/* Info boxes / callouts */
.cms-content .info-box {
    background-color: #f9fafb; /* gray-50 */
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

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

/* Contact info box style */
.cms-content .contact-box {
    background-color: #f9fafb; /* gray-50 */
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.cms-content .contact-box p {
    margin-bottom: 0.5rem;
}

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

/* Underline, strikethrough */
.cms-content u {
    text-decoration: underline;
}

.cms-content s,
.cms-content del,
.cms-content strike {
    text-decoration: line-through;
}

/* Subscript and superscript */
.cms-content sub {
    vertical-align: sub;
    font-size: 0.75em;
}

.cms-content sup {
    vertical-align: super;
    font-size: 0.75em;
}

/* Highlight/mark */
.cms-content mark {
    background-color: #fef08a; /* yellow-200 */
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* Figure and caption */
.cms-content figure {
    margin: 1.5rem 0;
}

.cms-content figcaption {
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
    margin-top: 0.5rem;
    text-align: center;
}

/* Text alignment */
.cms-content .text-left {
    text-align: left;
}

.cms-content .text-center {
    text-align: center;
}

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

/* Image alignment */
.cms-content img.align-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.cms-content img.align-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.cms-content img.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Clear floats */
.cms-content .clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Abbreviation */
.cms-content abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

/* Address */
.cms-content address {
    font-style: normal;
    margin-bottom: 1rem;
}

/* Small text */
.cms-content small {
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
}
