/* Güneş Uygarlığı — mobile navigation layering fix
 * =================================================
 * Bug (measured 2026-10-30, mobile 390×844): on pages whose content sits in a
 * second `.container`, the open hamburger drawer slipped *under* the content
 * cards — books, akademi, stats, manifesto, contact, donate, solarcity,
 * solarvillage, join and the generated haberler page. Menu links were painted
 * over by the orange price cards and the book panels.
 *
 * Cause: `.mobile-nav` is `position: fixed; z-index: 9998`, but it lives inside
 * the hero's `.container`, which is `position: relative; z-index: 1`. That
 * ancestor creates a stacking context, so the drawer's 9998 only orders it
 * *inside* a context that paints at z-index 1. The content block that follows
 * is another `.container` with the same z-index 1 — equal z-index, later in
 * document order, so it paints on top of the drawer.
 *
 * Fix: lift the hero (the drawer's stacking context) above the content blocks,
 * order the drawer and its overlay explicitly, and make the drawer opaque — at
 * rgba(…,0.85) the cards bled through the panel even once it was on top, and
 * lite mode kills backdrop-filter so a blur could not save it.
 *
 * Loaded by every page that has a drawer, after css/lite-mode.css.
 */
.hero-section {
  position: relative;
  z-index: 9990;          /* above the content .container blocks (z-index: 1) */
}
.mobile-nav-overlay { z-index: 10040; }
.mobile-nav {
  z-index: 10050;
  background: #FFFDFA;    /* opaque: nothing bleeds through, lite mode included */
  backdrop-filter: blur(24px) saturate(1.15);
}
[data-theme="dark"] .mobile-nav { background: #0E1230; }

/* Floating widgets outrank the drawer's stacking context and poked through it:
   #gunes-chat-bubble is z-index 999999 and #gunesLiteBtn 9999, both body-level,
   measured on books.html 2026-10-30. While the drawer is open it owns the
   screen — hide them instead of escalating a z-index arms race. */
body:has(.mobile-nav.open) #gunes-chat-bubble,
body:has(.mobile-nav.open) #gunesLiteBtn { visibility: hidden !important; }

/* An open drawer owns the screen: don't let the page scroll underneath. */
body:has(.mobile-nav.open) { overscroll-behavior: contain; }
