/* Основные стили текста */
.text p {
    font-size: 1.2em;
    font-weight: 300;
    line-height: 1.5;
}

/* Стили изображений */
img.foto {
    display: block;
    width: min(300px, 100%);
    height: 300px;
    margin: 10px auto;
    object-fit: contain;
}

/* Стили для ячеек таблицы */
td {
    padding: 10px;
    font-size: 150%;
}

/* Адаптивные стили для изображений и ячеек на мобильных устройствах */
@media (max-width: 991px) {
    img.foto {
        width: min(100px, 100%);
        height: 100px;
        margin: 3px auto;
    }

    td {
        padding: 3px;
        font-size: 110%;
    }
}

/* Навигация */
.nav-sections {
    list-style: none;
    font-weight: 300;
    position: relative;
    width: 100%;
    background-color: white;
    box-shadow: 0 2px 0 white;
    border-radius: 2px;
}

.nav-sections li {
    position: relative;
    display: block;
}

.nav-sections li a {
    display: block;
    padding: 5px 10px;
    color: #3e3e3e;
    background-color: #fff;
    text-decoration: none;
    font-weight: 300;
    border-radius: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Выравнивание по левому краю */
}

.nav-sections li a:hover {
    background-color: #f7f7f7;
}

/* Выпадающие пункты меню */
.nav-sections ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    width: 100%;
    border: 1px solid #2fb5d1;
    border-radius: 2px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 400px;
    overflow-y: auto;
}

/* Кастомизированная вертикальная прокрутка */
.nav-sections ul::-webkit-scrollbar {
    width: 8px;
}

.nav-sections ul::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nav-sections ul::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.nav-sections ul::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.nav-sections ul li {
    padding-top: 1px;
    word-break: break-all;
    border-bottom: 1px solid #eee;
}

.nav-sections ul li:last-child {
    border-bottom: none;
}

.nav-sections ul a {
    white-space: nowrap;
    display: block;
    padding: 5px 15px;
}

.nav-sections ul a:hover {
    background-color: #f7f7f7;
}

/* Стили для таблицы с категориями */
.table-ramka {
    border-collapse: separate;
    border-spacing: 20px;
    width: 100%;
    border: 0;
}

.td-ramka {
    width: 33.33%;
    text-align: center;
    vertical-align: bottom;
    margin: 5px;
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.td-ramka > a,
.td-ramka > span {
    display: block;
    min-height: 320px;
}

/* Ховер-эффект для ячеек */
.td-ramka:hover {
    border: 1px solid orange;
    cursor: pointer;
}

/* Задаем блочный уровень и растягиваем по всей ширине */
[data-section-btn="btn"] {
    display: block;
    width: 100%;
    padding: 5px 10px;
    box-sizing: border-box;
    cursor: pointer;
    position: relative;
}

/* Галочка */
[data-section-btn="btn"]::after {
    content: '\003E';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translate(-50%, -50%) rotate(90deg) scaleY(1.75);
    color: #3e3e3e;
    font-size: 28px;
    pointer-events: none;
    z-index: 2;
    transition: all 250ms cubic-bezier(.4,.25,.3,1);
    opacity: .6;
}

/* Поворачиваем стрелку вверх при открытии */
[data-section-btn="btn"].open::after {
    transform: translate(-50%, -50%) rotate(90deg) scaleX(-1) scaleY(1.75);
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 991px) {
    .table-ramka {
        border-spacing: 10px;
    }

    tr {
        display: block;
        width: 100%;
    }

    .td-ramka {
        display: block;
        width: 100%;
        text-align: center;
        margin: 0 auto;
        padding: 10px;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    .td-ramka > a,
    .td-ramka > span {
        min-height: 110px;
    }

    img.foto {
        width: min(100px, 100%);
        height: 100px;
    }
}

.nav-sections ul li.nav-level-2 > a {
    font-weight: 500;
}

.nav-sections ul li.nav-level-3 > a {
    padding-left: 26px;
    font-size: 0.92em;
    color: #6a6a6a;
}

.nav-sections .section-direct-link {
    display: block;
    padding: 5px 10px;
    color: #3e3e3e;
    text-decoration: none;
    text-align: left;
}

.nav-sections .section-direct-link:hover {
    background-color: #f7f7f7;
}
