/* Service-page layout fixes from the SEO team's "20th Nov Pending Changes" document (staging review, 22 Nov 2026).
   Scoped to #dc-root.dc-svc (every /service/ page; lib/components/index.cjs adds the class plus dc-pg-<slug>).
   Selectors use the component classes from lib/components/ui-classes.cjs (c-banner, c-section, c-section--boxed/--full/
   --legacy, c-heading, c-text, c-button, c-card, c-media ...) instead of raw Elementor structure. Section rules keep
   the ".elementor >" step so their weight matches the Elementor / spacing.css rules they override.
   Layout and colour only: no copy, headings or metadata change here. No animation. */
#dc-root.dc-svc{--svc-max:1360px;--svc-pad:40px;--tint:#f6f5f1;--tint-line:#e7e4da}

/* 1. One content width on every service page, lined up with the header (logo left edge to "Get a Free Quote" right
      edge: 1360px max with 40px side padding, the same as .dcn-bar). Was 1170px on the newer pages and ~1000px on the
      older Timber Works pages. Desktop only (>=1025px); tablets/phones keep their gutters. */
@media (min-width:1025px){
  #dc-root.dc-svc .elementor > .c-section.c-section--boxed.e-con:not(.c-banner){--container-max-width:var(--svc-max);--padding-left:var(--svc-pad);--padding-right:var(--svc-pad)}
  #dc-root.dc-svc .elementor > .c-section--legacy.c-section--boxed:not(.c-banner){padding-left:var(--svc-pad)!important;padding-right:var(--svc-pad)!important}
  #dc-root.dc-svc .elementor > .c-section--legacy.c-section--boxed:not(.c-banner) > .elementor-container{max-width:var(--svc-max)!important}
  /* full-width (e-con-full) product sections (Timber Flooring, Outdoor Decking tabs): same edges */
  #dc-root.dc-svc .elementor > .c-section.c-section--full.e-con:not(.c-banner):not([data-settings*=background_background]){padding-left:max(var(--svc-pad),calc((100% - var(--svc-max)) / 2))!important;padding-right:max(var(--svc-pad),calc((100% - var(--svc-max)) / 2))!important}
}

/* 2. Text uses the full width of its column, like the Residential Painting intro (was capped at ~75 characters/640px,
      which left narrow text islands in wide sections). Very wide single-column blocks stop at 1200px. */
@media (min-width:768px){
  #dc-root.dc-svc .pxl-text-editor .pxl-item--inner:not(:has(img,picture,table,iframe,form,video)){max-width:75rem;width:100%}
  #dc-root.dc-svc .pxl-text-editor .pxl-item--inner{display:block}
}

/* 3. Section spacing. spacing.css rule 1 put the section padding on both the container and its inner box, so
      neighbouring sections sat ~165px apart on desktop instead of the intended ~82px. Service pages now use the
      inner padding only (48px phone -> ~82px desktop between sections). */
#dc-root.dc-svc .elementor > .c-section.e-con:not(.e-con-full){padding-block-start:0;padding-block-end:0}
/* old-style sections (Timber Works pages, catalogue/brand rows) and full-width product sections had 100-112px padding */
#dc-root.dc-svc .elementor > .c-section--legacy:not(.c-banner){padding-top:var(--section-y-half)!important;padding-bottom:var(--section-y-half)!important}
#dc-root.dc-svc .elementor > .c-section.c-section--full.e-con:not(.c-banner):not([data-settings*=background_background]){padding-top:var(--section-y-half)!important;padding-bottom:var(--section-y-half)!important}

/* 4. Before & After photos: 4 in one row on computers (2 x 2 on tablets, 1 per row on phones); click/tap to enlarge. */
@media (min-width:1025px){#dc-root.dc-svc .dc-photos .elementor-image-carousel.swiper-wrapper:has(> .swiper-slide:nth-child(4):last-child){grid-template-columns:repeat(4,minmax(0,1fr));gap:20px}}
#dc-root.dc-svc .dc-photos .swiper-slide-image{cursor:zoom-in}
#dc-root.dc-svc .dc-photos .swiper-slide-image:focus-visible{outline:3px solid #A6A182;outline-offset:2px}

/* 5. HeroCta: call to action + trust note in the banner (lib/components/hero-cta.cjs) */
#dc-root.dc-svc .dc-hero-cta{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 16px;margin-top:var(--space-6);width:100%}
#dc-root.dc-svc .dc-hero-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:12px 28px;background:#fff;color:#111;border:2px solid #fff;font:600 15px/1.2 Montserrat,system-ui,sans-serif;letter-spacing:.02em;text-decoration:none}
#dc-root.dc-svc .dc-hero-btn-o{background:transparent;color:#fff}
#dc-root.dc-svc .dc-hero-btn:hover,#dc-root.dc-svc .dc-hero-btn:focus-visible{background:#A6A182;border-color:#A6A182;color:#111}
#dc-root.dc-svc .dc-hero-btn:focus-visible{outline:3px solid #fff;outline-offset:3px}
#dc-root.dc-svc .dc-hero-trust{margin:var(--space-4) 0 0;color:#fff;font-size:15px;line-height:1.5;text-align:center;width:100%}
#dc-root.dc-svc .dc-hero-trust .dc-hero-stars{color:#f5b301;letter-spacing:2px;margin-right:4px}
/* the breadcrumb widget is width:auto in a centred flex column: let it hold the full-width CTA row */
#dc-root.dc-svc .c-banner .c-breadcrumb > .elementor-widget-container{display:flex;flex-direction:column;align-items:center}

/* 6. TrustStrip: badges below the banner (lib/components/trust-strip.cjs) */
#dc-root.dc-svc .dc-trust{background:var(--tint);border-bottom:1px solid var(--tint-line);padding:var(--space-6) var(--gutter)}
#dc-root.dc-svc .dc-trust-list{list-style:none;margin:0 auto;padding:0;max-width:var(--svc-max);display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-5)}
#dc-root.dc-svc .dc-trust-list li{display:flex;align-items:center;gap:var(--space-4);margin:0}
#dc-root.dc-svc .dc-trust-list svg{flex:none;width:40px;height:40px;padding:8px;border-radius:50%;background:#fff;color:#7d7860;box-sizing:border-box}
#dc-root.dc-svc .dc-trust-list strong{display:block;font:600 16px/1.3 Montserrat,system-ui,sans-serif;color:#111}
#dc-root.dc-svc .dc-trust-list li span span{display:block;font-size:14px;line-height:1.45;color:#5f5a52}
@media (max-width:1024px){#dc-root.dc-svc .dc-trust-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:480px){#dc-root.dc-svc .dc-trust{padding:var(--space-5) 20px}#dc-root.dc-svc .dc-trust-list{grid-template-columns:1fr;gap:var(--space-4)}}

/* 7. Older pages (Timber Works, Stairs & Handrail, Refinishing, Tiling) sat inside the theme's 1170px post container,
      so their banner was boxed and every block narrower than the header. Release it so they match the other pages. */
#dc-root.dc-svc #pxl-main > .container:has(.pxl-entry-content > .elementor){max-width:none;width:100%;padding-left:0;padding-right:0}
#dc-root.dc-svc #pxl-main > .container:has(.pxl-entry-content > .elementor) > .row{margin-left:0;margin-right:0}
#dc-root.dc-svc #pxl-main > .container:has(.pxl-entry-content > .elementor) > .row > [class*=col-]{padding-left:0;padding-right:0;max-width:100%;flex:0 0 100%}
@media (max-width:1024px){#dc-root.dc-svc .elementor > .c-section--legacy:not(.c-banner){padding-left:16px!important;padding-right:16px!important}}

/* 8. Reviews block: one heading per section reads better; the widget title becomes a smaller sub-heading (same text and
      tag), sits closer to the intro, uses the full content width, and loses its own 56px top/bottom padding. */
#dc-root.dc-svc .dc-reviews{padding:var(--space-6) 0 0}
#dc-root.dc-svc .dc-reviews-inner{max-width:none;padding:0}
#dc-root.dc-svc .dc-reviews-title{font-size:clamp(22px,1rem + 1vw,28px)}

/* 9. Two-column rows: when the text runs much longer than the photo, the photo column is centred against the text
      instead of leaving one big empty block under it (desktop). */
@media (min-width:1025px){
  #dc-root.dc-svc .e-con-inner > .e-con.e-child:has(> .c-media):not(:has(:is(.c-heading,.c-text))){align-self:center}
}

/* 10. Full-width old-style sections (Timber Flooring product blocks, Outdoor Decking tabs) used a 7.2% side padding
       (content ~104px from the edge at 1440px): same edges as the header instead. */
@media (min-width:1025px){
  #dc-root.dc-svc .elementor > .c-section--legacy.c-section--full:not(.c-banner):not([data-settings*=background_background]) > .elementor-container > .elementor-col-100 > .elementor-widget-wrap{padding-left:max(var(--svc-pad),calc((100% - var(--svc-max)) / 2))!important;padding-right:max(var(--svc-pad),calc((100% - var(--svc-max)) / 2))!important}
}
/* 11. Banner sits directly on the trust strip (older pages had a 120px white gap under the banner). */
#dc-root.dc-svc .c-banner:has(+ .dc-trust){margin-bottom:0!important}
/* 12. "Areas We Serve": the area list stays left-aligned as a block centred under the centred heading/intro. */
@media (min-width:768px){
  #dc-root.dc-svc .dc-areas .pxl-item--inner ul{display:inline-block;text-align:left;margin-inline:auto;max-width:100%}
}
/* 13. Swatch grids (product tabs): one tile shape for every swatch. Some swatch files are squares with white bands
       above and below a plank (e.g. Terra GVT-101), others are full-bleed squares (herringbone); a 7:4 tile crops
       both to the same visible size. Disclaimer under the grids is unchanged. */
#dc-root.dc-svc .dc-grid .swiper-slide-image{aspect-ratio:7/4!important;height:auto!important;width:100%!important;object-fit:cover!important}
/* 14. "Related articles" band uses the same width as the page content. */
#dc-root.dc-svc .dc-related-inner{max-width:var(--svc-max)}

/* 15. Cards in a row (process steps, service types) are the same height, so their borders line up. */
#dc-root.dc-svc .e-con.e-child > .c-card{flex-grow:1}
#dc-root.dc-svc .e-con.e-child > .c-card > .elementor-widget-container{height:100%}
/* 16. Centred intro blocks that contain a list (the "Why choose" blocks): the list is a left-aligned block centred
       under the heading, instead of hugging the left edge of the full-width column. */
@media (min-width:768px){
  #dc-root.dc-svc :is(.dc-lead,.dc-prose):has(+ .c-button.elementor-align-center) .pxl-item--inner:has(ul,ol){display:inline-block;width:auto}
}
/* 17. Blocks whose only content is hidden on every device (Flooring Contractor, Outdoor Decking) kept 54px of empty
       padding: collapsed. Nothing visible changes except the gap. */
#dc-root.dc-svc .elementor > .c-section--legacy:has(> .elementor-container > .elementor-col-100 > .elementor-widget-wrap > .elementor-hidden-desktop.elementor-hidden-tablet.elementor-hidden-mobile:only-child){padding:0!important}

/* 18. Section bands (lib/components/section-bands.cjs lists the blocks per page). Boxed containers keep their padding on
       .e-con-inner; full-width containers and old sections on themselves. */
#dc-root.dc-svc .elementor > .c-section.c-section--tint{background-color:var(--tint)}
#dc-root.dc-svc .elementor > :is(.c-section--tint-start,.c-section--gap-top).e-con-boxed > .e-con-inner{padding-top:var(--section-y)!important}
#dc-root.dc-svc .elementor > :is(.c-section--tint-start,.c-section--gap-top):not(.e-con-boxed){padding-top:var(--section-y)!important}
#dc-root.dc-svc .elementor > .c-section--tint-end.e-con-boxed > .e-con-inner{padding-bottom:var(--section-y)!important}
#dc-root.dc-svc .elementor > .c-section--tint-end:not(.e-con-boxed){padding-bottom:var(--section-y)!important}
/* a block that continues the block above (Eric's .dc-band-follow / .dc-band-end, lib/dc-classes.cjs): small gap only */
#dc-root.dc-svc .elementor > .c-section.dc-band-follow.e-con-boxed > .e-con-inner{padding-top:var(--space-4)!important}
#dc-root.dc-svc .elementor > .c-section.dc-band-follow:not(.e-con-boxed){padding-top:var(--space-4)!important}
#dc-root.dc-svc .elementor > .c-section.dc-band-end.e-con-boxed > .e-con-inner{padding-bottom:0!important}
#dc-root.dc-svc .elementor > .c-section.dc-band-end:not(.e-con-boxed){padding-bottom:0!important}
/* a block that starts with the button of the cards above: the button stays with the cards, full gap after it */
#dc-root.dc-svc .elementor > .c-section--cta-first.e-con-boxed > .e-con-inner{padding-top:0!important}
#dc-root.dc-svc .elementor > .c-section--cta-first:not(.e-con-boxed){padding-top:0!important}
#dc-root.dc-svc .elementor > .c-section.c-section--cta-first > .e-con-inner > .c-button:first-child{margin-bottom:var(--section-y)}
