/* Compact internal headings, matching Cia da Praia's search-page-heading-copy.
   Home hero, navigation, article content and dialog headings keep their styles. */
:root {
  --santafe-page-title-size: 1.8rem;
  --santafe-page-heading-space: 20px;
}

body {
  --santafe-page-header-offset: 0px;
}

body:has(> .site-header) {
  --santafe-page-header-offset: var(--site-header-height, 88px);
}

body:not(.home-page) #conteudo :is(
  .search-page-heading-copy,
  .institutional-title-band,
  .blog-title-band,
  .post-heading,
  .favorites-title-band,
  .favorites-heading,
  .developments-title-band,
  .development-hero-content,
  .neighborhood-guide-heading,
  .neighborhood-hero-copy,
  .listed-title-band,
  .property-detail-header,
  .property-overview,
  .property-comparison-title-band,
  .detail-not-found,
  .development-not-found,
  .neighborhood-not-found,
  .blog-empty
) h1 {
  margin: 0;
  font-family: inherit;
  font-size: var(--santafe-page-title-size);
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

body:not(.home-page) #conteudo :is(
  .search-page-heading-copy,
  .institutional-title-band,
  .blog-title-band,
  .post-heading,
  .favorites-title-band,
  .favorites-heading,
  .developments-title-band,
  .development-hero-content,
  .neighborhood-guide-heading,
  .neighborhood-hero-copy,
  .listed-title-band,
  .property-detail-header,
  .property-overview,
  .property-comparison-title-band,
  .detail-not-found,
  .development-not-found
) .eyebrow {
  margin: 0 0 6px;
  line-height: 1;
  transform: none;
}

/* Reserve the fixed navigation height only once, on the main element.
   Shared lists and embedded property pages without a header reserve no space. */
body:not(.home-page) #conteudo:is(
  .search-page,
  .institutional-page,
  .blog-page,
  .development-page,
  .developments-listing-page,
  .favorites-page,
  .neighborhood-guide-page,
  .neighborhood-detail-page,
  .property-detail-page,
  .property-comparison-page,
  .listed-page
) {
  padding-top: var(--santafe-page-header-offset);
}

body:not(.home-page) #conteudo :is(
  .search-page-header,
  .institutional-title-band,
  .blog-title-band,
  .post-title-band,
  .favorites-title-band,
  .developments-title-band,
  .listed-title-band,
  .neighborhood-guide-heading,
  .neighborhood-detail-hero,
  .property-comparison-title-band
) {
  padding: var(--santafe-page-heading-space) 0;
}

body:not(.home-page) #conteudo :is(
  .institutional-lead,
  .blog-title-band > .container > p:not(.eyebrow),
  .favorites-title-band > .container > p:not(.eyebrow),
  .developments-title-band > .container > p:not(.eyebrow),
  .listed-title-band > .container > p:not(.eyebrow),
  .neighborhood-guide-heading > .container > p:not(.eyebrow),
  .property-comparison-title-band > .container > p:not(.eyebrow)
) {
  margin: 8px 0 0;
  font-size: .9rem;
  line-height: 1.5;
}

body:not(.home-page) #conteudo .favorites-content {
  padding-top: var(--santafe-page-heading-space);
}

body:not(.home-page) #conteudo .favorites-heading {
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
}

body:not(.home-page) #conteudo .development-title-band-content {
  min-height: 0;
  gap: 12px;
  padding-block: 12px;
}

body:not(.home-page) #conteudo .development-hero-content {
  gap: 16px;
  padding-block: var(--santafe-page-heading-space);
}

body:not(.home-page) #conteudo .property-title-band {
  margin-bottom: 20px;
  padding-block: 12px;
}

body:not(.home-page) #conteudo .property-detail-header {
  gap: 16px;
}

body:not(.home-page) #conteudo .post-heading nav {
  margin: 0 0 10px;
}

body:not(.home-page) #conteudo .post-heading > time {
  margin: 8px 0 0;
}

body:not(.home-page) #conteudo .neighborhood-breadcrumb {
  margin-bottom: 12px;
}

body:not(.home-page) #conteudo .neighborhood-hero-copy :is(.neighborhood-location, .neighborhood-description) {
  margin: 12px 0;
  font-size: .9rem;
  line-height: 1.5;
}

body:not(.home-page) #conteudo :is(
  .detail-not-found,
  .development-not-found,
  .neighborhood-not-found,
  .blog-empty:has(> h1)
) {
  min-height: 0;
  padding-block: var(--santafe-page-heading-space);
}

@media (max-width: 699px) {
  :root {
    --santafe-page-heading-space: 16px;
  }
}

@media (max-width: 979px) {
  body:has(> .site-header) {
    --santafe-page-header-offset: var(--site-header-height, 72px);
  }
}
