/* Custom sections from blocks/, their break-out utilities and the core block overrides, loaded everywhere. */

/* Break-outs. A section escapes .page-content or .page-xl to the viewport edge; html clips the scrollbar overflow. */
.full-bleed,
.page-content .alignfull,
.page-xl .alignfull {
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.page-content .alignwide,
.page-xl .alignwide {
    width: min(100vw - 2 * var(--ubct-gutter), var(--ubct-wide));
    max-width: none;
    margin-left: calc(50% - min(50vw - var(--ubct-gutter), var(--ubct-wide) / 2));
    margin-right: calc(50% - min(50vw - var(--ubct-gutter), var(--ubct-wide) / 2));
}

/* Eyebrow above a section heading. Also a Paragraph block with this class in the editor. */
.section-label {
    display: block;
    font-family: var(--ubct-font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--ubct-muted-color);
    margin: 0 0 0.75rem;
}

/* Core blocks: square, flat, on the theme's lines. */
.wp-block-image img,
.wp-block-cover,
.wp-block-cover__image-background,
.wp-block-media-text__media img,
.wp-block-group,
.wp-block-columns {
    border-radius: 0;
}

.wp-block-separator {
    border: none;
    border-top: 1px solid var(--ubct-line-color);
    margin: 2.5rem auto;
}

.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
    width: 6rem;
}

.wp-block-quote,
.page-content .wp-block-quote {
    margin: 2rem 0;
    padding-left: 1.25rem;
    border-left: 3px solid var(--ubct-accent-color);
    font-style: italic;
}

.wp-block-quote cite {
    display: block;
    margin-top: 0.75rem;
    font-family: var(--ubct-font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    font-style: normal;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ubct-muted-color);
}

.wp-block-pullquote {
    border-top: 3px solid var(--ubct-accent-color);
    border-bottom: 3px solid var(--ubct-accent-color);
    padding: 2rem 0;
}

.wp-block-table td,
.wp-block-table th {
    border: 1px solid var(--ubct-line-color);
    padding: 0.6rem 0.8rem;
}

.wp-block-table th {
    font-family: var(--ubct-font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
}

/* The core Search block borrows the theme's form frame. */
.wp-block-search__input {
    border: 3px solid var(--ubct-accent-color);
    border-radius: 0;
    padding: 0.6rem 0.9rem;
}

.wp-block-search__button {
    border-radius: 0;
}

/* blocks/cta.php. */
/* Placed last from the editor, the panel runs flush into the footer rather than floating above it. */
.page-main:has(> .page-content > .cta:last-child),
.page-main:has(> .canvas > .cta:last-child) {
    padding-bottom: 0;
}

.cta {
    padding-block: clamp(3rem, 6vw, 5rem);
    background-color: var(--ubct-panel-color);
}

.cta-inner {
    text-align: center;
}

.page-content .cta-heading,
.cta-heading {
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    line-height: 1.08;
    margin: 0 0 1rem;
}

.page-content .cta-body,
.cta-body {
    max-width: 46ch;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
}

.page-content .cta-meta,
.cta-meta {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ubct-muted-color);
}

/* Measured: a call and an email button need 437px, so they wrap below a 485px viewport inside .page-l. */
@media (max-width: 30.5rem) {
    .cta-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }
}

/* blocks/feature.php. */
.feature {
    padding-block: clamp(3rem, 6vw, 5rem);
}

.feature-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.feature-content,
.feature-visual {
    flex: 1 1 50%;
    min-width: 0;
    width: 100%;
}

.page-content .feature-heading,
.feature-heading {
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    line-height: 1.08;
    margin: 0 0 1.25rem;
}

.feature-body {
    max-width: 52ch;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.feature-body > :last-child {
    margin-bottom: 0;
}

.feature-link {
    display: inline-block;
    font-family: var(--ubct-font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.8rem;
}

.feature-img {
    display: block;
    width: 100%;
    height: auto;
}

/* Holds the space until an image is chosen; it reads as a gap, not a broken image. */
.feature-placeholder {
    aspect-ratio: 4 / 3;
    border: 3px dashed var(--ubct-line-color);
    background-color: var(--ubct-bg-color);
}

@media (min-width: 48rem) {
    .feature-grid {
        flex-direction: row;
        gap: 4rem;
    }

    .feature--right .feature-grid {
        flex-direction: row-reverse;
    }
}
