/* ===== Протокол24 mobile hero fix v4.1 ===== */

/* На мобильном запрещаем горизонтальное переполнение всей страницы */
@media (max-width: 760px) {
  html,
  body,
  .p24-page {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .p24-wide,
  .p24-container {
    width: min(100% - 28px, 100%) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Верхняя тёмная полоса */
  .p24-topline {
    font-size: 13px !important;
  }

  .p24-topline-inner {
    min-height: auto !important;
    padding: 10px 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 7px !important;
    text-align: center !important;
  }

  .p24-topline-left {
    display: block !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
  }

  .p24-topline-right {
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 5px 12px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }

  .p24-topline-right span {
    width: auto !important;
  }

  .p24-topline-right a {
    font-size: 13px !important;
  }

  /* Шапка */
  .p24-header-inner {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }

  .p24-brand {
    max-width: calc(100% - 58px) !important;
    overflow: hidden !important;
  }

  .p24-brand span:last-child {
    display: block !important;
    max-width: 185px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    color: #10234f !important;
    font-size: 20px !important;
    font-weight: 950 !important;
    white-space: nowrap !important;
  }

  /* Hero */
  .p24-hero {
    padding: 34px 0 44px !important;
  }

  .p24-hero-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    min-width: 0 !important;
  }

  .p24-hero-grid > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .p24-eyebrow {
    max-width: 100% !important;
    display: inline-flex !important;
    white-space: normal !important;
    overflow: hidden !important;
    padding: 9px 14px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    border-radius: 999px !important;
  }

  .p24-hero h1 {
    max-width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: 18px !important;
    font-size: clamp(34px, 10.4vw, 44px) !important;
    line-height: 1.02 !important;
    letter-spacing: -0.055em !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .p24-hero-lead {
    max-width: 100% !important;
    margin-bottom: 24px !important;
    font-size: 17px !important;
    line-height: 1.55 !important;
    overflow-wrap: anywhere !important;
  }

  .p24-hero-ctas {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .p24-hero-ctas .p24-btn,
  .p24-hero-ctas a {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
  }

  /* Блок преимуществ под hero */
  .p24-proof-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 28px !important;
    width: 100% !important;
  }

  .p24-proof-item {
    width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 44px 1fr !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }

  .p24-proof-item span:last-child,
  .p24-proof-item div:last-child {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
  }

  /* Демо-карточку на мобильном чуть ниже и без распирания */
  .p24-product,
  .p24-product-card,
  .p24-protocol-demo {
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }
}

/* Очень узкие экраны */
@media (max-width: 430px) {
  .p24-brand span:last-child {
    max-width: 170px !important;
  }

  .p24-hero h1 {
    font-size: clamp(32px, 10.2vw, 40px) !important;
  }

  .p24-eyebrow {
    display: block !important;
  }
}

@media (max-width: 380px) {
  .p24-brand span:last-child {
    max-width: 145px !important;
  }

  .p24-hero h1 {
    font-size: 32px !important;
  }
}