/*---*\
WYSIWYG Block
Free-form rich text styled to the brand. Whatever the editor enters (headings,
paragraphs, blockquotes, lists, links) is styled to match the Figma design.

KEY FEATURES:
- H2/H3 in light-weight Brandon Grotesque; gray Roboto Medium body copy
- Blockquote with an 8px vertical gradient bar (teal -> blue)
- Lists with teal dot markers; optional two-column layout on larger screens
- Background variants: white, off-white, blue, gradient (text adapts)
- Optional buttons reuse the global `.button-{style}` system

DESIGN TOKENS (from Figma):
- Teal:        #00a99d  (bar top #01a99d)
- Blue:        #1a2f5c  (bar bottom #0d1851)
- Gray text:   #86939e
- Heading dark:#111111
- Off-white:   #f5f4f0 (project standard)

IMPLEMENTATION NOTES:
- Content is echoed from an ACF WYSIWYG field (already sanitized on save)
- Mobile-first; hover states scoped to the desktop breakpoint
- !important guards heading/text colours on dark backgrounds against the theme's
  global heading/link colour rules
\*---*/

/* ==========================================================================
   BASE (Mobile First)
   ========================================================================== */

.wysiwyg-block {
    position: relative;
    padding-top: 50px;
    padding-bottom: 50px;
}

.wysiwyg-block__container {
    width: calc(100% - 40px);
    max-width: 1300px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* --------------------------------------------------------------------------
   RICH CONTENT
   -------------------------------------------------------------------------- */

.wysiwyg-block__content {
    font-family: var(--fb-font-body);
    font-weight: var(--fb-font-body-weight);
    font-size: 16px;
    line-height: 1.7;
    color: #86939e;
}

.wysiwyg-block__content > *:first-child {
    margin-top: 0;
}

.wysiwyg-block__content > *:last-child {
    margin-bottom: 0;
}

/* Headings */
.wysiwyg-block__content h2 {
    margin: 40px 0 16px;
    font-family: 'brandon-grotesque', Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 30px;
    line-height: 1.2;
    color: #111111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wysiwyg-block__content h3 {
    margin: 45px 0 16px;
    font-family: 'brandon-grotesque', Helvetica, Arial, sans-serif;
    font-weight: 300;
    font-size: 22.4px;
    line-height: 1.3;
    color: #111111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.wysiwyg-block__content h4,
.wysiwyg-block__content h5,
.wysiwyg-block__content h6 {
    margin: 24px 0 12px;
    font-family: 'brandon-grotesque', Helvetica, Arial, sans-serif;
    font-weight: 400;
    line-height: 1.3;
    color: #111111;
}

/* Body copy */
.wysiwyg-block__content p {
    margin: 0 0 16px;
    color: #86939e;
    font-weight: var(--fb-font-body-weight);
}

.wysiwyg-block__content a {
    color: #00a99d;
    text-decoration: underline;
}

.wysiwyg-block__content strong,
.wysiwyg-block__content b {
    font-weight: 700;
}

/* Blockquote — vertical gradient bar on the left */
.wysiwyg-block__content blockquote {
    position: relative;
    width: 100%;
    padding: 8px 0 8px 24px;
}

.wysiwyg-block__content blockquote::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    border-radius: 16px;
    background: linear-gradient(to bottom, #01a99d, #0d1851);
}

.wysiwyg-block__content blockquote p {
    font-size: 16px !important;
    line-height: 1.7 !important;
    color: #86939e !important;
}

.bg-blue .wysiwyg-block__content blockquote p,
.bg-gradient .wysiwyg-block__content blockquote p {
    color: #fff !important;
}

.wysiwyg-block__content blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists — teal dot markers */
.wysiwyg-block__content ul,
.wysiwyg-block__content ol {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.wysiwyg-block__content li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: #86939e;
}

.wysiwyg-block__content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #00a99d;
}

/* Ordered lists keep numbers, in teal */
.wysiwyg-block__content ol {
    counter-reset: wysiwyg-counter;
}

.wysiwyg-block__content ol li {
    counter-increment: wysiwyg-counter;
}

.wysiwyg-block__content ol li::before {
    content: counter(wysiwyg-counter) '.';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 700;
    color: #00a99d;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */

.wysiwyg-block__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.wysiwyg-block__button {
    margin: 0;
    text-align: center;
}

/* ==========================================================================
   BACKGROUND VARIANTS
   ========================================================================== */

/* Dark backgrounds: white text.
   !important guards against the theme's global heading/link colour rules. */
.bg-blue .wysiwyg-block__content h2,
.bg-gradient .wysiwyg-block__content h2,
.bg-blue .wysiwyg-block__content h3,
.bg-gradient .wysiwyg-block__content h3,
.bg-blue .wysiwyg-block__content h4,
.bg-gradient .wysiwyg-block__content h4,
.bg-blue .wysiwyg-block__content h5,
.bg-gradient .wysiwyg-block__content h5,
.bg-blue .wysiwyg-block__content h6,
.bg-gradient .wysiwyg-block__content h6 {
    color: #ffffff !important;
}

.bg-blue .wysiwyg-block__content,
.bg-gradient .wysiwyg-block__content,
.bg-blue .wysiwyg-block__content p,
.bg-gradient .wysiwyg-block__content p,
.bg-blue .wysiwyg-block__content li,
.bg-gradient .wysiwyg-block__content li {
    color: #ffffff;
}

.bg-blue .wysiwyg-block__content a,
.bg-gradient .wysiwyg-block__content a {
    color: #ffffff;
}

/* On a blue section the bottom of the bar would disappear; brighten it */
/* .bg-blue .wysiwyg-block__content blockquote::before {
    background: linear-gradient(to bottom, #01a99d, #ffffff);
} */

/* ==========================================================================
   TABLET (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {
    .wysiwyg-block {
        padding-top: 70px;
        padding-bottom: 70px;
    }

    .wysiwyg-block__container {
        gap: 40px;
    }

    .wysiwyg-block__content h2 {
        font-size: 38px;
    }
}

/* ==========================================================================
   DESKTOP (min-width: 1025px)
   ========================================================================== */

@media (min-width: 1025px) {
    .wysiwyg-block {
        padding-top: 100px;
        padding-bottom: 100px;
    }

    .wysiwyg-block__container {
        gap: 45px;
    }

    .wysiwyg-block__content h2 {
        font-size: 43px;
        line-height: 52.8px;
    }

    .wysiwyg-block__content h3 {
        font-size: 22.4px;
        line-height: 28.8px;
    }

    /* Two-column lists (matches the "Multi-column Bullets" design) */
    .wysiwyg-block__content--two-col-lists ul,
    .wysiwyg-block__content--two-col-lists ol {
        column-count: 2;
        column-gap: 32px;
    }

    .wysiwyg-block__content--two-col-lists li {
        break-inside: avoid;
    }

    /* Hover states - DESKTOP ONLY */
    .wysiwyg-block__content a:hover {
        opacity: 0.85;
    }
}
