/* Belovode · мобильное меню и фикс полосы (секции 15–16)
   Часть brand.css — подключается в inc/assets.php.
   Источник истины: исторический разрез по секциям 1–26. */

/* ---------------------------------------------------------------------
   15. МОБИЛЬНОЕ МЕНЮ (Astra dropdown) — тот же Philosopher-язык,
   охряной акцент на текущей ветке, розетка у подпунктов
   --------------------------------------------------------------------- */
#ast-mobile-header .ast-builder-menu-mobile { padding: 4px 0; }
#ast-mobile-header .main-header-menu,
#ast-mobile-header .main-header-menu > .menu-item { display: block; }
#ast-mobile-header .main-header-menu > .menu-item {
    position: relative;
    border-bottom: 1px solid var(--bel-oak-faded);
}
#ast-mobile-header .main-header-menu > .menu-item:last-child { border-bottom: 0; }
#ast-mobile-header .main-header-menu .menu-item > a {
    display: flex !important;
    align-items: center;
    min-height: 52px;
    padding: 12px 64px 12px 22px !important;
    font-family: var(--bel-font-display) !important;
    font-size: 0.88rem !important;
    font-weight: 500;
    letter-spacing: 0.1em !important;
    text-transform: uppercase;
    line-height: 1.2 !important;
    color: var(--bel-ink) !important;
    background: transparent !important;
    position: relative;
}
/* Охряная планка слева на активном пункте (мобильная индикация) */
#ast-mobile-header .main-header-menu .menu-item > a::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--bel-ochre);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 180ms ease;
}
#ast-mobile-header .main-header-menu > .menu-item:not(.menu-item-has-children) > a { padding-right: 22px !important; }
#ast-mobile-header .main-header-menu .current-menu-item > a,
#ast-mobile-header .main-header-menu .current-menu-ancestor > a {
    color: var(--bel-burgundy) !important;
    background: var(--bel-oak-wash) !important;
}
#ast-mobile-header .main-header-menu .current-menu-item > a::before,
#ast-mobile-header .main-header-menu .current-menu-ancestor > a::before {
    transform: scaleY(1);
}

/* Шеврон раскрытия подменю */
#ast-mobile-header .ast-menu-toggle {
    position: absolute !important;
    top: 0 !important; right: 0 !important;
    width: 52px !important; height: 52px !important;
    padding: 0 !important; margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 0 !important;
    border-left: 1px solid var(--bel-oak-faded) !important;
    color: var(--bel-oak) !important;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
#ast-mobile-header .ast-menu-toggle:hover,
#ast-mobile-header .ast-menu-toggle:focus-visible {
    background: var(--bel-oak-wash) !important;
    color: var(--bel-ochre) !important;
}
#ast-mobile-header .ast-menu-toggle .ast-arrow-svg,
#ast-mobile-header .ast-menu-toggle svg {
    width: 12px !important; height: 8px !important;
    fill: currentColor;
    transition: transform 180ms ease;
}
#ast-mobile-header .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle svg,
#ast-mobile-header .menu-item-has-children[aria-expanded="true"] > .ast-menu-toggle svg {
    transform: rotate(180deg);
}
#ast-mobile-header .menu-item-has-children.ast-submenu-expanded > .ast-menu-toggle,
#ast-mobile-header .menu-item-has-children[aria-expanded="true"] > .ast-menu-toggle {
    color: var(--bel-ochre) !important;
}

/* ---------- Подменю на мобильном ---------- */
#ast-mobile-header .sub-menu {
    background: rgba(139, 111, 71, 0.04) !important;
    border-top: 1px solid var(--bel-oak-faded);
    padding: 0;
}
#ast-mobile-header .sub-menu .menu-item { border-bottom: 1px solid var(--bel-oak-faded); }
#ast-mobile-header .sub-menu .menu-item:last-child { border-bottom: 0; }
#ast-mobile-header .sub-menu .menu-item > a {
    min-height: 46px;
    padding: 10px 64px 10px 42px !important;
    font-family: var(--bel-font-display) !important;
    font-size: 0.76rem !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase;
    color: var(--bel-ink-soft) !important;
    position: relative;
}
/* Маленькая розетка перед каждым подпунктом */
#ast-mobile-header .sub-menu .menu-item > a::before {
    content: '';
    position: static !important;
    width: 7px; height: 7px;
    transform: none !important;
    background: var(--bel-oak) !important;
    opacity: 0.5;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='black' stroke-width='3'><circle cx='20' cy='20' r='12'/><circle cx='20' cy='20' r='5' fill='black'/></svg>") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' fill='none' stroke='black' stroke-width='3'><circle cx='20' cy='20' r='12'/><circle cx='20' cy='20' r='5' fill='black'/></svg>") no-repeat center / contain;
    margin-right: 12px;
    flex: 0 0 auto;
}
#ast-mobile-header .sub-menu .current-menu-item > a {
    color: var(--bel-burgundy) !important;
    background: var(--bel-oak-wash) !important;
}
#ast-mobile-header .sub-menu .current-menu-item > a::before {
    background: var(--bel-ochre) !important;
    opacity: 1;
}
#ast-mobile-header .sub-menu .sub-menu .menu-item > a { padding-left: 60px !important; }
#ast-mobile-header .sub-menu .ast-menu-toggle {
    width: 46px !important; height: 46px !important;
    border-left: 1px solid var(--bel-oak-faded) !important;
}

/* ---------- CTA-пункт «Связаться» на мобильном ---------- */
#ast-mobile-header .main-header-menu .menu-item.menu-item-cta {
    border-bottom: 0;
    padding: 18px 16px;
    background: linear-gradient(180deg, transparent, var(--bel-oak-wash));
}
#ast-mobile-header .main-header-menu .menu-item.menu-item-cta > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 14px 22px !important;
    text-align: center;
    font-family: var(--bel-font-body) !important;
    letter-spacing: 0.14em !important;
    font-size: 0.82rem !important;
}
#ast-mobile-header .main-header-menu .menu-item.menu-item-cta > a::before { display: none !important; }

/* =====================================================================
   16. ФИКС ПУСТОЙ ПОЛОСЫ ПОД ШАПКОЙ
   Astra добавляет крупные padding-top к .site-content/.ast-container.
   На страницах с hero и на главной — убираем его под ноль.
   ===================================================================== */
.page-home .site-content,
.page-home .ast-container,
.page-home #primary,
.page-home #main,
.page-home .ast-article-single,
.has-hero .site-content,
.has-hero .ast-container,
.has-hero #primary,
.has-hero #main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.page-home .entry-content,
.has-hero .entry-content { margin-top: 0 !important; padding-top: 0 !important; }
.page-home .entry-content > *:first-child,
.has-hero .entry-content > *:first-child {
    margin-top: 0 !important;
}
/* Внутренние страницы: верхний padding контейнера убран — отступ от шапки
   до контента теперь задаёт `#primary { margin-top }` ниже. */
.site-content > .ast-container {
    padding-top: 0;
}
body:not(.page-home):not(.has-hero) #primary {
    margin-top: 20px;
}

/* Мягкая «бумажная» подложка у основного контента — edge texture */
.ast-article-single {
    position: relative;
}
.page-home .ast-article-single,
.has-hero .ast-article-single {
    /* hero на всю ширину, подложка не нужна */
    background: transparent;
    box-shadow: none;
}

