/* 41-commercial-service-v2.css – commercial service template parity enhancements */

/* ---- Elegant Advantages cards (mirror residential feature cards) ---- */
.comm-advantages__grid--elegant{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-6);}
.comm-advantages__grid--elegant .comm-advantage{position:relative;display:block;background:var(--color-bg-white);border:1px solid var(--color-border);border-radius:var(--radius-lg);padding:var(--space-8);overflow:hidden;transition:transform var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out),border-color var(--duration-base) var(--ease-out);}
.comm-advantages__grid--elegant .comm-advantage::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--color-action),var(--color-action-deep));transform:scaleX(0);transform-origin:left;transition:transform var(--duration-base) var(--ease-out);}
.comm-advantages__grid--elegant .comm-advantage:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:transparent;}
.comm-advantages__grid--elegant .comm-advantage:hover::before{transform:scaleX(1);}
.comm-advantage__num{display:block;font-family:var(--font-heading);font-size:var(--text-sm);font-weight:var(--weight-bold);color:var(--color-action);letter-spacing:var(--tracking-wide);margin-bottom:var(--space-2);}
@media(max-width:860px){.comm-advantages__grid--elegant{grid-template-columns:1fr;}}

/* ---- Installation Process: parallax band with frosted cards ---- */
.comm-proc-parallax{position:relative;overflow:hidden;padding-block:var(--space-16);isolation:isolate;}
.comm-proc-parallax__bg{position:absolute;inset:0;z-index:-2;background-image:var(--proc-bg);background-size:cover;background-position:center;background-attachment:fixed;}
.comm-proc-parallax__overlay{position:absolute;inset:0;z-index:-1;background:linear-gradient(135deg,rgba(4,106,56,.9),rgba(49,155,66,.82));}
.comm-proc-parallax__content{position:relative;}
.comm-proc__heading{color:#fff;}
.comm-proc__grid{display:grid;grid-template-columns:repeat(4,1fr);gap:var(--space-6);margin-top:var(--space-10);}
.comm-proc__card{background:rgba(255,255,255,.12);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border:1px solid rgba(255,255,255,.25);border-radius:var(--radius-lg);padding:var(--space-6);text-align:center;transition:transform var(--duration-base) var(--ease-out),background var(--duration-base) var(--ease-out);}
.comm-proc__card:hover{transform:translateY(-4px);background:rgba(255,255,255,.2);}
.comm-proc__num{width:44px;height:44px;margin:0 auto var(--space-3);border-radius:50%;background:rgba(255,255,255,.2);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--font-heading);font-weight:var(--weight-bold);font-size:var(--text-lg);}
.comm-proc__title{font-family:var(--font-heading);font-size:var(--text-base);font-weight:var(--weight-semibold);color:#fff;margin-bottom:var(--space-2);}
.comm-proc__desc{color:rgba(255,255,255,.88);font-size:var(--text-sm);line-height:var(--leading-normal);}
@media(max-width:860px){.comm-proc__grid{grid-template-columns:repeat(2,1fr);}.comm-proc-parallax__bg{background-attachment:scroll;}}
@media(max-width:480px){.comm-proc__grid{grid-template-columns:1fr;}}

/* ---- Case Studies (PDF link cards) ---- */
.comm-casestudies__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-6);}
.comm-casestudy{display:flex;flex-direction:column;background:var(--color-bg-white);border:1px solid var(--color-border);border-radius:var(--radius-lg);overflow:hidden;text-decoration:none;transition:transform var(--duration-base) var(--ease-out),box-shadow var(--duration-base) var(--ease-out);}
.comm-casestudy:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);}
.comm-casestudy__thumb{aspect-ratio:3/2;overflow:hidden;background:var(--color-bg-alt);}
.comm-casestudy__thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.comm-casestudy__thumb--placeholder{display:flex;align-items:center;justify-content:center;color:var(--color-action);}
.comm-casestudy__body{padding:var(--space-5) var(--space-6);display:flex;flex-direction:column;gap:var(--space-2);}
.comm-casestudy__title{font-family:var(--font-heading);font-size:var(--text-base);font-weight:var(--weight-semibold);color:var(--color-text-primary);}
.comm-casestudy__link{display:inline-flex;align-items:center;gap:var(--space-1);font-size:var(--text-sm);font-weight:var(--weight-semibold);color:var(--color-action-deep);}
@media(max-width:860px){.comm-casestudies__grid{grid-template-columns:1fr;}}

/* ---- Optional video section ---- */
.comm-video__frame{position:relative;width:100%;aspect-ratio:16/9;border-radius:var(--radius-lg);overflow:hidden;box-shadow:var(--shadow-md);margin-top:var(--space-6);}
.comm-video__frame iframe{position:absolute;inset:0;width:100%;height:100%;border:0;}

/* ---- Challenges: sticky image, matched to the residential intro ----
   The grid was centre-aligned and static, so the image sat still while the
   challenge list scrolled past. align-items:start plus a sticky media column
   brings it in line with .svc-explain__media--sticky. The 5.5rem offset
   clears the sticky site nav, which condenses to 60px on scroll. The 3:2
   ratio matches residential so image heights are uniform site-wide. */
.comm-split { align-items: start; }

.comm-split__media { position: sticky; top: 5.5rem; }

.comm-split__img { aspect-ratio: 3 / 2; object-fit: cover; display: block; }

@media (max-width: 860px) {
  .comm-split__media { position: static; }
  .comm-split__img { aspect-ratio: auto; }
}


/* ── Commercial hero with a lead form ──
   Applied only when a form is configured; pages without one keep
   svc-hero--tall and are untouched. */

/* No 88vh floor: the form card sets the height, so the card sits close under
   the nav instead of floating in the middle of a tall band. */
.svc-hero--form{
  display:flex;
  align-items:center;
}
.svc-hero--form .svc-hero__content{
  padding-block:var(--space-10);
}

/* The copy hangs from the bottom of its column rather than centring. The
   overlay fades from opaque white at the foot of the hero, so centred copy
   lands where the wash is thin and dark type disappears into the photograph.
   Dropping it low puts it over the solid part. The form card is unaffected
   and stays centred. */
.svc-hero--form .loc-hero__copy{
  align-self:end;
  padding-bottom:var(--space-4);
}

/* A denser overlay ramp than the shared one, which fades out by 65% and was
   built for a text-only hero. */
.page-template-service-commercial .svc-hero__overlay{
  background:linear-gradient(to top,
    #fff 0%,
    rgba(255,255,255,.97) 14%,
    rgba(255,255,255,.90) 30%,
    rgba(255,255,255,.78) 44%,
    rgba(255,255,255,.56) 60%,
    rgba(255,255,255,.32) 76%,
    rgba(255,255,255,.12) 90%,
    transparent 100%);
}

/* Same layered glow used on the service and location heroes, so the type
   holds wherever the photograph happens to be busy behind it. */
.page-template-service-commercial .svc-hero__heading{
  text-shadow:
    0 0 6px  rgba(255,255,255,1),
    0 0 16px rgba(255,255,255,.98),
    0 0 34px rgba(255,255,255,.92),
    0 0 60px rgba(255,255,255,.7);
}
.page-template-service-commercial .svc-hero__tagline{
  text-shadow:
    0 0 6px  rgba(255,255,255,1),
    0 0 14px rgba(255,255,255,.95),
    0 0 28px rgba(255,255,255,.8);
}

/* With the spec button removed, the call button is the only action in the
   hero. The ghost style was designed to sit beside a solid primary and is far
   too quiet on its own, so it takes the primary treatment here. */
.svc-hero--form .svc-hero__actions .btn-ghost{
  background:var(--color-cta);
  color:#fff;
  border-color:var(--color-cta);
}
.svc-hero--form .svc-hero__actions .btn-ghost:hover{
  background:var(--color-cta-hover);
  border-color:var(--color-cta-hover);
  color:#fff;
}

@media(max-width:1100px){
  /* ── Mobile: image band, then copy on white ──
     The same shape as the homepage mobile hero. Overlaying dark type on a
     photograph is the whole source of the legibility problem, so on a narrow
     screen the image becomes a fixed band at the top and everything else sits
     on white beneath it. Nothing has to be rescued with gradients or glows,
     and the reading order stays natural: image, heading, sub-heading, call,
     then the form. */
  .svc-hero--form{
    display:block;
    background:var(--color-bg-base);
  }

  /* Image band. position:relative lifts it out of the absolute stack so it
     occupies real height at the top of the section rather than sitting behind
     the content. */
  .svc-hero--form .svc-hero__bg{
    position:relative;
    height:240px;
  }

  /* The overlay only has to soften the join into the white below it now, so
     it drops the heavy ramp used on desktop. */
  .svc-hero--form .svc-hero__overlay{
    background:linear-gradient(to bottom,
      transparent 0%,
      transparent 55%,
      rgba(255,255,255,.35) 78%,
      rgba(255,255,255,.85) 94%,
      var(--color-bg-base) 100%) !important;
    height:240px;
    top:0;
  }

  .svc-hero--form .svc-hero__content{
    padding-block:var(--space-8) var(--space-10);
    text-align:center;
  }

  /* Type is on white now, so the glow comes off and the colours revert. */
  .svc-hero--form .svc-hero__heading,
  .svc-hero--form .svc-hero__tagline{
    text-shadow:none;
    text-align:center;
  }
  .svc-hero--form .svc-hero__heading{color:var(--color-text-primary);}
  .svc-hero--form .svc-hero__tagline{color:var(--color-text-body);}

  .svc-hero--form .loc-hero__copy{align-self:auto;padding-bottom:0;}

  /* Half width, centred. align-items rather than justify-content: the shared
     mobile rule makes this a column flex container, where justify-content
     controls the vertical axis and does nothing horizontally. */
  .svc-hero--form .svc-hero__actions{
    align-items:center;
  }
  .svc-hero--form .svc-hero__actions .btn-ghost{
    width:50%;
    min-width:220px;
    justify-content:center;
  }
}