/* Phase 5 image integration. The approved-copy stylesheet remains immutable. */
.phase5-picture{display:block;overflow:hidden}
.phase5-picture>img{display:block;width:100%;height:100%}
.phase5-cover{object-fit:cover}
.phase5-fill{object-fit:fill}
.phase5-background{position:absolute;z-index:0;pointer-events:none}

/* Picture wrappers preserve the exact dimensions formerly assigned to direct img children. */
.core-grid article>.card-picture{width:100%;height:300px}
.core-grid article:nth-child(2)>.card-picture{order:2}
.service-grid article>.card-picture{width:100%;height:240px}
.why-picture,.why-picture>img{width:100%;height:500px;position:relative}
.faq-grid>.faq-picture,.faq-grid>.faq-picture>img{width:100%;height:386px}
.contact-picture,.contact-picture>img{width:100%;height:500px}

/* Homepage raster backgrounds now use responsive, lazy-aware Astro pictures. */
.hero-photo{background-image:none}
.hero-photo-media{inset:0}
.hero-photo>.hero-panel{position:relative;z-index:1}
.process{background-image:none;overflow:hidden}
.process-grid{position:relative;z-index:2}
.home-process-left{left:0;top:0;width:40%;height:100%}
.home-process-right{right:0;top:0;width:20%;height:50%}
.process article{position:relative;overflow:hidden}
.home-process-first{inset:0}
.process article:nth-child(1){background:#54839e}
.process article:nth-child(1)::before{content:'';position:absolute;inset:0;background:#0a4e7bd0;z-index:1}
.process article>:not(picture){position:relative;z-index:2}
.final{position:relative;overflow:hidden;background:#0a4e7b}
.final-picture{right:0;top:0;width:55%;height:100%}
.final>.container{position:relative;z-index:1}

/* Service heroes and main image slots. */
.service-hero-picture,.service-hero-picture>img{width:100%;height:500px}
.wide-hero-picture,.wide-hero-picture>img{width:100%;height:400px}
.fire-damage-restoration-page .service-hero-grid>div:first-child{order:2}
.fire-damage-restoration-page .service-hero-grid>.hero-image-frame{order:1}
.immediate-photo{background-image:none;overflow:hidden}
.immediate-picture,.immediate-picture>img{width:100%;height:100%}
.split-collage{display:block;background-image:none;overflow:hidden}
.split-picture,.split-picture>img{width:100%;height:100%}
.service-page:not(.water-page) .split-collage>.split-picture{display:block}
.three-photo>picture{height:386px}
.three-photo>picture>img{width:100%;height:100%}
.three-photo.two-photo{grid-template-columns:repeat(2,1fr)}
.fire-damage-restoration-page .two-photo>picture{height:389px}
.mold-risk>picture,.mold-risk>picture>img{height:258px}
.sanitization-photo{background-image:none;overflow:hidden}
.sanitization-picture,.sanitization-picture>img{width:100%;height:100%}
.mid-cta-photo{background-image:none;overflow:hidden}
.mid-cta-picture,.mid-cta-picture>img{width:100%;height:100%}

/* Fire's source soot composition is a large base photo with a smaller overlay. */
.fire-soot-grid{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:center}
.fire-soot-grid>div:first-child>p{margin:0 0 28px}
.fire-soot-visual{height:425px;position:relative}
.fire-soot-base{position:absolute;left:0;top:0;width:100%;height:348px}
.fire-soot-overlay{position:absolute;right:-120px;bottom:0;width:345px;height:249px;border:8px solid #fff}

/* Containment keeps the original pale veil over its source wall photo. */
.containment{background:none;isolation:isolate;overflow:hidden}
.containment-backdrop{inset:0;z-index:-2}
.containment::before{content:'';position:absolute;inset:0;background:#fff9;z-index:-1}
.containment-grid{position:relative;z-index:1}
.containment-photo{background-image:none;overflow:hidden}
.containment-picture,.containment-picture>img{width:100%;height:100%}

/* The photographic process cards retain their source blue/black overlays. */
.service-process-grid article,.mold-process-grid article{position:relative;overflow:hidden}
.service-process-grid article:nth-of-type(1),
.service-process-grid article:nth-of-type(3),
.mold-process-grid article:nth-child(1),
.mold-process-grid article:nth-child(3){background-image:none}
.service-process-first,.service-process-third{inset:0}
.service-process-grid article:has(.service-process-first)::before,
.mold-process-grid article:has(.service-process-first)::before{content:'';position:absolute;inset:0;background:#0a4e7bbd;z-index:1}
.service-process-grid article:has(.service-process-third)::before,
.mold-process-grid article:has(.service-process-third)::before{content:'';position:absolute;inset:0;background:#0008;z-index:1}
.service-process-grid article>:not(picture),.mold-process-grid article>:not(picture){position:relative;z-index:2}

/* Packout source sections include the photos omitted from the earlier generic shell. */
.packout-care-grid article:nth-child(2)>.card-picture{order:2}
.why-service-with-photo .why-service-inner{display:grid;grid-template-columns:1fr 1fr;gap:80px;align-items:center}
.why-service-with-photo .section-top{display:block}
.why-service-with-photo .section-top .button{margin-top:22px}
.why-service-with-photo .why-service-grid article{padding:28px}
.why-service-photo{position:relative}
.why-service-photo::before{content:'';position:absolute;inset:65px -35px 35px 35px;background:#0a4e7b}
.why-service-picture,.why-service-picture>img{width:100%;height:500px;position:relative}

@media(max-width:1100px) and (min-width:768px){
  .fire-soot-overlay{right:-24px}
  .why-service-photo::before{right:-24px}
  .why-service-with-photo .why-service-inner{gap:40px}
  .why-service-with-photo .why-service-grid{grid-template-columns:1fr}
}

@media(max-width:767px){
  .core-grid article>.card-picture{height:250px}
  .core-grid article:nth-child(2)>.card-picture{order:0}
  .why-picture,.why-picture>img{height:350px}
  .faq-grid>.faq-picture,.faq-grid>.faq-picture>img{height:260px}
  .contact-picture,.contact-picture>img{height:350px}

  .home-process-left,.home-process-right,.final-picture{display:none}
  .fire-damage-restoration-page .service-hero-grid>div:first-child{order:2}
  .fire-damage-restoration-page .service-hero-grid>.hero-image-frame,
  .full-reconstruction-page .service-hero-grid>.hero-image-frame{order:1}
  .full-reconstruction-page .service-hero-grid>div:first-child{order:2}
  .service-hero-picture,.service-hero-picture>img{height:320px}
  .packout-hero .wide-hero-picture,.packout-hero .wide-hero-picture>img{height:150px}
  .packout-textiles-page .content-split>div:last-child{order:-1}

  .three-photo>picture,.three-photo>picture>img,.mold-risk>picture,.mold-risk>picture>img{height:250px}
  .three-photo.two-photo{grid-template-columns:1fr}
  .fire-damage-restoration-page .two-photo>picture,
  .fire-damage-restoration-page .two-photo>picture>img{height:auto;object-fit:contain}
  .fire-soot-grid{grid-template-columns:1fr;gap:0}
  .fire-soot-visual{display:none}

  .service-process-third>img{object-position:center!important}
  .packout-care-grid article:nth-child(2)>.card-picture{order:2}
  .why-service-with-photo .why-service-inner{grid-template-columns:1fr;gap:45px}
  .why-service-with-photo .why-service-photo{order:-1}
  .why-service-with-photo .why-service-grid{grid-template-columns:1fr}
  .why-service-photo::before{inset:30px -12px -12px 15px}
  .why-service-picture,.why-service-picture>img{height:350px}
  .full-reconstruction-page .faq-grid>.faq-picture{order:-1}
}
