/* AF-Health frontend polish: solid/collapsible nested navigation and
 * intrinsic-ratio mobile hero media. Loaded after all theme and Menu Manager
 * styles so these usability rules remain final across every frontend theme. */

/* Nested navigation ------------------------------------------------------- */
body.guest-shell .public-nav-submenu{
  background:linear-gradient(var(--surface,#fff),var(--surface,#fff)),var(--bg,#fff)!important;
  border-color:color-mix(in srgb,var(--border,#dbe4ee) 88%,var(--text,#172554) 12%)!important;
  box-shadow:0 20px 52px rgba(15,23,42,.20)!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  opacity:1!important;
}
body.guest-shell .public-nav-submenu a,
body.guest-shell .public-nav-submenu-label{
  min-height:44px;
  padding:10px 12px;
  font-size:.84rem;
  line-height:1.3;
}

@media(max-width:1180px){
  body.guest-shell .public-nav-dropdown{
    width:100%!important;
  }
  body.guest-shell .public-nav-dropdown>summary.public-nav-link{
    width:100%!important;
    min-height:50px!important;
    justify-content:flex-start!important;
    padding:13px 14px!important;
    font-size:.94rem!important;
  }
  body.guest-shell .public-nav-dropdown>summary .public-nav-chevron{
    margin-inline-start:auto!important;
  }
  body.guest-shell .public-nav-submenu{
    position:static!important;
    width:calc(100% - 12px)!important;
    min-width:0!important;
    margin:6px 6px 10px!important;
    padding:7px!important;
    border-radius:14px!important;
    background:linear-gradient(var(--surface,#fff),var(--surface,#fff)),var(--bg,#fff)!important;
    box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--border,#dbe4ee) 65%,transparent)!important;
    transform:none!important;
  }
  body.guest-shell .public-nav-submenu a,
  body.guest-shell .public-nav-submenu-label{
    min-height:48px!important;
    padding:12px 13px!important;
    border-radius:10px!important;
    font-size:.92rem!important;
    font-weight:750!important;
    white-space:normal!important;
  }
  body.guest-shell .public-nav-submenu svg{
    width:19px!important;
    height:19px!important;
    flex-basis:19px!important;
  }
}

/* Mobile hero sliders ----------------------------------------------------
 * Media-only sliders use uploaded image dimensions as their height source.
 * This removes the old square/tall crop and preserves the complete image on
 * phones, including future custom hero images with a different aspect ratio. */
@media(max-width:900px){
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only{
    height:auto!important;
    min-height:0!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only>.home-flat-slider-stage{
    height:auto!important;
    min-height:0!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slide{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:auto!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slide-media{
    height:auto!important;
    min-height:0!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slide.has-background-image .home-flat-slide-image{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:none!important;
    object-fit:contain!important;
    object-position:center center!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slide.uses-theme-artwork .home-flat-slide-media{
    min-height:clamp(220px,56vw,300px)!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-hero-labels{
    top:10px!important;
    left:10px!important;
    right:10px!important;
    gap:6px 8px!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-hero-label{
    padding:6px 9px!important;
    font-size:clamp(.68rem,2.8vw,.82rem)!important;
    line-height:1.2!important;
  }
}

@media(max-width:560px){
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only{
    border-radius:18px!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slider-controls{
    bottom:8px!important;
  }
  body.guest-shell[class*="frontend-theme-"] .home-flat-slider.home-flat-slider-media-only .home-flat-slider-controls>button{
    width:32px!important;
    height:32px!important;
  }
}

/* Homepage has older high-specificity theme guards that forced a 330-460px
 * mobile minimum. Explicitly supersede those protected selectors for the
 * media-only image slider while leaving the title/content sections untouched. */
@media(max-width:900px){
  body.guest-shell.ui-v2.route-home[class*="frontend-theme-"] .home-flat-slider-context-homepage-main .home-flat-slider.home-flat-slider-media-only{
    height:auto!important;
    min-height:0!important;
  }
  body.guest-shell.ui-v2.route-home[class*="frontend-theme-"] .home-flat-slider-context-homepage-main .home-flat-slider.home-flat-slider-media-only>.home-flat-slider-stage{
    height:auto!important;
    min-height:0!important;
  }
  body.guest-shell.ui-v2.route-home[class*="frontend-theme-"] .home-flat-slider-context-homepage-main .home-flat-slider.home-flat-slider-media-only .home-flat-slide{
    height:auto!important;
    min-height:0!important;
    grid-template-rows:auto!important;
  }
  body.guest-shell.ui-v2.route-home[class*="frontend-theme-"] .home-flat-slider-context-homepage-main .home-flat-slider.home-flat-slider-media-only .home-flat-slide-media{
    height:auto!important;
    min-height:0!important;
  }
}
