/* Public homepage navigation, scoped to avoid the legacy WordPress theme UI.
   Keep dimensions and breakpoints aligned with assets/css/free-astra.css.
   Menu, reading progress and auth state use the existing public-site scripts. */
body.scrively-blog-midnight .blog-site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0;
  background: #fffffffa;
  border-bottom: 1px solid #d5e3da;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #203d36;
  font: 800 16px/1.7 'Nunito Sans', system-ui, sans-serif;
  transition: box-shadow .2s;
}
.blog-site-header, .blog-site-header * { box-sizing: border-box; }
.blog-site-header::after {
  content: '';
  position: absolute;
  inset: auto 0 -2px;
  height: 3px;
  background: linear-gradient(90deg, #f58a7f 0 34%, #ffdc79 34% 67%, #9ccdb6 67%);
  opacity: .75;
  pointer-events: none;
}
body.scrively-blog-midnight .blog-site-header.scrolled { box-shadow: 0 7px 24px #203d3610; }
.blog-site-header .reading-progress {
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #176d54;
  transform: scaleX(0);
  transform-origin: left;
  pointer-events: none;
}
.blog-site-header__wrap { width: min(100% - 64px, 1160px); margin-inline: auto; }
.blog-site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; gap: 24px; }
.blog-site-header a { color: inherit; text-decoration: none; }
.blog-site-header__logo { display: flex; align-items: center; min-height: 48px; flex-shrink: 0; }
.blog-site-header .logo-svg { display: block; width: 157px; height: 42px; }
.blog-site-header__links { display: flex; align-items: center; gap: 22px; }
.blog-site-header__explore { display: flex; align-items: center; }
.blog-site-header__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  font: inherit;
  white-space: nowrap;
  text-decoration: underline !important;
  text-decoration-color: transparent !important;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px !important;
  transition: color .2s, text-decoration-color .2s;
}
.blog-site-header__explore .blog-site-header__link { padding: 0 12px; border-radius: 8px; }
.blog-site-header__link:hover { color: #176d54; text-decoration-color: #176d54 !important; }
.blog-site-header__explore .blog-site-header__link:hover { background: #edf7f1; text-decoration-color: transparent !important; }
.blog-site-header__account { border-left: 1px solid #d5e3da; padding-left: 22px; }
.blog-site-header a.blog-site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid #176d54;
  border-radius: 999px;
  background: #176d54;
  box-shadow: 0 3px 0 #0d4c3c;
  color: #fff;
  font: 800 16px/1.4 'Nunito Sans', system-ui, sans-serif;
  text-align: center;
  white-space: nowrap;
  transition: background .16s, transform .16s, box-shadow .16s;
}
.blog-site-header a.blog-site-header__cta:hover { background: #10583f; transform: translateY(-2px); }
.blog-site-header a.blog-site-header__cta:active { transform: translateY(0); box-shadow: none; }
.blog-site-header__cta img { display: block; width: 20px; height: 20px; flex: 0 0 20px; filter: brightness(0) invert(1); transition: transform .2s; }
.blog-site-header__cta:hover img { transform: translateX(4px); }
.blog-site-header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  padding: 0;
  background: #fff;
  border: 1px solid #d5e3da;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.blog-site-header__burger img { display: block; width: 24px; height: 24px; }
.blog-site-header__burger:hover { background: #eaf8f2; border-color: #7eae97; }
.blog-site-header__burger:active { transform: scale(.95); }
.blog-site-header :focus-visible { outline: 3px solid #ac4e25 !important; outline-offset: 5px !important; }
/* The header now occupies its own row instead of floating over the artwork. */
body.scrively-blog-midnight .blog_featured,
body.scrively-blog-midnight .search_post,
body.scrively-blog-midnight .search_post_404,
body.scrively-blog-midnight .single_head { padding-top: 40px !important; }
body.admin-bar.scrively-blog-midnight .blog-site-header { top: 32px; }
@media (max-width: 800px) {
  .blog-site-header__wrap { width: calc(100% - 40px); }
  .blog-site-header__inner { min-height: 72px; }
  .blog-site-header .logo-svg { width: 139px; height: 37px; }
  .blog-site-header__links { gap: 20px; }
}
@media (max-width: 782px) {
  body.admin-bar.scrively-blog-midnight .blog-site-header { top: 46px; }
}
@media (max-width: 700px) {
  .blog-site-header__burger { display: flex; }
  .blog-site-header__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 16px 24px 24px;
    max-height: calc(100dvh - var(--nav-height, 73px));
    overflow-y: auto;
    background: #fff;
    border-bottom: 1px solid #d5e3da;
    box-shadow: 0 12px 24px #203d3614;
  }
  .blog-site-header.open .blog-site-header__links { display: flex; flex-direction: column; align-items: stretch; gap: 12px; animation: blog-menu-reveal .2s ease-out; }
  .blog-site-header__explore { display: block; }
  .blog-site-header__link { justify-content: center; }
  .blog-site-header__account { border-left: 0; border-top: 1px solid #d5e3da; padding: 12px 0 0; }
  body.scrively-blog-midnight .blog_featured,
  body.scrively-blog-midnight .search_post,
  body.scrively-blog-midnight .search_post_404,
  body.scrively-blog-midnight .single_head { padding-top: 24px !important; }
}
@media (max-width: 600px) {
  /* WordPress's mobile admin bar scrolls away rather than staying fixed. */
  body.admin-bar.scrively-blog-midnight .blog-site-header { top: 0; }
}
@media (max-width: 560px) {
  .blog-site-header__wrap { width: calc(100% - 32px); }
  .blog-site-header__inner { min-height: 68px; gap: 16px; }
  .blog-site-header .logo-svg { width: 136px; height: 36px; }
  .blog-site-header__links { padding: 12px 20px 20px; }
  .blog-site-header.open .blog-site-header__links { gap: 8px; }
}
@keyframes blog-menu-reveal { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .blog-site-header, .blog-site-header * { animation: none !important; transition: none !important; }
}
