/**
 * Navigation styles (mobile-first)
 */

/* Body padding reset */
body {
  padding: 0;
}

/* Header wrapper - full width */
.bn-header-wrapper {
  width: 100%;
  background-color: transparent;
}

/* Legacy header - keeping for backward compatibility */
.bn-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 1rem var(--wp--preset--spacing--md);
  gap: var(--wp--preset--spacing--md);
  color: #ffffff;
  background-color: transparent;
  width: 100%;
  max-width: 100%;
  /* Sticky behavior */
  position: sticky; /* fallback; JS will switch to fixed for robustness */
  top: 0;
  z-index: 1000;
  transition:
    padding 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

/* Pre-scroll header: tagline left, logo center, menu right */
.bn-header-bar-pre-scroll {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
  padding: 1rem var(--wp--preset--spacing--md);
  gap: var(--wp--preset--spacing--md);
  color: #ffffff;
  background-color: #484848;
  width: 100%;
  max-width: 100%;
  z-index: 1000;
  transition:
    opacity 0.3s ease,
    background-color 0.2s ease;
}

/* Transparent background on hero pages */
body.has-hero-issue .bn-header-bar-pre-scroll,
body.has-hero-header .bn-header-bar-pre-scroll {
  background-color: transparent;
}

/* Float pre-scroll header over hero on pages with a hero */
body.has-hero-issue .bn-header-wrapper,
body.has-hero-header .bn-header-wrapper {
  position: relative;
}

body.has-hero-issue .bn-header-bar-pre-scroll,
body.has-hero-header .bn-header-bar-pre-scroll {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Hide pre-scroll header when scrolled */
.bn-header-bar-pre-scroll.is-hidden {
  opacity: 0;
  pointer-events: none;
}

/* Pre-scroll header: three-column layout positioning */
.bn-header-bar-pre-scroll .bn-header-tagline {
  justify-self: start;
}

.bn-header-bar-pre-scroll .bn-header-logo {
  justify-self: center;
}

.bn-header-bar-pre-scroll .bn-header-right {
  justify-self: end;
  margin-left: 0;
}

/* After-scroll header: logo left, menu right */
.bn-header-bar-after-scroll {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.5rem var(--wp--preset--spacing--md);
  gap: var(--wp--preset--spacing--md);
  color: #ffffff;
  background-color: #484848;
  width: 100%;
  max-width: 100%;
  z-index: 9999;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-100%);
  opacity: 0;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease,
    padding 0.2s ease,
    box-shadow 0.2s ease;
}

/* Show after-scroll header when visible */
.bn-header-bar-after-scroll.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Admin bar offset for after-scroll header */
.admin-bar .bn-header-bar-after-scroll {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .bn-header-bar-after-scroll {
    top: 46px;
  }
}

/* Compact logo in after-scroll header */
.bn-header-bar-after-scroll .bn-header-logo img,
.bn-header-bar-after-scroll .bn-header-logo svg {
  max-height: 32px;
}

.bn-header-tagline {
  margin: 0;
  font-size: 0.85rem;
  color: #ffffff;
  opacity: 0.9;
  line-height: 1.2;
  flex-shrink: 0;
  white-space: nowrap;
}

.bn-header-logo {
  position: static;
  flex-shrink: 0;
}

.bn-header-logo img,
.bn-header-logo svg {
  max-height: 50px;
  width: auto;
  height: auto;
  display: block;
}

.bn-header-logo a {
  display: inline-block;
  vertical-align: middle;
  text-decoration: none;
}

.bn-header-logo .custom-logo-link {
  margin: 0;
}

.bn-header-logo .custom-logo-link img {
  max-height: 50px;
  width: auto;
  height: auto;
  display: block;
}

/* Compact state when stuck */
.bn-header-bar.is-stuck {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  padding: 0.5rem var(--wp--preset--spacing--md);
  position: fixed;
  background: #484848 !important;
}
.bn-header-bar.is-fixed {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
}
.admin-bar .bn-header-bar.is-fixed {
  top: 40px;
}
@media (max-width: 782px) {
  .admin-bar .bn-header-bar.is-fixed {
    top: 46px;
  }
}
.bn-header-bar.is-stuck .bn-header-logo img,
.bn-header-bar.is-stuck .bn-header-logo svg {
  max-height: 32px;
}

.bn-header-right {
  display: flex;
  align-items: center;
  gap: var(--wp--preset--spacing--md);
  margin-left: auto;
  flex-shrink: 0;
}

/* Primary row (under the top header) */
.bn-primary-row {
  background: #f2f2f2;
  color: #111111;
  display: none !important;
}

.bn-primary-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--wp--preset--spacing--sm);
  gap: var(--wp--preset--spacing--md);
}

.bn-primary-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.bn-primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bn-primary-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-primary-menu li + li {
  position: relative;
}

.bn-primary-menu li + li::before {
  content: "\2022";
  color: #999999;
  margin: 0 0.5rem;
}

.bn-primary-menu a {
  color: #111111;
  text-decoration: none;
}

.bn-primary-menu a:hover,
.bn-primary-menu a:focus-visible {
  text-decoration: underline;
}

.bn-primary-right {
  display: flex;
  align-items: center;
}

.bn-primary-all {
  color: #111111;
  text-decoration: none;
  font-weight: 600;
}

.bn-primary-all:hover,
.bn-primary-all:focus-visible {
  text-decoration: underline;
}

.bn-header-title {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--wp--preset--color--contrast);
  line-height: 1.2;
}

.bn-header-title:hover,
.bn-header-title:focus-visible {
  color: var(--wp--preset--color--primary);
}

.bn-header-nav-wrap {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

/* Header buttons container */
.bn-header-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Join and Donate buttons */
.bn-header-join-button,
.bn-header-donate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 6px;
  white-space: nowrap;
  border: 2px solid transparent;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.15s ease;
  text-transform: none;
  letter-spacing: normal;
}

.bn-header-join-button {
  background-color: #01a2e6;
  color: #ffffff;
}

.bn-header-join-button:hover,
.bn-header-join-button:focus-visible {
  background-color: transparent;
  border-color: #01a2e6;
  color: #ffffff;
  transform: scale(1.02);
}

.bn-header-donate-button {
  background-color: #ffd700;
  color: #000000;
}

.bn-header-donate-button:hover,
.bn-header-donate-button:focus-visible {
  background-color: transparent;
  border-color: #ffd700;
  color: #ffd700;
  transform: scale(1.02);
}

.bn-header-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.bn-header-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.bn-header-menu-item {
  display: flex;
}

.bn-header-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: #ffffff !important;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}
a.bn-header-menu-link,
.bn-header-buttons .bn-btn {
  font-family: var(--newspack-theme-font-heading);
}

.bn-header-menu-link:hover,
.bn-header-menu-link:focus-visible,
.bn-header-menu-link:visited,
.bn-header-menu-link:active {
  color: #ffffff !important;
  opacity: 0.8;
}

/* After-scroll header: style menu links as buttons (Grist-style) */
.bn-header-bar-after-scroll .bn-header-menu-link {
  display: inline-block;
  padding: 9px 14px;
  background-color: #ffffff;
  color: #484848 !important;
  border: 1px solid #ffffff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
  white-space: nowrap;
  opacity: 1;
  font-size: 0.625rem;
}

.bn-header-bar-after-scroll .bn-header-menu-link:hover,
.bn-header-bar-after-scroll .bn-header-menu-link:focus-visible {
  background-color: #f5821f;
  color: #ffffff !important;
  border-color: #f5821f;
  opacity: 1;
}

.bn-header-bar-after-scroll .bn-header-menu-link:visited,
.bn-header-bar-after-scroll .bn-header-menu-link:active {
  color: #484848 !important;
  opacity: 1;
}

.bn-header-bar-after-scroll .bn-header-menu-link:visited:hover,
.bn-header-bar-after-scroll .bn-header-menu-link:active:hover {
  color: #ffffff !important;
}

.bn-header-menu-link--cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid #ffffff;
  border-radius: 999px;
  color: #ffffff !important;
}

.bn-header-menu-link--cta:hover,
.bn-header-menu-link--cta:focus-visible,
.bn-header-menu-link--cta:visited,
.bn-header-menu-link--cta:active {
  color: #ffffff !important;
  border-color: #ffffff;
  opacity: 0.8;
}

.bn-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.bn-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

/* Search icon - simple magnifying glass without border */
.bn-header-search {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  padding: 0;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.bn-header-icon:hover,
.bn-header-icon:focus-visible {
  opacity: 0.8;
}

.bn-header-search:hover,
.bn-header-search:focus-visible {
  opacity: 1;
  transform: scale(1.2);
  background: transparent;
}

.bn-header-icon:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.bn-header-search:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 2px;
}

.bn-header-icon svg {
  width: 18px;
  height: 18px;
}

.bn-header-search svg {
  width: 36px;
  height: 36px;
}

@media (max-width: 1023px) {
  .bn-header-bar {
    flex-wrap: wrap;
    row-gap: var(--wp--preset--spacing--sm);
    padding: 1rem var(--wp--preset--spacing--sm);
  }

  .bn-header-bar-pre-scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: var(--wp--preset--spacing--sm);
    padding: 1rem var(--wp--preset--spacing--sm);
  }

  .bn-header-bar-pre-scroll .bn-header-tagline {
    order: 1;
  }

  .bn-header-bar-pre-scroll .bn-header-logo {
    order: 2;
  }

  .bn-header-bar-pre-scroll .bn-header-right {
    order: 3;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .bn-header-bar-pre-scroll .bn-header-nav-wrap {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .bn-header-bar-pre-scroll .bn-header-nav {
    justify-content: flex-start;
  }

  .bn-header-bar-pre-scroll .bn-header-menu {
    gap: 1rem;
  }

  /* Adjust button sizes for tablet */
  .bn-header-buttons {
    gap: 0.5rem;
  }

  .bn-header-join-button,
  .bn-header-donate-button {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
  }

  .bn-header-logo {
    order: 1;
    width: auto;
    text-align: left;
    margin-bottom: 0;
  }

  .bn-header-right {
    order: 2;
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .bn-header-nav-wrap {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .bn-header-nav {
    justify-content: flex-start;
  }

  .bn-header-menu {
    gap: 1rem;
  }
}

@media (max-width: 720px) {
  .bn-header-bar {
    align-items: flex-start;
    padding: 0.75rem var(--wp--preset--spacing--sm);
  }

  .bn-header-bar-pre-scroll {
    padding: 0.75rem var(--wp--preset--spacing--sm);
  }

  .bn-header-bar-pre-scroll .bn-header-logo img,
  .bn-header-bar-pre-scroll .bn-header-logo svg {
    max-height: 32px;
  }

  .bn-header-bar-pre-scroll .bn-header-nav-wrap {
    display: none;
  }

  /* Hide buttons on very small screens, show only search and hamburger */
  .bn-header-bar-pre-scroll .bn-header-buttons {
    display: none;
  }

  .bn-header-logo img,
  .bn-header-logo svg {
    max-height: 32px;
  }

  .bn-header-nav-wrap {
    display: none;
  }

  .bn-header-right {
    order: 2;
  }
}

/* Hide the primary menu on smaller mobile screens */
@media (max-width: 720px) {
  .bn-primary-center {
    display: none;
  }
  .bn-primary-inner {
    justify-content: flex-end;
  }
}

.bn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  min-height: 44px;
  min-width: 44px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.25rem;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease;
}

.bn-btn:active {
  transform: scale(0.97);
}

.bn-btn-join {
  background-color: var(--wp--preset--color--cyan);
  color: var(--wp--preset--color--base);
}

.bn-btn-join:hover,
.bn-btn-join:focus {
  background-color: #00a3c0;
}

.bn-btn-donate {
  background-color: var(--wp--preset--color--yellow);
  color: var(--wp--preset--color--base);
}

.bn-btn-donate:hover,
.bn-btn-donate:focus {
  background-color: #e6c100;
}

/* Hamburger */
.bn-hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  width: 44px;
  height: 44px;
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.2s ease;
}

.bn-hamburger:hover,
.bn-hamburger:focus {
  opacity: 1;
  transform: scale(1.2);
  background: transparent;
}

.bn-hamburger-line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #ffffff;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.bn-hamburger[aria-expanded="true"] .bn-hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.bn-hamburger[aria-expanded="true"] .bn-hamburger-line:nth-child(2) {
  opacity: 0;
}

.bn-hamburger[aria-expanded="true"] .bn-hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Topics row */
.bn-topics-row {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.bn-topics-nav {
  display: block;
}

.bn-topics-menu {
  display: flex;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-topics-menu li {
  flex-shrink: 0;
}

.bn-topics-menu a {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--wp--preset--color--base);
  background-color: var(--wp--preset--color--contrast);
  border-radius: 1rem;
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.bn-topics-menu a:hover,
.bn-topics-menu a:focus {
  background-color: var(--wp--preset--color--gray-200);
}

.bn-topics-menu .current-menu-item a {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/* Overlay menu */
.bn-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  overflow-y: auto;
  visibility: hidden;
  transition: visibility 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .bn-overlay {
    transition: none;
  }
  .bn-overlay-inner {
    transition: none;
  }
}

.bn-overlay[aria-hidden="false"] {
  visibility: visible;
}

/* Semi-transparent backdrop on desktop */
.bn-overlay::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.bn-overlay[aria-hidden="false"]::before {
  opacity: 1;
}

/* Slide-in panel */
.bn-overlay-inner {
  position: relative;
  width: 100%;
  min-height: 100vh;
  padding: var(--wp--preset--spacing--sm);
  background-color: #efefef;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 1;
}

.bn-overlay[aria-hidden="false"] .bn-overlay-inner {
  transform: translateX(0);
}

/* Close button - white circle with dark X, top-right overlapping */
.bn-overlay-close {
  position: fixed;
  top: var(--wp--preset--spacing--sm);
  right: -60px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  background: #ffffff;
  border: none;
  border-radius: 50%;
  color: #333333;
  cursor: pointer;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
  z-index: 10000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.bn-overlay-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
}

/* Admin bar offset for close button (mobile only - fixed positioning) */
@media (max-width: 767px) {
  .bn-overlay-close {
    right: 20px;
  }
  .admin-bar .bn-overlay-close {
    top: calc(32px + var(--wp--preset--spacing--sm));
    right: 20px;
  }
}
@media (max-width: 782px) {
  .admin-bar .bn-overlay-close {
    top: calc(46px + var(--wp--preset--spacing--sm));
    right: 20px;
  }
}

.bn-overlay-close:hover,
.bn-overlay-close:focus {
  opacity: 0.8;
  transform: scale(1.05);
  outline: 2px solid #333333;
  outline-offset: 2px;
}

.bn-overlay-content {
  display: flex;
  flex-direction: column;
  gap: var(--wp--preset--spacing--lg);
  padding-top: calc(
    var(--wp--preset--spacing--sm) + 48px + var(--wp--preset--spacing--sm)
  );
}

/* Intro text section */
.bn-overlay-intro {
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.bn-overlay-intro p {
  margin: 0 0 0.75rem 0;
}

.bn-overlay-intro p:last-child {
  margin-bottom: 0;
}

/* Search section */
.bn-overlay-search-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bn-overlay-search-label {
  display: block;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

.bn-overlay-search-form {
  width: 100%;
}

.bn-overlay-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #a6ce38;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  gap: 0.5rem;
}

.bn-overlay-search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #000000;
  width: 20px;
  height: 20px;
}

.bn-overlay-search-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

.bn-overlay-search-input {
  flex: 1;
  border: none;
  background: transparent;
  color: #333333;
  font-size: 1rem;
  padding: 0.25rem 0;
  outline: none;
  border: none !important;
}

.bn-overlay-search-input::placeholder {
  color: #999999;
}

.bn-overlay-search-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #000000;
  border: none;
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    transform 0.15s ease;
  flex-shrink: 0;
}

.bn-overlay-search-submit:hover,
.bn-overlay-search-submit:focus {
  background-color: #333333;
  outline: 2px solid #333333;
  outline-offset: 2px;
  transform: scale(1.05);
}

.bn-overlay-search-submit svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

/* Section labels and separators */
.bn-overlay-section-label {
  display: block;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0 0 0.75rem 0;
}

.bn-overlay-goto-separator,
.bn-overlay-topics-separator,
.bn-overlay-print-edition-separator {
  height: 1px;
  background: repeating-linear-gradient(
    to right,
    #333333 0,
    #333333 4px,
    transparent 4px,
    transparent 8px
  );
  margin-bottom: 1rem;
}

/* Go To section */
.bn-overlay-goto-section {
  display: flex;
  flex-direction: column;
}

.bn-overlay-goto-nav {
  display: block;
}

.bn-overlay-goto-menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-overlay-goto-menu li {
  margin: 0;
  list-style: none;
}

.bn-overlay-goto-menu a {
  display: block;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 0;
}

.bn-overlay-goto-menu a:hover,
.bn-overlay-goto-menu a:focus {
  color: #000000;
  text-decoration: underline;
}

/* Topics section */
.bn-overlay-topics-section {
  display: flex;
  flex-direction: column;
}

.bn-overlay-topics-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-overlay-topics-menu li {
  margin: 0;
}

.bn-overlay-topics-menu a {
  display: block;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.bn-overlay-topics-menu a:hover,
.bn-overlay-topics-menu a:focus {
  color: #000000;
  text-decoration: underline;
}

/* Print Edition section */
.bn-overlay-print-edition-section {
  display: flex;
  flex-direction: column;
}

.bn-overlay-print-edition-content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.bn-overlay-print-edition-cover {
  flex-shrink: 0;
}

.bn-overlay-print-edition-cover a {
  display: block;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.bn-overlay-print-edition-cover a:hover,
.bn-overlay-print-edition-cover a:focus {
  opacity: 0.85;
}

.bn-overlay-print-edition-cover img {
  max-width: 120px;
  width: 100%;
  height: auto;
  display: block;
}

.bn-overlay-print-edition-nav {
  display: block;
  flex: 1;
}

.bn-overlay-print-edition-menu {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-overlay-print-edition-menu li {
  margin: 0;
  list-style: none;
}

.bn-overlay-print-edition-menu a {
  display: block;
  color: #333333;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 0;
}

.bn-overlay-print-edition-menu a:hover,
.bn-overlay-print-edition-menu a:focus {
  color: #000000;
  text-decoration: underline;
}

/* Print Edition section - mobile responsive */
@media (max-width: 767px) {
  .bn-overlay-print-edition-content {
    flex-direction: column;
    gap: 1rem;
  }

  .bn-overlay-print-edition-cover {
    align-self: flex-start;
  }

  .bn-overlay-print-edition-cover img {
    max-width: 100px;
  }
}

/* Legacy popup menu styles (for backward compatibility) - only apply when not in overlay Go To section */
.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu,
.bn-popup-menu:not(.bn-overlay-goto-menu) {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu li,
.bn-popup-menu:not(.bn-overlay-goto-menu) li {
  margin-bottom: 0.5rem;
}

.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu a,
.bn-popup-menu:not(.bn-overlay-goto-menu) a {
  display: block;
  padding: 0.75rem 0;
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--wp--preset--color--base);
  transition: color 0.15s ease;
}

.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu a:hover,
.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu a:focus,
.bn-popup-menu:not(.bn-overlay-goto-menu) a:hover,
.bn-popup-menu:not(.bn-overlay-goto-menu) a:focus {
  color: var(--wp--preset--color--primary);
}

.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu .sub-menu,
.bn-popup-menu:not(.bn-overlay-goto-menu) .sub-menu {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.bn-popup-nav:not(.bn-overlay-goto-nav) .bn-popup-menu .sub-menu a,
.bn-popup-menu:not(.bn-overlay-goto-menu) .sub-menu a {
  font-size: 1rem;
  font-weight: 400;
}

/* Desktop enhancements */
@media (min-width: 768px) {
  .bn-btn {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
  }

  .bn-topics-menu a {
    font-size: 1rem;
  }

  /* Grist-style overlay: 40% width on desktop */
  .bn-overlay-inner {
    width: 40%;
    padding: var(--wp--preset--spacing--lg);
  }

  /* Close button positioned relative to overlay on desktop */
  .bn-overlay-close {
    position: absolute;
    top: var(--wp--preset--spacing--lg);
    right: -60px;
  }

  .bn-overlay-content {
    padding-top: 0;
  }

  /* Go To menu - 3 columns on larger screens */
  .bn-overlay-goto-menu {
    grid-template-columns: repeat(3, 1fr);
  }

  .bn-popup-menu a {
    font-size: 1.25rem;
  }
}

/* WordPress admin bar offset for sticky header */
.admin-bar .bn-header-bar {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .bn-header-bar {
    top: 46px;
  }
}

/* Spacer used to prevent layout shift when header becomes fixed */
.bn-header-spacer {
  height: 0;
}

/* Show primary row only on desktop (>=1024px) */
@media (max-width: 1023px) {
  .bn-primary-row {
    display: none;
  }
}
/* ==================== BN CONSOLIDATED PATCH (2025-10-21) ==================== */
:root {
  --bn-blue-500: #009ad9;
  --bn-green-300: #a6ce38;
  --bn-yellow: #ffcb04;
  --bn-orange: #f5821f;
  --bn-black: #111111;
}
/* buttons: circle fill (hover-in), text visible */
.bn-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 6px;
  padding: 9px 14px;
  font-weight: 700;
  border: 1px solid transparent;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}

.bn-btn > span {
  position: relative;
  z-index: 1;
  font-size: 0.625rem;
}

.bn-btn::before {
  display: none !important;
}

.bn-btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0);
  transform-origin: 50% 50%;
  transition: transform 0.35s ease;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.bn-btn--join {
  background: #009ad9;
  color: #fff;
  border-color: transparent;
}

.bn-btn--join::after {
  background: var(--bn-green-300);
}

.bn-btn--join:hover::after {
  transform: translate(-50%, -50%) scale(40);
}

.bn-btn--join:hover {
  color: #111;
  border-color: #7fb126;
}

.bn-btn--donate {
  background: var(--bn-yellow);
  color: #111;
  border-color: #e0b700;
}

.bn-btn--donate::after {
  background: var(--bn-orange);
}

.bn-btn--donate:hover::after {
  transform: translate(-50%, -50%) scale(40);
}

.bn-btn--donate:hover {
  color: #fff;
  border-color: #d06e18;
}
