/* Shared native-template and SAJ widget layouts for tablets and Surface.
 * Breakpoints are CSS pixels, independent of device resolution or pixel ratio. */
:is(.generic-page__layout,.legal-page__layout,.article-layout,.archive-layout,.physician-layout,.service-detail-layout,.saj-video-watch__layout)>*,
:is(.inner-hero__grid,.article-hero__grid,.archive-hero__grid,.doctors-hero__grid,.services-hero__panel,.service-detail-hero__panel)>*,
:is(.archive-grid,.physician-grid,.service-catalog__grid,.saj-video-archive__grid,.saj-video-related__grid)>*{
  min-width:0;
}
:is(.generic-content,.article-content,.service-detail-content,.physician-content,.saj-video-watch__main){overflow-wrap:break-word}
:is(.generic-content,.article-content,.service-rich-content,.physician-content,.saj-video-watch__content) :is(img,iframe,video){max-width:100%}
:is(.saj-page-entry__content,.article-entry,.service-rich-content,.physician-content,.saj-video-watch__content) .wp-block-table{min-width:0;max-width:100%;overflow-x:auto}
:is(.saj-page-entry__content,.article-entry,.service-rich-content,.physician-content,.saj-video-watch__content)>table{display:block;max-width:100%;overflow-x:auto}
.saj-contact-main-widget .saj-contact-location-card__title{color:#fff}
.saj-contact-main-widget .saj-contact-location-card__address{color:#dce9e5}

@media(max-width:1399px){
  /* Move sidebars below the content before nested widgets become cramped. */
  .generic-page .generic-page__layout,.legal-page .legal-page__layout{
    grid-template-columns:minmax(0,1fr)!important;gap:28px;
  }
  .article-body .article-layout{
    grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content" "sidebar";gap:28px;
  }
  .articles-archive .archive-layout{
    grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content" "sidebar";gap:28px;
  }
  .articles-archive .archive-layout--no-sidebar{grid-template-areas:"content"}
  .physician-body .physician-layout{
    grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content" "sidebar";gap:28px;
  }
  .physician-body .physician-layout--no-sidebar{grid-template-areas:"content"}
  .service-detail-body .service-detail-layout,.saj-video-watch__body .saj-video-watch__layout{
    grid-template-columns:minmax(0,1fr)!important;gap:28px;
  }
  .generic-sidebar.saj-page-sidebar,.article-sidebar__sticky,.archive-sidebar,.physician-sidebar__sticky,.service-detail-sidebar,.saj-video-watch__sidebar{
    position:static!important;inset:auto;height:auto;max-height:none;
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:18px;
  }
  .saj-generic-page--elementor .saj-page-sidebar{order:1}
  .saj-page-sidebar .saj-page-widgets{display:contents}
  .saj-page-sidebar .saj-page-toc{max-height:none}
  .saj-generic-page--elementor .saj-page-entry{padding:clamp(16px,2vw,28px)}
  .article-content .article-entry{max-width:100%}
  .articles-archive .archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .saj-doctor-archive .physician-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .service-catalog .service-catalog__grid{grid-template-columns:repeat(3,minmax(0,1fr))}

  /* The form and hospital access card each own a full row. */
  .saj-contact-main-widget .saj-contact-main-widget__grid,.contact-main .contact-main__grid{
    grid-template-columns:minmax(0,1fr)!important;align-items:start;gap:24px;
  }
  .saj-contact-main-widget .saj-contact-location-card{
    display:flex;flex-direction:column;height:auto!important;min-height:0;
  }
  .saj-contact-main-widget .saj-contact-location-card__media{
    flex:0 0 auto;width:100%;height:clamp(240px,27vw,360px);min-height:0;
  }
  .saj-contact-main-widget .saj-contact-location-card__content{min-height:0}
  .saj-contact-main-widget .saj-contact-form-card{height:auto!important}
  .saj-elementor-service-journey .service-journey__panel{grid-template-columns:minmax(0,1fr)!important}
}

@media(min-width:768px) and (max-width:1399px){
  .saj-elementor-contact-hero .saj-contact-channels__grid,
  .contact-channels>.container,.contact-departments .container>div{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;align-items:stretch;
  }
  .saj-elementor-contact-hero .saj-contact-channel__inner{
    flex-direction:column;align-items:flex-start;justify-content:flex-start;
    gap:13px;min-height:168px;height:100%;padding:20px;
  }
  .saj-elementor-contact-hero .saj-contact-channel__copy{width:100%;min-width:0}
  .saj-elementor-contact-hero .saj-contact-channel__detail{width:auto;max-width:100%;white-space:normal;overflow-wrap:break-word;line-height:1.9}
  .saj-elementor-contact-hero .saj-contact-channel__value{font-size:15px;overflow-wrap:anywhere}
  .about-values .container>div,.saj-elementor-about-values .saj-about-values__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .about-timeline ol,.saj-elementor-about-timeline .saj-about-timeline__list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .site-footer.saj-footer-builder .footer-grid{
    grid-template-areas:"map contact newsletter" "services links newsletter";
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  }
  .site-footer.saj-footer-builder .footer-grid>.saj-footer-zone--3{border-inline-start:0}
}

@media(max-width:1199px){
  .article-hero .article-hero__grid{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content" "media";gap:24px}
  .archive-hero .archive-hero__grid{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"intro" "feature";gap:24px}
  .archive-hero .archive-hero__grid--without-featured{grid-template-areas:"intro"}
  .doctors-hero .doctors-hero__grid{grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"content" "visual";gap:24px}
  .doctors-hero .doctors-hero__grid--content-only{grid-template-areas:"content"}
  .inner-hero .inner-hero__grid,.services-hero .services-hero__panel,.service-detail-hero .service-detail-hero__panel{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .article-hero .article-hero__grid--no-media{grid-template-areas:"content"}
  .article-hero .article-hero__media{height:auto;min-height:0;aspect-ratio:16/9;max-height:560px}
  .service-detail-hero .service-detail-hero__panel>figure{aspect-ratio:16/9;min-height:240px}
  .services-hero .services-hero__media{min-height:0;aspect-ratio:16/9}
  .service-feature .service-feature__panel,.service-detail-content .technology-showcase{grid-template-columns:minmax(0,1fr)}
  .archive-categories .archive-categories__inner,.service-tools .service-tools__inner{grid-template-columns:minmax(0,1fr)}
  .archive-hero .archive-hero__stats{grid-template-columns:repeat(3,minmax(0,1fr))}
  .article-hero h1,.archive-hero h1,.inner-hero__copy h1{font-size:clamp(28px,3.6vw,44px);line-height:1.5;overflow-wrap:break-word}
  .saj-elementor-about-hero .inner-hero__grid,.saj-elementor-about-story .about-story__grid{grid-template-columns:minmax(0,1fr)!important;direction:rtl!important}
  .saj-elementor-about-hero .inner-hero__media,.saj-elementor-about-story .saj-about-story__media{min-height:0;max-width:100%}
  .saj-elementor-service-journey .service-journey__steps{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .saj-video-watch__chapters a{grid-template-columns:72px minmax(0,1fr) 28px}
}
@media(min-width:768px) and (max-width:1199px){
  .saj-doctor-archive .physician-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .saj-elementor-why-saj .why-saj__layout{grid-template-areas:"center center" "right left"!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px}
  .saj-elementor-why-saj .why-saj__medallion{width:min(340px,100%);justify-self:center}
  .saj-elementor-why-saj .why-saj-feature__icon::before{display:none}
}
@media(min-width:993px) and (max-width:1199px){
  .site-header .navbar__inner{gap:14px}
  .site-header .main-nav>ul{gap:12px}
}

@media(max-width:767px){
  .generic-sidebar.saj-page-sidebar,.article-sidebar__sticky,.archive-sidebar,.physician-sidebar__sticky,.service-detail-sidebar,.saj-video-watch__sidebar{
    grid-template-columns:minmax(0,1fr)!important;
  }
  .articles-archive .archive-grid,.service-catalog .service-catalog__grid{grid-template-columns:minmax(0,1fr)}
  .saj-doctor-archive .physician-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .saj-elementor-contact-hero .saj-contact-channels__grid{grid-template-columns:minmax(0,1fr)!important}
  .saj-contact-main-widget .saj-contact-location-card__media{height:220px}
  .saj-elementor-service-journey .service-journey__steps{grid-template-columns:minmax(0,1fr)!important}
  .service-detail-hero .service-detail-hero__panel>figure{min-height:200px}
  .archive-hero .archive-hero__stats{grid-template-columns:minmax(0,1fr)}
  .saj-generic-page--elementor .saj-page-entry{padding:14px}
}
@media(max-width:359px){.saj-doctor-archive .physician-grid{grid-template-columns:minmax(0,1fr)}}
