/*
 * ONE WORLD BALANCE
 * Proposed 10.09.26.03
 * Sticky navigation and homepage entrance simplification.
 * Local visual preview only.
 */

/*
 * 10.09.26.03 FOUR-ROW GRID CORRECTION
 *
 * The sticky navigation adds a fourth direct child to .site.
 * Keep navigation, header and footer at natural height.
 * Allow only main content to use the flexible grid row.
 */

.site {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}
.owb-sticky-navigation {
  position: sticky;
  top: 0;
  z-index: 90;
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--soft-line, #d7dce2);
  box-shadow: 0 0.15rem 0.45rem rgba(23, 47, 80, 0.09);
}

.owb-sticky-navigation-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--page-width));
  margin-inline: auto;
  padding: 0.4rem 0;
}

.owb-sticky-navigation .wordmark {
  flex: 0 0 auto;
  white-space: nowrap;
}

.owb-sticky-navigation .site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
  margin: 0;
}

.owb-sticky-navigation .site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.15rem;
}

/* Star banner and fundraising statistics remain in the original header. */
.site > .site-header {
  padding-top: 0;
}

/* Offset anchor targets for sticky navigation. */
html {
  scroll-padding-top: 5rem;
}

#main-content {
  scroll-margin-top: 5rem;
}

/* Compact the homepage after removing the entrance map. */
body.gateway-body .site-main {
  padding-block: clamp(2rem, 4vw, 4rem);
}

body.gateway-body .gateway-actions {
  margin-top: clamp(0.85rem, 2vw, 1.5rem);
}

@media (max-width: 64rem) {
  .owb-sticky-navigation-inner {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.1rem 0.75rem;
  }

  .owb-sticky-navigation .site-nav {
    justify-content: flex-start;
    gap: 0.15rem 0.7rem;
  }
}

@media (max-width: 42rem) {
  .owb-sticky-navigation-inner {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0.25rem 0;
  }

  .owb-sticky-navigation .wordmark {
    align-self: flex-start;
    min-height: 1.8rem;
    font-size: 0.75rem;
  }

  .owb-sticky-navigation .site-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.1rem 0.45rem;
  }

  .owb-sticky-navigation .site-nav a {
    min-height: 2.75rem;
    padding: 0.2rem 0.1rem;
    font-size: 0.7rem;
    letter-spacing: 0.035em;
  }

  .site > .site-header {
    padding-top: 0 !important;
  }

  html {
    scroll-padding-top: 9rem;
  }

  #main-content {
    scroll-margin-top: 9rem;
  }
}
