/**
 * Base layer – минимальные глобальные правила.
 * Токены: _variables.css | Кнопки: _buttons.css | Компоненты: _components.css
 */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    /* Резерв места под скроллбар: макет не «прыгает», когда бар появляется/исчезает */
    scrollbar-gutter: stable;
}

/*
 * Единая content-grid: шапка / hero / секции / футер.
 * Astra даёт .ast-container { max-width: 100% } – перекрываем.
 * Токены: --container-max, --container-pad-x (_variables.css).
 */
.ast-container,
.header-main__container,
.header-topbar__container,
.footer-container,
.footer-bottom__inner {
    max-width: var(--container-max) !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-pad-x) !important;
    padding-right: var(--container-pad-x) !important;
    box-sizing: border-box;
}

/*
 * H1: обычный перенос при переполнении (как у body-текста).
 * Astra даёт overflow-wrap только .ast-article-inner – hero H1 там не лежит.
 * Не используем text-wrap: balance – иначе перенос отличается от подзаголовка.
 */
h1 {
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

/* Скрытый honeypot / a11y helper */
.ps-visually-hidden,
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =============================================================================
   Устранение браузерной точечной / пунктирной обводки (dotted focus outline)
   ============================================================================= */
/* Убираем пунктирную обводку при клике мыши или тапе на ссылки, кнопки и элементы */
a,
button,
summary,
[tabindex] {
    -webkit-tap-highlight-color: transparent;
}

a:focus:not(:focus-visible),
a:active,
button:focus:not(:focus-visible),
button:active,
summary:focus:not(:focus-visible),
summary:active,
[tabindex]:focus:not(:focus-visible) {
    outline: none !important;
    outline-style: none !important;
    box-shadow: none !important;
}

/* Для браузера Firefox: убираем внутреннюю системную пунктирную рамку */
a::-moz-focus-inner,
button::-moz-focus-inner,
input::-moz-focus-inner {
    border: 0 !important;
    outline: none !important;
}

