/* positions.html — mobile: кнопки блока «Выбор направления службы» = как в карточке истории */

@media (max-width: 768px) {
  html body.page-positions section.modern-hero .modern-hero-bg::before,
  html body.page-positions section.modern-hero.positions-modern-hero .modern-hero-bg::before,
  html.m-next-ready body.page-positions section.modern-hero .modern-hero-bg::before,
  html.m-next-ready body.page-positions section.modern-hero.positions-modern-hero .modern-hero-bg::before,
  html.site-blocks body.page-positions section.modern-hero .modern-hero-bg::before,
  html.site-blocks body.page-positions section.modern-hero.positions-modern-hero .modern-hero-bg::before {
    background-size: auto 76% !important;
    background-position: right 8px center !important;
  }

  /* Шапка — «ГЛАВНАЯ» = «НОВОСТИ» (одинаковая ширина, высота = бургер) */
  html body.page-positions .site-header .header-inner .header-actions > .home-link.top-news-btn,
  html body.page-positions .site-header .header-inner .header-actions > a.home-link.top-news-btn {
    flex: 1 1 0 !important;
    flex-basis: 0 !important;
    inline-size: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    block-size: 48px !important;
    padding: 0 12px !important;
    margin: 0 !important;
    font-size: 12px !important;
    line-height: 1.12 !important;
    letter-spacing: 0 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
  }

  html body.page-positions .site-header .header-actions .home-link.top-news-btn:first-child {
    display: inline-flex !important;
  }

  html body.page-positions .positions-block--divisions .positions-divisions-actions--mobile.fund-action-row-mobile {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: clamp(20px, 3vw, 28px) 0 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* 1:1 с #openContractBtnHistoryMobileLabs в карточке «24 февраля 2022 года…» */
  html body.page-positions .positions-block--divisions .positions-divisions-actions--mobile .contract-btn,
  html body.page-positions .positions-block--divisions .positions-divisions-actions--mobile .history-action-btn {
    width: var(--index-news-btn-width, 6.4cm) !important;
    min-width: var(--index-news-btn-width, 6.4cm) !important;
    max-width: min(var(--index-news-btn-width, 6.4cm), 100%) !important;
    inline-size: var(--index-news-btn-width, 6.4cm) !important;
    height: var(--index-news-btn-height, 1.3cm) !important;
    min-height: var(--index-news-btn-height, 1.3cm) !important;
    max-height: var(--index-news-btn-height, 1.3cm) !important;
    block-size: var(--index-news-btn-height, 1.3cm) !important;
    padding: 0 0.28cm !important;
    margin: 0 !important;
    font-size: 14px !important;
    line-height: 1.12 !important;
    flex: 0 0 var(--index-news-btn-width, 6.4cm) !important;
    align-self: start !important;
    justify-self: start !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    border-radius: var(--index-news-btn-radius, 14px) !important;
    box-sizing: border-box !important;
  }

  /* Карточки направлений — «Перейти →» слева, как на desktop */
  html body.page-positions .positions-block--divisions .hero-action-card .hero-action-cta,
  html body.page-positions .positions-block--divisions a.hero-action-card > .hero-action-cta,
  html body.page-positions .positions-block--divisions .js-division-card .hero-action-cta {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    inline-size: auto !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    block-size: auto !important;
    margin-top: auto !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    filter: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    align-self: flex-start !important;
    text-align: left !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: var(--positions-brand-mid, #3f93ad) !important;
    -webkit-text-fill-color: var(--positions-brand-mid, #3f93ad) !important;
  }
}

/* Модалки «Краснодар» / «Донецк» — заголовок по центру */
@media (max-width: 768px) {
  html body.page-positions #officeMapModal#officeMapModal .social-legal-modal-header,
  html body.page-positions #officeMapModal#officeMapModal .social-legal-modal-header h2,
  html body.page-positions #officeMapModal#officeMapModal #officeMapModalTitle {
    text-align: center !important;
    justify-content: center !important;
  }

  html body.page-positions #officeMapModal#officeMapModal .social-legal-modal-header h2,
  html body.page-positions #officeMapModal#officeMapModal #officeMapModalTitle {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* «ОСТАВИТЬ ЗАЯВКУ» (Краснодар/Донецк) = «ОТПРАВИТЬ ЗАЯВКУ» (ОСТАВИТЬ ЗАЯВКУ) */
  html body.page-positions #officeMapModal#officeMapModal .social-legal-modal-footer #officeFeedbackBtn,
  html body.page-positions #officeMapModal#officeMapModal button#officeFeedbackBtn.social-legal-submit-btn {
    inline-size: var(--index-news-btn-width, 6.4cm) !important;
    width: var(--index-news-btn-width, 6.4cm) !important;
    min-width: var(--index-news-btn-width, 6.4cm) !important;
    max-width: min(var(--index-news-btn-width, 6.4cm), 100%) !important;
    flex: 0 0 var(--index-news-btn-width, 6.4cm) !important;
    height: calc(1.5cm - 4px) !important;
    min-height: 0 !important;
    max-height: calc(1.5cm - 4px) !important;
    block-size: calc(1.5cm - 4px) !important;
    padding: 0 0.32cm !important;
    font-size: 15px !important;
    line-height: 1.12 !important;
    border-radius: var(--index-news-btn-radius, 14px) !important;
    box-sizing: border-box !important;
  }

  /* «ОТПРАВИТЬ ЗАЯВКУ» — цвет как «КОНТРАКТ с ВС РФ» (блок 2) */
  html body.page-positions #officeFeedbackModal#officeFeedbackModal .social-legal-modal-footer #officeFeedbackSubmitBtn,
  html body.page-positions #officeFeedbackModal#officeFeedbackModal button#officeFeedbackSubmitBtn.social-legal-submit-btn {
    background: var(--oai-picture-blue-gradient, linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%)) !important;
    background-image: var(--oai-picture-blue-gradient, linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%)) !important;
    background-color: transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: var(--oai-picture-blue-shadow, 0 12px 30px rgba(37, 84, 100, 0.28)) !important;
    border: none !important;
    filter: none !important;
  }

  html body.page-positions #officeFeedbackModal#officeFeedbackModal .social-legal-modal-footer #officeFeedbackSubmitBtn:hover,
  html body.page-positions #officeFeedbackModal#officeFeedbackModal .social-legal-modal-footer #officeFeedbackSubmitBtn:focus-visible,
  html body.page-positions #officeFeedbackModal#officeFeedbackModal button#officeFeedbackSubmitBtn.social-legal-submit-btn:hover,
  html body.page-positions #officeFeedbackModal#officeFeedbackModal button#officeFeedbackSubmitBtn.social-legal-submit-btn:focus-visible {
    background: var(--oai-picture-blue-gradient-hover, linear-gradient(135deg, #1f4b5b 0%, #2f7892 52%, #75adbc 100%)) !important;
    background-image: var(--oai-picture-blue-gradient-hover, linear-gradient(135deg, #1f4b5b 0%, #2f7892 52%, #75adbc 100%)) !important;
    box-shadow: var(--oai-picture-blue-shadow-hover, 0 16px 36px rgba(37, 84, 100, 0.36)) !important;
  }

  /* «ОСТАВИТЬ ЗАЯВКУ», «БОЕВОЕ ПОДРАЗДЕЛЕНИЕ» и др. — заголовок по центру */
  html body.page-positions #divisionDocsModal#divisionDocsModal .social-legal-modal-header,
  html body.page-positions #divisionDocsModal#divisionDocsModal .division-docs-modal-header {
    height: auto !important;
    min-height: 1.45cm !important;
    max-height: none !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    padding-left: 54px !important;
    padding-right: 54px !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
  }

  html body.page-positions #officeFeedbackModal#officeFeedbackModal .social-legal-modal-header,
  html body.page-positions div#officeFeedbackModal#officeFeedbackModal .social-legal-modal-header {
    padding-left: 54px !important;
    padding-right: 54px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  html body.page-positions #officeFeedbackModal#officeFeedbackModal .social-legal-modal-header h2,
  html body.page-positions #officeFeedbackModal#officeFeedbackModal #officeFeedbackModalTitle,
  html body.page-positions #divisionDocsModal#divisionDocsModal .social-legal-modal-header h2,
  html body.page-positions #divisionDocsModal#divisionDocsModal #divisionDocsModalTitle {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* «ТЕХНИЧЕСКОЕ, МАТЕРИАЛЬНОЕ И МЕДИЦИНСКОЕ ОБЕСПЕЧЕНИЕ» — полностью внутри модалки, без уменьшения шрифта */
  html body.page-positions #divisionDocsModal#divisionDocsModal .social-legal-modal-header h2,
  html body.page-positions #divisionDocsModal#divisionDocsModal #divisionDocsModalTitle {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    text-overflow: clip !important;
  }

  /* «КОНТРАКТ с ВС РФ» (division docs) = «ОТПРАВИТЬ ЗАЯВКУ» (ОСТАВИТЬ ЗАЯВКУ) */
  html body.page-positions #divisionDocsModal#divisionDocsModal #divisionDocsContractBtn.calc-tab-btn,
  html body.page-positions #divisionDocsModal#divisionDocsModal button#divisionDocsContractBtn.division-docs-contract-btn {
    inline-size: var(--index-news-btn-width, 6.4cm) !important;
    width: var(--index-news-btn-width, 6.4cm) !important;
    min-width: var(--index-news-btn-width, 6.4cm) !important;
    max-width: min(var(--index-news-btn-width, 6.4cm), 100%) !important;
    flex: 0 0 var(--index-news-btn-width, 6.4cm) !important;
    height: calc(1.5cm - 4px) !important;
    min-height: 0 !important;
    max-height: calc(1.5cm - 4px) !important;
    block-size: calc(1.5cm - 4px) !important;
    padding: 0 0.32cm !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.12 !important;
    border-radius: var(--index-news-btn-radius, 14px) !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }

  /* «ВЫБОР ДОЛЖНОСТИ» — заголовок по центру (симметричные отступы под крестик / «назад») */
  html body.page-positions #contractModal#contractModal .contract-modal-header {
    padding-left: 54px !important;
    padding-right: 54px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  html body.page-positions #contractModal#contractModal.contract-modal-has-back .contract-modal-header {
    padding-left: 54px !important;
    padding-right: 54px !important;
  }

  html body.page-positions #contractModal#contractModal .contract-modal-title,
  html body.page-positions #contractModal#contractModal .modal-title.contract-modal-title {
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* «ВЫБОР ДОЛЖНОСТИ» — «ОТПРАВИТЬ ЗАЯВКУ» = «КОНТРАКТ с ВС РФ» (БОЕВОЕ ПОДРАЗДЕЛЕНИЕ) */
  html body.page-positions #contractModal#contractModal .contract-modal-footer,
  html body.page-positions #contractModal#contractModal .form-actions.contract-modal-footer {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 0 14px !important;
    height: 1.45cm !important;
    min-height: 1.45cm !important;
    max-height: 1.45cm !important;
    flex: 0 0 1.45cm !important;
    box-sizing: border-box !important;
  }

  html body.page-positions #contractModal#contractModal .contract-modal-footer > .note:empty {
    display: none !important;
    width: 0 !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 0 !important;
  }

  html body.page-positions #contractModal#contractModal .contract-modal-footer .submit-btn,
  html body.page-positions #contractModal#contractModal .contract-modal-footer > .submit-btn,
  html body.page-positions #contractModal#contractModal button[type="submit"].submit-btn {
    inline-size: var(--index-news-btn-width, 6.4cm) !important;
    width: var(--index-news-btn-width, 6.4cm) !important;
    min-width: var(--index-news-btn-width, 6.4cm) !important;
    max-width: min(var(--index-news-btn-width, 6.4cm), 100%) !important;
    flex: 0 0 var(--index-news-btn-width, 6.4cm) !important;
    height: calc(1.5cm - 4px) !important;
    min-height: 0 !important;
    max-height: calc(1.5cm - 4px) !important;
    block-size: calc(1.5cm - 4px) !important;
    padding: 0 0.32cm !important;
    margin: 0 !important;
    font-size: 15px !important;
    line-height: 1.12 !important;
    border-radius: var(--index-news-btn-radius, 14px) !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    align-self: center !important;
  }

  /* #calcModal — «ВЫБРАТЬ РЕГИОН» и «КАЛЬКУЛЯТОР» в одну строку */
  html body.page-positions #calcModal#calcModal .calc-tabs,
  html body.page-positions #calcModal#calcModal .calc-modal-footer-sticky .calc-tabs {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: none !important;
  }

  html body.page-positions #calcModal#calcModal .calc-tabs > .calc-tab-btn,
  html body.page-positions #calcModal#calcModal .calc-tabs > button.calc-tab-btn,
  html body.page-positions #calcModal#calcModal .calc-modal-footer-sticky .calc-tabs > .calc-tab-btn,
  html body.page-positions #calcModal#calcModal .calc-modal-footer-sticky .calc-tabs > button.calc-tab-btn {
    flex: 1 1 0 !important;
    width: calc((100% - 10px) / 2) !important;
    min-width: 0 !important;
    max-width: calc((100% - 10px) / 2) !important;
    inline-size: calc((100% - 10px) / 2) !important;
    margin: 0 !important;
    align-self: center !important;
  }

  /* #calcModal — подвал: единая высота и выравнивание */
  html body.page-positions #calcModal#calcModal .calc-modal-footer-sticky {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0 !important;
    padding: 0 14px !important;
    height: 1.45cm !important;
    min-height: 1.45cm !important;
    max-height: 1.45cm !important;
    box-sizing: border-box !important;
  }

  html body.page-positions #calcModal#calcModal .calc-footer-left,
  html body.page-positions #calcModal#calcModal .calc-footer-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  /* #calcModal — «СБРОС» = «ВЫБРАТЬ РЕГИОН» по размеру, стилю и позиции слева */
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="region"] .calc-footer-right,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="money"] .calc-footer-right,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"].calc-mode-region .calc-footer-right,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"].calc-mode-money .calc-footer-right {
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="region"] #moneyCalcReset,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="money"] #moneyCalcReset,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"].calc-mode-region #moneyCalcReset,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"].calc-mode-money #moneyCalcReset,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="region"] button#moneyCalcReset.money-reset-btn,
  html body.page-positions #calcModal#calcModal[data-oai-mobile-reset-ready="1"][data-calc-flow-mode="money"] button#moneyCalcReset.money-reset-btn {
    flex: 1 1 0 !important;
    width: calc((100% - 10px) / 2) !important;
    min-width: 0 !important;
    max-width: calc((100% - 10px) / 2) !important;
    inline-size: calc((100% - 10px) / 2) !important;
    height: 1.3cm !important;
    min-height: 1.3cm !important;
    max-height: 1.3cm !important;
    block-size: 1.3cm !important;
    padding: 0 10px !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border: none !important;
    border-radius: var(--site-fund-btn-radius, 14px) !important;
    background: var(--oai-picture-blue-gradient, linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%)) !important;
    background-image: var(--oai-picture-blue-gradient, linear-gradient(135deg, #2f7085 0%, #3f93ad 52%, #92cbdb 100%)) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: var(--oai-picture-blue-shadow, 0 12px 30px rgba(37, 84, 100, 0.28)) !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 480px) {
  html body.page-positions .site-header .header-inner .header-actions > .home-link.top-news-btn,
  html body.page-positions .site-header .header-inner .header-actions > a.home-link.top-news-btn {
    display: inline-flex !important;
    flex: 1 1 0 !important;
    flex-basis: 0 !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    block-size: 48px !important;
    padding: 0 12px !important;
    font-size: 12px !important;
    line-height: 1.12 !important;
    border-radius: 14px !important;
  }
}
