/* Шапка torgi25.ru: адаптивный бренд и кнопка меню в одну строку */
.navbar-ag .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
}
.navbar-ag .navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
    padding: 0;
    white-space: normal;
}
.navbar-ag .brand-logo {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
}
.navbar-ag .brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.navbar-ag .brand-name {
    font-weight: 800;
    color: #1f4e79;
    letter-spacing: .01em;
    line-height: 1.12;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-ag .brand-sub {
    font-size: .74rem;
    color: #6b7789;
    letter-spacing: .04em;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-ag .brand-agency {
    font-size: 10.5px;
    line-height: 1.2;
    letter-spacing: .02em;
    color: #6b7789;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.navbar-ag .navbar-toggler {
    flex: 0 0 auto;
}

/* Десктоп: одна строка с длинным названием + подпись домена */
@media (min-width: 769px) {
    .navbar-ag .navbar-brand { flex: 0 0 auto; }
    .navbar-ag .brand-name { font-size: .92rem; letter-spacing: 0; }
    .navbar-ag .brand-sub { font-size: .72rem; }
    .navbar-ag .navbar-nav { gap: .25rem; }
    .navbar-ag .nav-link { padding-left: .5rem !important; padding-right: .5rem !important; }
}

/* Мобильные: компактный двухстрочный бренд, кнопка меню всегда справа */
@media (max-width: 768px) {
    .navbar-ag .brand-logo { width: 32px; height: 32px; }
    .navbar-ag .navbar-brand { gap: 6px; }
    .navbar-ag .brand-name { font-size: 1rem; line-height: 1.1; }
    .navbar-ag .brand-agency {
        font-size: 10px;
        line-height: 1.2;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .navbar-ag .navbar-toggler { padding: .3rem .45rem; }
}

@media (max-width: 360px) {
    .navbar-ag .brand-agency { font-size: 9px; }
    .navbar-ag .brand-name { font-size: .95rem; }
    .navbar-ag .brand-logo { width: 28px; height: 28px; }
}

/* Граница ровно 768px: на ней уже мобильный вариант, на 769px — десктопный */
@media (max-width: 768px) {
    .navbar-ag .brand-desktop { display: none !important; }
    .navbar-ag .brand-mobile { display: flex !important; }
}
@media (min-width: 769px) {
    .navbar-ag .brand-desktop { display: flex !important; }
    .navbar-ag .brand-mobile { display: none !important; }
}

/* Кнопки первого экрана: одинаковая геометрия и ровная колонка на мобильных */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}
.hero-actions .hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 44px;
    padding: .55rem 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: .5rem;
    white-space: nowrap;
    text-decoration: none;
}
.hero-actions .hero-btn i {
    font-size: 1.05em;
    line-height: 1;
    flex: 0 0 auto;
}
@media (max-width: 640px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: .55rem;
    }
    .hero-actions .hero-btn {
        width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
    }
}

/* Chrome иногда внедряет в страницу служебный элемент <settings-manager> —
   на некоторых машинах он рисуется синим кружком у правого края. Скрываем. */
settings-manager,
#settings-manager,
.page-settings-manager {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}
