
/* NILA v21.48 CTA, Map Card and Marquee Hard Fix */
:root{
  --v48-ink:#071b31;
  --v48-green:#075f3c;
  --v48-teal:#007f78;
  --v48-blue:#176fc2;
  --v48-yellow:#ffc400;
  --v48-line:rgba(7,27,49,.12);
  --v48-muted:#52677f;
}

/* MOBILE HOMEPAGE: header, CTA, then image. No empty form fields. */
@media(max-width:780px){
  body.page-home .v42-hero,
  body[data-nila-page="index"] .v42-hero{
    padding:22px 0 26px!important;
  }
  body.page-home .v42-hero-inner,
  body[data-nila-page="index"] .v42-hero-inner{
    display:flex!important;
    flex-direction:column!important;
    gap:16px!important;
  }
  body.page-home .v42-hero-copy,
  body[data-nila-page="index"] .v42-hero-copy{
    order:1!important;
  }
  body.page-home .v42-hero-visual,
  body[data-nila-page="index"] .v42-hero-visual{
    order:2!important;
    width:100%!important;
    transform:none!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.page-home .v42-hero-visual img,
  body[data-nila-page="index"] .v42-hero-visual img{
    aspect-ratio:1.6/1!important;
    border-radius:22px!important;
    box-shadow:0 22px 60px rgba(7,27,49,.14)!important;
  }
  body.page-home .v42-search-shell,
  body[data-nila-page="index"] .v42-search-shell{
    display:block!important;
    margin-top:16px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.page-home .v42-search-shell #heroSearch,
  body[data-nila-page="index"] .v42-search-shell #heroSearch{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:12px!important;
    padding:0!important;
    background:transparent!important;
    border:0!important;
    box-shadow:none!important;
  }
  body.page-home .v42-search-shell .hs-field,
  body[data-nila-page="index"] .v42-search-shell .hs-field,
  body.page-home #servicePickerWrap,
  body.page-home .hs-loc-wrap,
  body[data-nila-page="index"] #servicePickerWrap,
  body[data-nila-page="index"] .hs-loc-wrap{
    display:none!important;
  }
  body.page-home .v42-location-action,
  body.page-home .v42-search-shell .hs-submit,
  body[data-nila-page="index"] .v42-location-action,
  body[data-nila-page="index"] .v42-search-shell .hs-submit{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:62px!important;
    border-radius:18px!important;
    font-size:18px!important;
    font-weight:950!important;
    text-decoration:none!important;
  }
  body.page-home .v42-trust-row,
  body[data-nila-page="index"] .v42-trust-row{
    margin-top:16px!important;
    width:100%!important;
  }
}

/* CATEGORY PAGE MAP: use the real existing map card, placed into the useful top layout */
body.v48-category-page #v48CategoryHero{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 340px!important;
  gap:18px!important;
  max-width:1280px!important;
  margin:20px auto 18px!important;
  padding:0 24px!important;
  align-items:stretch!important;
}
.v48-category-main{
  display:grid!important;
  grid-template-columns:minmax(280px,.88fr) minmax(400px,1.12fr)!important;
  gap:18px!important;
  background:#fff!important;
  border:1px solid var(--v48-line)!important;
  border-radius:28px!important;
  box-shadow:0 24px 70px rgba(7,27,49,.12)!important;
  padding:20px!important;
  min-height:310px!important;
}
.v48-category-copy{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.v48-category-copy .kicker{
  display:inline-flex!important;
  width:max-content!important;
  border-radius:999px!important;
  background:rgba(23,111,194,.10)!important;
  color:var(--v48-blue)!important;
  padding:8px 13px!important;
  font-weight:950!important;
  font-size:13px!important;
  margin-bottom:14px!important;
}
.v48-category-copy h1{
  font-family:Fraunces,Georgia,serif!important;
  font-size:clamp(34px,4vw,54px)!important;
  line-height:.95!important;
  letter-spacing:-.055em!important;
  color:var(--v48-ink)!important;
  margin:0 0 12px!important;
}
.v48-category-copy p{
  color:var(--v48-muted)!important;
  margin:0 0 18px!important;
  line-height:1.5!important;
}
.v48-category-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}
.v48-category-actions a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:44px!important;
  padding:0 16px!important;
  border-radius:999px!important;
  border:1px solid var(--v48-line)!important;
  font-weight:950!important;
  text-decoration:none!important;
}
.v48-category-actions a:first-child{
  background:var(--v48-green)!important;
  color:#fff!important;
}
.v48-category-actions a:last-child{
  background:#fff!important;
  color:var(--v48-ink)!important;
}
.v48-category-map-slot{
  min-height:280px!important;
}
.v48-category-map-slot #dirMapCard{
  display:flex!important;
  width:100%!important;
  height:100%!important;
  min-height:280px!important;
  position:relative!important;
  inset:auto!important;
  margin:0!important;
  visibility:visible!important;
  opacity:1!important;
  border-radius:22px!important;
  overflow:hidden!important;
  box-shadow:none!important;
}
.v48-category-map-slot #dirMap{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:220px!important;
  width:100%!important;
}
.v48-category-image{
  border-radius:28px!important;
  overflow:hidden!important;
  box-shadow:0 24px 70px rgba(7,27,49,.12)!important;
}
.v48-category-image img{
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  display:block!important;
}

/* Hide older category hero panels once v48 is active */
body.v48-category-page #v46CategoryHero,
body.v48-category-page #v36DirCategoryHero,
body.v48-category-page #v31DirCategoryHero,
body.v48-category-page #v30DirCategoryHero,
body.v48-category-page #v29DirCategoryHero{
  display:none!important;
}

/* Compact top search on category/directory web */
body.v48-directory-page .v19-dir-search{
  max-width:880px!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto auto!important;
  gap:8px!important;
  padding:8px!important;
  border-radius:18px!important;
}
body.v48-directory-page .v19-dir-search input,
body.v48-directory-page .v19-dir-search button{
  min-height:42px!important;
  border-radius:13px!important;
}
body.v48-directory-page #dirHeroUseLocation,
body.v48-directory-page #dirSearchBtn{
  min-width:116px!important;
  padding-left:14px!important;
  padding-right:14px!important;
}

/* HARD WEB MARQUEE for category/provider rail */
@media(min-width:781px){
  body.v48-category-page .v19-cat-rail,
  body.v48-category-page .v19-cat-rail .container,
  body.page-provider .v47-provider-rail{
    overflow:hidden!important;
  }
  body.v48-category-page .v19-cat-rail-inner,
  body.page-provider .v47-provider-rail-inner{
    display:flex!important;
    flex-wrap:nowrap!important;
    gap:10px!important;
    width:max-content!important;
    min-width:max-content!important;
    overflow:visible!important;
    animation:v48RailMarquee 22s linear infinite!important;
    transform:translate3d(0,0,0);
    will-change:transform!important;
  }
  body.v48-category-page .v19-cat-rail:hover .v19-cat-rail-inner,
  body.v48-category-page .v19-cat-rail:focus-within .v19-cat-rail-inner,
  body.page-provider .v47-provider-rail:hover .v47-provider-rail-inner,
  body.page-provider .v47-provider-rail:focus-within .v47-provider-rail-inner{
    animation-play-state:paused!important;
  }
  @keyframes v48RailMarquee{
    0%{transform:translate3d(0,0,0);}
    100%{transform:translate3d(-50%,0,0);}
  }
}

/* MOBILE category/provider pages: manual swipe only, no marquee */
@media(max-width:780px){
  body.v48-category-page .v19-cat-rail-inner,
  body.page-provider .v47-provider-rail-inner{
    animation:none!important;
    transform:none!important;
    display:flex!important;
    overflow-x:auto!important;
    width:auto!important;
    min-width:0!important;
    -webkit-overflow-scrolling:touch!important;
  }
  body.v48-category-page #v48CategoryHero{
    display:block!important;
    padding:0 14px!important;
    margin:14px auto!important;
  }
  .v48-category-main{
    display:block!important;
    padding:16px!important;
    min-height:0!important;
  }
  .v48-category-map-slot{
    margin-top:14px!important;
    min-height:250px!important;
  }
  .v48-category-image{
    display:none!important;
  }
  body.v48-directory-page .v19-dir-search{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
  body.v48-directory-page #dirHeroUseLocation,
  body.v48-directory-page #dirSearchBtn{
    width:100%!important;
    min-width:0!important;
  }
}

/* Homepage popular services marquee remains mobile-only */
@media(max-width:780px){
  body.page-home .v42-service-grid,
  body[data-nila-page="index"] .v42-service-grid{
    animation:v48HomeServicesMarquee 34s linear infinite!important;
    will-change:transform!important;
  }
  @keyframes v48HomeServicesMarquee{
    0%{transform:translate3d(0,0,0);}
    100%{transform:translate3d(-50%,0,0);}
  }
}
