/* Mandatory category masthead geometry. See docs/CATEGORY-LAYOUT-SYSTEM.md. */
:root{
  --site-category-hero-height:350px;
  --site-category-shell:min(1280px,calc(100% - 96px));
}

:is(
  html body main.tc-core-page>.tc-hero,
  html body main.tc-overview-page>.tc-hero,
  html body main.tc-directory-page>.tc-juri-hero,
  html body.identity-directory-page main>.formation-hero,
  html body.application-page main>.service-hero,
  html body.global-education-page-body main>.education-hero,
  html body.settlement-page-body main>.settlement-hero,
  html body.insight-category-page main>.insight-news-hero
){
  box-sizing:border-box!important;
  width:100%!important;
}

:is(
  html body main.tc-core-page>.tc-hero,
  html body main.tc-overview-page>.tc-hero,
  html body main.tc-directory-page>.tc-juri-hero,
  html body.identity-directory-page main>.formation-hero,
  html body.application-page main>.service-hero,
  html body.global-education-page-body main>.education-hero,
  html body.settlement-page-body main>.settlement-hero,
  html body.insight-category-page main>.insight-news-hero
)>.shell{
  width:var(--site-category-shell)!important;
  margin-inline:auto!important;
}

/* Category body content aligns with the same homepage and masthead shell. */
:is(
  html body.identity-directory-page main>.citizenship-directory,
  html body.identity-directory-page main>.page-cta
)>.shell{
  width:var(--site-category-shell)!important;
  margin-inline:auto!important;
}

/* Contact belongs in the shared section navigation, never in a masthead. */
html body:not(.home-page) main>section:first-child a:is(
  [href="/contact-us"],
  [href="/c/corporate-contact.html"]
){
  display:none!important;
}

@media(min-width:1001px){
  :is(
    html body main.tc-core-page>.tc-hero,
    html body main.tc-overview-page>.tc-hero,
    html body main.tc-directory-page>.tc-juri-hero,
    html body.identity-directory-page main>.formation-hero,
    html body.application-page main>.service-hero,
    html body.global-education-page-body main>.education-hero,
    html body.settlement-page-body main>.settlement-hero,
    html body.insight-category-page main>.insight-news-hero
  ){
    height:var(--site-category-hero-height)!important;
    min-height:var(--site-category-hero-height)!important;
    max-height:var(--site-category-hero-height)!important;
  }

  :is(
    html body main.tc-core-page>.tc-hero>.tc-hero-inner,
    html body main.tc-overview-page>.tc-hero>.tc-hero-inner,
    html body main.tc-directory-page>.tc-juri-hero>.tc-juri-hero-inner,
    html body.identity-directory-page main>.formation-hero>.shell,
    html body.application-page main>.service-hero>.shell,
    html body.global-education-page-body main>.education-hero>.education-hero-inner,
    html body.settlement-page-body main>.settlement-hero>.settlement-hero-inner,
    html body.insight-category-page main>.insight-news-hero>.shell
  ){
    box-sizing:border-box!important;
    height:var(--site-category-hero-height)!important;
    min-height:var(--site-category-hero-height)!important;
    max-height:var(--site-category-hero-height)!important;
  }

  html body.application-page main>.service-hero .service-hero-copy>p:not(.service-label){
    margin-bottom:10px!important;
  }
}

@media(max-width:1280px){
  :root{
    --site-category-shell:min(1180px,calc(100% - 48px));
  }
}

@media(max-width:1000px){
  :is(
    html body main.tc-core-page>.tc-hero,
    html body main.tc-overview-page>.tc-hero,
    html body main.tc-directory-page>.tc-juri-hero,
    html body.identity-directory-page main>.formation-hero,
    html body.application-page main>.service-hero,
    html body.global-education-page-body main>.education-hero,
    html body.settlement-page-body main>.settlement-hero,
    html body.insight-category-page main>.insight-news-hero
  ){
    height:auto!important;
    min-height:var(--site-category-hero-height)!important;
    max-height:none!important;
  }

  :is(
    html body main.tc-core-page>.tc-hero>.tc-hero-inner,
    html body main.tc-overview-page>.tc-hero>.tc-hero-inner,
    html body main.tc-directory-page>.tc-juri-hero>.tc-juri-hero-inner,
    html body.identity-directory-page main>.formation-hero>.shell,
    html body.application-page main>.service-hero>.shell,
    html body.global-education-page-body main>.education-hero>.education-hero-inner,
    html body.settlement-page-body main>.settlement-hero>.settlement-hero-inner,
    html body.insight-category-page main>.insight-news-hero>.shell
  ){
    height:auto!important;
    min-height:var(--site-category-hero-height)!important;
    max-height:none!important;
  }
}

@media(max-width:760px){
  :root{
    --site-category-shell:calc(100% - 32px);
  }
}
