* {
    font-family: Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.5;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1 {
    color: #000;
    font-size: 22px;
    margin-bottom: 25px;
    font-weight: normal;
}

.section-title {
    color: #000;
    font-size: 18px;
    font-weight: normal;
    margin: 25px 0 12px 0;
}

.section-links {
    margin-bottom: 25px;
}

.section-links a {
    display: block;
    padding: 4px 0;
    text-decoration: none;
    color: #5a7ea1;
}

.section-links a:hover {
    color: #3a5e81;
}

/* Хлебные крошки */
.breadcrumbs {
    margin: 60px 0 20px 0;
    font-size: 14px;
    color: #666;
}

.breadcrumbs a {
    color: #2c3e50;
    text-decoration: none;
}

.breadcrumbs span {
    color: #7f8c8d;
}

.breadcrumbs .separator {
    margin: 0 8px;
    color: #bdc3c7;
}

/* Стили для ссылок */
.link {
    color: #1155cc;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Ссылки в тексте - черные подчеркнутые */
a:not(.link):not(.nav-btn):not(.menu-tile):not(.search-result):not(.section-links a):not(.breadcrumbs a) {
    color: #000;
    text-decoration: underline;
}

/* Якоря-заголовки обычного стиля как просто заголовки */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit;
    text-decoration: none;
}

/* Стили для мобильной навигации - iOS-style с серо-синим цветом */
@media (max-width: 768px) {
    .mobile-nav {
        display: flex !important;
        gap: 10px;
        margin: 20px 0 !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        background: #f8f9fa;
        padding: 16px;
        border-radius: 12px;
        border: 1px solid #e9ecef;
        align-items: center;
        /* Фиксируем высоту контейнера */
        min-height: 100px;
        height: 100px;
        /* Гарантируем, что кнопки не будут переноситься */
        flex-wrap: nowrap;
    }
    
    .nav-btn {
        text-decoration: none;
        border-radius: 4px;
        font-weight: normal !important;
        display: flex;
        align-items: center;
        justify-content: center;
        /* УВЕЛИЧЕНА высота кнопок */
        height: 68px;
        min-height: 68px;
        max-height: 68px;
        box-sizing: border-box;
        border: none;
        /* Адаптивный текст */
        font-size: 14px !important;
        position: relative;
        text-align: center;
        line-height: 1.2;
        /* Свойства для обработки длинного текста */
        overflow: hidden;
        white-space: normal;
        word-wrap: break-word;
        word-break: normal;
        hyphens: auto;
        padding: 8px 12px;
        /* Выравнивание содержимого по центру */
        align-items: center;
        /* ФИКСИРУЕМ РАЗМЕРЫ КНОПОК */
        flex-shrink: 0;
    }
    
    /* Primary action - серо-синий (3/4 ширины по умолчанию) */
    .nav-btn.forward {
        background: #5D7A9E;
        color: white;
        /* Фиксируем ширину 3/4 по умолчанию */
        flex: 0 0 75%;
        width: 75%;
        max-width: 75%;
        padding: 8px 40px 8px 16px;
        box-shadow: 0 2px 8px rgba(93, 122, 158, 0.3);
        /* Адаптивный текст */
        font-size: min(3.2vw, 14px) !important;
        justify-content: center;
    }
    
    .nav-btn.forward::after {
        content: "→";
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        font-size: min(4.2vw, 16px);
    }
    
    /* Secondary action - кнопка меню (1/4 ширины по умолчанию) */
    .nav-btn.back {
        background: transparent;
        color: #5D7A9E;
        border: 1px solid #5D7A9E;
        padding: 8px 12px;
        /* Фиксируем ширину 1/4 по умолчанию */
        flex: 0 0 25%;
        width: 25%;
        max-width: 25%;
        min-width: 25%;
        /* Адаптивный текст для кнопки назад */
        font-size: min(2.8vw, 13px) !important;
        white-space: normal;
        word-wrap: break-word;
        word-break: normal;
        /* Горизонтальное расположение иконки и текста */
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .nav-btn.back::before {
        content: "☰";
        margin-right: 6px;
        font-size: min(3.5vw, 15px);
        flex-shrink: 0;
        /* Фиксируем иконку слева */
        align-self: center;
    }
    
    /* Содержимое кнопки назад - ПОЛНЫЙ ТЕКСТ */
    .nav-btn.back .btn-text {
        flex: 1;
        text-align: left;
        line-height: 1.2;
        word-wrap: break-word;
        word-break: normal;
        /* ПОКАЗЫВАЕМ ВЕСЬ ТЕКСТ */
        display: block;
        overflow: visible;
        max-height: none;
        white-space: normal;
        /* Гарантируем, что текст не выходит за границы */
        width: 100%;
    }
    
    /* Центрируем текст в кнопке следующая - ПОЛНЫЙ ТЕКСТ */
    .nav-btn.forward .btn-text {
        text-align: center;
        width: 100%;
        white-space: normal;
        word-wrap: break-word;
        word-break: normal;
        line-height: 1.2;
        /* ПОКАЗЫВАЕМ ВЕСЬ ТЕКСТ */
        display: block;
        overflow: visible;
        max-height: none;
    }
    
    /* Disabled state - ОБЕ КНОПКИ СЕРЫЕ */
    .nav-btn.disabled {
        background: #bdbdbd !important;
        color: #757575 !important;
        border-color: #bdbdbd !important;
        cursor: not-allowed;
        opacity: 0.6;
        /* Убираем тень у disabled кнопок */
        box-shadow: none !important;
    }
    
    .nav-btn.disabled::before,
    .nav-btn.disabled::after {
        display: none; /* Скрываем иконки */
    }
    
    /* Скрываем текст в disabled кнопках */
    .nav-btn.disabled .btn-text,
    .nav-btn.disabled:empty::before,
    .nav-btn.disabled:empty::after {
        display: none !important;
    }
    
    /* Hover states - только для активных кнопок */
    .nav-btn.forward:not(.disabled):hover {
        background: #4A6380;
    }
    
    .nav-btn.back:not(.disabled):hover {
        background: rgba(93, 122, 158, 0.1);
    }
    
    /* Отключаем hover для disabled кнопок */
    .nav-btn.disabled:hover {
        background: #bdbdbd !important;
        border-color: #bdbdbd !important;
    }
    
    /* ИЗМЕНЕНЫ ПРОПОРЦИИ ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
    @media (max-width: 400px) {
        .mobile-nav {
            min-height: 105px;
            height: 105px;
            padding: 14px;
        }
        
        .nav-btn {
            height: 72px;
            min-height: 72px;
            max-height: 72px;
        }
        
        /* Первая кнопка 35%, вторая 65% */
        .nav-btn.back {
            flex: 0 0 35%;
            width: 35%;
            max-width: 35%;
            min-width: 35%;
            font-size: min(3.2vw, 14px) !important;
            padding: 8px 10px;
        }
        
        .nav-btn.forward {
            flex: 0 0 65%;
            width: 65%;
            max-width: 65%;
            font-size: min(3.5vw, 15px) !important;
            padding: 8px 42px 8px 16px;
        }
        
        .nav-btn.forward::after {
            font-size: min(5vw, 18px);
            right: 16px;
        }
        
        .nav-btn.back::before {
            font-size: min(4vw, 16px);
        }
    }
    
    @media (max-width: 360px) {
        .mobile-nav {
            padding: 12px;
            margin: 15px 0 !important;
            min-height: 100px;
            height: 100px;
            gap: 8px;
        }
        
        .nav-btn {
            height: 70px;
            min-height: 70px;
            max-height: 70px;
            padding: 7px 10px;
        }
        
        /* Сохраняем пропорции 35%/65% */
        .nav-btn.back {
            flex: 0 0 35%;
            width: 35%;
            max-width: 35%;
            min-width: 35%;
            font-size: min(3.5vw, 13px) !important;
            padding: 7px 8px;
        }
        
        .nav-btn.forward {
            flex: 0 0 65%;
            width: 65%;
            max-width: 65%;
            font-size: min(3.8vw, 14px) !important;
            padding: 7px 38px 7px 14px;
        }
        
        .nav-btn.forward::after {
            right: 14px;
            font-size: min(5.5vw, 17px);
        }
        
        .nav-btn.back::before {
            margin-right: 4px;
            font-size: min(4.2vw, 15px);
        }
    }
    
    /* Дополнительный медиа-запрос для очень маленьких экранов */
    @media (max-width: 320px) {
        .mobile-nav {
            min-height: 95px;
            height: 95px;
            padding: 10px;
        }
        
        .nav-btn {
            height: 66px;
            min-height: 66px;
            max-height: 66px;
            padding: 6px 8px;
        }
        
        /* Сохраняем пропорции 35%/65% */
        .nav-btn.back {
            flex: 0 0 35%;
            width: 35%;
            max-width: 35%;
            min-width: 35%;
            font-size: min(3.8vw, 12px) !important;
            padding: 6px 6px;
        }
        
        .nav-btn.forward {
            flex: 0 0 65%;
            width: 65%;
            max-width: 65%;
            font-size: min(4.2vw, 13px) !important;
            padding: 6px 34px 6px 12px;
        }
        
        .nav-btn.forward::after {
            right: 12px;
            font-size: min(6vw, 16px);
        }
        
        .nav-btn.back::before {
            margin-right: 3px;
            font-size: min(4.8vw, 14px);
        }
    }
    
    /* Экстренное уменьшение для очень длинного текста */
    @media (max-width: 280px) {
        .mobile-nav {
            min-height: 90px;
            height: 90px;
        }
        
        .nav-btn {
            height: 62px;
            min-height: 62px;
            max-height: 62px;
            padding: 5px 6px;
        }
        
        /* Сохраняем пропорции 35%/65% */
        .nav-btn.back {
            flex: 0 0 35%;
            width: 35%;
            max-width: 35%;
            min-width: 35%;
            font-size: 10px !important;
            padding: 5px 4px;
        }
        
        .nav-btn.forward {
            flex: 0 0 65%;
            width: 65%;
            max-width: 65%;
            font-size: 11px !important;
            padding: 5px 30px 5px 10px;
        }
        
        .nav-btn.forward::after {
            right: 10px;
            font-size: 14px;
        }
        
        .nav-btn.back::before {
            margin-right: 2px;
            font-size: 12px;
        }
    }
}

/* Остальные ваши стили остаются без изменений */
@media (min-width: 769px) {
    .mobile-nav {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .breadcrumbs {
        display: none;
    }
    
    .container {
        padding: 30px 10px;
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    h1 {
        margin-top: 40px !important;
        padding: 0 15px;
        box-sizing: border-box;
    }
    
    .container > * {
        max-width: 100%;
        box-sizing: border-box;
    }
}

.float-image + h2 {
    margin-top: 45px !important;
}

.content-section {
    margin: 40px 0 !important;
}

.float-image {
    margin: 25px 25px 40px 10px !important;
}

@media (max-width: 767px) {
    .float-image + h2 {
        margin-top: 35px !important;
    }
    
    .float-image {
        margin: 20px auto 35px !important;
    }
    
    .content-section {
        margin: 30px 0 !important;
    }
}

/* Шапка */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.logo {
    font-size: 14px;
    color: #333;
    white-space: nowrap; /* По умолчанию запрещаем переносы */
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 1; /* Но разрешаем сжатие при нехватке места */
    min-width: 0;
    text-align: center;
    line-height: 1.2;
    /* Убираем все ограничения по ширине */
    max-width: none;
    overflow: visible;
}

.navigation, 
.navigation a {
    cursor: pointer !important;
}

#main-nav {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
    position: static !important;
    z-index: 1002 !important;
}

.navigation {
    display: flex;
    align-items: center;
    height: 100%;
    flex-shrink: 0;
    gap: 10px; /* Добавляем отступ между элементами навигации */
}

.navigation a {
    display: flex !important;
    align-items: center !important;
    height: 50px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    position: static !important;
    padding: 0 8px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    flex-shrink: 0; /* Запрещаем сжатие элементов навигации */
}

/* ТОЛЬКО для очень маленьких экранов разрешаем переносы */
@media (max-width: 350px) {
    .logo {
        font-size: 11px !important;
        white-space: normal !important; /* Переносы только здесь */
        word-wrap: break-word !important;
        line-height: 1.1 !important;
        text-align: left;
        /* Легкое ограничение только на самых маленьких экранах */
        max-width: 100px;
    }
    
    .header-content {
        padding: 0 8px;
    }
    
    .navigation {
        gap: 5px; /* Уменьшаем отступы на маленьких экранах */
    }
    
    .navigation a {
        font-size: 11px !important;
        padding: 0 5px !important;
    }
}

/* Маленькие экраны 401px - 600px */
@media (min-width: 401px) and (max-width: 600px) {
    .logo {
        font-size: 13px !important;
        white-space: nowrap !important; /* Запрещаем переносы */
    }
    
    .navigation a {
        font-size: 12px !important;
    }
}

/* Средние экраны 601px - 849px */
@media (min-width: 601px) and (max-width: 849px) {
    .logo {
        font-size: 16px !important;
        white-space: nowrap !important; /* Запрещаем переносы */
        flex-shrink: 0; /* Запрещаем сжатие на средних экранах */
    }
    
    .navigation a {
        font-size: 13px !important;
        padding: 0 12px !important;
    }
}

/* Большие экраны 850px+ */
@media (min-width: 850px) {
    .logo {
        font-size: 18px !important;
        white-space: nowrap !important;
        flex-shrink: 0; /* Запрещаем сжатие */
    }
    
    .navigation a {
        font-size: 14px !important;
        padding: 0 15px !important;
    }
}


/* Экстренный случай - если все равно не хватает места */
@media (max-width: 500px) {
    .navigation a {
        font-size: 11px !important;
        padding: 0 6px !important;
    }
}

      

/* Стили для спойлеров-аккордеонов - с уголками */
.spoiler {
    margin-bottom: 5px;
    position: relative;
}

.spoiler-header {
    background: none;
    padding: 12px 0;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 18px;
    color: #000;
    font-weight: normal;
    position: relative;
    padding-left: 20px;
}

/* Уголок вправо для закрытого состояния */
.spoiler-header::before {
    content: "›";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: #666;
}

/* Уголок вниз для открытого состояния */
.spoiler.active .spoiler-header::before {
    content: "⌄";
}

.spoiler-content {
    padding: 0;
    display: none;
}

.spoiler.active .spoiler-content {
    padding: 10px 0;
    display: block;
}

.section-links {
    margin: 0;
}

.section-links a {
    display: block;
    padding: 8px 0 8px 20px;
    text-decoration: none;
    color: #5a7ea1;
    border-bottom: 1px solid #f8f8f8;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
}

/* Добавляем отступ для всех ссылок внутри спойлеров */
.spoiler-content .section-links a {
    padding-left: 20px;
}

/* Отступ для обычных ссылок разделов (не в спойлерах) */
.container > .section-links a {
    padding-left: 0;
}

.section-links a:last-child {
    border-bottom: none;
}

.section-links a:hover {
    color: #3a5e81;
}

/* Дополнительные стили для выравнивания */
.spoiler-content {
    padding-left: 0;
}

/* Для мобильных устройств - одинаковые отступы */
@media (max-width: 768px) {
    .spoiler-header {
        padding-left: 20px;
    }
    
    .spoiler-content .section-links a {
        padding-left: 20px;
    }
    
    /* Для обычных заголовков разделов добавляем такой же отступ */
    .section-title {
        padding-left: 20px;
        margin-left: 0;
    }
    
    /* Для основного h1 заголовка */
    h1 {
        padding-left: 0px;
        margin-left: 0;
    }
}



/* Стили для плиток меню */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.menu-tile {
    display: block;
    text-decoration: none;
    background: white;
    border-radius: 4px;
    padding: 20px;
    color: #333;
    border: 1px solid #e9ecef;
}

.menu-tile:hover {
    text-decoration: none;
    color: #333;
}

.tile-header {
    margin-bottom: 15px;
}

.tile-title {
    font-size: 18px;
    font-weight: normal;
    color: #000;
    margin: 0;
}

.tile-content p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Адаптивность для плиток */
@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .menu-tile {
        padding: 15px;
    }
    
    .tile-title {
        font-size: 18px;
    }
}

/* Стили для поиска */
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 60px 0 30px 0;
    gap: 30px;
}

.page-title {
    flex: 1;
}

.search-container {
    position: relative;
    flex: 0 0 300px;
}

.search-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #5a7ea1;
    box-shadow: 0 0 0 2px rgba(90, 126, 161, 0.1);
}

#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.search-result {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.search-result:hover {
    background: #f8f9fa;
}

.search-result h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.search-result p {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.search-result mark {
    background: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Адаптивность для поиска */
@media (max-width: 768px) {
    .search-header {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        margin: 50px 0 25px 0;
    }
    
    .search-container {
        flex: none;
        width: 100%;
    }
    
    .page-title h1 {
        margin-bottom: 0 !important;
    }
}

/* Добавьте это в ваш существующий CSS файл */
@media (max-width: 768px) {
    /* Ваши текущие стили... */
    
    /* ДОБАВЬТЕ ЭТИ СТИЛИ ДЛЯ ПОИСКА */
    .search-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 0 0px !important;
        margin: 20px 0 15px 0 !important;
    }
    
    .search-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        position: relative !important;
    }
    
    .search-input {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 16px !important;
        font-size: 16px !important;
        border: 1px solid #e9ecef !important;
        border-radius: 8px !important;
        background: white !important;
        margin: 0 !important;
        display: block !important;
    }
    
    /* Остальные стили для поиска из предыдущего ответа */
}
/* ФИКС для мобильной навигации на странице с поиском */
.container > .mobile-nav {
    margin: 20px 0 !important; /* Восстанавливаем правильный отступ */
    order: 1; /* Ставим кнопки ПОД поиском */
}

.container > .search-header {
    margin: 60px 0 20px 0 !important; /* Уменьшаем нижний отступ */
    order: 0; /* Поиск остается сверху */
}

/* На очень маленьких экранах */
@media (max-width: 768px) {
    .container > .search-header {
        margin: 50px 0 15px 0 !important;
    }
    
    .container > .mobile-nav {
        margin: 15px 0 !important;
    }
}

/* ТОЛЬКО этот фикс - убираем верхний отступ у search-header */
.search-header {
    margin-top: 0 !important;
    margin-bottom: 20px !important;
}

/* ФИКС для disabled кнопки - показываем текст и значок */
.nav-btn.back.disabled {
    background: #bdbdbd !important;
    color: #ffffff !important;
    border-color: #bdbdbd !important;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ВКЛЮЧАЕМ значок меню для disabled кнопки */
.nav-btn.back.disabled::before {
    display: inline-block !important;
    content: "☰" !important;
    margin-right: 5px;
    font-size: min(3.5vw, 14px);
    color: #e2e2e2 !important;
    opacity: 1 !important;
}

/* ВКЛЮЧАЕМ текст для disabled кнопки */
.nav-btn.back.disabled .btn-text {
    display: block !important;
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Убираем все скрывающие стили */
.nav-btn.disabled::after {
    display: none;
}

/* Переопределяем скрывающие стили с большей специфичностью */
.nav-btn.back.disabled .btn-text,
.nav-btn.back.disabled:empty::before,
.nav-btn.back.disabled:empty::after {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}



/* ===== СТИЛИ ДЛЯ КОНТЕНТА СТРАНИЦ ===== */

/* Основной контент */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовки */
h1.sub {
    font-size: 20px;
    color: #000;
    font-weight: normal;
    line-height: 1.3;
    margin: 25px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media (min-width: 768px) {
    h1.sub {
        font-size: 22px;
    }
}

h2 {
    font-size: 19px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 25px 0 15px 0;
    font-weight: normal;
    color: #000;
}

@media (min-width: 768px) {
    h2 {
        font-size: 20px;
    }
}

/* Параграфы и списки */
p {
    font-size: 17px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    margin: 15px 0;
    color: #333;
}

ul {
    padding-left: 30px;
    margin: 15px 0;
}

li {
    font-size: 17px;
    list-style-type: disc;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
    margin: 8px 0;
    color: #333;
}

@media (min-width: 768px) {
    p, li {
        font-size: 16px;
    }
}

/* Изображения */
img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    
}

/* Код */
pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-all;
    overflow-wrap: break-word;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.4;
    margin: 15px 0;
}

/* Таблицы */
table {
    border-collapse: collapse;
    width: 80%;
    margin: 20px 0;
}

table, th, td {
    border: 1px solid #cccccc;
}

th, td {
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f9f9f9;
}

/* Цитаты */
blockquote {
    background-color: #ffffff;
    border-left: 3px solid #dee2e6;
    margin: 20px 0;
    padding: 18px 22px;
    color: #343a40;
    line-height: 1.7;
    font-family: Georgia, serif;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Разделитель */
.divider {
    height: 1px;
    background-color: #ccc;
    margin: 20px 0;
    border: none;
}

/* Модальное окно для изображений */
.modal-checkbox {
    display: none;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-checkbox:checked ~ .modal-overlay {
    display: flex;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    border: 3px solid white;

}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    background: none;
    border: none;
}

.caption {
    font-size: 14px;
    color: #666;
    text-align: center;
    margin-top: 5px;
}

.modal-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: default;
}

/* Сворачиваемые разделы */
.catalog-section {
    margin: 0 !important;
}

h2.catalog {
    cursor: pointer;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 0;
    transition: background-color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 19px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin-top: 0px;
    font-weight: normal;
}

h2.catalog:hover {
    background-color: #e9ecef;
}

h2.catalog::after {
    content: "+";
    font-size: 18px;
    font-weight: bold;
    color: #495057;
}

h2.catalog:not(.collapsed)::after {
    content: "−";
}

.catalog-header {
    cursor: pointer;
    padding: 0 !important;
    margin: 10px 0 !important;
    transition: color 0.3s ease;
    display: block !important;
    background: none !important;
    border: none !important;
    position: relative;
}

.catalog-header h2 {
    display: inline !important;
    margin-right: 8px !important;
}

.catalog-header p {
    display: block !important;
    margin: 5px 0 0 0 !important;
    font-size: 14px !important;
    color: #666 !important;
    font-style: italic !important;
}

.catalog-header::after {
    content: "+";
    font-size: 12px;
    font-weight: normal;
    color: #666;
    margin-left: 5px !important;
}

.catalog-header:not(.collapsed)::after {
    content: "−";
}

.catalog-content {
    display: none;
}

.catalog-content:not(.collapsed) {
    display: block;
}

h2.catalog + .catalog-content {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
}

.catalog-header + .catalog-content {
    margin: 0 !important;
    padding: 0 !important;
}

/* Якорные ссылки внутри заголовков */
h2 a {
    color: inherit;
    text-decoration: none;
}

h2 a:hover {
    text-decoration: underline;
}

/* Стили для ссылок */
.link {
    color: #1155cc;
    text-decoration: none;
}

/* Ссылки в тексте - черные подчеркнутые (базовый стиль для всех ссылок) */
a {
    color: #000;
    text-decoration: underline;
}

/* ИСКЛЮЧЕНИЯ - элементы, которые НЕ должны быть черными подчеркнутыми */

/* 1. Класс .link - голубые без подчеркивания */
.link {
    color: #1155cc;
    text-decoration: none;
}

/* 2. Навигационные кнопки (каты) */
.nav-btn {
    color: #5D7A9E !important;
    text-decoration: none !important;
}

.nav-btn.forward {
    color: white !important;
    text-decoration: none !important;
}

/* 3. Ссылки в спойлерах */
.section-links a {
    color: #5a7ea1 !important;
    text-decoration: none !important;
}

/* 4. Хлебные крошки */
.breadcrumbs a {
    color: #2c3e50 !important;
    text-decoration: none !important;
}

/* 5. Якоря внутри заголовков и спойлеров */
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    color: inherit !important;
    text-decoration: none !important;
}

/* 6. Плитки меню */
.menu-tile {
    color: #333 !important;
    text-decoration: none !important;
}

/* 7. Результаты поиска */
.search-result {
    color: #333 !important;
    text-decoration: none !important;
}

/* Hover состояния для исключений */
.section-links a:hover {
    color: #3a5e81 !important;
}

.breadcrumbs a:hover {
    color: #2c3e50 !important;
    text-decoration: underline !important;
}

.link:hover {
    text-decoration: underline;
}

.content-block {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    overflow: hidden;
}

.image-left {
    float: left;
    margin-right: 20px;
    width: 200px;
    height: 150px;
    object-fit: cover;
}

.characteristics {
    overflow: hidden;
}

.characteristics-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.characteristic-item {
    margin-bottom: 8px;
}


body.has-catalog {
    overflow-y: scroll !important;;
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Фиксированная ширина колонок */
}

.characteristics-table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    vertical-align: top;
    word-wrap: break-word; /* Перенос длинных слов */
}

.characteristics-table td:first-child {
    width: 40%; /* Фиксированная ширина первой колонки */
    background-color: #f8f8f8;
}

.characteristics-table td:last-child {
    width: 60%; /* Фиксированная ширина второй колонки */
}

.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.image-item {
    display: inline-block;
    margin: 10px;
    text-align: center;
    vertical-align: top;
    width: 150px;
}

.image-link {
    display: block;
    margin-bottom: 8px;
}

.gallery-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 1px solid #ddd;
    display: block;
    margin: 0 auto;
}

.download-link {
    display: block;
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

table {
    margin-left: 10px;
}

@media (max-width: 800px) {
    table {
        width: 80%;
        max-width: 80%;
        margin-left: 5px;
    }
}



div.spoiler-content .descr {
    color: #666;
    line-height: 1.5;
    padding: 12px 0;
    margin: 0 16px 16px 16px; /* отступы со всех сторон */
    background: transparent;
    border-bottom: 2px solid #f0f0f0;
}

div.spoiler-content .descr p {
    color: inherit;
    line-height: inherit;
    margin: 10px 0;
}

