﻿/* ==========================================================================
   .tiptap-rte-blog — Rich text content styles
   Brand colors:
     Primary:   #660033 (deep maroon)
     Secondary: #8e6133 (bronze/tan)
     Text:      #555555 (grey)
   ========================================================================== */

.tiptap-rte-blog {
    --color-primary: #660033;
    --color-secondary: #8e6133;
    --color-text: #555555;
    --color-text-light: #7a7a7a;
    --color-border: #e2e2e2;
    --color-bg-subtle: #f7f8fa;
    --color-bg-code: #f2f2f2;
    color: var(--color-text);
    font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.7;
    
    word-wrap: break-word;
}

    /* -------------------- Headings -------------------- */

    .tiptap-rte-blog h1,
    .tiptap-rte-blog h2,
    .tiptap-rte-blog h3,
    .tiptap-rte-blog h4,
    .tiptap-rte-blog h5,
    .tiptap-rte-blog h6 {
        color: var(--color-primary);
        font-weight: 700;
        line-height: 1.3;
        margin-top: 1.8em;
        margin-bottom: 0.6em;
    }

    .tiptap-rte-blog > *:first-child {
        margin-top: 0;
    }

    .tiptap-rte-blog h1 {
        font-size: 2.25em;
        border-bottom: 3px solid var(--color-secondary);
        padding-bottom: 0.3em;
        margin-bottom: 0.8em;
    }

    .tiptap-rte-blog h2 {
        font-size: 1.75em;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 0.25em;
    }

    .tiptap-rte-blog h3 {
        font-size: 1.4em;
    }

    .tiptap-rte-blog h4 {
        font-size: 1.15em;
    }

    .tiptap-rte-blog h5 {
        font-size: 1em;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--color-text-light);
    }

    .tiptap-rte-blog h6 {
        font-size: 0.9em;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--color-text-light);
    }

    /* -------------------- Paragraphs & inline text -------------------- */

    .tiptap-rte-blog p {
        margin: 0 0 1.2em;
    }

    .tiptap-rte-blog strong,
    .tiptap-rte-blog b {
        color: var(--color-primary);
        font-weight: 700;
    }

    .tiptap-rte-blog em,
    .tiptap-rte-blog i {
        font-style: italic;
    }

    .tiptap-rte-blog small {
        font-size: 0.85em;
        color: var(--color-text-light);
    }

    .tiptap-rte-blog mark {
        background-color: rgba(142, 97, 51, 0.18);
        color: var(--color-text);
        padding: 0.05em 0.3em;
        border-radius: 3px;
    }

    .tiptap-rte-blog del,
    .tiptap-rte-blog s {
        color: var(--color-text-light);
    }

    .tiptap-rte-blog sub,
    .tiptap-rte-blog sup {
        font-size: 0.75em;
    }

    /* -------------------- Links -------------------- */

    .tiptap-rte-blog a {
        color: var(--color-primary);
        text-decoration: underline;
        text-decoration-color: var(--color-secondary);
        text-decoration-thickness: 2px;
        text-underline-offset: 2px;
        transition: color 0.15s ease, text-decoration-color 0.15s ease;
    }

        .tiptap-rte-blog a:hover,
        .tiptap-rte-blog a:focus {
            color: var(--color-secondary);
            text-decoration-color: var(--color-primary);
        }

    /* -------------------- Lists -------------------- */

    .tiptap-rte-blog ul,
    .tiptap-rte-blog ol {
        margin: 0 0 1.2em;
        padding-left: 1.4em;
    }

    .tiptap-rte-blog ul {
        list-style: disc;
    }

        .tiptap-rte-blog ul ul {
            list-style: circle;
            margin-bottom: 0;
        }

            .tiptap-rte-blog ul ul ul {
                list-style: square;
            }

    .tiptap-rte-blog ol {
        list-style: decimal;
    }

        .tiptap-rte-blog ol ol {
            list-style: lower-alpha;
            margin-bottom: 0;
        }

    .tiptap-rte-blog li {
        margin-bottom: 0.4em;
    }

        .tiptap-rte-blog li::marker {
            color: var(--color-secondary);
        }

        .tiptap-rte-blog li > ul,
        .tiptap-rte-blog li > ol {
            margin-top: 0.4em;
        }

    .tiptap-rte-blog dl {
        margin: 0 0 1.2em;
    }

    .tiptap-rte-blog dt {
        font-weight: 700;
        color: var(--color-primary);
    }

    .tiptap-rte-blog dd {
        margin: 0 0 0.8em 1.4em;
        color: var(--color-text-light);
    }

    /* -------------------- Blockquote -------------------- */

    .tiptap-rte-blog blockquote {
        margin: 1.6em 0;
        padding: 0.8em 1.4em;
        border-left: 4px solid var(--color-secondary);
        background-color: var(--color-bg-subtle);
        color: var(--color-text-light);
        font-style: italic;
    }

        .tiptap-rte-blog blockquote p:last-child {
            margin-bottom: 0;
        }

    /* -------------------- Tables -------------------- */

    .tiptap-rte-blog table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.6em 0;
        font-size: 0.95em;
        overflow-x: auto;
        display: block;
    }

        .tiptap-rte-blog table thead {
            display: table-header-group;
        }

        .tiptap-rte-blog table tbody {
            display: table-row-group;
        }

        .tiptap-rte-blog table tr {
            display: table-row;
        }

    .tiptap-rte-blog th,
    .tiptap-rte-blog td {
        display: table-cell;
        padding: 0.7em 1em;
        border: 1px solid var(--color-border);
        text-align: left;
    }

    .tiptap-rte-blog th {
        background-color: var(--color-primary) !important;
        color: #ffffff !important;
        font-weight: 600;
    }

        .tiptap-rte-blog th p,
        .tiptap-rte-blog th * {
            color: #ffffff !important;
        }

    .tiptap-rte-blog tbody tr:nth-child(even) {
        background-color: var(--color-bg-subtle);
    }

    .tiptap-rte-blog tbody tr:hover {
        background-color: rgba(142, 97, 51, 0.08);
    }

    /* -------------------- Images & media -------------------- */

    .tiptap-rte-blog img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        margin: 1.2em 0;
        display: block;
    }

    .tiptap-rte-blog figure {
        margin: 1.6em 0;
    }

    .tiptap-rte-blog figcaption {
        font-size: 0.85em;
        color: var(--color-text-light);
        text-align: center;
        margin-top: 0.5em;
    }

    .tiptap-rte-blog iframe,
    .tiptap-rte-blog video {
        max-width: 100%;
        border-radius: 6px;
        margin: 1.2em 0;
    }

    /* -------------------- Code -------------------- */

    .tiptap-rte-blog code {
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
        font-size: 0.9em;
        background-color: var(--color-bg-code);
        color: var(--color-primary);
        padding: 0.15em 0.4em;
        border-radius: 4px;
    }

    .tiptap-rte-blog pre {
        background-color: var(--color-bg-code);
        border-left: 4px solid var(--color-primary);
        padding: 1em 1.2em;
        border-radius: 6px;
        overflow-x: auto;
        margin: 1.4em 0;
    }

        .tiptap-rte-blog pre code {
            background: none;
            padding: 0;
            color: var(--color-text);
        }

    /* -------------------- Horizontal rule -------------------- */

    .tiptap-rte-blog hr {
        border: none;
        border-top: 2px solid var(--color-border);
        margin: 2.4em 0;
    }

    /* -------------------- Buttons / CTA elements -------------------- */

    .tiptap-rte-blog button,
    .tiptap-rte-blog .btn {
        background-color: var(--color-secondary);
        color: #ffffff;
        border: none;
        padding: 0.6em 1.4em;
        border-radius: 4px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color 0.15s ease;
    }

        .tiptap-rte-blog button:hover,
        .tiptap-rte-blog .btn:hover {
            background-color: #734f29;
        }

/* -------------------- Responsive -------------------- */

@media (max-width: 600px) {
    .tiptap-rte-blog {
        font-size: 16px;
    }

        .tiptap-rte-blog h1 {
            font-size: 1.75em;
        }

        .tiptap-rte-blog h2 {
            font-size: 1.4em;
        }

        .tiptap-rte-blog table {
            font-size: 0.85em;
        }

        .tiptap-rte-blog th,
        .tiptap-rte-blog td {
            padding: 0.5em 0.7em;
        }
}
