/* Shared native-block layouts for editorial pages and shared project patterns. */
.mesco-editor-page { padding-top: 88px; }
.mesco-editor-section { container: mesco-editor-section / inline-size; }
/* Section and site-shell containers share the gutter rules below. */
.mesco-editor-section.hero { min-height:0; padding-block:64px; align-items:center; }
.mesco-editor-section.hero::after { top:32px; right:clamp(20px,5%,72px); left:auto; }
.mesco-editor-section .hero__grid { padding-top:0; grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr); gap:clamp(24px,5cqi,68px); }
.mesco-editor-section .hero__content { max-width:760px; }
.mesco-editor-section .hero__lead { max-width:590px; }
.mesco-editor-section h1 { font-size:clamp(34px,4.1cqi,52px); line-height:1.2; }
.mesco-editor-section :is(.hero__grid,.split-layout,.card-grid,.expanded-services,.process-steps) > * { min-width:0; }
.mesco-editor-section .split-layout { grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(24px,5cqi,70px); }
.mesco-editor-section :is(.section-heading,.hero__content,.service-card,.expanded-service,.cta-banner) > * { margin-block-start:0; }
.mesco-editor-section .trade-image { margin:0; min-width:0; min-height:0; aspect-ratio:auto; display:block; }
.mesco-editor-section .trade-image:not(.featured-hero-image--logo) img { display:block; position:static; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; }
.mesco-editor-section .expanded-services { gap:32px; }
.mesco-editor-section .expanded-service { min-height:0; grid-template-columns:52px minmax(0,1fr); gap:20px; align-content:start; }
.mesco-editor-section .expanded-service__summary { grid-column:1/-1; padding-top:18px; border-top:1px solid #e1e8ef; margin-bottom:0; font-size:13px; color:#1976d2; }
.mesco-editor-section .service-card__icon { margin:0; flex-shrink:0; }
.mesco-editor-section .process-steps p:first-child { display:flex; width:72px; height:72px; align-items:center; justify-content:center; margin:0 auto 14px; border-radius:50%; background:#1976d2; color:#fff; font-size:22px; font-weight:700; }
.mesco-editor-section .process-steps > .wp-block-group:first-child > p:first-child { background:#39c86a; color:#12346b; }
.mesco-editor-section .cta-banner { min-height:0; gap:24px; }
.mesco-editor-section .cta-banner h2 { font-size:clamp(28px,3.3cqi,42px); line-height:1.2; }
.mesco-editor-section .wp-block-button, .project-sidebar__cta .wp-block-button { background:transparent; border:0; box-shadow:none; }
.project-sidebar__cta { container:mesco-project-cta / inline-size; }
.project-sidebar__cta > * { margin-block-start:0; }
.project-sidebar__cta .wp-block-button__link { white-space:normal; }
@container mesco-editor-section (max-width: 1000px) {
 .mesco-editor-section .cta-banner { flex-direction:column; align-items:flex-start; }
 .mesco-editor-section .process-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container mesco-editor-section (max-width: 900px) {
 .mesco-editor-section :is(.hero__grid,.split-layout,.expanded-services,.card-grid--services) { display:grid; grid-template-columns:minmax(0,1fr); }
 .mesco-editor-section .hero__grid .trade-image { display:block; max-width:600px; width:100%; }
 .mesco-editor-section .hero__lead { font-size:16px; line-height:25px; }
}
@container mesco-editor-section (max-width: 500px) {
 .mesco-editor-section .expanded-service { padding:24px; grid-template-columns:1fr; }
 .mesco-editor-section .process-steps { grid-template-columns:1fr; }
 .mesco-editor-section .cta-banner { padding:28px 24px; }
 .mesco-editor-section .section-heading h2 { font-size:32px; line-height:1.2; }
}
@media (max-width:767px) { .mesco-editor-page { padding-top:72px; } }

/* Home and Projects use the same native section structure as the editorial pages. */
.mesco-editor-section.hero--home h1 { font-size:clamp(34px,5.1cqi,66px); line-height:1.12; }
.mesco-editor-section :is(p,h1,h2,h3,a) { overflow-wrap:anywhere; }
.mesco-editor-section .card-grid--projects { grid-template-columns:repeat(3,minmax(0,1fr)); }
@container mesco-editor-section (max-width: 1000px) {
 .mesco-editor-section .card-grid--projects { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@container mesco-editor-section (max-width: 600px) {
 .mesco-editor-section .card-grid--projects { grid-template-columns:minmax(0,1fr); }
 .mesco-editor-section .button-row { flex-wrap:wrap; }
}
/* Decorative dots do not belong in saved native Group markup. */
.trust-bar__item::before { content:""; display:block; width:24px; height:24px; border-radius:50%; background:var(--wp--preset--color--signal-green,#39c86a); }
.trust-bar { container:mesco-trust / inline-size; }
@container mesco-trust (max-width:900px) {
 .trust-bar__item { padding:16px; }
}
@media (max-width:900px) {
 .trust-bar--five { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.editor-styles-wrapper .trust-bar--five { grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr)); }

.feature--decorated::before { content:""; display:block; width:56px; height:56px; margin-bottom:14px; border-radius:50%; background:radial-gradient(circle,#39c86a 0 30%,rgba(57,200,106,.18) 32% 100%); }

/* Keep the historic portrait's head inside its 4:3 crop, in both editor and site. */
.mesco-editor-section .trade-image img.wp-image-306 {
 object-position: center 20%;
}

/* About: native, captioned images tell the story from Then to Now. */
.mesco-editor-section.hero--history .mesco-history-layout { display:grid; gap:40px; }
.mesco-editor-section.hero--history .hero__content { max-width:960px; }
.mesco-editor-section.hero--history h1 { max-width:960px; }
.mesco-editor-section.hero--history .hero__lead { max-width:760px; }
.mesco-history-pair { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; align-items:start; }
.mesco-history-pair > * { min-width:0; margin:0; }
.mesco-history-image { margin:0; }
.mesco-history-image img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:contain; border-radius:8px; background:#071b63; }
.mesco-history-image figcaption { margin:16px 0 0; color:#d8e8f7; text-align:left; font-size:15px; line-height:1.6; }
.mesco-history-image figcaption strong { display:inline-block; margin-bottom:4px; color:#fff; font-size:13px; letter-spacing:.12em; text-transform:uppercase; }
@container mesco-editor-section (max-width:700px) {
 .mesco-history-pair { grid-template-columns:minmax(0,1fr); gap:28px; }
 .mesco-editor-section.hero--history .mesco-history-layout { gap:28px; }
}

/* One gutter system for the public shell and native page sections.
 * Explicit physical margins also protect centring when other block styles set margins. */
.home main > .wp-block-gallery.has-nested-images,
.container,
.mesco-editor-section > .container,
.hero--contact > .container,
.contact-section > .container {
 --mesco-gutter: var(--wp--custom--gutter--desktop, 72px);
 width: min(calc(100% - 2 * var(--mesco-gutter)), 1296px);
 margin-left: auto;
 margin-right: auto;
}
@media (max-width:1199px) {
 .home main > .wp-block-gallery.has-nested-images,
 .container,
 .mesco-editor-section > .container,
 .hero--contact > .container,
 .contact-section > .container { --mesco-gutter:var(--wp--custom--gutter--tablet,32px); }
}
@media (max-width:767px) {
 .home main > .wp-block-gallery.has-nested-images,
 .container,
 .mesco-editor-section > .container,
 .hero--contact > .container,
 .contact-section > .container { --mesco-gutter:var(--wp--custom--gutter--mobile,20px); }
}
/* An editor sidebar reduces the section's actual available width. */
@container mesco-editor-section (max-width:1199px) {
 .mesco-editor-section > .container { --mesco-gutter:var(--wp--custom--gutter--tablet,32px); }
}
@container mesco-editor-section (max-width:767px) {
 .mesco-editor-section > .container { --mesco-gutter:var(--wp--custom--gutter--mobile,20px); }
}
@container mesco-contact-section (max-width:1199px) {
 :is(.hero--contact,.contact-section) > .container { --mesco-gutter:var(--wp--custom--gutter--tablet,32px); }
}
@container mesco-contact-section (max-width:767px) {
 :is(.hero--contact,.contact-section) > .container { --mesco-gutter:var(--wp--custom--gutter--mobile,20px); }
}
