/* wp-img-auto-sizes-contain-inline-css */
img:is([sizes=auto i], [sizes^="auto,"i]) {
    contain-intrinsic-size: 3000px 1500px
}

/* wp-emoji-styles-inline-css */
img.wp-smiley,
img.emoji {
    display: inline !important;
    border: none !important;
    box-shadow: none !important;
    height: 1em !important;
    width: 1em !important;
    margin: 0 0.07em !important;
    vertical-align: -0.1em !important;
    background: none !important;
    padding: 0 !important;
}

/* activecampaign-form-overrides */
#_form_3_ {
    margin: 0;
    padding: 0;
    max-width: none;
    background: transparent !important;
    box-shadow: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit
}

#_form_3_ ._form_element {
    position: relative;
    margin-bottom: 0;
    max-width: 100%
}

#_form_3_ ._field-wrapper {
    position: relative
}

#_form_3_ ._form-thank-you {
    position: relative;
    text-align: left;
    outline: none
}

#_form_3_ ._form-thank-you .contact-thank-you {
    padding: 8px 0 12px;
    animation: contactThankYouIn .55s ease
}

#_form_3_ ._form-thank-you .contact-thank-you__rule {
    width: 48px;
    height: 1px;
    background: currentColor;
    margin: 0 0 24px;
    opacity: .45
}

#_form_3_ ._form-thank-you .contact-thank-you__title {
    margin: 0 0 12px;
    font-size: 1.75rem;
    line-height: 1.25;
    letter-spacing: -.02em;
    font-weight: 600
}

#_form_3_ ._form-thank-you .contact-thank-you__body {
    margin: 0;
    max-width: 28em;
    font-size: 1rem;
    line-height: 1.7;
    opacity: .78
}

@keyframes contactThankYouIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

@media (prefers-reduced-motion:reduce) {
    #_form_3_ ._form-thank-you .contact-thank-you {
        animation: none
    }
}

#_form_3_ ._submit:disabled {
    cursor: not-allowed;
    opacity: .4
}

#_form_3_ ._submit.processing {
    position: relative
}

#_form_3_ select.form-control {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23142341' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
    cursor: pointer
}

#_form_3_ input._has_error,
#_form_3_ textarea._has_error,
#_form_3_ select._has_error {
    border-color: #F37C7B
}

#_form_3_ ._error {
    display: block;
    position: absolute;
    z-index: 10;
    right: 0;
    top: 100%;
    padding-top: 8px
}

#_form_3_ ._error-inner {
    padding: 8px 12px;
    background: #FFDDDD;
    color: #000;
    font-size: 14px;
    border-radius: 4px;
    text-align: left;
    font-weight: 600
}

#_form_3_ ._error-inner._form_error {
    margin-bottom: 12px
}

#_form_3_ ._error-html {
    margin-top: 8px;
    font-weight: 400
}

#_form_3_ ._form_hide {
    display: none;
    visibility: hidden
}

#_form_3_ ._form_show {
    display: block;
    visibility: visible
}

/* timeline-animations-scene-style-inline-css */
.wp-block-timeline-animations-scene {
    height: 100vh;
    height: 100svh;
    overflow: hidden;
    position: relative
}

strong {
    font-weight: 700;
}

.keep-word {
    white-space: nowrap;
}

/* Related Work stacking (mobile only; desktop keeps original spacers) */
@media (max-width: 768px) {
    section.main .related-work-grid {
        --related-work-stack-gap: 1rem;
    }

    section.main .related-work-grid + .related-work-grid {
        margin-top: 10px;
    }

    section.main .related-work-grid .wp-bootstrap-blocks-row {
        row-gap: 10px;
    }

    section.main .related-work-grid figure.wp-block-image {
        margin-bottom: var(--related-work-stack-gap);
    }

    section.main .related-work-grid figure.wp-block-image + .wp-block-spacer {
        display: none;
    }

    section.main .related-work-grid .col-12.col-md-6 > .wp-block-heading {
        display: flex;
        flex-direction: column;
        gap: var(--related-work-stack-gap);
    }

    section.main .related-work-grid .col-12.col-md-6 > .wp-block-heading > h5.wp-block-heading {
        margin: 0;
    }

    section.main .related-work-grid .col-12.col-md-6 > .wp-block-heading > br {
        display: none;
    }
}

/* Spacers toggled per breakpoint (desktop layout preserved in HTML) */
@media (min-width: 769px) {
    section.main .spacer-show-mobile {
        display: none;
    }

    section.main .br-show-mobile {
        display: none;
    }
}

/* mobile overrides */
@media (max-width: 768px) {
    .wp-block-heading {
        flex-direction: column !important;
    }

    .wp-block-heading>div {
        width: 100% !important;
    }

    .mobile-body-text {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }

    .bold-mobile {
        font-weight: 700;
    }

    .mobile-body-text .intro-service-line {
        display: block;
    }

    .col-12.col-md-6 .h-100.d-flex.flex-column.justify-content-center:has(.responsive-text) {
        align-items: center;
        text-align: center;
    }

    .responsive-text {
        font-size: 16px !important;
        line-height: 1.7 !important;
        text-align: center !important;
    }
    .responsive-text:first-of-type {
        padding-top: 32px !important;
    }

    /* Uniform gap between major sections (overrides inline heights + theme is-style-*) */
    section.main {
        --mobile-section-space: 40px;
    }

    section.main .wp-block-spacer.section-gap,
    section.main .wp-block-spacer.is-style-large {
        height: var(--mobile-section-space) !important;
    }

    .wp-block-spacer.heading-gap {
        display: none;
    }

    section.main .spacer-show-desktop {
        display: none;
    }

    section.main .spacer-hide-mobile {
        display: none !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Selected layout spacers: remove on mobile only */
    section.main > .wp-bootstrap-blocks-container.container.mb-2:first-of-type .col-md-8 > h2.wp-block-heading + .wp-block-spacer.is-style-small,
    section.main > .mblm-carousel-wrapper + .wp-block-spacer.section-gap.is-style-small,
    section.main > .wp-bootstrap-blocks-container.container.mb-2:last-of-type .col-md-3 > .wp-block-spacer.is-style-large {
        display: none !important;
    }

    /* In-grid content spacers (e.g. Related Work): +10px on mobile */
    section.main .wp-bootstrap-blocks-row .wp-block-spacer:not(.section-gap):not(.heading-gap):not(.is-style-large)[style*="height:24px"] {
        height: 34px !important;
    }

    section.main .wp-bootstrap-blocks-row .wp-block-spacer:not(.section-gap):not(.heading-gap):not(.is-style-large)[style*="height:30px"] {
        height: 40px !important;
    }

    section.main .wp-bootstrap-blocks-row .wp-block-spacer:not(.section-gap):not(.heading-gap):not(.is-style-large)[style*="height:32px"] {
        height: 42px !important;
    }

    section.main .wp-bootstrap-blocks-row .wp-block-spacer:not(.section-gap):not(.heading-gap):not(.is-style-large)[style*="height:40px"] {
        height: 50px !important;
    }

    /* Theme hides .line-heading below lg; show a shorter rule on mobile */
    section.main .lined-heading-block .line-heading {
        display: block !important;
        flex-shrink: 0;
        width: 44px;
        height: 1px;
        background-color: #000;
        margin-right: 16px;
    }

    section.main .mblm-block.lined-heading-block:not(:has(:is(h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6))) {
        display: none;
    }

    section.main .mblm-block.indent-block:has(.acf-innerblocks-container:not(:has(*))) {
        display: none;
    }

    .carousel-buttons .btn-xl {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0 !important;
        font-size: 14px !important;
        line-height: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .carousel-buttons .btn-xl .icon {
        margin: 0;
        font-size: 14px;
    }
}

/* Hero copy over mobile image (theme stacks copy below image until lg) */
@media (max-width: 991.98px) {
    .hero-copy .hero-brand-title__line {
        display: block;
    }

    .hero-copy .hero-brand-title__sep {
        display: none;
    }

    .hero-image .hero-copy {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
        z-index: 10;
        height: 520px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 40px 0;
        color: #fff !important;
    }

    .hero-image .hero-copy.tint-dark,
    .hero-image .hero-copy.tint-dark .hero-pretitle,
    .hero-image .hero-copy.tint-dark h1,
    .hero-image .hero-copy.tint-dark p,
    .hero-image .hero-copy.tint-dark strong {
        color: #fff !important;
    }
}
