
/* NILA v21.45 Map Visibility and Mobile Homepage Marquee Recovery */
:root{
  --v45-ink:#071b31;
  --v45-green:#075f3c;
  --v45-teal:#007f78;
  --v45-blue:#176fc2;
  --v45-yellow:#ffc400;
  --v45-line:rgba(7,27,49,.12);
  --v45-muted:#52677f;
}

/* MAP RECOVERY: no map container should be hidden by old recovery layers */
body.page-directory #dirMapCard,
body[data-nila-page="directory"] #dirMapCard,
body.v36-category-page #dirMapCard,
body.v39-category-page #dirMapCard,
body.v41-category-page #dirMapCard,
body.v45-directory-page #dirMapCard{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}
body.page-directory #dirMap,
body[data-nila-page="directory"] #dirMap,
body.v36-category-page #dirMap,
body.v39-category-page #dirMap,
body.v41-category-page #dirMap,
body.v45-directory-page #dirMap{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  width:100%!important;
  min-height:320px!important;
  background:#eaf2fb!important;
}
body.v45-category-page #v36DirCategoryHero{
  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;
}
body.v45-category-page .v36-category-copy{
  display:grid!important;
  grid-template-columns:minmax(280px,.92fr) minmax(380px,1.08fr)!important;
  gap:18px!important;
  min-height:300px!important;
}
body.v45-category-page .v36-category-map{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  min-height:270px!important;
  border-radius:22px!important;
  overflow:hidden!important;
  background:#eaf2fb!important;
  border:1px solid rgba(7,27,49,.10)!important;
  position:relative!important;
}
body.v45-category-page .v36-category-map #dirMap{
  min-height:270px!important;
  height:100%!important;
}
body.v45-category-page .v36-category-map-label{
  display:none!important;
}

/* Make web category page search compact, not huge */
body.v45-category-page .v19-dir-search,
body.v45-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.v45-category-page .v19-dir-search input,
body.v45-category-page .v19-dir-search button,
body.v45-directory-page .v19-dir-search input,
body.v45-directory-page .v19-dir-search button{
  min-height:42px!important;
  border-radius:13px!important;
}
body.v45-category-page #dirHeroUseLocation,
body.v45-category-page #dirSearchBtn,
body.v45-directory-page #dirHeroUseLocation,
body.v45-directory-page #dirSearchBtn{
  min-width:116px!important;
  padding-left:14px!important;
  padding-right:14px!important;
}

/* Homepage mobile CTA clarity */
@media(max-width:780px){
  body.page-home .v42-search-shell,
  body[data-nila-page="index"] .v42-search-shell{
    display:block!important;
    margin-top:18px!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;
  }
  body.page-home .v42-search-shell .hs-field,
  body[data-nila-page="index"] .v42-search-shell .hs-field{
    min-height:74px!important;
    border-radius:22px!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{
    min-height:64px!important;
    font-size:18px!important;
    border-radius:18px!important;
  }
  body.page-home .v42-trust-row,
  body[data-nila-page="index"] .v42-trust-row{
    margin-top:18px!important;
  }

  /* The only mobile marquee is homepage popular services */
  body.page-home .v42-mobile-marquee,
  body[data-nila-page="index"] .v42-mobile-marquee{
    overflow:hidden!important;
    width:100%!important;
    margin-top:8px!important;
  }
  body.page-home .v42-service-grid,
  body[data-nila-page="index"] .v42-service-grid{
    display:flex!important;
    gap:14px!important;
    width:max-content!important;
    min-width:max-content!important;
    animation:v45HomeServicesMarquee 34s linear infinite!important;
    will-change:transform!important;
    overflow:visible!important;
  }
  body.page-home .v42-mobile-marquee:active .v42-service-grid,
  body.page-home .v42-mobile-marquee:hover .v42-service-grid,
  body[data-nila-page="index"] .v42-mobile-marquee:active .v42-service-grid,
  body[data-nila-page="index"] .v42-mobile-marquee:hover .v42-service-grid{
    animation-play-state:paused!important;
  }
  @keyframes v45HomeServicesMarquee{
    from{transform:translateX(0);}
    to{transform:translateX(-50%);}
  }

  /* Category pages mobile: no marquee, manual swipe only */
  body.v45-category-page .v19-cat-rail-inner,
  body.v41-category-page .v19-cat-rail-inner,
  body.v39-category-page .v19-cat-rail-inner,
  body.v36-category-page .v19-cat-rail-inner{
    animation:none!important;
    transform:none!important;
    overflow-x:auto!important;
    width:auto!important;
    min-width:0!important;
    display:flex!important;
    -webkit-overflow-scrolling:touch!important;
  }

  body.v45-category-page #v36DirCategoryHero{
    display:block!important;
    padding:0 14px!important;
  }
  body.v45-category-page .v36-category-copy{
    display:block!important;
    min-height:0!important;
    padding:16px!important;
  }
  body.v45-category-page .v36-category-map{
    margin-top:14px!important;
    min-height:230px!important;
  }
  body.v45-category-page .v36-category-map #dirMap{
    min-height:230px!important;
  }
  body.v45-category-page .v36-category-visual{
    display:none!important;
  }
  body.v45-category-page .v19-dir-search,
  body.v45-directory-page .v19-dir-search{
    grid-template-columns:1fr!important;
    max-width:none!important;
  }
  body.v45-category-page #dirHeroUseLocation,
  body.v45-category-page #dirSearchBtn,
  body.v45-directory-page #dirHeroUseLocation,
  body.v45-directory-page #dirSearchBtn{
    width:100%!important;
    min-width:0!important;
  }
}

/* Web category pages get the clickable marquee rail */
@media(min-width:781px){
  body.v45-category-page .v19-cat-rail,
  body.v41-category-page .v19-cat-rail{
    overflow:hidden!important;
  }
  body.v45-category-page .v19-cat-rail .container,
  body.v41-category-page .v19-cat-rail .container{
    overflow:hidden!important;
  }
  body.v45-category-page .v19-cat-rail-inner,
  body.v41-category-page .v19-cat-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:v45CategoryRailMarquee 30s linear infinite!important;
    scrollbar-width:none!important;
  }
  body.v45-category-page .v19-cat-rail:hover .v19-cat-rail-inner,
  body.v45-category-page .v19-cat-rail:focus-within .v19-cat-rail-inner,
  body.v41-category-page .v19-cat-rail:hover .v19-cat-rail-inner,
  body.v41-category-page .v19-cat-rail:focus-within .v19-cat-rail-inner{
    animation-play-state:paused!important;
  }
  @keyframes v45CategoryRailMarquee{
    from{transform:translateX(0);}
    to{transform:translateX(-50%);}
  }
}
