/* 1. Sticky header: solid near-black background so page content doesn't show
   through while scrolling. Homepage header is a <header> element; inner pages
   use the "header-pages" template part (a div containing the nav).
   :has(.wp-block-navigation) scopes the div selector to the header only, so the
   footer and post-meta strip keep their theme styling. */
header.wp-block-template-part,
header.wp-block-template-part > .wp-block-group,
div.wp-block-template-part:has(.wp-block-navigation) {
  background-color: #0a0a0a;
}

/* 2. White text on the dark header (inner pages don't inherit it from the theme). */
header.wp-block-template-part,
header.wp-block-template-part :is(a, p, span, li),
div.wp-block-template-part:has(.wp-block-navigation),
div.wp-block-template-part:has(.wp-block-navigation) :is(a, p, span, li) {
  color: #ffffff;
}

/* 3. Desktop nav: comfortable spacing between items. */
@media (min-width: 769px) {
  .wp-block-template-part .wp-block-navigation__container {
    gap: 24px !important;
  }
}

/* 4. Mobile: header nav as a compact horizontal wrapping row. */
@media (max-width: 768px) {
  .wp-block-template-part .wp-block-navigation__container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    row-gap: 12px !important;
    align-items: center;
    justify-content: flex-start;
  }
  .wp-block-template-part .wp-block-navigation {
    font-size: 12px;
    line-height: 1.6;
  }
  .wp-block-template-part .wp-block-navigation .wp-block-navigation-item {
    margin: 0;
  }
  .wp-block-template-part > .wp-block-group > .wp-block-group.alignfull {
    flex-wrap: wrap !important;
    row-gap: 12px;
  }
}

/* 5. Mobile homepage only: header scrolls away instead of staying pinned.
   Articles keep the sticky header; desktop unchanged. */
@media (max-width: 768px) {
  body.home header.wp-block-template-part,
  body.home header.wp-block-template-part .wp-block-group {
    position: static !important;
  }
}

/* Homepage: pop cover titles over featured images */
body.home .wp-block-cover .wp-block-post-title {
  text-shadow:
    -1px -1px 0 rgba(0,0,0,0.9),
    1px -1px 0 rgba(0,0,0,0.9),
    -1px 1px 0 rgba(0,0,0,0.9),
    1px 1px 0 rgba(0,0,0,0.9),
    0 3px 10px rgba(0,0,0,0.85);
}
.wp-block-post-content a {
  color: #8a6100;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container {
background-color: #141414 !important;
border: 1px solid #2e2e2e;
}
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
color: #ffffff !important;
}
.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
color: #e8b24b !important;
}
@media (min-width: 782px) {
header .wp-block-navigation {
font-size: 18px;
}
header .wp-block-navigation__container {
column-gap: 18px;
}
}
header .wp-block-site-logo img {
width: 44px;
height: auto;
}
header .wp-block-site-title {
font-size: 24px;
}
@media (min-width: 782px) {
.wp-block-template-part .wp-block-navigation {
font-size: 18px;
}
.wp-block-template-part .wp-block-navigation__container {
column-gap: 18px;
}
}
.wp-block-template-part .wp-block-site-logo img {
width: 44px;
height: auto;
}
.wp-block-template-part .wp-block-site-title {
font-size: 24px;
}
/* Article titles: loosen tight letters, add word space */
.wp-block-post-title {
  letter-spacing: -0.02em;
  word-spacing: 0.06em;
}
.wp-block-post-content {
  word-spacing: 0.03em;
}
.wp-block-post-content h2,
.wp-block-post-content h3 {
  letter-spacing: normal;
}
/* Featured images on articles: show the whole image, no 4:3 crop */
.single-post .wp-block-post-featured-image img {
  aspect-ratio: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

