/* ==============================================
   BVI (версия для слабовидящих) — фиксы верстки
   Все правила скопированы под .bvi-body,
   поэтому НЕ влияют на обычную версию сайта.
   ============================================== */

/* === GENERAL: prevent horizontal overflow === */
body .bvi-body {
    overflow-x: hidden !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* === LINE-HEIGHT FIX: prevent text merging at large fonts === */
body .bvi-body * {
    line-height: 1.4 !important;
}

/* === NAV MENU: allow wrapping, remove fixed height === */
body .bvi-body .header-layout__submenu {
    flex-wrap: wrap !important;
    overflow: visible !important;
}

body .bvi-body .header-layout__submenu .dropdown {
    height: auto !important;
    white-space: nowrap !important;
}

body .bvi-body .header-layout__submenu .dropdown-link {
    padding: 8px 10px !important;
    line-height: 1.3 !important;
}

/* === DROPDOWN SUBMENUS: readable at large fonts === */
body .bvi-body .header-layout__submenu .dropdown-content {
    width: auto !important;
    min-width: 250px !important;
    max-width: 90vw !important;
    white-space: normal !important;
    position: absolute !important;
    z-index: 9999 !important;
}

body .bvi-body .header-layout__submenu .dropdown-content li {
    width: auto !important;
    min-height: unset !important;
}

body .bvi-body .header-layout__submenu .dropdown-content a {
    white-space: normal !important;
    word-wrap: break-word !important;
    line-height: 1.3 !important;
    padding: 10px 5px !important;
}

body .bvi-body .header-layout__submenu .dropdown-content-inner {
    position: static !important;
    width: auto !important;
    box-shadow: none !important;
    padding-left: 15px !important;
}

/* === "Услуги и специалисты" mega-menu === */
body .bvi-body .dropdown-content2 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    flex-direction: column !important;
    z-index: 99999 !important;
    padding: 20px !important;
}

body .bvi-body .dropdown-content2 .menu-block,
body .bvi-body .dropdown-content2 .menu-block2,
body .bvi-body .dropdown-content2 .menu-block3 {
    min-width: unset !important;
    width: 100% !important;
    flex: unset !important;
    margin-bottom: 15px !important;
}

body .bvi-body .dropdown-content2 a {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: block !important;
    padding: 5px 0 !important;
}

/* === SEARCH BUTTON: fix clipping at large font === */
body .bvi-body .mod-finder__search.input-group {
    margin-top: -5px !important;
    position: static !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 100% !important;
}

body .bvi-body .input-group .js-finder-search-query.form-control {
    flex: 1 1 auto !important;
    width: auto !important;
    float: none !important;
    min-width: 0 !important;
}

body .bvi-body .input-group .btn.btn-primary {
    height: auto !important;
    margin-top: 0 !important;
    padding: 6px 12px !important;
    position: static !important;
    float: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    width: auto !important;
}

/* === HOME BOXES (График работы, Записаться на прием) === */
body .bvi-body .home-box-wrapper {
    position: static !important;
    bottom: auto !important;
}

body .bvi-body .home_box_container {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
}

body .bvi-body .home_box_container li {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: unset !important;
}

body .bvi-body .home_box {
    width: 100% !important;
}

body .bvi-body .home_box h2 {
    line-height: 1.3 !important;
}

body .bvi-body .home_box .news {
    line-height: 1.4 !important;
}

/* === MAIN CONTENT: stack vertically === */
body .bvi-body .main-content-wrapper {
    flex-direction: column !important;
    margin-top: 20px !important;
}

/* === NEWS: single column in BVI mode === */
body .bvi-body .home-news {
    width: 100% !important;
}

body .bvi-body .news-container {
    flex-direction: column !important;
}

body .bvi-body .news-item {
    width: 100% !important;
}

/* === DIRECTIONS: full width, fix overlapping text === */
body .bvi-body .directions {
    width: 100% !important;
    margin-left: 0 !important;
    margin-top: 20px !important;
}

body .bvi-body .direction-content {
    height: auto !important;
    white-space: normal !important;
    padding: 12px 13px !important;
}

body .bvi-body .direction-content h3 {
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.3 !important;
}

/* === FOOTER: stack columns vertically === */
body .bvi-body .footer__banner {
    flex-direction: column !important;
    align-items: center !important;
}

body .bvi-body .footer__banner-content {
    width: 100% !important;
    max-width: 100% !important;
}

body .bvi-body .footer__box {
    flex-direction: column !important;
}

body .bvi-body .footer__box .box-item {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
}

body .bvi-body .footer__box .contact-row {
    flex-wrap: wrap !important;
}

body .bvi-body .footer__box .contact-desc {
    white-space: normal !important;
}

/* === TABLES: scrollable === */
body .bvi-body table {
    display: block !important;
    overflow-x: auto !important;
    max-width: 100% !important;
}
