/* ===== Minecraft Moscow — minimal supplement =====
   Only adds: (1) site-specific header logo positioning that wasn't bundled
              (2) tiny fix when XF JS fails to init dropdowns
   XF skin bundle (css.css / css_xf_addons.css) does the heavy lifting. */

/* === Site-specific header positioning ===
   #logo / #logo2 / #logo3 are pages.minecraft-moscow.com-specific. The XF
   moscow skin's bundle covers .moscow_wrapper, .navTabs, .publicTabs etc.
   But the wooden-sign positioning is a per-site customisation that isn't
   in the bundle CSS — we re-create it here. */
#header { position: relative; }
#logoBlock .pageWidth { max-width: 1180px; margin: 0 auto; padding: 0 10px; position: relative; min-height: 220px; }
#logoBlock .pageContent { position: relative; height: 220px; }
#logo { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 5; }
#logo img { max-width: 540px; height: auto; display: block; }
#logo2, #logo3 { position: absolute; top: 30px; z-index: 4; }
#logo2 { left: 0; }
#logo3 { right: 0; }
#logo2 a, #logo3 a { display: block; width: 180px; height: 130px; position: relative; }
#begin { background: url('/styles/moscow/images/game.png') no-repeat; background-size: contain; width: 180px; height: 130px; }
#vote { width: 180px; height: 130px; }
#vote img { width: 180px; height: 130px; display: block; }

/* "Войти или зарегистрироваться" top-right */
.loginBar, #loginBar { color: #fff; }

/* === Defensive: ensure articles grid does not stack vertically if JS masonry fails ===
   XF Mason layout needs masonry.js init; without it, articleItem renders as inline-block
   (XF bundle does this) but with no width constraint. Provide max-width fallback only. */
.ArticlesMason.articlesGrid .articleItem { max-width: 33%; }

/* === Defensive: if bxSlider JS fails to init, only show first slide ===
   Slider items use plain <li>'s. XF skin styles them but doesn't hide non-active. */
.EWRporta_slider .bxslider > li:nth-child(n+2):not(.bx-clone) { display: none; }

/* === Header background image (sky + houses).  Bundle background-color only,
   not the actual image. */
html.Public, body { background: #28281f url('/styles/moscow/backgrounds/bg1.jpg') no-repeat top center / 100% auto fixed; }

/* === Nav dropdown hover (pure-CSS fallback) ===
   XF JS Popup uses click handlers + classes. On a static restore the
   handler isn't bound, so dropdowns never open.  CSS hover gives a
   reasonable static fallback.  feedback_spry_menu_css_hover.md applies
   the same pattern for legacy Spry menus. */
nav .navTab.Popup .tabLinks,
nav .navTab.Popup .Menu.JsOnly { display: none; position: absolute; top: 100%; left: 0; z-index: 1000; min-width: 220px; }
nav .navTab.Popup:hover .tabLinks,
nav .navTab.Popup:hover .Menu.JsOnly { display: block; }

/* === Mobile responsive — XF bundle has its own media queries but lacks
   our wooden-sign 480px collapse. */
@media (max-width: 600px) {
    #logo2, #logo3 { display: none; }
    #logo img { max-width: 280px; }
}
