/* ===== Base Styles ===== */
* {
    outline: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Mulish', Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* ===== Layout Structure ===== */
.all {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main_content_container {
    display: flex;
    flex: 1;
    margin: 0 auto;
    width: 100%;
}

.imgblock {
    display: flex;
}

/* Lightbox стили */

/* Контейнер для крошек и кнопки назад */
.breadcrumbs-container {
    display: flex;
    margin-left: -5px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    position: relative;
}

/* Основные стили крошек */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-family: 'Mulish', sans-serif;
    font-size: 0.9rem;
    color: #555;
    width: calc(100% - 80px);
}

.breadcrumb-separator {
    flex-shrink: 0;
    margin: 0 2px;
}

.breadcrumb-link {
    color: #0077bb;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
    margin-right: 5px;
    margin-left: 5px;
    border-radius: 4px;
}

.breadcrumb-current {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 5px;
    overflow: hidden;
    display: inline-block;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .breadcrumbs-container {
        flex-wrap: wrap;
        gap: 8px;
    }

    .breadcrumbs {
        width: 100%;
        font-size: 0.8rem;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* Firefox */
    }

    .breadcrumbs::-webkit-scrollbar {
        display: none;
        /* Chrome/Safari */
    }

    .mobile-back-btn {
        display: inline-flex;
    }

    .breadcrumb-link {
        padding: 3px 5px;
        font-size: 0.8rem;
    }

    .breadcrumb-current {
        max-width: 150px;
        
    margin-left: 10px;
        text-overflow: ellipsis;
    }
}

/* Анимация для интерактивности */
@media (hover: hover) {
    .breadcrumb-link:hover {
        transform: translateY(-1px);
    }

    .mobile-back-btn:hover {
        background: rgba(0, 119, 187, 0.2);
    }
}




.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-prev,
.lightbox-next {
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    user-select: none;
}

.lightbox-prev {
    border-radius: 0 5px 5px 0;
}

.lightbox-next {
    border-radius: 5px 0 0 5px;
}

/* Дополнительные элементы управления */
.lightbox-close-bottom {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    z-index: 1001;
}

.main_inform_text img.img-small {
    max-width: 100%;
    height: 150px;
    width: 150px;
    object-fit: cover;
    cursor: pointer;
}

.main_inform_text img.img-original {
    max-width: 100%;
    height: auto;
    cursor: default;
}

.main_inform_text img.img-original-clickable {
    max-width: 100%;
    height: auto;
    cursor: pointer;
}

/* Lightbox стили */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main_inform_text table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.main_inform_text table td {
    padding: 10px;
}

.main_inform_text th {
    background-color: #f8f9fa;
    padding: 10px;
    text-align: left;
}

.main_inform_text ul,
.main_inform_text ol {
    list-style: initial !important;
    /* Восстанавливает стандартные маркеры */
    margin: 15px 0;
    padding-left: 40px;
}

.main_inform_text li {
    margin-bottom: 8px;
}

.main_inform_text p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    text-align: justify;
}

/* Для выравнивания по центру */
.main_inform_text p[style*="center"] {
    text-align: center !important;
}

.main_inform_text td {
    vertical-align: middle;
    /* Важно для выравнивания содержимого */
}

@media (max-width: 768px) {

    .imgblock {
        display:block!important;
    }

    /* Отключаем влияние colgroup на мобильных */
    .main_inform_text table colgroup,
    .main_inform_text table col {
        display: none;
    }

    /* Принудительно сбрасываем ширину ячеек */
    .main_inform_text table td {
        width: 100% !important;
        display: block;
    }

    /* Для таблицы с преподавателями */
    .main_inform_text table[style*="height: 1287.9px"] tr {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 30px;
        border: 1px solid #ddd;
        border-radius: 8px;
    }

    .main_inform_text table[style*="height: 1287.9px"] td {
        width: 100% !important;
        box-sizing: border-box;
        padding: 15px;
    }


}


/* Фиксируем высоту ячеек с изображениями */
.main_inform_text td img {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* Специфичные стили для разных типов изображений */
.main_inform_text td img.img-small {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.main_inform_text td img.img-original,
.main_inform_text td img.img-original-clickable {
    max-width: 400px;
    /* Ограничиваем максимальную ширину */
    height: auto;
}

/* Убираем inline-стили, которые могут мешать */
.main_inform_text table[style],
.main_inform_text tr[style],
.main_inform_text td[style] {
    height: auto !important;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto;
}

.lightbox-zoom-controls {
    position: fixed;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 1001;
}

.lightbox-zoom-in,
.lightbox-zoom-out,
.lightbox-reset {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

/* Стили для изображений в контенте */
.main_inform_text img {
    cursor: pointer;
    transition: transform 0.2s;
    max-width: 100%;
    height: auto;
}

.main_inform_text img:hover {
    transform: scale(1.02);
}

/* ===== Navigation Styles ===== */
.main_nav {
    width: 420px;
    background-color: hsla(202, 100%, 37%, 0.916);
    /* Голубой цвет */
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

img.img-responsive {
    max-width: 100%;
    height: 150px;
    width: 150px;
    object-fit: cover;
}

.navigation {
    list-style-type: none;
}

.nav_block {
    position: relative;
    list-style-type: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.selected_block {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-left-color: #fff;
}

.nav_link {
    display: block;
    padding: 14px 25px 14px 40px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

/* Точка перед основными разделами */
.nav_level_0>.nav_block>.nav_link:before {
    position: absolute;
    left: 20px;
    font-family: 'Material Icons Round';
    content: 'arrow_right';
}

.nav_block:has(> ul)>.nav_link:before {
    font-family: 'Material Icons Round';
    content: 'arrow_drop_down';
}

.nav_block:not(:has(> ul))>.nav_link:before {
    font-family: 'Material Icons Round';
    content: 'arrow_right';
}

.nav_block>.nav_link:before {
    transition: transform 0.3s ease;
}

.nav_block:has(> ul)>.nav_link {
    padding-right: 30px;
    position: relative;
}



/* Стрелка перед подразделами */
.nav_level_1>.nav_block>.nav_link:before,
.nav_level_2>.nav_block>.nav_link:before,
.nav_level_3>.nav_block>.nav_link:before,
.nav_level_4>.nav_block>.nav_link:before {
    position: absolute;
    left: 20px;
    opacity: 0.8;
}

.selected_text {
    color: #fff !important;
    font-weight: 600;
}

/* Nested menu levels */
.nav_level_1 .nav_block {
    padding-left: 15px;
    background-color: rgba(0, 0, 0, 0.06);
}

.nav_level_2 .nav_block {
    padding-left: 30px;
    background-color: rgba(0, 0, 0, 0.04);
}

.nav_level_3 .nav_block {
    padding-left: 45px;
    background-color: rgba(0, 0, 0, 0.03);
}

.nav_level_4 .nav_block {
    padding-left: 60px;
    background-color: rgba(0, 0, 0, 0.01);
}

/* ===== Content Area Styles ===== */
.main_inform {
    flex: 1;
    padding: 30px 40px;
    background-color: #fff;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.05);
}

.main_inform_tittle {
    font-size: 2.2rem;
    color: #000000;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
    font-weight: 700;
    text-align: left;
}


/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .main_content_container {
        flex-direction: column;
    }

    .imgblock {
        display: block !important;
    }

    .main_nav {
        width: 100%;
        order: 1;
    }

    .main_inform {
        order: 2;
        padding: 20px;
    }

    .navigation {
        display: flex;
        flex-wrap: wrap;
    }

    .nav_block {
        flex: 1 0 auto;
        min-width: 200px;
    }

    /* Hide nested menus on mobile */
    .nav_level_1,
    .nav_level_2,
    .nav_level_3,
    .nav_level_4 {
        display: none;
    }

    .main_inform_tittle {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .main_inform_text img {
        max-width: 100% !important;
        height: auto !important;
        margin: 10px auto;
    }

    .main_inform_text .img-small,
    .main_inform_text .img-original-clickable {
        width: 100% !important;
        height: auto !important;
    }

    /* Обтекание изображений */
    .main_inform_text p img,
    .main_inform_text div img {
        float: none !important;
    }
}

@media (max-width: 768px) {

    .main_inform_text {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .main_inform_text p {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Предотвращение горизонтального скролла */
    .main_inform_text * {
        max-width: 100%;
    }

    .main_inform {
        padding: 15px;
    }

    .main_inform_tittle {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .nav_block {
        min-width: 100%;
    }

    /* Adjust markers for mobile */
    .nav_level_0>.nav_block>.nav_link:before,
    .nav_level_1>.nav_block>.nav_link:before,
    .nav_level_2>.nav_block>.nav_link:before,
    .nav_level_3>.nav_block>.nav_link:before,
    .nav_level_4>.nav_block>.nav_link:before {
        left: 15px;
    }
}

/* ===== Mobile Styles ===== */
@media (max-width: 992px) {
    .main_content_container {
        flex-direction: column;
    }

    /* Скрываем навигацию в мобильной версии */
    .main_nav {
        display: none;
    }

    .main_inform {
        width: 100%;
        padding: 20px 15px;
        order: 2;
    }

    .main_inform_tittle {
        font-size: 1.8rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }

    /* Адаптация таблиц */
    .main_inform_text table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Адаптация изображений */
    .main_inform_text img {
        max-width: 100%;
        height: auto;
    }

    .main_inform_text img.img-small,
    .main_inform_text img.img-original-clickable {
        width: 100%;
        max-width: none;
    }

    /* Улучшение отступов */
    .main_inform_text ul,
    .main_inform_text ol {
        padding-left: 20px;
    }

    .main_inform_text p {
        margin-bottom: 12px;
    }
}

@media (max-width: 576px) {
    .main_inform_tittle {
        font-size: 1.5rem;
    }

    /* Lightbox адаптация */
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
    }

    .lightbox-close-bottom {
        bottom: 10px;
        padding: 8px 15px;
    }

    .lightbox-zoom-controls {
        bottom: 60px;
    }
}

.mobile-nav-btn {
    display: none;
    /* По умолчанию скрыто */
    background-color: #0077bb;
    color: white;
    border: none;
    padding: 12px 15px;
    margin: 10px 15px;
    border-radius: 5px;
    font-family: 'Mulish', sans-serif;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-nav-btn i {
    margin-right: 8px;
}

.mobile-nav-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: #0077bb;
    z-index: 1100;
    transition: left 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-nav-container.active {
    left: 0;
}

.mobile-nav-container .main_nav {
    display: block;
    width: 100%;
    height: 100%;
    background: none;
    box-shadow: none;
}

.mobile-nav-container .navigation {
    flex-direction: column;
    padding: 20px 0;
}

.mobile-nav-container .nav_block {
    width: 100%;
}

.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    display: none;
}

.mobile-nav-container.active+.mobile-nav-overlay {
    display: block;
}

@media (max-width: 992px) {
    .mobile-nav-btn {
        position: sticky;
        top: 75px;
        z-index: 100;
        width: calc(100% - 30px);
        margin: 15px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    body.no-scroll {
        overflow: hidden;
    }
}

/* Анимация для стрелок */
.nav_block:has(> ul)>.nav_link:before {
    transition: transform 0.3s ease;
}

.nav_block:has(> ul).active>.nav_link:before {
    transform: rotate(180deg);
}

@media (max-width: 768px) {

    .lightbox {
        padding: 0;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 80vh;
        width: auto;
    }

    .lightbox-img {
        max-height: 70vh;
    }

    .lightbox-nav {
        position: fixed;
        top: 50%;
        width: 100%;
        transform: translateY(-50%);
        display: flex;
        justify-content: space-between;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .lightbox-prev,
    .lightbox-next {
        position: static;
        transform: none;
        padding: 15px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
    }

    .lightbox-close-bottom {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px 20px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        border-radius: 20px;
        font-size: 16px;
        z-index: 1001;
    }

    .lightbox-zoom-controls {
        position: fixed;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        background: rgba(0, 0, 0, 0.5);
        padding: 8px 15px;
        border-radius: 20px;
        z-index: 1001;
    }

    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 24px;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1002;
    }

    .lightbox-zoom-in,
    .lightbox-zoom-out,
    .lightbox-reset {
        padding: 5px 10px;
        font-size: 14px;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .main_inform_text table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .main_inform_text table tr {
        display: flex;
        flex-direction: column;
    }

    .main_inform_text table td {
        display: block;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Скрываем пустые ячейки */
    .main_inform_text table td:empty {
        display: none;
    }

    .main_inform_text thead {
        display: none;
    }

    .main_inform_text tr {
        border-radius: 5px;
    }

    .main_inform_text td {
        display: flex;
        flex-direction: column;
        padding: 8px 12px;
        white-space: normal;
    }

    .main_inform_text td:last-child {
        border-bottom: none;
    }

    /* Для таблиц с изображениями */
    .main_inform_text td img {
        max-width: 100% !important;
        height: auto !important;
        margin: 5px 0;
    }
}

.gallery-container {
    margin: 20px 0;
}

.gallery-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.gallery-item {
    display: block;
    object-fit: cover;
    margin: 0 10px 0 0;
    max-width: calc(20% - 10px);
    transition: transform 0.2s;
}



.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-error {
    padding: 10px;
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #d32f2f;
    margin: 20px 0;
}

@media (max-width: 768px) {
    .gallery-item {

        object-fit: cover;
        margin: 0 10px 0 0;
        max-width: calc(33.333% - 10px);
    }
}

@media (max-width: 480px) {
    .gallery-item {

        object-fit: cover;
        margin: 0 10px 0 0;
        max-width: calc(50% - 10px);
    }
}