{#
  Material for MkDocs Jinja2 template:
  https://github.com/squidfunk/mkdocs-material/blob/9.4.8/src/templates/partials/header.html

  The .picodata-header block mirrors the Astro Header on picodata.io —
  same DOM classes (.topbar / .menu-item / .mega-panel / .aux / .drawer
  etc.) so navigation.css and navigation.js can stay close to the Astro
  header stylesheet/script. The .md-header__inner block below carries
  the MkDocs Material breadcrumb + search and stays as-is.
#}

<header class="md-header md-grid" data-md-component="header">
  <div class="picodata-header">
    <div class="container topbar">
      <a href="https://picodata.io/" class="logo" aria-label="Picodata">
        <img src="https://picodata.io/logo.svg" alt="Picodata" width="140" height="28" />
      </a>

      <nav class="primary" aria-label="Главное меню">
        <div class="menu-item is-rich">
          <a href="https://picodata.io/picodata/" class="menu-trigger">Продукты</a>
          <div class="mega-panel" aria-hidden="true">
            <div class="container mega-grid">
              <div class="mega-label">Продукты</div>
              <div class="mega-items is-rich">
                <a href="https://picodata.io/picodata/" class="mega-link">
                  <span class="mega-link-title">Picodata</span>
                  <span class="mega-link-desc">Распределённая СУБД, совместимая с PostgreSQL</span>
                </a>
                <a href="https://picodata.io/redis-fstek/" class="mega-link">
                  <span class="mega-link-title">Radix</span>
                  <span class="mega-link-desc">Сертифицированная ФСТЭК замена Redis</span>
                </a>
                <a href="https://picodata.io/sirin/" class="mega-link">
                  <span class="mega-link-title">Sirin</span>
                  <span class="mega-link-desc">СУБД для IIoT, совместимая с Cassandra</span>
                </a>
              </div>
            </div>
          </div>
        </div>

        <div class="menu-item">
          <a href="https://picodata.io/services/" class="menu-trigger">Услуги</a>
          <div class="mega-panel" aria-hidden="true">
            <div class="container mega-grid">
              <div class="mega-label">Услуги</div>
              <div class="mega-items">
                <a href="https://picodata.io/services/#smart_start" class="mega-link"><span class="mega-link-title">Смарт Старт</span></a>
                <a href="https://picodata.io/services/#dba_saas" class="mega-link"><span class="mega-link-title">DBA as a Service</span></a>
                <a href="https://picodata.io/services/#education" class="mega-link"><span class="mega-link-title">Тренинги</span></a>
                <a href="https://picodata.io/services/" class="mega-link is-all"><span class="mega-link-title">Все услуги</span></a>
              </div>
            </div>
          </div>
        </div>

        <div class="menu-item">
          <a href="https://picodata.io/solutions/" class="menu-trigger">Решения</a>
          <div class="mega-panel" aria-hidden="true">
            <div class="container mega-grid">
              <div class="mega-label">Решения</div>
              <div class="mega-items">
                <a href="https://picodata.io/solutions/tco-reduction/" class="mega-link"><span class="mega-link-title">Снижение ТСО</span></a>
                <a href="https://picodata.io/migrate/" class="mega-link"><span class="mega-link-title">Бесшовная замена Redis и Cassandra</span></a>
                <a href="https://picodata.io/solutions/network-analysis/" class="mega-link"><span class="mega-link-title">Система визуального сетевого анализа</span></a>
                <a href="https://picodata.io/solutions/customer-profile/" class="mega-link"><span class="mega-link-title">Единый профиль клиента</span></a>
                <a href="https://picodata.io/solutions/abs-offload/" class="mega-link"><span class="mega-link-title">Снижение нагрузки на АБС</span></a>
                <a href="https://picodata.io/solutions/" class="mega-link is-all"><span class="mega-link-title">Все решения</span></a>
              </div>
            </div>
          </div>
        </div>

        <div class="menu-item">
          <a href="https://docs.picodata.io/picodata" class="menu-trigger">Документация</a>
          <div class="mega-panel" aria-hidden="true">
            <div class="container mega-grid">
              <div class="mega-label">Документация</div>
              <div class="mega-items">
                <a href="https://docs.picodata.io/picodata/stable/tutorial/run/" class="mega-link"><span class="mega-link-title">Запуск Picodata</span></a>
                <a href="https://docs.picodata.io/picodata/stable/sql_index/" class="mega-link"><span class="mega-link-title">Команды SQL</span></a>
                <a href="https://docs.picodata.io/picodata/stable/reference/settings/" class="mega-link"><span class="mega-link-title">Справочник настроек</span></a>
                <a href="https://docs.picodata.io/picodata/devel/plugins/plugin_list/" class="mega-link"><span class="mega-link-title">Расширения</span></a>
                <a href="https://docs.picodata.io/picodata" class="mega-link is-all"><span class="mega-link-title">Вся документация</span></a>
              </div>
            </div>
          </div>
        </div>

        <div class="menu-item">
          <a href="https://picodata.io/about/" class="menu-trigger">О компании</a>
          <div class="mega-panel" aria-hidden="true">
            <div class="container mega-grid">
              <div class="mega-label">О компании</div>
              <div class="mega-items">
                <a href="https://picodata.io/about/" class="mega-link"><span class="mega-link-title">О нас</span></a>
                <a href="https://picodata.io/careers/" class="mega-link"><span class="mega-link-title">Работа</span></a>
                <a href="https://picodata.io/about/certificates/" class="mega-link"><span class="mega-link-title">Сертификаты</span></a>
                <a href="https://picodata.io/news/" class="mega-link"><span class="mega-link-title">Новости</span></a>
                <a href="https://picodata.io/blog/" class="mega-link"><span class="mega-link-title">Блог</span></a>
              </div>
            </div>
          </div>
        </div>
      </nav>

      <div class="aux">
        <a class="aux-icon" href="https://picodata.io/en/" aria-label="Switch to English" title="Switch to English">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
            <circle cx="12" cy="12" r="10"/>
            <path d="M2 12h20"/>
            <path d="M12 2a15 15 0 0 1 0 20"/>
            <path d="M12 2a15 15 0 0 0 0 20"/>
          </svg>
        </a>
        <a class="aux-icon" href="https://t.me/picodataru" aria-label="Telegram" target="_blank" rel="noopener">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
            <path d="M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.27 1.4.18 1.12 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"/>
          </svg>
        </a>
        <a class="aux-icon" href="https://discord.gg/tC5kuRVDMa" aria-label="Discord" target="_blank" rel="noopener">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
            <path d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"/>
          </svg>
        </a>
        <a class="aux-icon" href="https://git.picodata.io/core/picodata" aria-label="GitLab" target="_blank" rel="noopener">
          <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
            <path d="M22.65 14.39L12 22.13L1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78l2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.49A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"/>
          </svg>
        </a>
        <a class="nav-btn" href="https://picodata.io/download/">Скачать</a>
        <button class="hamburger" aria-label="Открыть меню" aria-expanded="false" aria-controls="site-drawer" type="button">
          <span></span><span></span><span></span>
        </button>
      </div>
    </div>

    <div id="site-drawer" class="drawer" aria-hidden="true">
      <div class="drawer-head">
        <a href="https://picodata.io/" class="logo" aria-label="Picodata">
          <img src="https://picodata.io/logo.svg" alt="Picodata" width="140" height="28" />
        </a>
        <button class="drawer-close" aria-label="Закрыть меню" type="button">
          <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true">
            <path d="M6 6l12 12M18 6L6 18"/>
          </svg>
        </button>
      </div>
      <ul class="drawer-list">
        <li class="drawer-section">
          <button class="drawer-trigger" aria-expanded="false" type="button">
            <span>Продукты</span>
            <svg class="drawer-chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <polyline points="6 9 12 15 18 9"/>
            </svg>
          </button>
          <div class="drawer-items">
            <a href="https://picodata.io/picodata/">Picodata</a>
            <a href="https://picodata.io/redis-fstek/">Radix</a>
            <a href="https://picodata.io/sirin/">Sirin</a>
          </div>
        </li>
        <li class="drawer-section">
          <button class="drawer-trigger" aria-expanded="false" type="button">
            <span>Услуги</span>
            <svg class="drawer-chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <polyline points="6 9 12 15 18 9"/>
            </svg>
          </button>
          <div class="drawer-items">
            <a href="https://picodata.io/services/#smart_start">Смарт Старт</a>
            <a href="https://picodata.io/services/#dba_saas">DBA as a Service</a>
            <a href="https://picodata.io/services/#education">Тренинги</a>
            <a href="https://picodata.io/services/" class="is-all">Все услуги</a>
          </div>
        </li>
        <li class="drawer-section">
          <button class="drawer-trigger" aria-expanded="false" type="button">
            <span>Решения</span>
            <svg class="drawer-chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <polyline points="6 9 12 15 18 9"/>
            </svg>
          </button>
          <div class="drawer-items">
            <a href="https://picodata.io/solutions/tco-reduction/">Снижение ТСО</a>
            <a href="https://picodata.io/migrate/">Бесшовная замена Redis и Cassandra</a>
            <a href="https://picodata.io/solutions/network-analysis/">Система визуального сетевого анализа</a>
            <a href="https://picodata.io/solutions/customer-profile/">Единый профиль клиента</a>
            <a href="https://picodata.io/solutions/abs-offload/">Снижение нагрузки на АБС</a>
            <a href="https://picodata.io/solutions/" class="is-all">Все решения</a>
          </div>
        </li>
        <li class="drawer-section">
          <button class="drawer-trigger" aria-expanded="false" type="button">
            <span>Документация</span>
            <svg class="drawer-chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <polyline points="6 9 12 15 18 9"/>
            </svg>
          </button>
          <div class="drawer-items">
            <a href="https://docs.picodata.io/picodata/stable/tutorial/run/">Запуск Picodata</a>
            <a href="https://docs.picodata.io/picodata/stable/sql_index/">Команды SQL</a>
            <a href="https://docs.picodata.io/picodata/stable/reference/settings/">Справочник настроек</a>
            <a href="https://docs.picodata.io/picodata/devel/plugins/plugin_list/">Расширения</a>
            <a href="https://docs.picodata.io/picodata" class="is-all">Вся документация</a>
          </div>
        </li>
        <li class="drawer-section">
          <button class="drawer-trigger" aria-expanded="false" type="button">
            <span>О компании</span>
            <svg class="drawer-chevron" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <polyline points="6 9 12 15 18 9"/>
            </svg>
          </button>
          <div class="drawer-items">
            <a href="https://picodata.io/about/">О нас</a>
            <a href="https://picodata.io/careers/">Работа</a>
            <a href="https://picodata.io/about/certificates/">Сертификаты</a>
            <a href="https://picodata.io/news/">Новости</a>
            <a href="https://picodata.io/blog/">Блог</a>
          </div>
        </li>
      </ul>
      <div class="drawer-foot">
        <a class="nav-btn" href="https://picodata.io/download/">Скачать</a>
        <div class="drawer-icons">
          <a class="aux-icon" href="https://picodata.io/en/" aria-label="Switch to English">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
              <circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15 15 0 0 1 0 20"/><path d="M12 2a15 15 0 0 0 0 20"/>
            </svg>
          </a>
          <a class="aux-icon" href="https://t.me/picodataru" aria-label="Telegram" target="_blank" rel="noopener">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
              <path d="M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.27 1.4.18 1.12 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"/>
            </svg>
          </a>
          <a class="aux-icon" href="https://discord.gg/tC5kuRVDMa" aria-label="Discord" target="_blank" rel="noopener">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
              <path d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"/>
            </svg>
          </a>
          <a class="aux-icon" href="https://git.picodata.io/core/picodata" aria-label="GitLab" target="_blank" rel="noopener">
            <svg width="22" height="22" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
              <path d="M22.65 14.39L12 22.13L1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78l2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.49A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0a.42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"/>
            </svg>
          </a>
        </div>
      </div>
    </div>
  </div>

  <nav class="md-header__inner md-grid" aria-label="{{ lang.t('header') }}">
    <div class="md-header__button-wrapper">
      <label class="md-header__button" for="__drawer">Содержание</label>
    </div>

    <nav aria-label="breadcrumb" class="md-header__breadcrumb">
      <span class="md-header__breadcrumb-nav">
        <a href="{{ '/' | url }}">Главная</a>

        {% if page and page.ancestors %}
          {% for ancestor in page.ancestors[::-1] %}
            <span class="md-header__breadcrumb-separator">/</span>
            <span class="md-header__breadcrumb-nav">{{ ancestor.title }}</span>
          {% endfor %}
        {% endif %}

        {% if page and page.title %}
          <span class="md-header__breadcrumb-separator">/</span>
          <span class="md-header__breadcrumb-current">{{ page.title }}</span>
        {% endif %}
      </span>
    </nav>

    <div class="md-header__bar">
      <div class="md-header__title" data-md-component="header-title">
        <div class="md-header__ellipsis">
          <div class="md-header__topic" data-md-component="header-topic"></div>
        </div>
      </div>

      <div class="md-header__custom-search">
        {% if "material/search" in config.plugins %}
          <label class="md-header__button md-icon" for="__search">
            {% set icon = config.theme.icon.search or "material/magnify" %}
            {% include ".icons/" ~ icon ~ ".svg" %}
          </label>

          {% include "partials/search.html" %}
        {% endif %}
      </div>
    </div>
  </nav>
</header>
