/*
 * Pro Carpenter One 1.9.7 - homepage, career and service hero system.
 * The original images and text remain content. All fades are CSS overlays.
 * Scope + specificity also support a Display stylesheet enqueued by a late shortcode.
 */
body.pc-one-unified-heroes {
  --pc-one-hero-fade: linear-gradient(90deg,#fff 0%,rgba(255,255,255,.98) 8%,rgba(255,255,255,.72) 23%,rgba(255,255,255,0) 60%);
  --pc-one-mobile-image-height: clamp(270px,75vw,500px);
  --pc-one-mobile-fade: linear-gradient(180deg,#fff 0%,rgba(255,255,255,.88) 8%,rgba(255,255,255,.28) 21%,rgba(255,255,255,0) 34%);
}
/* Career: image is a full-bleed layer, not a boxed panel inside the content grid. */
body.pc-one-unified-heroes .pc-career-hero--homepage {
  position:relative;isolation:isolate;overflow:hidden;background:#fff;min-height:520px;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-layout {
  display:block;position:relative;z-index:2;min-height:520px;
  padding:66px 0 42px;pointer-events:none;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-copy {
  width:52%;max-width:650px;padding:0;min-width:0;pointer-events:auto;
}
body.pc-one-unified-heroes .pc-career-hero--homepage h1 {
  font-size:clamp(38px,3.7vw,57px);line-height:1.1;letter-spacing:-.05em;
  margin:0 0 22px;overflow-wrap:break-word;hyphens:auto;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-lead {
  max-width:530px;font-size:15px;line-height:1.7;margin:0;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-actions {
  margin:26px 0 28px;gap:12px;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-actions .btn {
  min-height:48px;max-width:100%;white-space:normal;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-values {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;max-width:610px;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-values span {
  min-width:0;overflow-wrap:break-word;line-height:1.45;font-size:11px;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual {
  position:absolute;inset:0 0 0 auto;z-index:0;width:64%;height:100%;min-height:0;
  max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;overflow:hidden;background:#e5e9ec;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-team-photo {
  position:absolute;inset:0;width:100%;height:100%;max-width:none;display:block;
  object-fit:cover;object-position:var(--pc-career-hero-x,50%) var(--pc-career-hero-y,30%);
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual::before {
  content:none;display:none;
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual::after {
  content:"";display:block;position:absolute;inset:0;z-index:1;pointer-events:none;
  background:var(--pc-one-hero-fade);
}
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-visual-caption,
body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-visual-art { display:none; }
body.pc-one-unified-heroes .pc-career-hero--homepage.pc-career-no-photo .pc-career-hero-copy {
  width:100%;max-width:760px;
}
/* Native PC service / service shortcode: keep content, buttons and media IDs intact. */
body.pc-one-unified-heroes .pc-site .pc-hero {
  position:relative;isolation:isolate;overflow:hidden;min-height:520px;background:#fff;
}
body.pc-one-unified-heroes .pc-site .pc-hero-image {
  position:absolute;inset:0 0 0 auto;width:64%;height:100%;opacity:1;z-index:0;
  background:#e5e9ec;border-radius:0;
}
body.pc-one-unified-heroes .pc-site .pc-hero-image img {
  position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;
  object-fit:cover;object-position:var(--pc-service-hero-x,50%) var(--pc-service-hero-y,50%);
}
body.pc-one-unified-heroes .pc-site .pc-hero-image::after {
  content:"";display:block;position:absolute;inset:0;pointer-events:none;
  background:var(--pc-one-hero-fade);
}
body.pc-one-unified-heroes .pc-site .pc-hero-image::before { content:none;display:none; }
body.pc-one-unified-heroes .pc-site .pc-hero-content {
  position:relative;z-index:1;min-height:520px;display:flex;flex-direction:column;
  justify-content:center;align-items:flex-start;width:min(1180px,calc(100% - 40px));
  max-width:none;margin:0 auto;padding:66px 0 42px;pointer-events:none;
}
body.pc-one-unified-heroes .pc-site .pc-hero-content > * { pointer-events:auto; }
body.pc-one-unified-heroes .pc-site .pc-hero h1 {
  width:52%;max-width:650px;line-height:1.1;font-size:clamp(38px,3.7vw,57px);
  letter-spacing:-.05em;margin:0 0 22px;overflow-wrap:break-word;hyphens:auto;
}
body.pc-one-unified-heroes .pc-site .pc-hero h1 span { display:block; }
body.pc-one-unified-heroes .pc-site .pc-hero .pc-eyebrow {
  max-width:52%;font-size:10px;letter-spacing:.19em;margin:0 0 18px;overflow-wrap:break-word;
}
body.pc-one-unified-heroes .pc-site .pc-hero-intro {
  width:47%;max-width:530px;font-size:15px;line-height:1.7;
}
body.pc-one-unified-heroes .pc-site .pc-hero-intro p { line-height:inherit;font-size:inherit; }
body.pc-one-unified-heroes .pc-site .pc-hero-buttons {
  max-width:55%;gap:12px;margin-top:25px;
}
body.pc-one-unified-heroes .pc-site .pc-hero-buttons .pc-btn {
  max-width:100%;white-space:normal;min-height:48px;
}
body.pc-one-unified-heroes .pc-site .pc-hero-benefits {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:55%;max-width:650px;
  margin-top:30px;gap:14px;align-items:start;
}
body.pc-one-unified-heroes .pc-site .pc-hero-benefit {
  display:flex;min-width:0;align-items:flex-start;gap:9px;
}
body.pc-one-unified-heroes .pc-site .pc-hero-benefit > .pc-svg { flex:0 0 24px;width:24px;height:24px; }
body.pc-one-unified-heroes .pc-site .pc-hero-benefit > div { min-width:0; }
body.pc-one-unified-heroes .pc-site .pc-hero-benefit strong,
body.pc-one-unified-heroes .pc-site .pc-hero-benefit small { overflow-wrap:break-word; }
body.pc-one-unified-heroes .pc-site .pc-hero-image:empty { display:none; }
/* Progressive enhancement for services without a selected picture. */
body.pc-one-unified-heroes .pc-site .pc-hero:has(> .pc-hero-image:empty) h1,
body.pc-one-unified-heroes .pc-site .pc-hero:has(> .pc-hero-image:empty) .pc-hero-intro { width:100%;max-width:760px; }
/* Existing Gutenberg service landing: feature image is still selected in the editor. */
body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero {
  position:relative;isolation:isolate;background:#fff;background-image:none;
  min-height:520px;padding:66px max(20px,calc((100% - 1180px)/2)) 42px;
}
body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero::before,
body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero::after { content:none;display:none; }
body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::before {
  content:"";display:block;position:absolute;inset:0 0 0 auto;width:64%;height:100%;
  z-index:-2;transform:none;opacity:1;background-image:var(--pc-service-hero-image);
  background-size:cover;background-repeat:no-repeat;background-position:var(--pc-service-hero-x,50%) var(--pc-service-hero-y,50%);
}
body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::after {
  content:"";display:block;position:absolute;inset:0 0 0 auto;width:64%;height:100%;
  z-index:-1;transform:none;opacity:1;background:var(--pc-one-hero-fade);pointer-events:none;
}
body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero > :not(.wp-block-group__inner-container),
body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero > .wp-block-group__inner-container > * {
  max-width:52%;margin-left:0;margin-right:0;
}
body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero h1 {
  font-size:clamp(38px,3.7vw,57px);line-height:1.1;letter-spacing:-.05em;overflow-wrap:break-word;
}
/* Medium desktop: maintain the photo to the right while allowing natural text height. */
@media (min-width:801px) and (max-width:1024px) {
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-copy,
  body.pc-one-unified-heroes .pc-site .pc-hero h1 { width:56%; }
  body.pc-one-unified-heroes .pc-site .pc-hero-intro { width:52%; }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefits { width:59%;gap:10px; }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-layout,
  body.pc-one-unified-heroes .pc-site .pc-hero-content { padding-top:48px;padding-bottom:36px; }
}
/* Mobile/tablet: text first, then an edge-to-edge photograph within the SAME hero.
   A short top-to-bottom fade joins the two; the rest of the photo stays opaque. */
@media (max-width:800px) {
  body.pc-one-unified-heroes .pc-home-hero,
  body.pc-one-unified-heroes .pc-career-hero--homepage,
  body.pc-one-unified-heroes .pc-site .pc-hero {
    display:flex;flex-direction:column;min-height:0;background:#fff;
  }
  body.pc-one-unified-heroes .pc-home-hero > .wrap,
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-layout,
  body.pc-one-unified-heroes .pc-site .pc-hero-content {
    order:1;min-height:0;width:calc(100% - 40px);max-width:760px;
    margin:0 auto;padding:36px 0 24px;
  }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-copy {
    width:100%;max-width:none;padding:0;
  }
  body.pc-one-unified-heroes .pc-career-hero--homepage h1,
  body.pc-one-unified-heroes .pc-site .pc-hero h1 {
    width:100%;max-width:680px;font-size:clamp(34px,9vw,46px);line-height:1.12;margin-bottom:18px;
  }
  body.pc-one-unified-heroes .pc-site .pc-hero .pc-eyebrow { max-width:100%; }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-lead,
  body.pc-one-unified-heroes .pc-site .pc-hero-intro {
    width:100%;max-width:650px;font-size:15px;line-height:1.7;
  }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-actions,
  body.pc-one-unified-heroes .pc-site .pc-hero-buttons {
    display:flex;flex-wrap:wrap;max-width:100%;width:100%;gap:10px;margin-top:23px;
  }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-values { gap:11px;margin-top:0; }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefits { width:100%;max-width:650px;margin-top:25px;gap:12px; }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefit strong { font-size:11px; }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefit small { font-size:10px; }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefit > .pc-svg { flex-basis:21px;width:21px;height:21px; }
  body.pc-one-unified-heroes .pc-home-hero .hero-img,
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual,
  body.pc-one-unified-heroes .pc-site .pc-hero-image {
    order:2;position:relative;inset:auto;width:100%;height:var(--pc-one-mobile-image-height);
    min-height:0;max-height:none;flex:none;opacity:1;margin:0;z-index:0;border:0;border-radius:0;
  }
  body.pc-one-unified-heroes .pc-home-hero .hero-img::before,
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual::before,
  body.pc-one-unified-heroes .pc-site .pc-hero-image::before { content:none;display:none; }
  body.pc-one-unified-heroes .pc-home-hero .hero-img::after,
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-visual::after,
  body.pc-one-unified-heroes .pc-site .pc-hero-image::after {
    content:"";display:block;position:absolute;inset:0;z-index:1;
    background:var(--pc-one-mobile-fade);pointer-events:none;
  }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-team-photo {
    object-position:var(--pc-career-mobile-x,50%) var(--pc-career-mobile-y,50%);
  }
  body.pc-one-unified-heroes .pc-site .pc-hero-image img {
    object-position:var(--pc-service-mobile-x,50%) var(--pc-service-mobile-y,50%);
  }
  body.pc-one-unified-heroes .pc-site .pc-hero-image:empty { display:none; }
  body.pc-one-unified-heroes .pc-home-hero .hero-img:has(.pc-hero-no-photo) { display:none; }
  body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero {
    min-height:0;padding:36px 20px 24px;
  }
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero {
    padding-bottom:calc(var(--pc-one-mobile-image-height) + 24px);
  }
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::before,
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::after {
    inset:auto 0 0;width:100%;height:var(--pc-one-mobile-image-height);
  }
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::after {
    background:var(--pc-one-mobile-fade);
  }
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero::before {
    background-position:var(--pc-service-mobile-x,50%) var(--pc-service-mobile-y,50%);
  }
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero > :not(.wp-block-group__inner-container),
  body.pc-one-unified-heroes .pc-landing-page.has-pc-hero-photo .pc-landing-hero > .wp-block-group__inner-container > * {
    max-width:100%;
  }
  body.pc-one-unified-heroes .pc-landing-page .pc-landing-hero h1 {
    font-size:clamp(34px,9vw,46px);line-height:1.12;
  }
}
@media (max-width:600px) {
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-actions,
  body.pc-one-unified-heroes .pc-site .pc-hero-buttons,
  body.pc-one-unified-heroes .pc-home-hero .hero-actions { flex-direction:column;align-items:stretch; }
  body.pc-one-unified-heroes .pc-career-hero--homepage .pc-career-hero-actions .btn,
  body.pc-one-unified-heroes .pc-site .pc-hero-buttons .pc-btn,
  body.pc-one-unified-heroes .pc-home-hero .hero-actions .btn {
    width:100%;min-height:48px;font-size:14px;justify-content:center;
  }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefits { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.pc-one-unified-heroes .pc-site .pc-hero-benefit:last-child:nth-child(odd) { grid-column:1 / -1; }
}

/* Long Hungarian headlines must remain readable on narrow screens. */
body.pc-one-unified-heroes .pc-home-hero h1 { overflow-wrap:break-word;hyphens:auto; }
@media (min-width:801px) {
  body.pc-one-unified-heroes .pc-career-hero--homepage h1 { max-width:550px; }
}
