/* ══════════════════════════════════════════════════════════════════
   mod_megamenu — static stylesheet
   Все значения, зависящие от параметров модуля, подключаются
   через CSS custom properties (см. inline <style> в default.php).
   ══════════════════════════════════════════════════════════════════ */

.mm-root,
.mm-mobile-root {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.5;
}
.mm-root *,
.mm-mobile-root * { box-sizing: border-box; margin: 0; padding: 0; }
.mm-root ul,
.mm-mobile-root ul { list-style: none; }
.mm-root a,
.mm-mobile-root a { text-decoration: none; color: inherit; }

/* ════════════ DESKTOP NAV ════════════ */
.mm-root {
    background: var(--mm-bg);
    color: var(--mm-txt);
    position: relative;
    z-index: 10000;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    transition: background .3s, box-shadow .3s, padding .3s;
}
.mm-root.mm-transparent { background: transparent; }
.mm-root.mm-stuck {
    position: fixed;
    top: 0; left: 0; right: 0;
    width: 100%; margin-left: 0; margin-right: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,.3);
    z-index: 99998;
}
.mm-root.mm-stuck.mm-glass {
    background: color-mix(in srgb, var(--mm-bg), transparent 25%);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.mm-root.mm-stuck.mm-shrink { padding-top: 0; padding-bottom: 0; }
.mm-root.mm-stuck { transition: transform .26s cubic-bezier(.4,0,.2,1), background .3s, box-shadow .3s, padding .3s; }
.mm-root.mm-stuck.mm-hide { transform: translateY(-100%); }
/* Reduced motion — не анимируем прятки */
@media (prefers-reduced-motion: reduce) {
    .mm-root.mm-stuck { transition: none; }
    .mm-root.mm-stuck.mm-hide { transform: none; display: none; }
}

.mm-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex; align-items: center; gap: 0;
    min-height: var(--mm-h);
    position: relative;
}
.mm-root.mm-stuck .mm-container { min-height: var(--mm-h-stuck); }

/* Reading progress bar */
.mm-progress {
    position: absolute;
    left: 0; bottom: 0;
    height: 2px; width: 0%;
    background: var(--mm-acc);
    transition: width .08s linear;
    pointer-events: none;
    opacity: 0;
}
.mm-root.mm-stuck .mm-progress { opacity: 1; }

/* Centered variant */
.mm-root.mm-screen-center .mm-container { justify-content: center; }
.mm-root.mm-screen-center .mm-nav { flex: none; justify-content: center; }
.mm-root.mm-screen-center .mm-logo-left  { margin-right: 24px; }
.mm-root.mm-screen-center .mm-logo-right { margin-left: 24px; }

/* Logo */
.mm-logo { flex-shrink: 0; display: flex; align-items: center; padding: 8px 0; }
.mm-logo-img { height: var(--mm-logo-h); width: auto; transition: height .3s; display: block; }
.mm-root.mm-stuck .mm-logo-img { height: var(--mm-logo-h-stuck); }
.mm-logo-left   { order: 0; margin-right: auto; }
.mm-logo-right  { order: 3; margin-left: auto; }
.mm-logo-center { order: 1; margin: 0 auto; }

/* Primary nav */
.mm-nav { display: flex; align-items: stretch; order: 1; flex: 1; justify-content: var(--mm-justify); }

/* Многострочный режим — пункты переносятся на 2-3 ряда */
.mm-root.mm-multiline .mm-container {
    flex-wrap: wrap;
    row-gap: 4px;
    min-height: var(--mm-h);
    height: auto;
    padding-top: 6px;
    padding-bottom: 6px;
    align-items: center;
}
.mm-root.mm-multiline .mm-nav {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 2px;
    flex-basis: auto;
    min-width: 0;
}
.mm-root.mm-multiline.mm-stuck .mm-container {
    min-height: var(--mm-h-stuck);
    padding-top: 4px;
    padding-bottom: 4px;
}
.mm-root.mm-multiline .mm-nav > .mm-item > .mm-link {
    height: auto;
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.mm-nav > .mm-item { position: relative; }
.mm-nav > .mm-item > .mm-link {
    display: flex; align-items: center; gap: 6px;
    padding: 0 18px;
    font-size: var(--mm-fs);
    font-weight: var(--mm-fw);
    color: var(--mm-txt);
    white-space: nowrap;
    text-transform: var(--mm-tt);
    letter-spacing: var(--mm-ls);
    transition: color .2s, background .2s;
    height: var(--mm-h);
    position: relative;
}
.mm-root.mm-stuck .mm-nav > .mm-item > .mm-link { height: var(--mm-h-stuck); }

.mm-nav > .mm-item > .mm-link:hover,
.mm-nav > .mm-item.mm-active > .mm-link,
.mm-nav > .mm-item.mm-active-parent > .mm-link,
.mm-nav > .mm-item > .mm-link:focus-visible { color: var(--mm-acc); }

.mm-root[data-hover="underline"] .mm-nav > .mm-item > .mm-link::after {
    content: ''; position: absolute; bottom: 0; left: 50%; right: 50%;
    height: 3px; background: var(--mm-acc); border-radius: 3px 3px 0 0;
    transition: left .3s, right .3s;
}
.mm-root[data-hover="underline"] .mm-nav > .mm-item > .mm-link:hover::after,
.mm-root[data-hover="underline"] .mm-nav > .mm-item.mm-active > .mm-link::after {
    left: 18px; right: 18px;
}
.mm-root[data-hover="background"] .mm-nav > .mm-item > .mm-link:hover,
.mm-root[data-hover="background"] .mm-nav > .mm-item.mm-active > .mm-link {
    background: rgba(255,255,255,.08); border-radius: 8px;
}
.mm-root[data-hover="glow"] .mm-nav > .mm-item > .mm-link:hover,
.mm-root[data-hover="glow"] .mm-nav > .mm-item.mm-active > .mm-link {
    text-shadow: 0 0 12px var(--mm-acc), 0 0 24px color-mix(in srgb, var(--mm-acc), transparent 60%);
}

/* Focus ring — доступность */
.mm-root :focus-visible,
.mm-mobile-root :focus-visible {
    outline: 2px solid var(--mm-acc);
    outline-offset: 2px;
    border-radius: 4px;
}

.mm-arrow { width: 12px; height: 12px; flex-shrink: 0; transition: transform .25s; }
.mm-item.mm-open > .mm-link .mm-arrow,
.mm-item:hover > .mm-link .mm-arrow { transform: rotate(180deg); }
.mm-item-img { height: 20px; width: auto; margin-right: 4px; }

/* ── Dropdown (standard) ── */
.mm-subdrop {
    position: absolute; top: 100%; left: 0;
    min-width: var(--mm-dd-min-w, 220px);
    max-width: var(--mm-dd-max-w, none);
    background: var(--mm-ddbg);
    border-radius: 0 0 var(--mm-dd-radius) var(--mm-dd-radius);
    box-shadow: 0 12px 36px rgba(0,0,0,.3);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
    padding: 8px 0; z-index: 100;
}
/* Перенос длинных пунктов (если mm-dd-wrap активен) */
.mm-root.mm-dd-wrap .mm-subdrop .mm-link {
    white-space: normal;
    line-height: 1.35;
}
.mm-item.mm-open > .mm-subdrop,
.mm-item:hover > .mm-subdrop {
    opacity: 1; visibility: visible; transform: translateY(0);
}
.mm-subdrop .mm-link {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 20px; font-size: .85em; color: var(--mm-txt);
    font-weight: var(--mm-fw); text-transform: var(--mm-tt); letter-spacing: var(--mm-ls);
    transition: background .15s, color .15s, padding-left .15s;
}
.mm-subdrop .mm-link:hover,
.mm-subdrop .mm-link:focus-visible {
    background: rgba(255,255,255,.05); color: var(--mm-acc); padding-left: 26px;
}
.mm-subdrop .mm-item.mm-active > .mm-link { color: var(--mm-acc); }
.mm-subdrop .mm-heading > .mm-link {
    font-weight: 700; font-size: .75em; text-transform: uppercase;
    color: rgba(255,255,255,.35); letter-spacing: .06em; padding: 12px 20px 6px;
    cursor: default;
}

/* Nested sub */
.mm-subdrop .mm-subdrop {
    top: 0; left: 100%;
    border-radius: 0 var(--mm-dd-radius) var(--mm-dd-radius) 0;
}

/* ── Mega dropdown ── */
.mm-megadrop {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(-8px);
    min-width: var(--mm-dd-min-w, 600px);
    max-width: var(--mm-dd-max-w, 1100px);
    width: max-content;
    background: var(--mm-ddbg);
    border-radius: 0 0 var(--mm-dd-radius) var(--mm-dd-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.35);
    opacity: 0; visibility: hidden;
    transition: opacity .3s, transform .3s, visibility .3s;
    padding: 24px 28px; z-index: 100;
}
.mm-item.mm-open > .mm-megadrop,
.mm-item:hover > .mm-megadrop {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}
.mm-mega-inner { display: flex; gap: 32px; }
.mm-mega-col { flex: 1; min-width: 160px; }
.mm-mega-col .mm-link {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; font-size: .85em; color: var(--mm-txt);
    font-weight: var(--mm-fw); text-transform: var(--mm-tt); letter-spacing: var(--mm-ls);
    border-radius: 8px; transition: background .15s, color .15s;
}
.mm-mega-col .mm-link:hover,
.mm-mega-col .mm-link:focus-visible {
    background: rgba(255,255,255,.06); color: var(--mm-acc);
}
.mm-mega-col .mm-heading > .mm-link {
    font-weight: 700; font-size: .8em; text-transform: uppercase;
    color: var(--mm-acc); letter-spacing: .04em; padding-bottom: 4px;
    margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.06);
    cursor: default;
}
.mm-mega-col .mm-item.mm-active > .mm-link { color: var(--mm-acc); }

/* Featured promo block in mega */
.mm-mega-promo {
    flex: 0 0 260px;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    background: rgba(255,255,255,.04);
    transition: transform .2s;
}
.mm-mega-promo:hover { transform: translateY(-2px); }
.mm-mega-promo img { width: 100%; height: 140px; object-fit: cover; display: block; }
.mm-mega-promo-body { padding: 14px 16px; }
.mm-mega-promo-title { font-size: .95em; font-weight: 700; color: var(--mm-txt); margin-bottom: 4px; }
.mm-mega-promo-desc { font-size: .8em; color: rgba(255,255,255,.55); line-height: 1.4; }

/* ── DND (режим работы) ── */
.mm-dnd {
    order: 2; flex-shrink: 0;
    margin-left: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: .8em;
    font-weight: 600;
    white-space: nowrap;
    display: inline-flex; align-items: center;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.04);
    color: var(--mm-txt);
    transition: background .2s, border-color .2s;
}
.mm-dnd-online  { border-color: color-mix(in srgb, #34d399, transparent 60%); color: #34d399; }
.mm-dnd-offline { border-color: color-mix(in srgb, #f59e0b, transparent 60%); color: #f59e0b; }

/* ── CTA ── */
.mm-cta {
    order: 2; flex-shrink: 0; margin-left: 16px;
    padding: 10px 24px; border-radius: 10px; border: none;
    background: var(--mm-cta); color: #fff;
    font-weight: 700; font-size: .85em; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; transition: transform .2s, box-shadow .2s;
    text-decoration: none;
}
.mm-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--mm-cta), transparent 50%);
}
.mm-cta svg { width: 16px; height: 16px; fill: #fff; }

/* ── Search ── */
.mm-search { order: 2; position: relative; margin-left: 8px; }
.mm-theme-btn { order: 2; margin-left: 4px; }
.mm-search-btn,
.mm-sub-btn,
.mm-theme-btn {
    width: 40px; height: 40px; border: none; background: none; cursor: pointer;
    color: var(--mm-txt);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; transition: background .2s, color .2s;
    flex-shrink: 0;
}
.mm-search-btn:hover, .mm-sub-btn:hover, .mm-theme-btn:hover {
    background: rgba(255,255,255,.08); color: var(--mm-acc);
}
.mm-search-btn svg, .mm-sub-btn svg, .mm-theme-btn svg {
    width: 18px; height: 18px; fill: currentColor;
}
.mm-search-box {
    position: absolute; top: 100%; right: 0;
    width: 0; overflow: hidden;
    background: var(--mm-ddbg); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    transition: width .35s cubic-bezier(.4,0,.2,1), padding .35s, opacity .25s;
    opacity: 0; padding: 0;
}
.mm-search-box.mm-search-open { width: 320px; padding: 12px; opacity: 1; }
.mm-search-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px; background: rgba(255,255,255,.06);
    color: #fff; font-size: .9em; outline: none;
}
.mm-search-input:focus { border-color: var(--mm-acc); }

/* Badges */
.mm-badge {
    display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; border-radius: 4px; margin-left: 6px; line-height: 1.2;
    letter-spacing: .04em; vertical-align: middle;
}
.mm-badge-new  { background: var(--mm-acc); color: #000; }
.mm-badge-hot  { background: #ef4444; color: #fff; }
.mm-badge-sale { background: #f59e0b; color: #000; }

/* Burger */
.mm-burger {
    order: 3; width: 40px; height: 40px; border: none;
    background: none; cursor: pointer; padding: 8px;
    margin-left: auto; position: relative;
    display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.mm-burger span {
    display: block; width: 22px; height: 2px;
    background: var(--mm-txt); border-radius: 1px;
    transition: transform .3s, opacity .3s;
    transform-origin: center center;
}
.mm-burger.mm-burger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mm-burger.mm-burger-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mm-burger.mm-burger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Separators */
.mm-root[data-sep="line"] .mm-nav > .mm-item + .mm-item::before {
    content: ''; display: block; position: absolute; left: 0; top: 25%; height: 50%;
    width: 1px; background: rgba(255,255,255,.15);
}
.mm-root[data-sep="dot"] .mm-nav > .mm-item + .mm-item::before {
    content: ''; display: block; position: absolute; left: -2px; top: 50%;
    width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.25);
    transform: translateY(-50%);
}

/* Description line under sub items */
.mm-desc {
    display: block; font-size: .72em; color: rgba(255,255,255,.35);
    font-weight: 400; margin-top: 2px; line-height: 1.3;
    text-transform: none; letter-spacing: 0;
}

/* Font Awesome compat */
.mm-link .fa, .mm-link .fas, .mm-link .far, .mm-link .fab {
    margin-right: 6px; font-size: .9em; width: 18px; text-align: center;
}

/* Entrance */
.mm-root.mm-entrance { animation: mmEntrance .6s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes mmEntrance {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Light theme overrides */
.mm-root.mm-light { --mm-bg: var(--mm-light-bg); --mm-txt: var(--mm-light-txt); --mm-ddbg: #f3f4f6; }
.mm-root.mm-light .mm-burger span { background: var(--mm-txt); }
.mm-root.mm-light .mm-desc { color: rgba(0,0,0,.4); }
.mm-root.mm-light[data-sep="line"] .mm-nav > .mm-item + .mm-item::before { background: rgba(0,0,0,.1); }
.mm-root.mm-light[data-sep="dot"] .mm-nav > .mm-item + .mm-item::before  { background: rgba(0,0,0,.2); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mm-root *, .mm-mobile-root * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* ════════════ SUBSCRIBE ════════════ */
.mm-sub-wrap { order: 2; position: relative; margin-left: 4px; }
.mm-sub-drop {
    position: absolute; top: 100%; right: 0; width: 320px;
    background: var(--mm-ddbg); border-radius: var(--mm-dd-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.4);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .3s, visibility .3s, transform .3s;
    overflow: hidden; z-index: 200;
}
.mm-sub-drop.mm-sub-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mm-sub-header {
    padding: 20px 20px 14px; text-align: center;
    background: linear-gradient(135deg, var(--mm-acc), color-mix(in srgb, var(--mm-acc), #ec4899 35%));
}
.mm-sub-header h4 { margin: 0 0 4px; color: #fff; font-size: 1em; font-weight: 700; }
.mm-sub-header p  { margin: 0; color: rgba(255,255,255,.8); font-size: .78em; }
.mm-sub-body { padding: 16px 20px 20px; }
.mm-sub-row  { display: flex; gap: 8px; margin-bottom: 8px; }
.mm-sub-email {
    flex: 1; padding: 10px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06); color: #fff; font-size: .85em; outline: none;
}
.mm-sub-email:focus { border-color: var(--mm-acc); }
.mm-sub-send {
    padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer;
    background: var(--mm-acc); color: #000; font-weight: 700; font-size: .85em;
    transition: opacity .2s;
}
.mm-sub-send:hover { opacity: .85; }
.mm-sub-send:disabled { opacity: .5; cursor: not-allowed; }
.mm-sub-msg { font-size: .78em; text-align: center; min-height: 1em; }
.mm-sub-msg.ok  { color: #34d399; }
.mm-sub-msg.err { color: #f87171; }
.mm-honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ════════════ MOBILE OFF-CANVAS ════════════ */
.mm-mobile-root {
    position: fixed; top: 0; bottom: 0;
    width: 300px; max-width: 85vw;
    background: var(--mm-bg); color: var(--mm-txt);
    z-index: 100001;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto; overflow-x: hidden;
    display: flex; flex-direction: column;
}
.mm-mobile-root[data-side="left"]  { left: 0;  transform: translateX(-100%); box-shadow:  4px 0 30px rgba(0,0,0,.4); }
.mm-mobile-root[data-side="right"] { right: 0; transform: translateX(100%);  box-shadow: -4px 0 30px rgba(0,0,0,.4); }
.mm-mobile-root.mmo-open { transform: translateX(0); }

.mm-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    z-index: 100000; opacity: 0; visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.mm-overlay.mmo-open { opacity: 1; visibility: visible; }

.mmo-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.mmo-close {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.08); color: var(--mm-txt);
    cursor: pointer; font-size: 1.2em;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.mmo-close:hover { background: rgba(255,255,255,.15); }

.mmo-nav { padding: 8px 0; }
.mmo-row { display: flex; align-items: center; }
.mmo-link {
    flex: 1; padding: 14px 20px; font-size: var(--mm-fs); color: var(--mm-txt);
    font-weight: var(--mm-fw); text-transform: var(--mm-tt); letter-spacing: var(--mm-ls);
    transition: color .15s, background .15s;
}
.mmo-link:hover, .mmo-link:focus-visible { color: var(--mm-acc); background: rgba(255,255,255,.03); }
.mmo-active > .mmo-row > .mmo-link { color: var(--mm-acc); font-weight: 600; }
.mmo-active-parent > .mmo-row > .mmo-link { color: var(--mm-acc); }

.mmo-toggle {
    width: 48px; height: 48px; border: none; background: none;
    color: var(--mm-txt); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform .25s, color .15s;
    flex-shrink: 0;
}
.mmo-toggle svg { width: 14px; height: 14px; }
.mmo-toggle:hover { color: var(--mm-acc); }
.mmo-has-children.mmo-expanded > .mmo-row > .mmo-toggle { transform: rotate(180deg); }

.mmo-sub {
    max-height: 0; overflow: hidden;
    transition: max-height .35s cubic-bezier(.4,0,.2,1);
    background: rgba(0,0,0,.15);
}
.mmo-has-children.mmo-expanded > .mmo-sub { max-height: 1200px; }
.mmo-level-2 > .mmo-row > .mmo-link { padding-left: 36px; font-size: .9em; }
.mmo-level-3 > .mmo-row > .mmo-link { padding-left: 52px; font-size: .85em; }

.mmo-search { padding: 12px 20px; border-bottom: 1px solid rgba(255,255,255,.06); }
.mmo-search-input {
    width: 100%; padding: 12px 16px; border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px; background: rgba(255,255,255,.06); color: #fff;
    font-size: .9em; outline: none; box-sizing: border-box;
}
.mmo-search-input:focus { border-color: var(--mm-acc); }

.mmo-cta {
    display: block; margin: 16px 20px; padding: 14px; border-radius: 12px;
    background: var(--mm-cta); color: #fff; font-weight: 700;
    text-align: center; font-size: .9em; transition: opacity .2s;
}
.mmo-cta:hover { opacity: .85; }

.mmo-whatsapp, .mmo-telegram, .mmo-max {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin: 8px 20px; padding: 14px; border-radius: 12px;
    color: #fff; font-weight: 700; font-size: .9em;
    text-decoration: none; transition: opacity .2s;
}
.mmo-whatsapp { background: #25D366; margin-top: 12px; }
.mmo-telegram { background: #2AABEE; }
.mmo-max      { background: #7B68EE; }
.mmo-whatsapp:hover, .mmo-telegram:hover, .mmo-max:hover { opacity: .85; }
.mmo-whatsapp svg, .mmo-telegram svg, .mmo-max svg { width: 20px; height: 20px; fill: #fff; }

.mmo-subscribe { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.06); }
.mmo-subscribe h4 { margin: 0 0 8px; font-size: .9em; color: var(--mm-acc); font-weight: 600; }
.mmo-sub-row { display: flex; gap: 8px; margin-bottom: 6px; }
.mmo-sub-email {
    flex: 1; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.06); color: #fff; font-size: .9em; outline: none; box-sizing: border-box;
}
.mmo-sub-send {
    padding: 12px 18px; border-radius: 10px; border: none; cursor: pointer;
    background: var(--mm-acc); color: #000; font-weight: 700; font-size: .85em;
}
.mmo-sub-send:disabled { opacity: .5; cursor: not-allowed; }
.mmo-sub-msg { font-size: .78em; min-height: 1em; }
.mmo-sub-msg.ok  { color: #34d399; }
.mmo-sub-msg.err { color: #f87171; }

/* Responsive: breakpoint подставляется инлайном через CSS var */
@media (max-width: 992px) {
    .mm-root.mm-mobile-mode .mm-nav,
    .mm-root.mm-mobile-mode .mm-cta,
    .mm-root.mm-mobile-mode .mm-sub-wrap { display: none; }
    .mm-root.mm-mobile-mode .mm-burger { display: flex; }
    .mm-root.mm-mobile-mode .mm-container { min-height: 0; height: var(--mm-h-mobile); padding: 0 16px; }
    .mm-root.mm-mobile-mode .mm-logo-img { height: calc(var(--mm-logo-h) - 16px); }
}
.mm-mobile-root .mmo-hide-mobile { display: none; }

/* ══════════════════════════════════════════════════════════════════
   SEASONAL EFFECTS
   Активируются через класс mm-season-* на .mm-root
   ══════════════════════════════════════════════════════════════════ */

/* Новый год — снежинки в фоне */
.mm-root.mm-season-ny { position: relative; overflow: hidden; }
.mm-root.mm-season-ny::before,
.mm-root.mm-season-ny::after {
    content: '❄ ❅ ❆  ❄  ❅  ❆ ❄ ❅ ❆  ❄  ❅  ❆ ❄ ❅ ❆  ❄  ❅';
    position: absolute; top: 0; left: 0; right: 0;
    font-size: 14px; color: rgba(255,255,255,.25);
    white-space: nowrap; pointer-events: none;
    animation: mmSnow 40s linear infinite;
    z-index: 0;
}
.mm-root.mm-season-ny::after {
    font-size: 10px; color: rgba(255,255,255,.15);
    top: 50%;
    animation-duration: 28s; animation-direction: reverse;
}
.mm-root.mm-season-ny .mm-container { position: relative; z-index: 2; }
@keyframes mmSnow {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* День медработника — золотая кайма */
.mm-root.mm-season-medic {
    box-shadow: inset 0 -3px 0 0 linear-gradient(90deg, #d4af37, #f4d06f, #d4af37);
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, #d4af37, #f4d06f, #d4af37) 1;
}
.mm-root.mm-season-medic.mm-stuck {
    border-bottom-width: 3px;
}

/* День сердца — ECG-полоска снизу */
.mm-root.mm-season-heart { position: relative; }
.mm-root.mm-season-heart::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 14px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><polyline points='0,7 30,7 35,7 40,2 45,12 50,3 55,7 80,7 110,7 115,7 120,2 125,12 130,3 135,7 160,7 200,7' fill='none' stroke='%23ef4444' stroke-width='1.5'/></svg>");
    background-repeat: repeat-x;
    background-size: 200px 14px;
    animation: mmEcg 6s linear infinite;
    pointer-events: none;
    opacity: .75;
}
@keyframes mmEcg {
    from { background-position: 0 0; }
    to   { background-position: -200px 0; }
}

/* 9 мая — георгиевская лента сверху */
.mm-root.mm-season-victory { position: relative; padding-top: 6px; }
.mm-root.mm-season-victory::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: repeating-linear-gradient(
        90deg,
        #3a2b1a 0, #3a2b1a 8px,
        #f5a623 8px, #f5a623 16px,
        #3a2b1a 16px, #3a2b1a 24px
    );
    pointer-events: none;
}

/* ── Видео в мобильной панели ── */
.mmo-video {
    margin-top: auto;
    padding: 12px 16px 20px;
    border-top: 1px solid rgba(255,255,255,.08);
    flex-shrink: 0;
}
.mmo-video-title {
    font-size: .85em;
    font-weight: 600;
    opacity: .8;
    margin-bottom: 8px;
    color: var(--mm-txt);
}
.mmo-video-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}
.mmo-video-poster {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.mmo-video-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; cursor: pointer;
    transition: transform .2s;
    z-index: 2;
}
.mmo-video-play svg { width: 56px; height: 56px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.mmo-video-play:hover { transform: scale(1.08); }
.mmo-video-box.mmo-video-active .mmo-video-play,
.mmo-video-box.mmo-video-active .mmo-video-poster { display: none; }
.mmo-video-player,
.mmo-video-box iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: 0;
    display: none;
}
.mmo-video-box.mmo-video-active .mmo-video-player,
.mmo-video-box.mmo-video-active iframe { display: block; }

/* ════════════ Hover-preview card (Фича 6) ════════════ */
.mm-hover-card {
    position: absolute;
    z-index: 100000;
    min-width: 220px;
    max-width: 360px;
    background: #fff;
    color: #1f2937;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08);
    padding: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px) scale(.98);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
    font-family: inherit;
    line-height: 1.45;
}
.mm-hover-card-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.mm-hover-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}
.mm-hover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mm-hover-body {
    padding: 12px 14px 14px;
}
.mm-hover-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
    margin-bottom: 4px;
}
.mm-hover-text {
    font-size: 12.5px;
    color: #4b5563;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Если на сайте тёмная тема в целом — карточка остаётся светлой и контрастной */
@media (prefers-color-scheme: dark) {
    .mm-hover-card { background: #1f2937; color: #e5e7eb; }
    .mm-hover-title { color: #f3f4f6; }
    .mm-hover-text  { color: #cbd5e1; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-hover-card { transition: none; transform: none; }
}

/* ════════════ Sliding underline (Фича 2) ════════════ */
.mm-nav { position: relative; }
.mm-slide-ind {
    position: absolute;
    bottom: 6px;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--mm-acc);
    border-radius: 2px;
    transform: translateX(0);
    opacity: 0;
    pointer-events: none;
    transition: transform .32s cubic-bezier(.4,0,.2,1), width .32s cubic-bezier(.4,0,.2,1), opacity .2s ease;
    will-change: transform, width;
}
.mm-slide-ind-visible { opacity: 1; }
.mm-mobile-mode .mm-slide-ind { display: none; }
@media (prefers-reduced-motion: reduce) {
    .mm-slide-ind { transition: opacity .2s ease; }
}

/* ════════════ Quick actions (Фича 8) ════════════ */
.mm-level-1 > .mm-link { position: relative; }
.mm-qa {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--mm-ddbg);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    white-space: nowrap;
    z-index: 5;
}
/* Невидимый мост убран — панель внутри пункта, мост не нужен */
.mm-qa::before {
    content: none;
}
.mm-level-1:hover > .mm-link > .mm-qa,
.mm-level-1 > .mm-link:hover > .mm-qa,
.mm-level-1 > .mm-link:focus-within > .mm-qa,
.mm-level-1 > .mm-link > .mm-qa:hover {
    opacity: 1;
    pointer-events: auto;
}
.mm-qa-btn {
    width: 22px; height: 22px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--mm-txt);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
    opacity: .7;
    transition: background .15s, opacity .15s, color .15s;
}
.mm-qa-btn:hover { background: color-mix(in srgb, var(--mm-acc), transparent 80%); opacity: 1; color: var(--mm-acc); }
.mm-qa-btn.mm-qa-ok { color: #10b981; opacity: 1; }
.mm-qa-btn.mm-qa-ok::after {
    content: '✓';
    position: absolute;
    font-size: 12px;
    font-weight: bold;
}
.mm-qa-btn.mm-qa-ok svg { display: none; }
/* На мобильных скрываем полностью */
.mm-mobile-mode .mm-qa { display: none; }
@media (hover: none) { .mm-qa { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .mm-qa { transition: opacity .15s; }
}

/* ════════════ NEW-badge fade-out при клике (Фича 4) ════════════ */
.mm-badge-new { transition: opacity .3s ease, transform .3s ease; }

/* ════════════ Suck animation (Фича 13) ════════════ */
.mm-qa-ghost {
    position: fixed;
    background: color-mix(in srgb, var(--mm-acc, #00e5cc), transparent 50%);
    color: var(--mm-acc, #00e5cc);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    pointer-events: none;
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .45s cubic-bezier(.4, .0, .2, 1);
    will-change: left, top, width, height, opacity, transform;
}

/* ════════════ Toast при «добавить в закладки» ════════════ */
.mm-qa-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translate(-50%, 20px);
    background: rgba(17, 24, 39, .95);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
    opacity: 0;
    transition: opacity .25s ease, transform .25s ease;
    z-index: 100002;
    pointer-events: none;
}
.mm-qa-toast-show { opacity: 1; transform: translate(-50%, 0); }

/* ════════════ Context menu (Фича 15) ════════════ */
.mm-ctx {
    position: absolute;
    background: #fff;
    color: #1f2937;
    min-width: 220px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
    padding: 6px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    z-index: 100003;
    opacity: 0;
    transform: translateY(-4px) scale(.96);
    transition: opacity .16s ease, transform .16s ease;
    will-change: opacity, transform;
}
.mm-ctx-show { opacity: 1; transform: translateY(0) scale(1); }
.mm-ctx-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: background .12s ease;
}
.mm-ctx-row:hover, .mm-ctx-row:focus-visible {
    background: #f3f4f6;
    outline: none;
}
.mm-ctx-ic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: #6b7280;
    flex-shrink: 0;
}
.mm-ctx-row:hover .mm-ctx-ic { color: var(--mm-acc, #00e5cc); }

/* Темная тема — подстраиваемся */
@media (prefers-color-scheme: dark) {
    .mm-ctx { background: #1f2937; color: #e5e7eb; }
    .mm-ctx-row:hover, .mm-ctx-row:focus-visible { background: #374151; }
    .mm-ctx-ic { color: #9ca3af; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-qa-ghost, .mm-qa-toast, .mm-ctx { transition: opacity .15s; }
    .mm-ctx-show { transform: none; }
}

/* ════════════ Фича 1 — приветствие ════════════ */
.mm-greet {
    display: none;
    font-size: 13px;
    padding: 4px 12px;
    margin: 0 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--mm-acc), transparent 82%);
    color: var(--mm-acc);
    font-weight: 500;
    white-space: nowrap;
    animation: mm-greet-in .5s ease;
}
.mm-greet-show { display: inline-flex; align-items: center; }
@keyframes mm-greet-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ════════════ Фича 6 — закреплённые пункты (chips) ════════════ */
.mm-pinned {
    display: none;
    gap: 6px;
    flex-wrap: wrap;
    margin-right: 12px;
    padding: 4px 0;
}
.mm-pinned.mm-pinned-has { display: flex; }
.mm-pin-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px 4px 10px;
    background: color-mix(in srgb, var(--mm-acc), transparent 85%);
    color: var(--mm-acc);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: background .15s;
    max-width: 180px;
}
.mm-pin-chip:hover { background: color-mix(in srgb, var(--mm-acc), transparent 70%); }
.mm-pin-chip > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 140px;
}
.mm-pin-x {
    width: 18px; height: 18px;
    border: 0;
    background: rgba(0,0,0,.1);
    color: inherit;
    border-radius: 50%;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.mm-pin-x:hover { background: rgba(0,0,0,.25); }
.mm-mobile-mode .mm-pinned { display: none; }

/* ════════════ Фича 13 — презентация ════════════ */
.mm-presentation {
    position: fixed; inset: 0;
    z-index: 200000;
    display: flex; align-items: center; justify-content: center;
    animation: mm-pres-in .3s ease;
}
.mm-pres-backdrop {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, .92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.mm-pres-stage {
    position: relative;
    max-width: min(90vw, 800px);
    padding: 60px 40px 40px;
    text-align: center;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
.mm-pres-slide-title {
    font-size: clamp(32px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.mm-pres-slide-href {
    font-size: 14px;
    color: #9ca3af;
    font-family: ui-monospace, Menlo, Consolas, monospace;
    word-break: break-all;
    margin-bottom: 36px;
}
.mm-pres-nav {
    display: flex; align-items: center; justify-content: center; gap: 24px;
    margin-bottom: 20px;
}
.mm-pres-prev, .mm-pres-next {
    width: 52px; height: 52px;
    border-radius: 50%;
    border: 0;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.mm-pres-prev:hover, .mm-pres-next:hover { background: rgba(255,255,255,.2); transform: scale(1.08); }
.mm-pres-counter {
    font-size: 14px;
    color: #d1d5db;
    font-variant-numeric: tabular-nums;
    min-width: 80px;
}
.mm-pres-hint {
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}
@keyframes mm-pres-in {
    from { opacity: 0; transform: scale(.98); }
    to   { opacity: 1; transform: scale(1); }
}

/* ════════════ Фича 15 — 3D-подъём пунктов ════════════ */
.mm-root.mm-lift .mm-level-1 > .mm-link {
    transition: transform .25s cubic-bezier(.4, 0, .2, 1), box-shadow .25s ease;
}
.mm-root.mm-lift .mm-level-1:hover > .mm-link {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .15);
}
.mm-root.mm-lift.mm-stuck .mm-level-1:hover > .mm-link {
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
@media (prefers-reduced-motion: reduce) {
    .mm-root.mm-lift .mm-level-1 > .mm-link { transition: none; }
    .mm-root.mm-lift .mm-level-1:hover > .mm-link { transform: none; }
}

/* ════════════ Фича 18 — SOS кнопка ════════════ */
.mm-sos {
    position: fixed;
    z-index: 99999;
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--mm-sos-color, #dc2626);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(220, 38, 38, .4), 0 2px 8px rgba(0, 0, 0, .2);
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}
.mm-sos:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(220, 38, 38, .55), 0 3px 12px rgba(0, 0, 0, .25); }
.mm-sos:active { transform: scale(.95); }
.mm-sos-right-bottom { right: 20px; bottom: 20px; }
.mm-sos-left-bottom  { left: 20px;  bottom: 20px; }
.mm-sos-right-top    { right: 20px; top: 20px; }
.mm-sos-left-top     { left: 20px;  top: 20px; }

.mm-sos-icon { width: 28px; height: 28px; }
.mm-sos-pulse {
    position: absolute; inset: -4px;
    border-radius: 50%;
    background: var(--mm-sos-color, #dc2626);
    opacity: .4;
    animation: mm-sos-pulse 1.8s ease-out infinite;
    pointer-events: none;
}
@keyframes mm-sos-pulse {
    0%   { transform: scale(1); opacity: .45; }
    100% { transform: scale(1.6); opacity: 0; }
}
.mm-sos-label {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 600;
    color: var(--mm-sos-color, #dc2626);
    background: rgba(255,255,255,.95);
    padding: 3px 10px;
    border-radius: 4px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
    z-index: 1;
}
.mm-sos:hover .mm-sos-label { opacity: 1; }
/* Для верхних позиций тоже показываем подпись снизу кнопки,
   чтобы не перекрывалась браузерным меню/шапкой. */
@media (max-width: 600px) {
    .mm-sos { width: 56px; height: 56px; }
    .mm-sos-icon { width: 24px; height: 24px; }
    .mm-sos-right-bottom { right: 14px; bottom: 14px; }
    .mm-sos-left-bottom  { left: 14px;  bottom: 14px; }
    /* На мобилке top-позиции конфликтуют с бургером/шапкой —
       принудительно фиксируем внизу, сохраняя сторону. */
    .mm-sos-right-top {
        top: auto; bottom: 14px; right: 14px;
    }
    .mm-sos-left-top {
        top: auto; bottom: 14px; left: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .mm-sos, .mm-sos-pulse { animation: none; transition: none; }
}

/* ════════════ Фича 8 — ленивая инициализация placeholder ════════════ */
.mm-sub-drop:not(.mm-lazy-ready) {
    content-visibility: auto;
    contain-intrinsic-size: 1px 300px;
}

/* ════════════ «Популярное сейчас» — дропдаун ════════════ */
.mm-pop-wrap { order: 2; position: relative; margin-left: 4px; }
.mm-pop-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0;
    border: none; background: transparent; cursor: pointer;
    font-size: 18px; line-height: 1; border-radius: 8px;
    transition: background .2s;
}
.mm-pop-btn:hover { background: rgba(255,255,255,.08); }
.mm-pop-btn:focus-visible { outline: 2px solid var(--mm-acc); }
.mm-pop-drop {
    position: absolute; top: 100%; right: 0; width: 320px; max-width: 86vw;
    background: var(--mm-ddbg); border-radius: var(--mm-dd-radius);
    box-shadow: 0 16px 48px rgba(0,0,0,.4);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, visibility .25s, transform .25s;
    overflow: hidden; z-index: 200;
}
.mm-pop-drop.mm-pop-show { opacity: 1; visibility: visible; transform: translateY(0); }
.mm-pop-head {
    padding: 14px 18px; color: #fff; font-size: .92em; font-weight: 700;
    background: linear-gradient(135deg, var(--mm-acc), color-mix(in srgb, var(--mm-acc), #ec4899 35%));
}
.mm-pop-body { padding: 6px 0; max-height: 60vh; overflow-y: auto; }
.mm-pop-empty { padding: 16px 18px; color: var(--mm-txt); opacity: .7; font-size: .82em; text-align: center; }
.mm-pop-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 16px; text-decoration: none; color: var(--mm-txt);
    font-size: .85em; transition: background .15s;
}
.mm-pop-item:hover { background: rgba(255,255,255,.06); color: var(--mm-acc); }
.mm-pop-rank {
    flex: none; width: 20px; height: 20px; border-radius: 50%;
    background: color-mix(in srgb, var(--mm-acc), transparent 80%);
    color: var(--mm-acc); font-size: .72em; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.mm-pop-ttl { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-pop-cnt { flex: none; opacity: .6; font-size: .78em; }
.mm-root.mm-mobile-mode .mm-pop-wrap { display: none; }
/* ════════ Доступность / Skip-link / Наверх / Клавиатура (v2.15.6) ════════ */

/* Skip-link «Перейти к содержимому» */
.mm-skip{
  position:fixed; top:8px; left:8px; z-index:100001;
  transform:translateY(-200%);
  background:var(--mm-acc,#c8a040); color:var(--mm-bg,#1a3a5c);
  padding:10px 16px; border-radius:8px; font-weight:600; font-size:15px;
  text-decoration:none; box-shadow:0 6px 20px rgba(0,0,0,.25);
  transition:transform .18s ease;
}
.mm-skip:focus{ transform:translateY(0); outline:3px solid var(--mm-bg,#1a3a5c); outline-offset:2px; }

/* Клавиатурный фокус по верхним пунктам */
.mm-nav > .mm-item > .mm-link:focus-visible{
  outline:2px solid var(--mm-acc,#c8a040); outline-offset:2px; border-radius:6px;
}

/* Плавающий стек (наверх + доступность) */
.mm-fab{ position:fixed; z-index:9990; display:flex; flex-direction:column; gap:12px; }
.mm-fab-rb{ right:20px; bottom:20px; align-items:flex-end; }
.mm-fab-lb{ left:20px;  bottom:20px; align-items:flex-start; }

.mm-totop, .mm-a11y-btn{
  width:46px; height:46px; border:none; border-radius:50%; cursor:pointer;
  background:var(--mm-acc,#c8a040); color:var(--mm-bg,#1a3a5c);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 6px 20px rgba(0,0,0,.28); transition:transform .15s, opacity .2s, visibility .2s;
}
.mm-totop svg, .mm-a11y-btn svg{ width:24px; height:24px; }
.mm-totop:hover, .mm-a11y-btn:hover{ transform:scale(1.08); }
.mm-totop:active, .mm-a11y-btn:active{ transform:scale(.94); }
.mm-totop:focus-visible, .mm-a11y-btn:focus-visible{ outline:3px solid var(--mm-bg,#1a3a5c); outline-offset:2px; }

/* «Наверх» — только после прокрутки */
.mm-totop{ opacity:0; visibility:hidden; pointer-events:none; }
.mm-totop.mm-show{ opacity:1; visibility:visible; pointer-events:auto; }

/* Панель доступности */
.mm-a11y-wrap{ position:relative; }
.mm-a11y-panel{
  position:absolute; bottom:56px; min-width:230px;
  background:var(--mm-ddbg,#fff); color:var(--mm-txt,#1a3a5c);
  border-radius:14px; padding:14px; box-shadow:0 12px 40px rgba(0,0,0,.30);
  opacity:0; visibility:hidden; transform:translateY(10px); transition:.18s ease;
}
.mm-fab-rb .mm-a11y-panel{ right:0; }
.mm-fab-lb .mm-a11y-panel{ left:0; }
.mm-a11y-panel.mm-open{ opacity:1; visibility:visible; transform:translateY(0); }
.mm-a11y-title{ font-weight:700; font-size:15px; margin:0 0 10px; }
.mm-a11y-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; }
.mm-a11y-row > span{ font-size:14px; }
.mm-a11y-fz{ display:flex; align-items:center; gap:8px; }
.mm-a11y-fz button{
  width:30px; height:30px; border-radius:8px; cursor:pointer; font-size:16px; line-height:1;
  border:1px solid color-mix(in srgb, var(--mm-txt,#1a3a5c), transparent 70%);
  background:transparent; color:inherit;
}
.mm-a11y-fz [data-a11y-fzlabel]{ min-width:42px; text-align:center; font-size:13px; }
.mm-a11y-toggle{
  border:1px solid color-mix(in srgb, var(--mm-txt,#1a3a5c), transparent 70%);
  background:transparent; color:inherit; cursor:pointer;
  padding:6px 12px; border-radius:8px; font-size:13px; font-weight:600;
}
.mm-a11y-toggle[aria-pressed="true"]{ background:var(--mm-acc,#c8a040); color:var(--mm-bg,#1a3a5c); border-color:var(--mm-acc,#c8a040); }
.mm-a11y-reset{
  width:100%; margin-top:6px; padding:8px; border:none; border-radius:8px; cursor:pointer;
  background:color-mix(in srgb, var(--mm-txt,#1a3a5c), transparent 88%); color:inherit; font-size:13px;
}

/* Режимы «для слабовидящих» — на весь документ */
html.mm-a11y-grayscale{ filter:grayscale(1); }
html.mm-a11y-noanim *, html.mm-a11y-noanim *::before, html.mm-a11y-noanim *::after{
  animation-duration:.001ms !important; animation-iteration-count:1 !important;
  transition-duration:.001ms !important; scroll-behavior:auto !important;
}
html.mm-a11y-spacing p, html.mm-a11y-spacing li, html.mm-a11y-spacing span,
html.mm-a11y-spacing a, html.mm-a11y-spacing h1, html.mm-a11y-spacing h2,
html.mm-a11y-spacing h3, html.mm-a11y-spacing h4, html.mm-a11y-spacing td, html.mm-a11y-spacing th{
  letter-spacing:.06em !important; word-spacing:.14em !important; line-height:1.7 !important;
}
html.mm-a11y-contrast, html.mm-a11y-contrast body{ background:#000 !important; }
html.mm-a11y-contrast *:not(svg):not(path):not(img):not(video){
  background-color:#000 !important; color:#ff0 !important;
  border-color:#ff0 !important; box-shadow:none !important; text-shadow:none !important;
}
html.mm-a11y-contrast a, html.mm-a11y-contrast a *{ color:#ff0 !important; text-decoration:underline !important; }
html.mm-a11y-contrast svg, html.mm-a11y-contrast svg *{ fill:#ff0 !important; stroke:#ff0 !important; }
html.mm-a11y-contrast img, html.mm-a11y-contrast video{ filter:grayscale(1) contrast(1.15); }

/* Кнопка доступности в шапке меню (вместо отдельного FAB) */
.mm-a11y-btn-hdr{
  width:auto; height:auto; border-radius:8px; padding:6px;
  background:transparent; color:inherit; box-shadow:none;
}
.mm-a11y-btn-hdr svg{ width:22px; height:22px; }
.mm-a11y-btn-hdr:hover{ transform:none; background:color-mix(in srgb, currentColor, transparent 90%); color:var(--mm-acc,#c8a040); }
/* Панель раскрывается вниз из-под кнопки в шапке */
.mm-a11y-panel{ max-width:calc(100vw - 24px); }
.mm-a11y-panel-hdr{ top:calc(100% + 8px); right:0; bottom:auto; left:auto; z-index:60; }
