/* MOSCAP Core asset — FluentSnippets "HEADER (CSS)" (15-header-css.php, run_at=wp_head)
   снипетээс 2026-11-22-нд нүүлгэсэн; includes/assets.php ачаална. Энэ толгойноос
   бусад код өөрчлөгдөөгүй.
*/

/* 2026-09-18: THIS FILE MUST BE LF (not CRLF) WHEN COMMITTED. Easy Code
   Manager's CodeRunner::parseBlock() splits a css/js snippet's docblock
   from its body on the exact string '// <Internal Doc End> ?>' . PHP_EOL
   -- \n on production's Linux PHP, \r\n on local Windows PHP. CRLF here
   broke this split silently on production (empty <style> output, no
   error anywhere) while working fine locally, since Local's PHP is a
   native Windows build needing \r\n. .gitattributes' `* text=auto` was
   meant to normalize this automatically but never actually renormalized
   this already-tracked blob -- confirmed via git cat-file. If you edit
   this file: keep the WORKING COPY as CRLF for local testing, but
   convert to LF (sed -i 's/\r$//') immediately before `git add`/commit,
   then restore CRLF locally afterward. Same bug likely applies to any
   other type:css/type:js snippet if it's ever re-saved with CRLF -- a
   scan confirmed all other such files are correctly LF as of this date. */
/* =============================================
   TRANSPARENT HEADER OVER SLIDER
============================================= */
.site-header {
    position: absolute;
    top: 41px;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent !important;
}

.site-content,
.site-main,
.entry-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.main-navigation,
.main-navigation .inside-navigation {
    background: transparent !important;
}

/* =============================================
   TRANSPARENT BACKGROUND FOR STICKY MENU
============================================= */
.sticky-enabled .main-navigation.is_stuck {
    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .2);
    background: rgba(10, 26, 47, 0.4) !important;
	backdrop-filter: blur(5px);
}

/* =============================================
   MENU ROW — vertical centering
============================================= */
.main-navigation .main-nav > ul {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

/* =============================================
   MENU LINKS
============================================= */
.main-navigation .main-nav ul li a {
    color: #fff !important;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
    padding-left: 12px;
    padding-right: 8px;
    line-height: 2.0;
    display: flex;
    align-items: center;
}

.main-navigation .main-nav ul li a:hover,
.main-navigation .main-nav ul li.current-menu-item a {
    color: #7FC4ED !important;
}

/* =============================================
   LOGO
============================================= */
.site-logo img {
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* =============================================
   BUTTON MENU ITEMS (Login / Register)
============================================= */
.main-navigation .main-nav ul li.nav-btn {
    margin-left: 24px;
}

.main-navigation .main-nav ul li.nav-btn a {
    border: 2px solid #006EB4;
    padding: 10px 10px !important;
    border-radius: 0;
    transition: all 0.3s ease;
}

.main-navigation .main-nav ul li.nav-btn a:hover {
    background: #006EB4;
    color: #fff !important;
}

.main-navigation .main-nav ul li.nav-btn-filled a {
    background: #006EB4;
    border: 2px solid #006EB4;
}

.main-navigation .main-nav ul li.nav-btn-filled a:hover {
    background: transparent;
}

/* Hide the LOG IN button when logged in */
body.logged-in .main-navigation .main-nav ul li.moscap-login-trigger {
    display: none !important;
}

/* =============================================
   MOBILE HEADER
============================================= */
@media (max-width: 768px) {
    .site-header {
        position: absolute;
        background: rgba(0,0,0,0.4) !important;
    }

    /* 2026-09-18: the transparent-header-over-slider rule above takes
       .site-header out of document flow (position:absolute), so
       GeneratePress's normal mobile-menu behavior -- just an in-flow
       block that pushes the rest of the page down when opened -- can't
       work here. First attempt promoted only #site-navigation itself to
       a fixed overlay -- broke the close button, because the ACTUAL
       clickable toggle lives in #mobile-menu-control-wrapper, a SIBLING
       of #site-navigation (both children of .site-header), not inside
       it. That sibling stayed at its normal absolute-header position
       and got visually buried under the new full-screen layer.
       Promoting the whole .site-header instead keeps the toggle button
       and the menu list in the same box, so nothing gets covered.
       Second attempt used .site-header:has(#site-navigation.toggled) --
       produced no visible change at all, meaning :has() wasn't matching
       in the browser tested (support gap, or some other mismatch) --
       switched to GeneratePress's own menu.js hook instead: it adds
       .mobile-menu-open directly to <html> (document.documentElement)
       whenever the menu opens/closes, a plain class selector with no
       modern-selector dependency. */
    html.mobile-menu-open .site-header {
        /* top stays at the base rule's 41px (not overridden here) --
           .moscap-topbar (social icons/MN|EN/login) is a SEPARATE
           element that sits BEFORE .site-header in the markup, injected
           via generate_before_header -- it's not part of the header at
           all. top:0 would slide the fixed header up over it, hiding it.
           Starting at 41px keeps the topbar visible above, exactly as
           in the closed state, and the overlay just fills what's left. */
        position: fixed;
        left: 0;
        width: 100%;
        height: calc(65vh - 41px);
        height: calc(65dvh - 41px);
        overflow-y: auto;
        padding-bottom: 2em;
        box-sizing: border-box;
        background: rgba(0,0,0,0.95) !important;
        z-index: 200;
    }

    /* GP's own #site-navigation.toggled margin-top rules end up at 0
       here (cascade order), leaving the link list sitting right under
       the logo with almost no gap. */
    #site-navigation.toggled {
        margin-top: 2em !important;
    }

    .main-navigation .menu-toggle {
        color: #fff !important;
    }

    .main-navigation ul {
        background: rgba(0,0,0,0.92) !important;
    }

    .main-navigation .main-nav ul li.nav-btn,
    .main-navigation .main-nav ul li.nav-btn + li.lang-content {
        margin-left: 0 !important;
    }
}
