* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Stetica", sans-serif;
}

@font-face {
    font-family: "Stetica";
    src: url("./fonts/AA_Stetica_Regular.otf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Stetica";
    src: url("./fonts/AA_Stetica_Bold.otf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "Stetica";
    src: url("./fonts/AA_Stetica_Italic.otf") format("truetype");
    font-weight: 400;
    font-style: italic;
}

body {
    hyphens: none;
    word-break: normal;
    overflow-wrap: break-word;
}

.body {
    background-color: #ffffff;
    color: #333;
    transition: 0.2 ease;
    transform: 0.2 ease;
}

.layout {
    display: flex;
}

.logo-img {
    width: 50px;
    height: auto;
    margin-top: -10px;
    margin-left: -3px
}

.scheme-img {
    width: 100%;
    max-width: 900px;
}

.logo {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    padding: 10px;
}

.info-logo {
    width: 70vw;
    min-width: 300px;
    max-width: 500px;
}

.link-logo {
    width: 30px;
    height: auto;
}


.menu {
    display: flex;
    flex-direction: column;
    gap: 18px;

    width: 190px
}

.menu a {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    transition: 0.2s;
}

.menu a.active {
    color: #32a850;
    font-weight: bold;
}

.menu a:hover {
    color: #32a850;
}


.links {
    display: flex;
    flex-direction: column;
    gap: 18px;

}

.links div {
    text-decoration: none;
    color: #333;
    font-size: 17px;
    transition: 0.2s;
}

.links div.active {
    color: #32a850;
    font-weight: bold;
}

.links div:hover {
    color: #32a850;
}


.breadMain {
    position: relative; /* было absolute */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    top: 0px;
    left: 0px;
    pointer-events: all; /* чтобы не блокировал клики на content */
    z-index: 0;
}
/* Content */





.crumbies {
    position: relative;
    width: 100%;
    display: flex;
    align-items: flex-start;
    pointer-events: none;
}

/* Белый элемент слева — маска */
/*.el-left {
    position: absolute;
    left: 0;
    top: 0;
    width: 90px;
    height: 28px;
    background-color: #fff;
    z-index: 2;
    pointer-events: none;
    box-shadow: #ffffff 19px 118px 6px -5px;

} */

/* Невидимый элемент справа */
.el-right {
    position: absolute; /* было fixed — это и вызывало проблемы */
    right: 0px;
    top: 0;
    width: 1px;
    height: 28px;
    pointer-events: none;
    z-index: 1;
}






.content {
    z-index: 0;
    flex: 1;
    padding: 40px 95px;
    padding-top: 0px; /* добавлено — отступ под breadcrumbs */
    background: #ffffff;
    width: 100%;
    height: 100%;
    margin-top: 0px; /* было -40px — убрать */
    min-height: unset;
    height: auto;
    pointer-events: all;
}

.top-title {
    text-align: center;
    font-size: 25px;
    font-weight: bold;
    align-self: center;
    margin-top: 50px;
    hyphens: none;
}

.breadcrumbs {
    z-index: 1;
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    height: 28px;
    /* убрали min-width — он растягивал страницу */
    top: 30px;
    left: 100px;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    position: absolute; /* было relative */
    /* right ограничиваем, чтобы не выходил за пределы */
    right: 20px;
    pointer-events: auto;
}

.breadcrumbs-track {
    display: flex;
    white-space: nowrap;
}

.breadcrumbs.show {
    opacity: 1
}

.breadcrumbs a {
    padding: 5px;
    cursor: pointer;
    color: #888;
    text-decoration: none;
}

.breadcrumbs a::after {
    content: ">";
    margin-left: 10px;
    padding: 5px;
}

.breadcrumbs currenta2 {
    cursor: pointer;
    color: #32a850;
    border: 1px solid #32a850;
    border-radius: 10px;
    border-bottom-left-radius: 0px;
    border-bottom-right-radius: 0px;
    padding: 5px;
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
    
    
}

.breadcrumbs a:hover {
    color:#32a850;
}

.divider {
    z-index: 1;
    width: auto;
    height: 18px;
    border-bottom: 1px solid #32a850;
    margin-top: 40px;
    margin-bottom: 28px;
}

h2 {
    font-size: 26px;
    margin-bottom: 30px;
    hyphens: none;
}

.section {
    margin-bottom: 45px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.section.show {
    opacity: 1
}

.section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    hyphens: none;
}

.warning {
    color: #1f8b3a
}

.bebra {
    font-size: 16px;
    margin-bottom: 8px;
}

.section ul {
    list-style: none;
}

.section ul li {
    z-index: 1;
    margin-bottom: 8px;
    margin-top: 8px;
    padding-left: 16px;
    position: relative;
    font-size: 16px;
}

.section ul li::before {
    z-index: 1;
    content: "▶︎";
    position: absolute;
    left: 0;
    color: #32a850;
    font-size: 11px;
}

/* Buttons */



button {
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}


.btn-outline {
    background-color: transparent;
    border: 1px solid #3ec07f;
    color: #333;
    margin-bottom: 0px;
}

.btn-outline:hover {
    background-color: #e8fcef;
}

.btn-outline:active {
    background-color: #3ec07f;
    color: white;
}

.btn-outline-glossary {
    background-color:#effff4;
    border: 1px solid #3ec07f;
    color: #333;
    margin-bottom: 0px;
}

.btn-outline-glossary:hover {
    background-color:#e8fcef;
}

.btn-outline-glossary:active {
    background-color: #3ec07f;
    color: white;
}

.btn-outline-greene {
    background-color: transparent;
    border: 1px solid #3ec07f;
    color: #333;
    margin-bottom: 0px;
}

.btn-outline-greene:hover {
    background-color: #e8fcef;
}

.btn-outline-greene:active {
    background-color: #3ec07f;
    color: white;
}

.btn-outline-comp {
    background-color: transparent;
    border: 1px solid #3ec07f;
    color: #333;
    margin-bottom: 10px;
    min-height: 45px;
    text-align: left;
}

.btn-outline-comp:hover {
    background-color: #e8fcef;
}

.btn-outline-comp:active {
    background-color: #3ec07f;
    color: white;
}

/* Бургер кнопка */
.burger {
    z-index: 5;
    font-size: 27px;
    color: #2e2e2e;
    background: #ffffff;
    width: 60px;
    padding-left: 15px;
    border: 1px solid #e0e0e0;
    border-left-color: #ffffff;
    border-top-left-radius: 0%;
    border-bottom-left-radius: 0%;
    cursor: pointer;
    margin-top: -17px;
    margin-right: -78px;
}


.return {
    z-index: 3;
    position: absolute;
    font-size: 27px;
    color: #2e2e2e;
    background: #ffffff;
    width: 58px;
    height: 58px;
    padding-left: 15px;
    border: 1px solid #e0e0e0;
    border-top-left-radius: 0%;
    border-bottom-left-radius: 0%;
    cursor: pointer;
    margin-top: -48px;
    margin-left: 20px;
}

.return:hover {
    color:#32a850
}

/* Десктопная кнопка вопроса */
.question {
    position: fixed;
    z-index: 5; /* Чтобы была поверх оверлея */
    top: 151px;
    left: 14px; /* Прячем её за экраном синхронно с сайдбаром */
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-top-left-radius: 0%;
    border-bottom-left-radius: 0%;
    background: #ffffff;
    color: #2e2e2e;
    font-size: 27px;
    cursor: pointer;
    transition: transform 0.4s ease, color 0.2s; /* Анимация выезда */
}

/* Когда сайдбар открывается, вытаскиваем кнопку (десктоп) */
.question.sidebar-opened {
    transform: translateX(205px); 
}

.question:hover {
    color: #32a850;
}
/* Анимация sidebar */
.sidebar {
    box-shadow: 1px 0px 8px 0px #3333337c;
    z-index: 4;
    position: fixed;
    left: -205px;
    top: 0;
    width: 220px;
    height: 100vh;
    background: #ffffff;
    padding: 30px 20px;
    border-right: 1px solid #e0e0e0;
    transition: 0.3s;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between; 
    margin-bottom: 30px;
}

/* затемнение */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.2); /* Легкое затемнение */
    backdrop-filter: grayscale(40%); /* Обесцвечиваем всё, что под ним (аналог твоего saturate) */
    -webkit-backdrop-filter: grayscale(40%); /* Для Safari */
    z-index: 3; /* Он будет выше контента и кнопок, но ниже сайдбара (у него z-index: 4) */
    opacity: 0;
    pointer-events: none; /* Пропускает клики сквозь себя, когда невидим */
    transition: opacity 0.3s ease;
}

/* Класс, который делает оверлей активным */
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all; /* Перехватывает клики (чтобы нельзя было нажимать на кнопки под ним) */
}

/* Скрытое состояние */




.sidebar.opened {
    transform: translateX(93%);
    filter: saturate(100%)
}

.bebrinka {
    display: flex
}



.breadMain {
    transition: background-color 0.4s ease, filter 0.4s ease;
}

.content {
    transition: background-color 0.4s ease, filter 0.4s ease;
}

.body {
    transition: background-color 0.4s ease, filter 0.4s ease;
}

.sidebar {
    transition: transform 0.4s ease, filter 0.4s ease;
}

/* Состояния остаются без transition */


.sidebar.opened {
    transform: translateX(93%);
    filter: saturate(100%);
}





.med-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.med-table th {
    background-color: #1f8b3a;
    color: white;
    padding: 10px;
    border: 1px solid #ffffff;
    text-align: center;
}

.med-table td {
    padding: 10px;
    border: 1px solid #ffffff;
    background-color: #32a85041;
    vertical-align: top;
}

.med-table tr:nth-child(even) td {
    background-color:#44a75d1c;
}

.group {
    font-weight: bold;
    width: 200px;
}

.red {
    color: red;
    text-decoration: underline;
}



.separator-drug {
    font-size: 10px;
}

/* ФИКСЫ */

.burger,
.return,
.question {
    width: 60px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
}

.burger {
    position: absolute;
    top: 50px;
    right: 18px;
}

.return {
    position: absolute;
    top: 140px;
    left: 199px;
}


/* ========================================= */
/* МОБИЛЬНАЯ ВЕРСИЯ              */
/* ========================================= */
@media (max-width: 768px) {
    body, .body {
        overflow-x: hidden;
    }

    .content {
        padding: 60px 20px 25px 20px;
    }

    /* Сайдбар */
    .sidebar {
        left: -217px;
    }
    .sidebar.opened {
        transform: translateX(99%);
    }

    /* Хлебные крошки и заголовок */
    .breadcrumbs {
        left: 20px;
        right: 10px;
        top: 90px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }
    .breadcrumbs-track {
        min-width: max-content;
    }
    .el-left {
        display: none;
    }
    
    .top-title {
        position: fixed;
        top: 0px;
        left: 50%; /* Поправил центровку */
        transform: translateX(-50%);
        padding-left: 60px;
        padding-top: 20px;
        padding-bottom: 11px;
        width: 100%;
        font-size: 20px;
        margin: 0;
        z-index: 2;
        background-color: white;
        transition: filter 0.4s ease;
    }

    /* Элементы управления (Кнопки сайдбара) */
    .burger {
        top: 27px;
        right: 18px;
        font-size: 22px;
        border-radius: 50%; /* Делаем её круглой */
        border: 1px solid #e0e0e0;
        width: 45px;
        height: 45px;
    }

    .return {
        top: 58px;
        left: 270px;
        font-size: 22px;
        border-radius: 50%; /* Делаем её круглой */
        border: 1px solid #e0e0e0;
        width: 45px;
        height: 45px;
    }

    /* Мобильная кнопка вопроса — отвязываем от анимации сайдбара! */
    .question {
        top: 10px; /* Аккуратный отступ сверху */
        right: 15px; /* Аккуратный отступ справа */
        left: auto;
        border-radius: 50%; /* Делаем её круглой */
        border: 1px solid #e0e0e0;
        width: 45px;
        height: 45px;
        font-size: 22px;
        transform: none !important; /* Насильно запрещаем ей уезжать вправо при открытии сайдбара */
        transition: opacity 0.3s ease;
    }
    
    /* Если сайдбар открыт, просто скрываем кнопку вопроса на мобилке, чтобы не мешала */
    .question.sidebar-opened {
        opacity: 0;
        pointer-events: none;
    }

    /* Контентные кнопки и таблицы */
    .btn-outline,
    .btn-outline-glossary,
    .btn-outline-greene {
        display: block;
        width: 100%;
        margin-bottom: 12px;
        padding: 8px 12px;
        font-size: 16px;
        -webkit-tap-highlight-color: transparent;
    }
    
    button:active,
    .btn-outline:active,
    .btn-outline-glossary:active,
    .btn-outline-greene:active {
        background-color: #3ec07f;
        color: white;
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    .med-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        font-size: 14px;
    }
    
    .med-table th,
    .med-table td {
        white-space: normal;
    }

    .divider {
        width: calc(100% + 10px);
    }
}

