/* ===== Протокол24 mobile burger menu v4.2 ===== */

.p24-mobile-menu-toggle,
.p24-mobile-drawer,
.p24-mobile-drawer-backdrop {
  display: none;
}

@media (max-width: 760px) {
  /* Верхний чёрный блок на мобильном больше не показываем */
  .p24-topline {
    display: none !important;
  }

  .p24-header-inner {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
  }

  .p24-brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .p24-brand span:last-child,
  .p24-brand-title,
  .p24-brand-name,
  .p24-logo-text,
  .p24-logo-title {
    display: block !important;
    max-width: 190px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .p24-nav {
    display: none !important;
  }

  .p24-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
  }

  .p24-mobile-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border: 1px solid #d9e5f7 !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 24px rgba(20,35,79,.06) !important;
    cursor: pointer !important;
    padding: 0 !important;
    appearance: none !important;
  }

  .p24-mobile-menu-toggle span {
    position: relative;
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #10234f;
  }

  .p24-mobile-menu-toggle span::before,
  .p24-mobile-menu-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #10234f;
  }

  .p24-mobile-menu-toggle span::before { top: -6px; }
  .p24-mobile-menu-toggle span::after  { top:  6px; }

  .p24-mobile-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(5, 16, 44, .38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    z-index: 98;
  }

  .p24-mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: min(88vw, 360px);
    height: 100dvh;
    padding: 22px 20px 24px;
    background: #ffffff;
    box-shadow: -20px 0 48px rgba(16,35,79,.18);
    transform: translateX(104%);
    transition: transform .25s ease;
    z-index: 99;
    overflow-y: auto;
  }

  body.p24-mobile-menu-open {
    overflow: hidden !important;
  }

  body.p24-mobile-menu-open .p24-mobile-drawer {
    transform: translateX(0);
  }

  body.p24-mobile-menu-open .p24-mobile-drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .p24-mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e8eef8;
  }

  .p24-mobile-drawer-title {
    color: #10234f;
    font-size: 20px;
    font-weight: 950;
    letter-spacing: -.02em;
  }

  .p24-mobile-drawer-close {
    width: 40px;
    height: 40px;
    border: 1px solid #d9e5f7;
    border-radius: 14px;
    background: #ffffff;
    color: #10234f;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .p24-mobile-drawer-nav {
    display: grid;
    gap: 8px;
    margin-bottom: 22px;
  }

  .p24-mobile-drawer-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    color: #10234f;
    text-decoration: none;
    font-size: 16px;
    font-weight: 800;
    background: #f6f9ff;
  }

  .p24-mobile-drawer-card {
    padding: 16px;
    border: 1px solid #e1eaf8;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    margin-bottom: 14px;
  }

  .p24-mobile-drawer-label {
    margin-bottom: 10px;
    color: #155dfc;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
  }

  .p24-mobile-drawer-contact {
    display: block;
    margin-bottom: 10px;
    color: #10234f;
    text-decoration: none;
    font-size: 16px;
    line-height: 1.35;
  }

  .p24-mobile-drawer-contact:last-child {
    margin-bottom: 0;
  }

  .p24-mobile-drawer-contact strong {
    display: block;
    font-size: 15px;
    line-height: 1.25;
  }

  .p24-mobile-drawer-contact small {
    display: block;
    margin-top: 4px;
    color: #627392;
    font-size: 13px;
    line-height: 1.35;
  }

  .p24-mobile-messengers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .p24-mobile-messengers a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 8px;
    border-radius: 14px;
    background: #eef4ff;
    color: #155dfc;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
  }

  .p24-mobile-menu-meta {
    margin-top: auto;
    padding-top: 18px;
    color: #6b7a98;
    font-size: 12px;
    line-height: 1.45;
  }
}