/* ==========================================================================
   MDL Blocks — shared stylesheet (mdlui/cta, mdlui/author-box)
   One file, one handle — WordPress deduplicates by handle so this loads
   exactly once per page regardless of how many blocks are present.
   ========================================================================== */

/* --------------------------------------------------------------------------
   CTA block
   -------------------------------------------------------------------------- */
.mdlui-cta {
    box-sizing: border-box;
    padding: 48px 40px;
    border-radius: 8px;
    text-align: center;
}

.mdlui-cta__heading {
    margin: 0 0 12px;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.25;
    color: inherit;
}

.mdlui-cta__subheading {
    margin: 0 0 28px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
    color: inherit;
}

.mdlui-cta__button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: opacity 0.2s ease, box-shadow 0.2s ease;
}

.mdlui-cta__button:hover,
.mdlui-cta__button:focus {
    opacity: 0.88;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.mdlui-cta--primary { background-color: #2563eb; color: #ffffff; }
.mdlui-cta--primary .mdlui-cta__button { background-color: #ffffff; color: #2563eb; }

.mdlui-cta--secondary { background-color: #f1f5f9; color: #1e293b; }
.mdlui-cta--secondary .mdlui-cta__button { background-color: #2563eb; color: #ffffff; }

.mdlui-cta--dark { background-color: #0f172a; color: #e2e8f0; }
.mdlui-cta--dark .mdlui-cta__button { background-color: #2563eb; color: #ffffff; }

/* --------------------------------------------------------------------------
   Author Box block
   -------------------------------------------------------------------------- */
.mdlui-author-box {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 28px 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #ffffff;
}

.mdlui-author-box__avatar { flex-shrink: 0; }

.mdlui-author-box__avatar img {
    display: block;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
}

.mdlui-author-box__content { flex: 1; min-width: 0; }

.mdlui-author-box__name {
    margin: 0 0 8px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.mdlui-author-box__bio {
    margin: 0 0 16px;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #475569;
}

.mdlui-author-box__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.mdlui-author-box__link {
    font-size: 0.875rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline transparent;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.mdlui-author-box__link:hover,
.mdlui-author-box__link:focus {
    color: #1d4ed8;
    text-decoration-color: currentColor;
}

@media (max-width: 480px) {
    .mdlui-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 24px 20px;
    }
    .mdlui-author-box__links { justify-content: center; }
}

/* --------------------------------------------------------------------------
   Advanced Heading block — 13 decorative styles
   All accent colours use var(--mdlui-accent) set inline by the render callback.
   -------------------------------------------------------------------------- */

.mdlui-heading {
    position: relative;
    margin: 0;
    padding: 0;
    transition: color 0.2s ease;
}
.mdlui-heading .mdlui-heading__tagline { display: block; font-size: 0.5em; line-height: 1.3; }
.mdlui-heading em { font-style: normal; font-weight: 600; }

/* 1 — centred uppercase, short bar + full rule below */
.mdlui-heading--style-1 .mdlui-heading { text-align: center; text-transform: uppercase; padding-bottom: 5px; }
.mdlui-heading--style-1 .mdlui-heading:before {
    content: ""; position: absolute;
    bottom: 3px; left: 50%; margin-left: -14px;
    width: 28px; height: 5px;
    background-color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-1 .mdlui-heading:after {
    content: ""; display: block; position: relative;
    margin-top: 25px; left: 50%; margin-left: -50px;
    width: 100px; height: 1px;
    background-color: var(--mdlui-accent, currentColor);
}

/* 2 — capitalised, left underline, muted tagline */
.mdlui-heading--style-2 .mdlui-heading { text-transform: capitalize; }
.mdlui-heading--style-2 .mdlui-heading:before {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 60px; height: 2px;
    background-color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-2 .mdlui-heading .mdlui-heading__tagline {
    font-size: 13px; font-weight: 500; text-transform: uppercase;
    letter-spacing: 4px; line-height: 3em; padding-left: 0.25em;
    color: rgba(0,0,0,.4); padding-bottom: 10px;
}

/* 3 — left thick bar + long thin rule */
.mdlui-heading--style-3 .mdlui-heading { padding-bottom: 15px; }
.mdlui-heading--style-3 .mdlui-heading:before {
    content: ""; position: absolute; left: 0; bottom: 0;
    width: 55px; height: 5px;
    background-color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-3 .mdlui-heading:after {
    content: ""; position: absolute; left: 0; bottom: 2px;
    width: 95%; max-width: 255px; height: 1px;
    background-color: var(--mdlui-accent, currentColor); opacity: 0.4;
}

/* 4 — centred, muted tagline, centred rule */
.mdlui-heading--style-4 .mdlui-heading { text-align: center; padding-bottom: 0.7em; }
.mdlui-heading--style-4 .mdlui-heading .mdlui-heading__tagline {
    word-spacing: 3px; line-height: 2em; padding-bottom: 0.35em;
    color: rgba(0,0,0,.5);
}
.mdlui-heading--style-4 .mdlui-heading:before {
    content: ""; position: absolute; bottom: 0; left: 50%; margin-left: -30px;
    width: 60px; height: 1px;
    background-color: var(--mdlui-accent, currentColor);
}

/* 5 — centred uppercase, italic tagline, decorative bar */
.mdlui-heading--style-5 .mdlui-heading { text-align: center; text-transform: uppercase; letter-spacing: 2px; }
.mdlui-heading--style-5 .mdlui-heading .mdlui-heading__tagline {
    margin-top: 40px; font-size: 0.75em; font-weight: normal; font-style: italic;
    color: #999; text-transform: none; letter-spacing: -0.005em;
}
.mdlui-heading--style-5 .mdlui-heading:before {
    content: ""; position: absolute; bottom: 38px; left: 50%; margin-left: -30px;
    width: 60px; height: 4px;
    background-color: var(--mdlui-accent, currentColor);
}

/* 6 — centred, accent-coloured text, dual flanking bars */
.mdlui-heading--style-6 .mdlui-heading {
    text-align: center; text-transform: uppercase; letter-spacing: 2px;
    color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-6 .mdlui-heading .mdlui-heading__tagline {
    line-height: 2em; padding-bottom: 15px; font-size: 0.7em;
    font-weight: normal; font-style: italic; color: #999; text-transform: none;
}
.mdlui-heading--style-6 .mdlui-heading:before,
.mdlui-heading--style-6 .mdlui-heading:after {
    content: ""; position: absolute; bottom: 0; margin: auto; right: 45px;
    width: 45px; height: 4px; background-color: #ccc;
}
.mdlui-heading--style-6 .mdlui-heading:before {
    left: 45px; width: 90px; background-color: var(--mdlui-accent, currentColor);
}

/* 7 — centred grid, double-line flanks */
.mdlui-heading--style-7 .mdlui-heading {
    text-align: center; text-transform: uppercase; letter-spacing: 1px;
    display: grid; grid-template-columns: 1fr max-content 1fr;
    grid-template-rows: 27px 0; gap: 20px; align-items: center;
}
.mdlui-heading--style-7 .mdlui-heading:before,
.mdlui-heading--style-7 .mdlui-heading:after {
    content: " "; display: block;
    border-top: 1px solid var(--mdlui-accent, currentColor);
    border-bottom: 1px solid var(--mdlui-accent, currentColor);
    height: 5px;
}

/* 8 — centred grid, single-line flanks */
.mdlui-heading--style-8 .mdlui-heading {
    text-align: center; text-transform: uppercase; letter-spacing: 1px;
    display: grid; grid-template-columns: 1fr auto 1fr;
    grid-template-rows: 16px 0; gap: 22px;
}
.mdlui-heading--style-8 .mdlui-heading:before,
.mdlui-heading--style-8 .mdlui-heading:after {
    content: " "; display: block;
    border-bottom: 2px solid var(--mdlui-accent, currentColor);
}

/* 9 — large centred serif, tagline with double-line flanks */
.mdlui-heading--style-9 .mdlui-heading { text-align: center; text-transform: uppercase; letter-spacing: 1px; }
.mdlui-heading--style-9 .mdlui-heading .mdlui-heading__tagline {
    margin-top: 5px; font-size: 15px; font-weight: 500;
    letter-spacing: 2px; text-transform: uppercase; word-spacing: 1px;
    display: grid; grid-template-columns: 1fr max-content 1fr;
    grid-template-rows: 27px 0; gap: 20px; align-items: center;
}
.mdlui-heading--style-9 .mdlui-heading .mdlui-heading__tagline:before,
.mdlui-heading--style-9 .mdlui-heading .mdlui-heading__tagline:after {
    content: " "; display: block;
    border-top: 1px solid #ccc; border-bottom: 1px solid #ccc; height: 5px;
}

/* 10 — accent bar above heading */
.mdlui-heading--style-10 .mdlui-heading { text-transform: uppercase; }
.mdlui-heading--style-10 .mdlui-heading:before {
    content: ''; display: block;
    width: 42px; height: 0.25rem; border-radius: 0.25rem; margin-bottom: 1.25rem;
    background-color: var(--mdlui-accent, currentColor);
}

/* 11 — centred, section-sign divider (§) */
.mdlui-heading--style-11 .mdlui-heading {
    text-align: center; text-transform: uppercase;
    letter-spacing: 2px; padding-bottom: 45px;
}
.mdlui-heading--style-11 .mdlui-heading:before {
    content: ""; position: absolute; bottom: 20px; left: 50%; margin-left: -30%;
    width: 60%; height: 1px; background-color: #777; z-index: 4;
}
.mdlui-heading--style-11 .mdlui-heading:after {
    content: '\00a7'; position: absolute;
    width: 40px; height: 40px; left: 50%; margin-left: -20px; bottom: 0;
    font-size: 30px; line-height: 40px; font-weight: 400; display: block; z-index: 5;
    color: var(--mdlui-accent, currentColor);
    background-color: #f8f8f8; /* gap fill — suits light page backgrounds */
}

/* 12 — narrow centred, twin accent bars top-left and bottom-right */
.mdlui-heading--style-12 .mdlui-heading {
    text-transform: uppercase; letter-spacing: 1px; width: 160px; text-align: center;
    margin: auto; white-space: nowrap; padding-bottom: 13px;
}
.mdlui-heading--style-12 .mdlui-heading:before {
    content: ''; display: block; width: 75px; height: 3px; margin-bottom: 5px;
    background-color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-12 .mdlui-heading:after {
    content: ''; display: block; position: absolute;
    right: 0; bottom: 0; width: 75px; height: 3px; margin-bottom: 0.25em;
    background-color: var(--mdlui-accent, currentColor);
}

/* 13 — bordered, twin dot accents */
.mdlui-heading--style-13 .mdlui-heading {
    text-transform: uppercase; width: 150px; text-align: center; margin: auto;
    white-space: nowrap; border: 2px solid #222; padding: 5px 11px 3px;
}
.mdlui-heading--style-13 .mdlui-heading:before,
.mdlui-heading--style-13 .mdlui-heading:after {
    content: ''; position: absolute;
    width: 7px; height: 7px; border-radius: 50%; bottom: 12px;
    background-color: var(--mdlui-accent, currentColor);
}
.mdlui-heading--style-13 .mdlui-heading:before { left: -20px; }
.mdlui-heading--style-13 .mdlui-heading:after  { right: -20px; }

/* --------------------------------------------------------------------------
   Marquee block
   -------------------------------------------------------------------------- */

.mdlui-marquee { overflow: hidden; width: 100%; }

.mdlui-marquee__row {
    overflow: hidden;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Advanced Separator block
   -------------------------------------------------------------------------- */

.mdlui-separator__row  { display: flex; }
.mdlui-separator__line { background-color: currentColor; }

/* Striped */
.wp-block-mdlui-advanced-separator.is-style-striped .mdlui-separator__line {
    background-image: linear-gradient(
        -45deg,
        transparent 22.5%,
        currentColor 22.5%,
        currentColor 27.5%,
        transparent 27.5%,
        transparent 47.5%,
        currentColor 47.5%,
        currentColor 52.5%,
        transparent 52.5%,
        transparent 72.5%,
        currentColor 72.5%,
        currentColor 77.5%,
        transparent 77.5%,
        transparent
    );
    background-color: transparent;
    background-position: 0.3rem 0;
    background-size: 1rem 1rem;
    border: none;
    image-rendering: pixelated;
}

/* Shade */
.wp-block-mdlui-advanced-separator.is-style-shade .mdlui-separator__line {
    position: relative;
    background: radial-gradient(
        ellipse farthest-side at top center,
        rgba(0, 0, 0, 0.08),
        transparent
    );
}
.wp-block-mdlui-advanced-separator.is-style-shade .mdlui-separator__line:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(
        to right,
        transparent,
        rgba(0, 0, 0, 0.02),
        rgba(0, 0, 0, 0.02),
        transparent
    );
}

/* Dotted */
.wp-block-mdlui-advanced-separator.is-style-dotted .mdlui-separator__line {
    background: radial-gradient(circle at center, currentColor 2px, transparent 0);
    background-size: 12px 12px;
    background-repeat: round;
    image-rendering: auto;
}
