/* ==========================================================================
   Yeon Lab — Navbar banner (stable version)
   ========================================================================== */

/* Banner navbar background */
nav.navbar.navbar-custom,
nav.navbar.navbar-custom.top-nav-regular,
nav.navbar.navbar-custom.top-nav-short,
nav.navbar.navbar-custom.top-nav-short-permanent {
  background: none !important;

  background-image: url("/assets/img/header-2.png") !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;

  /* banner size */
  min-height: 125px !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;

  border-bottom: 3px solid rgba(0, 0, 0, 0.12) !important;

  /* No longer fixed — flows with the page */
  position: relative !important;
}

/* Dark overlay for readability */
nav.navbar.navbar-custom::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

/* Keep navbar contents above overlay */
nav.navbar.navbar-custom > * {
  position: relative;
  z-index: 1;
}

/* Brand + links readable on banner */
nav.navbar.navbar-custom .navbar-brand,
nav.navbar.navbar-custom .navbar-nav .nav-link,
nav.navbar.navbar-custom .navbar-toggler {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  font-weight: 800;
  line-height: 1.1 !important;
}

/* sizes */
nav.navbar.navbar-custom .navbar-brand {
  font-size: 1.6rem !important;
}
nav.navbar.navbar-custom .navbar-nav .nav-link {
  font-size: 1.05rem !important;
  padding-top: 13px !important;
  padding-bottom: 13px !important;
}

/* Toggler visibility */
nav.navbar.navbar-custom .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.55) !important;
}
nav.navbar.navbar-custom .navbar-toggler-icon {
  filter: invert(1) contrast(2);
}

/* Dropdown readable */
nav.navbar.navbar-custom .dropdown-menu {
  background: #ffffff !important;
}
nav.navbar.navbar-custom .dropdown-menu .dropdown-item {
  color: #222 !important;
  text-shadow: none !important;
}

/* Hide logo image brand */
nav.navbar.navbar-custom .navbar-brand-logo {
  display: none !important;
}

/* ==========================================================================
   Top banner (above the page title) — opt-in via page front matter `top-banner`
   ========================================================================== */
.page-top-banner {
  max-width: 1000px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 15px;
  text-align: center;
}

.page-top-banner .page-top-banner-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

@media (max-width: 768px) {
  .page-top-banner {
    max-width: 100%;
  }
}

/* ==========================================================================
   FIX: Remove old margin-top that compensated for fixed-top navbar.
   Now the navbar is in normal document flow, so no top margin is needed.
   ========================================================================== */
.intro-header {
  margin-top: 0 !important;
}
.intro-header.big-img {
  margin-top: 0 !important;
}
nav.top-nav-short-permanent ~ header > .intro-header {
  margin-top: 0 !important;
}
nav.top-nav-short-permanent ~ header > .intro-header.big-img {
  margin-top: 0 !important;
}

/* ==========================================================================
   FIX: Reduce the gap between banner and page title (~50% of original)
   Original margin-bottom was 2.1875rem (~35px) → now ~1rem (~16px)
   Original page-heading h1 font-size was 3.125rem → kept, but tighten margins
   ========================================================================== */
.intro-header {
  margin-bottom: 1rem !important;
}

.intro-header .page-heading h1,
.intro-header .post-heading h1 {
  margin-top: 0 !important;
  margin-bottom: 0.4rem !important;
}

.intro-header .page-heading .page-subheading,
.intro-header .post-heading .post-subheading {
  margin-top: 0.3rem !important;
}

/* Also tighten the header-section wrapper itself */
.header-section {
  margin-bottom: 0 !important;

   }

/* ==========================================================================
   FIX: Center page content with equal left/right margins
   Cap the content width and auto-center it on wide screens.
   ========================================================================== */
main.container-fluid.fullwidth-pad > .row {
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}
  padding-bottom: 0 !important;
}

.intro-header {
  margin-bottom: 1rem !important;
}

/* ==========================================================================
   FIX: Shrink page title to 50% on Today's Paper detail pages and Wiki
   glossary term pages (paper-post.html / glossary-term.html layouts,
   both marked with the "title-sm" class via header.html's class param)
   ========================================================================== */
.intro-header .title-sm h1 {
  font-size: 1.5625rem !important; /* 50% of base 3.125rem */
}
@media (min-width: 1200px) {
  .intro-header .title-sm h1 {
    font-size: 2.5rem !important; /* 50% of large-breakpoint 5rem */
  }
}
