/* Contact Form 7 */
.contact-form-card {
    padding: 38px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
    margin-block-start: 2rem;

    & h2 {
        font-size: 30px;
    }

    & .wpcf7,
    & .wpcf7 form {
        width: 100%;
        margin: 0;
    }

    & .wpcf7 .row#form {
        display: grid;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        margin: 0;
        gap: 20px 18px;

        & > [class*='col-'] {
            min-width: 0;
            margin: 0;
            padding: 0;
        }

        & > .col-md-4.col-sm-12 {
            grid-column: span 4;
        }

        & > .col-sm-12:not(.col-md-4) {
            grid-column: 1 / -1;

            & > label:first-child:not([for]) {
                display: none;
            }
        }

        & label {
            display: block;
            margin: 0 0 7px;
            color: var(--color-text);
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .025em;
            line-height: 1.45;

            &:empty {
                display: none;
            }
        }
    }

    & .wpcf7 .floatIt {
        float: none;
    }

    & .wpcf7-form-control-wrap {
        display: block;
        width: 100%;
    }

    & .wpcf7 .form-control {
        display: block;
        width: 100%;
        min-height: 50px;
        margin: 0;
        padding: 12px 14px;
        border: 1px solid #aebeb5;
        border-radius: 11px;
        background: #fbfcf9;
        color: var(--color-text);
        font: inherit;
        font-size: 14px;
        line-height: 1.5;
        box-shadow: none;
        transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);

        &:focus {
            border-color: var(--color-secondary);
            outline: 0;
            background: var(--color-surface);
            box-shadow: 0 0 0 3px rgb(45 85 119 / 12%);
        }

        &[aria-invalid='true'] {
            border-color: #a43c35;
            background: #fffafa;
        }
    }

    & .wpcf7 select.form-control {
        padding-right: 42px;
        appearance: none;
        background-image: linear-gradient(45deg, transparent 50%, var(--color-primary-dark) 50%), linear-gradient(135deg, var(--color-primary-dark) 50%, transparent 50%);
        background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
        background-repeat: no-repeat;
        background-size: 5px 5px;
    }

    & .wpcf7 textarea.form-control {
        min-height: 150px;
        resize: vertical;
    }

    & .wpcf7-not-valid-tip {
        display: block;
        margin-top: 6px;
        color: var(--color-danger);
        font-size: 11px;
        line-height: 1.5;
    }

    & .wpcf7 input[type='submit'] {
        --button-padding: 14px 28px;
        --button-radius: 13px;
        --button-font-size: inherit;
        --button-font-weight: 800;
        --button-hover-lift: -1px;

        min-height: 50px;
        margin: 0;
        line-height: 1.4;

        &:focus-visible {
            outline: 3px solid var(--color-secondary);
            outline-offset: 4px;
        }

        &:disabled {
            opacity: .7;
            cursor: wait;
            transform: none;
        }
    }

    & .wpcf7-spinner {
        margin: 0 0 0 12px;
        vertical-align: middle;
    }

    & .wpcf7 form .wpcf7-response-output {
        margin: 22px 0 0;
        padding: 13px 15px;
        border: 1px solid var(--color-line);
        border-left: 4px solid var(--color-secondary);
        border-radius: 9px;
        background: var(--color-secondary-light);
        font-size: 12px;
        line-height: 1.6;
    }

    & .wpcf7 form.invalid .wpcf7-response-output,
    & .wpcf7 form.unaccepted .wpcf7-response-output,
    & .wpcf7 form.payment-required .wpcf7-response-output {
        border-color: #c88b43;
        background: #fff8e9;
    }

    & .wpcf7 form.failed .wpcf7-response-output,
    & .wpcf7 form.aborted .wpcf7-response-output,
    & .wpcf7 form.spam .wpcf7-response-output {
        border-color: #a43c35;
        background: #fff4f3;
    }

    & #next-disclsoure,
    & #next-disclosure {
        margin: 0;
        padding-top: 2px !important;
        color: var(--color-muted);
        font-size: 11px;
        line-height: 1.65;

        & small {
            font-size: inherit;
        }

        & a {
            font-weight: 700;
        }
    }

    @media (max-width: 780px) {
        padding: 24px;
        border-radius: 20px;

        & .wpcf7 .row#form {
            gap: 17px;

            & > .col-md-4.col-sm-12,
            & > .col-sm-12:not(.col-md-4) {
                grid-column: 1 / -1;
            }
        }

        & .wpcf7 input[type='submit'] {
            width: 100%;
        }

        & .wpcf7-spinner {
            display: block;
            margin: 10px auto 0;
        }
    }
}

/* Block editor parity */
.editor-styles-wrapper {
    & .wrap {
        width: 100%;
    }

    & .sidebar {
        position: static;
    }

    & .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    & .review-grid {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        overflow: visible;

        & > .review {
            flex-basis: auto;
        }
    }

    & .carousel-controls {
        display: none !important;
    }
}

/* Motion is opt-in and never hides content without JavaScript support. */
.reveal {
    transition: opacity .65s ease, transform .65s ease;
}

.motion-enabled [data-motion-state='waiting'] {
    opacity: 0;
    transform: translateY(28px);
}

@media (prefers-reduced-motion: reduce) {
    .motion-enabled [data-motion-state='waiting'] {
        opacity: 1;
        transform: none;
    }
}

@media print {
    .site-header {
        position: static;
    }

    .topbar,
    .mobile-call,
    .sals-primary-navigation,
    .carousel-controls {
        display: none !important;
    }

    .motion-enabled [data-motion-state],
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    .section {
        padding-block: 35px;
    }

    .service-card,
    .review {
        break-inside: avoid;
    }

    .reviews-section,
    .hero {
        background: var(--color-surface) !important;
        color: var(--color-text);
    }

    .reviews-section h2,
    .reviews-section .eyebrow,
    .reviews-section .section-head .intro,
    .hero h1,
    .hero-lead,
    .hero .eyebrow {
        color: var(--color-text);
    }

    .review-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        overflow: visible;
    }

    .review-grid > .review {
        max-width: none;
        break-inside: avoid;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .wrap {
        width: 95%;
    }

    .sidebar {
        position: static;
    }
}
