html {
    overflow-x: clip;
}

:root {
    --color-dark: #0B1C33;       /* тёмно-синий для текста */
    --color-accent: #1E3A8A;      /* синий для акцентов */
    --color-light-bg: #F9FAFB;    /* очень светлый фон для некоторых секций */
    --color-gray: #6B7280;
    --font-heading: 'Georgia', serif;  /* предположим, заголовки с засечками */
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
    --gap: 30px;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    line-height: 1.6;
    margin: 0;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

h2 + p {
    color: var(--color-gray);
    margin-bottom: 40px;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 19px 30px;
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--color-accent);
    color: #a0d5d5;
}

.hero {
    background: linear-gradient(to right, #f5f7f8, #021f50);
    padding: 100px 0;
}
.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    max-width: 800px;
}
/* подзаголовок под названием кафедры, фунд.ислед... */
.hero p {
    font-size: 1.2rem;
    color: #2e343e; 
    max-width: 700px;
    margin-bottom: 40px;
}
.hero .buttons {
    display: flex;
    gap: 20px;
}
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    border: 2px solid #051E33;
    color: #051E33;
    text-decoration: none;
    font-weight: 600;
    border-radius: 40px;
    transition: all 0.3s;
}
.btn:hover {
    background: #051E33;
    color: #fff;
}

.logo-container {
    display: flex;
    align-items: center;    /* выравнивание по вертикали */
    gap: 10px;              /* расстояние между логотипами и текстом */
}

.logo-img {
    height: 60px;           /* высота логотипов */
    width: auto;            /* ширина подстроится пропорционально */
    object-fit: contain;    /* чтобы картинка не искажалась */
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: #0B1C33;
    line-height: 1.2;
}

.header__inner {
    display: flex;
    justify-content: space-between; /* это раздвигает логотипы и меню по краям */
    align-items: center;
    height: 80px;
}

.nav {
    display: flex;
    gap: 20px;
    margin-right: 8px;  /* отступ справа — сдвигает меню влево */
}

.nav a {
    text-decoration: none; /* убираем подчёркивание */
    color: #0B1C33;
    font-weight: 500;
    padding: 8px 16px;     /* внутренние отступы, чтобы прямоугольник был вокруг текста */
    border-radius: 30px;    /* скругление прямоугольника */
    transition: background-color 0.3s, color 0.3s;
}

.nav a:hover {
    background-color: #eaeef2; /* светло-серый фон при наведении */
    color: #051E33;
}

.nav a.active {
    background-color: #051E33; /* синий фон для активного пункта */
    color: #ffffff;            /* белый текст */
}

/* Cookie баннер */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: #0B1C33;        /* тёмно-синий фон */
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;              /* по умолчанию скрыт, показывается через JS */
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.cookie-banner p {
    margin: 0 0 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-banner button {
    background: #1E3A8A;
    color: #ffffff;
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.3s ease;
    border: 1px solid transparent;
}
.cookie-banner button:hover {
    background: #153E75;
}

/* === текст наследие  === */
.section-pretitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color:  #1F6E6C;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.section-subtitle {
    color: var(--color-gray, #6B7280);
    margin-bottom: 40px;
}

/* === раздел О кафедре (фон, цвет, итд) === */
.heritage {
    background: #fff;
    padding: 80px 0;
}

.heritage__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.heritage__content {
    max-width: 600px;
}

/* Мелкий текст под О кафедре */
.heritage-subtitle {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #6B7280;
    margin-bottom: 80px; /* пробел после о Кафедре перед именем*/
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* Заголовок О кафедре */
.section-title {
    font-size: 3.5rem;
    font-family: 'Georgia', serif;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #0B1C33;
}

/* Имя Иосифа Израилевича Воровича */
.heritage-founder {
    font-size: 2.3rem;
    font-weight: 600; /* на сколько жирный текст */
    margin: 30px 0 20px;
    color: #0c1d36;
    font-family: 'Georgia', serif;
    position: relative;
    top: -30px; /* поднимет на 20px вверх */
}

/* Блок с жёлтой полосой и кавычками */
.heritage-quote {
    position: relative;
    border-left: 5px solid #FBBF24; /* жёлтая полоса */
    padding-left: 300px;
    margin: 30px 0 20px;
    background-color: #F5F7FA;      /* очень светлый фон для прямоугольника */
    padding: 20px 25px 20px 40px;
    border-radius: 0 8px 8px 0;      /* скругление только справа */
}

.heritage-quote::before {
    content: "“  ";
    font-size: 3rem;
    color: #FBBF24;
    font-family: 'Georgia', serif;
    position: absolute;
    left: 15px;
    top: 21px;
    line-height: 1;
}

/* Текст кафедра создана...*/
.heritage-quote p {
    margin: 0;
    color: #4A5C6E;
    line-height: 1.8;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    position: relative;
    z-index: 1;
}

/* Обычный текст после цитаты */
.heritage-text {
    color: #4B5563;
    line-height: 1.8;
    font-size: 0.9rem;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
}

/* Статистика — четыре квадрата в ряд */
.heritage-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}
 /* текст в квадратах*/
.stat-number {
    display: block;
    font-size: 2.0rem;
    font-weight: 700;
    color: #1F6E6C;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #6B7280;
    font-family: 'Inter', sans-serif;
    text-transform: lowercase;
}

/* Фото справа */
.heritage__photo {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* фото будет выше, но можно добавить margin-top */
    margin-top: 290px;        /* чтобы опустить фото */
    
}

.photo-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    max-width: 600px;        /* ограничиваем ширину карточки */
    width: 100%;
    text-align: center;
    transition: transform 0.3s; 
}

.photo-card:hover{
    transform: translateY(-5px);
}

.photo-card img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.photo-divider {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 15px 0 10px;
    width: 100%;
}

.photo-caption {
    font-size: 0.9rem;
    color: #6B7280;
    font-style: italic;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* === История === */
.history {
    background: #F9FAFB;
    padding: 80px 0;
}

.history__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* количество колонок */
    gap: 20px;
    margin-top: 50px;
}

/* Карточка */
.history-card {
    position: relative;        /* для позиционирования овала */
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    padding-top: 30px;         /* место для овала (он будет поверх фона) */
}

.history-card:hover {
    transform: translateY(-5px);
}

/* Овал (ярлык) */
.history-card__label {
    position: absolute;
    top: 15px;                 /* отступ от верхнего края карточки */
    left: 40px;                /* отступ от левого края */
    background: #1F6E6C;
    color: #fafafa;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-family: 'Inter', sans-serif;
    z-index: 2;                /* выше изображения */
}

/* Контейнер изображения */
.history-card__image {
    width: 100%;
    height: 200px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-top: 30px;
    padding-left: 10px;          /* отступ слева */
    padding-right: 10px;         /* отступ справа */
    box-sizing: border-box;      /* чтобы padding не увеличивал общую ширину */
}

.history-card__image img {
    max-width: 100%;              /* фото не шире 90% контейнера */
    max-height: 100%;             /* фото не выше 90% контейнера */
    width: auto;
    height: auto;
    object-fit: contain;        /* сохраняет пропорции */
    border-radius: 8px;          /* лёгкое скругление */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Контент под фото */
.history-card__content {
    padding: 20px;
}

.history-year {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1F6E6C;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.history-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}

.history-desc {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === Исследования === */
.research {
    padding-bottom: 80px;   /* такое же, как у history */
    margin-bottom: 0px;
}

.section-header {
    text-align: left;
    margin-bottom: 0px;
}

.section-header p {
    color: #6B7280;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0; 
    text-align: left;           /* убираем центрирование */
}

.section-tag {
    display: inline-block;
    font-size: 0.85rem;
    letter-spacing: 2px;
    color: #1F6E6C;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-header h2 {
    
    text-align: left;
}

.section-header p {
    color: #6B7280;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.science-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 0;
}

.science-card {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #E5E7EB;
}

.science-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}

.science-icon {
    font-size: 2.5rem;
    color: #1F6E6C;
    margin-bottom: 20px;
}

.science-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #0B1C33;
}

.science-card p {
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* === Общие стили для заголовков секций (если ещё не определены) === */
.section-pretitle {
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #1F6E6C;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
    color: #0B1C33;
}

.section-subtitle {
    color: #6B7280;
    font-size: 1rem;
    margin-bottom: 40px;
}


/* === Галерея (превью альбомов) === */
.gallery-preview {
    background: #F9FAFB;
    margin-top: 0;          /* убираем возможный лишний верхний отступ */
    padding-top: 80px;      /* такое же, как у research сверху */
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.gallery-album {
    display: block;
    background: #F9FAFB;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid #E5E7EB;
}

.gallery-album:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.album-cover {
    height: 200px;
    overflow: hidden;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-album:hover .album-cover img {
    transform: scale(1.05);
}

.album-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1F6E6C;
    background: #EFF6FF;
    padding: 4px 12px;
    border-radius: 30px;
    margin: 15px 15px 8px;
}

.album-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 15px 8px;
    color: #0B1C33;
}

.album-meta {
    display: flex;
    justify-content: space-between;
    padding: 0 15px 15px;
    font-size: 0.85rem;
    color: #6B7280;
    border-top: 1px solid #E5E7EB;
    margin-top: 10px;
    padding-top: 12px;
}

.album-meta span i {
    margin-right: 5px;
    font-size: 0.8rem;
}

/* Сотрудники */
/* Обёртка для широкого блока */
.teachers-carousel-wrapper {
    width: 100%;
    overflow: hidden;
    margin-top: 20px;
}

.teachers-carousel {
    position: relative;
    left: 50%;
    width: 100vw;
    margin-left: -50vw;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 0 60px; /* было 150px, стало 60px */
    box-sizing: border-box;
    background: #fff;
}

/* Трек с горизонтальным скроллом (скрытым) */
.teachers-track {
    flex: 1;
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 10px 0 50px 0;
    max-width: 1200px; /* ширина container */
    margin: 0 auto; /* центрирование */
}
.teachers-track::-webkit-scrollbar {
    display: none;
}

/* Карточка — фиксированная ширина, чтобы помещалось 4 */
.teacher-card-link {
    flex: 0 0 275px;          /* ширина карточки, подберите под свой дизайн */
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s;
    display: block;
}
.teacher-card-link:hover {
    transform: translateY(-8px);
}

.teacher-card {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 20px;
    transition: box-shadow 0.3s;
    border: 1px solid #E5E7EB;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.teacher-card-link:hover .teacher-card {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}

.teacher-photo {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.teacher-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}

.teacher-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1F6E6C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.teacher-desc {
    font-size: 0.85rem;
    color: #4B5563;
    line-height: 1.4;
    flex-grow: 1;
}

/* Стрелки */
.carousel-arrow {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.carousel-arrow .more-circle {
    width: 44px;
    height: 44px;
    background: #F9FAFB;
    border: 2px solid #1F6E6C;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #1F6E6C;
}
.carousel-arrow .more-circle i {
    font-size: 1.2rem;
}
.carousel-arrow:hover .more-circle {
    background: #1F6E6C;
    color: #fff;
    border-color: #1F6E6C;
}

/* === Контакты === */
/* === Контакты (тёмный стиль) === */
.contacts-dark {
    background: #051E33;
    padding: 80px 0;
}

/* Контейнер для заголовков и карточки — общая ширина */
.contacts-container {
    max-width: 600px;        /* уменьшили ширину (было 700px) */
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовки */
.contacts-header {
    margin-bottom: 30px;
}

.contacts-header .section-pretitle {
    color: #ba940d; /* надпись Связь */
    text-align: left;
    margin-bottom: 8px;
}

.contacts-header .section-title {
    color: #ffffff;
    text-align: left;
    margin-bottom: 10px;
}

.contacts-header .section-subtitle {
    color: #A0C4E2;
    text-align: left;
    margin-bottom: 0;
}

/* Карточка с контактами — теперь той же ширины, что и заголовки */
.contacts-card {
    background: #0A2A45;
    border-radius: 24px;
    padding: 40px 50px;
    box-shadow: 0 20px 35px -10px rgba(0, 0, 0, 0.3);
}

/* Остальные стили без изменений */
.contacts-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: #0F3450;
    padding: 20px 25px;
    border-radius: 16px;
    transition: transform 0.3s, background 0.3s;
}

.contact-item:hover {
    transform: translateX(5px);
    background: #144568;
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #1F6E6C;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.3rem;
}

.contact-details {
    flex: 1;
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ba940d;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.contact-value {
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.4;
    margin: 0;
}

/* Адаптив */
@media (max-width: 768px) {
    .contacts-container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .contacts-card {
        padding: 30px 20px;
    }
    
    .contact-item {
        padding: 15px 18px;
        gap: 15px;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* === Подвал (footer) === */
.footer {
    background: #ffffff;
    color: #030303;
    padding: 60px 0 30px;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-about {
   margin-right: 60px; 
}

/* Колонка "РАЗДЕЛЫ" — сдвигаем правее */
.footer-column:nth-child(2) {
    margin-left: 20px;     /* отталкивает от левой колонки */
    padding-left: 10px;    /* дополнительный отступ слева для визуального смещения */
}

.footer-logos {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-logo-link:hover {
    opacity: 0.8;
}

.footer-logo {
    width: 200px;           /* размер лого */
    height: 60px;
    object-fit: contain;
}

.footer-logo-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #000000;
    line-height: 1.3;
}
/* Первый логотип (ЮФУ) сдвигаем влево */
.footer-logo-link:first-child {
    margin-left: -30px;      /* отрицательный отступ сдвинет влево */
    padding-left: 0;
}

/* сдвигаем только текст который напротив лого юфу */
.footer-logo-link:first-child .footer-logo-title {
    margin-left: -30px;       /* сдвинет только текст */
}
.footer-description {
    font-size: 0.9rem;
    color: #0e0e0e;
    line-height: 1.5;
    margin: 0;
     margin-top: 30px;   /* добавить или увеличить значение */
}

.footer-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 1px;
    color: #0F3450; /* Название разделов */
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #0c0c0c; /**/
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #0F3450; /* подсветка разделов при наведении*/
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(193, 188, 188, 0.596);
    font-size: 0.8rem;
    color: #080808; /* внизу надпись*/
}

/* Адаптив */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-logo-link {
        justify-content: center;
    }
    .footer-about {
        align-items: center;
    }
}


/* Стрелки навигации при открытии фото в альбоме */
.lightbox {
    /* существующие стили */
    justify-content: center;
    align-items: center;
}
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 50%;
    transition: background 0.3s;
    z-index: 10;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(0,0,0,0.8);
}
.lightbox-prev.disabled, .lightbox-next.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* === Страница истории (аккордеон) === */
.history-page {
    padding: 60px 0;
}

.history-accordion {
    margin-top: 40px;
}

.accordion-item {
    background: #ffffff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    transition: box-shadow 0.3s;
}

.accordion-item:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    user-select: none;
}

.accordion-title {
    flex: 1;
}

.accordion-period {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1F6E6C;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.accordion-title h2 {
    font-size: 1.4rem;
    margin: 0;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}

.accordion-icon {
    font-size: 1.2rem;
    color: #1F6E6C;
    transition: transform 0.3s;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.accordion-content.open {
    transition: max-height 0.5s ease-in;
}

.accordion-inner {
    display: flex;
    gap: 40px;
    padding: 0 30px 30px 30px;
}
.teacher-accordion .accordion-inner {
    display: block;
    padding-top: 10px;
    border-top: 1px solid #E5E7EB;
    font-size: 0.95rem;
    line-height: 1.6;
}
.accordion-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3e50;
}

.accordion-text p {
    margin-bottom: 15px;
}

.accordion-image {
    flex: 0.8;
}

.accordion-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    object-fit: cover;
}

@media (max-width: 768px) {
    .accordion-inner {
        flex-direction: column;
    }
    .accordion-header {
        padding: 15px 20px;
    }
    .accordion-title h2 {
        font-size: 1.2rem;
    }
}

.accordion-image .photo-card {
    max-width: 400px;
    margin: 0 auto;
}

/* === Страница новостей === */
.news-page {
    padding: 60px 0;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.news-card {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 1px solid #E5E7EB;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}
.news-date {
    font-size: 0.85rem;
    color: #1F6E6C;
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.news-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}
.news-short {
    font-size: 0.95rem;
    color: #4B5563;
    line-height: 1.5;
    margin-bottom: 15px;
}
.news-more {
    font-size: 0.9rem;
    color: #1F6E6C;
    font-weight: 600;
    display: inline-block;
}

/* === Страница отдельной новости === */
.news-item-page {
    padding: 60px 0;
}
.back-link {
    display: inline-block;
    margin-bottom: 30px;
    color: #1F6E6C;
    text-decoration: none;
}
.news-item {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #E5E7EB;
}
.news-item-date {
    font-size: 0.9rem;
    color: #1F6E6C;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.news-item-title {
    font-size: 2rem;
    font-family: 'Georgia', serif;
    margin-bottom: 30px;
    color: #0B1C33;
}
.news-item-full p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #2d3e50;
    margin-bottom: 20px;
}
@media (max-width: 768px) {
    .news-item {
        padding: 25px;
    }
    .news-item-title {
        font-size: 1.6rem;
    }
}

/* === Картинка в карточке новости === */
.news-card {
    background: #F9FAFB;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #E5E7EB;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}
/* === Картинка в карточке новости === */
.news-card-image {
    width: 100%;
    height: 250px;          /* фиксированная высота для всех картинок */
    overflow: hidden;
    background-color: #f0f0f0;  /* фон на случай, если картинка не загрузится */
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* картинка заполнит контейнер, обрезая лишнее */
    display: block;
    transition: transform 0.3s ease;
}

/* При наведении можно сделать небольшой зум */
.news-card:hover .news-card-image img {
    transform: scale(1.03);
}
.news-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* === Картинка внутри полной новости === */
.news-item-image {
    text-align: center;
    margin: 20px 0 30px;
}

.news-item-image img {
    max-width: 100%;        /* не шире контейнера (адаптивность) */
    width: 500px;           /* фиксированная ширина (можно поставить 500px, 700px и т.д.) */
    height: auto;           /* высота автоматически подстроится пропорционально */
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;         /* центрируем картинку */
}

/* === Пагинация для новостей === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.page-btn, .page-num {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    color: #0B1C33;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-num.active {
    background: #1F6E6C;
    border-color: #1F6E6C;
    color: white;
}

.page-btn:hover:not(:disabled),
.page-num:hover:not(.active) {
    background: #EFF6FF;
    border-color: #1F6E6C;
}

.page-btn.disabled,
.page-num.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    color: #6B7280;
    padding: 0 5px;
}

/* === Страница списка сотрудников === */
.teachers-page {
    padding: 60px 0;
}
.teachers-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.teacher-list-card {
    display: flex;
    gap: 20px;
    background: #F9FAFB;
    border-radius: 16px;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
    align-items: center;
}
.teacher-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    background: #FFFFFF;
}
.teacher-list-photo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f2f5;
}

.teacher-list-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* сохраняет пропорции, заполняя контейнер */
    display: block;
}
.teacher-list-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #0B1C33;
}
.teacher-list-info p {
    font-size: 0.85rem;
    color: #1F6E6C;
    margin-bottom: 8px;
}
.teacher-more {
    font-size: 0.8rem;
    color: #1F6E6C;
    font-weight: 500;
}

/* === Страница отдельного сотрудника === */
.teacher-page {
    padding: 60px 0;
}
.teacher-profile {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #E5E7EB;
}
.teacher-profile-header {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #E5E7EB;
}
.teacher-profile-photo {
    width: 250px;
    flex-shrink: 0;
}
.teacher-profile-photo img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
.teacher-profile-info {
    flex: 1;
}
.teacher-profile-info h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #0B1C33;
}
.teacher-contact-row {
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
}
.teacher-contact-row i {
    width: 24px;
    color: #1F6E6C;
}
.teacher-contact-row a {
    color: #1F6E6C;
    text-decoration: none;
}

/* Аккордеон на странице сотрудника */
.teacher-accordion {
    margin-top: 20px;
}
.teacher-accordion .accordion-item {
    background: #FFFFFF;
    border-radius: 16px;
    margin-bottom: 15px;
    border: 1px solid #E5E7EB;
}
.teacher-accordion .accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
}
.teacher-accordion .accordion-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0B1C33;
}
.teacher-accordion .accordion-icon {
    color: #1F6E6C;
}
.teacher-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding: 0 25px;
}
.teacher-accordion .accordion-content.open {
    padding-bottom: 25px;
}
.teacher-accordion .accordion-inner {
    padding-top: 10px;
    border-top: 1px solid #E5E7EB;
    font-size: 0.95rem;
    line-height: 1.6;
    
}

@media (max-width: 768px) {
    .teacher-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .teacher-contact-row {
        justify-content: center;
    }
    .teacher-profile-photo {
        width: 180px;
    }
}

.accordion-inner p {
    display: block;
    margin-bottom: 15px;
    line-height: 1.6;
}

.accordion-inner {
    display: block;
}

/* Если есть дополнительный контейнер для биографии */
.teacher-bio p {
    display: block;
    margin-bottom: 15px;
}

.teacher-bio {
    display: block;
}

.carousel-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-arrow:disabled .more-circle {
    background: #F9FAFB;
    border-color: #ccc;
    color: #ccc;
}

.carousel-arrow:disabled:hover .more-circle {
    background: #F9FAFB;
    border-color: #ccc;
    color: #ccc;
}

/* Скрываем стрелки везде, кроме главной страницы в блоке .teachers */
body:not(.home) .carousel-arrow,
body:not(.home) .more-circle {
    display: none !important;
}

/* === Лабораторные работы в стиле карточек (как новости) === */
.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.work-card {
    background: #F9FAFB;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
}

.work-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}

/* === Карточки лабораторных работ === */
.work-image {
    width: 100%;
    height: 160px;                /* фиксированная высота для всех фото */
    background: #F0F2F5;         /* фон на случай, если фото меньше */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.work-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;         /* фото полностью видно, не обрезается */
    display: block;
}

.work-card:hover .work-image img {
    transform: scale(1.03);
}

.no-image {
    font-size: 3rem;
    color: #1F6E6C;
}

.work-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.work-number {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1F6E6C;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.work-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #0B1C33;
    line-height: 1.3;
}

.work-goal {
    font-size: 0.9rem;
    color: #4B5563;
    line-height: 1.5;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #E5E7EB;
}

.work-goal i {
    color: #1F6E6C;
    margin-right: 8px;
    font-size: 0.85rem;
}

/* Сотрудники лаборатории (оставляем как было) */
.staff-list {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.staff-card {
    background: #F9FAFB;
    border-radius: 16px;
    padding: 20px 30px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #E5E7EB;
    transition: all 0.3s;
    min-width: 250px;
}

.staff-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    background: #FFFFFF;
}

.staff-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #0B1C33;
    margin-bottom: 5px;
}

.staff-position {
    font-size: 0.9rem;
    color: #1F6E6C;
}

/* Описание лаборатории */
.laboratory-description {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid #E5E7EB;
}

.laboratory-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
    margin-bottom: 15px;
}

.laboratory-works h2 {
    font-size: 1.6rem;
    margin-top: 40px;
    margin-bottom: 20px;
    color: #0B1C33;
}

@media (max-width: 768px) {
    .works-grid {
        grid-template-columns: 1fr;
    }
}
/* === Увеличение отступа для страницы лаборатории === */
.laboratory-page {
    padding-top: 50px;   /* увеличивает расстояние между шапкой и заголовком */
}

/* Если нужно больше — увеличьте значение */
@media (max-width: 768px) {
    .laboratory-page {
        padding-top: 30px;
    }
}

/* === Страница аспирантов === */
.postgraduates-page {
    padding: 60px 0;
}

.year-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.year-header:hover {
    background: #f0f2f5;
}

.year-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: #0B1C33;
}

.year-icon {
    color: #1F6E6C;
    font-size: 1.2rem;
}

.year-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.student-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}


.student-info {
    margin-bottom: 5px;  /* небольшой запас снизу */
}

.students-list {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-item {
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 10px;
}

.student-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Студент с информацией (кликабельный) */
.student-accordion {
    width: 100%;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.student-header:hover {
    color: #1F6E6C;
}

.student-name {
    font-size: 1rem;
    font-weight: 500;
    color: #0B1C33;
}

.student-icon {
    color: #1F6E6C;
    font-size: 0.9rem;
}

.student-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    padding-left: 15px;
    margin-top: 8px;
}

.student-info {
    display: flex;
    gap: 20px;
    background: #F9FAFB;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 10px;
    align-items: flex-start;  /* выравнивание по верхнему краю */
}

.student-photo {
    width: 160px;
    height: 200px;
    object-fit: contain;      /* фото не обрезается, сохраняет пропорции */
    border-radius: 12px;
    background: #F9FAFB;      /* фон на случай пустых мест */
    flex-shrink: 0;
    margin-top: 25px;          /* опускаем фото немного вниз */
}

.student-details {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2d3e50;
}

.student-details p {
    margin-bottom: 8px;
}

/* Студент без информации */
.student-name-no-info {
    padding: 10px 0;
    font-size: 1rem;
    color: #0B1C33;
}

@media (max-width: 768px) {
    .student-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .student-photo {
        width: 80px;
        height: 80px;
    }
}

/* === Страница научной работы === */
.science-page {
    padding: 60px 0;
}

.science-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.science-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.science-header:hover {
    background: #f0f2f5;
}

.science-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: #0B1C33;
}

.science-icon {
    color: #1F6E6C;
    font-size: 1.2rem;
}

.science-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.science-inner {
    padding: 20px 25px;
    border-top: 1px solid #E5E7EB;
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3e50;
}

.science-inner h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    color: #0B1C33;
}

.science-inner h4 {
    font-size: 1rem;
    margin: 15px 0 8px;
    color: #1F6E6C;
}

.science-inner ul {
    margin: 10px 0;
    padding-left: 20px;
}

.science-inner li {
    margin-bottom: 8px;
}

.science-inner a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
    transition: color 0.3s;
}

.science-inner a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

/* === Страница грантов === */
.grants-page {
    padding: 60px 0;
}

.grants-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.grants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.grants-header:hover {
    background: #f0f2f5;
}

.grants-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: #0B1C33;
}

.grants-icon {
    color: #1F6E6C;
    font-size: 1.2rem;
}

.grants-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.grants-inner {
    padding: 20px 25px;
    border-top: 1px solid #E5E7EB;
}

.grants-inner ul {
    margin: 0;
    padding-left: 20px;
}

.grants-inner li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2d3e50;
}

.grants-inner li a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
}

.grants-inner li a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

/* === Страница стипендии === */
.scholarship-page {
    padding: 60px 0;
}

.scholarship-about {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 50px;
    border: 1px solid #E5E7EB;
}

.scholarship-about h2 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #0B1C33;
}

.about-links {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1F6E6C;
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.about-link:hover {
    background: #0e4e4c;
}

.about-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
}

.scholarship-winners h2 {
    font-size: 1.6rem;
    margin-bottom: 20px;
    color: #0B1C33;
}

.year-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.year-header:hover {
    background: #f0f2f5;
}

.year-header h3 {
    font-size: 1.2rem;
    margin: 0;
    color: #0B1C33;
}

.year-icon {
    color: #1F6E6C;
    font-size: 1rem;
}

.year-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.winners-list {
    padding: 15px 25px;
    border-top: 1px solid #E5E7EB;
}

.winners-list ul {
    margin: 0;
    padding-left: 20px;
}

.winners-list li {
    margin-bottom: 10px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #2d3e50;
}

/* === Страница образования === */
.education-page {
    padding: 60px 0;
}

.education-accordion {
    background: #fff;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(224, 106, 106, 0.05);
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.education-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.education-header:hover {
    background: #f0f2f5;
}

.education-header h2 {
    font-size: 1.3rem;
    margin: 0;
    color: #18330b;
}

.education-icon {
    color: #1F6E6C;
    font-size: 1.2rem;
}

.education-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fff;
}

.education-inner {
    padding: 20px 25px;
    border-top: 1px solid #E5E7EB;
    font-size: 1rem;
    line-height: 1.6;
    color: #2d3e50;
}

.education-inner h3 {
    font-size: 1.2rem;
    margin: 20px 0 10px;
    color: #0B1C33;
}

.education-inner h4 {
    font-size: 1rem;
    margin: 15px 0 8px;
    color: #1F6E6C;
}

.education-inner h5 {
    font-size: 0.95rem;
    margin: 12px 0 6px;
    color: #0B1C33;
}

.education-inner ul {
    margin: 10px 0;
    padding-left: 20px;
}

.education-inner li {
    margin-bottom: 8px;
}

.education-inner a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
    transition: color 0.3s;
}

.education-inner a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

/* === Поиск в шапке === */
.search-container {
    margin-left: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 40px;
    overflow: hidden;
    transition: all 0.3s;
}

.search-form:focus-within {
    border-color: #1F6E6C;
    box-shadow: 0 0 0 2px rgba(31, 110, 108, 0.2);
}

#searchInput {
    padding: 8px 15px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 180px;
    outline: none;
    color: #0B1C33;
}

#searchInput::placeholder {
    color: #9CA3AF;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    color: #1F6E6C;
    transition: color 0.3s;
}

.search-btn:hover {
    color: #0e4e4c;
}

@media (max-width: 992px) {
    .search-container {
        margin-left: 10px;
    }
    #searchInput {
        width: 140px;
    }
}

@media (max-width: 768px) {
    .header__inner {
        flex-wrap: wrap;
        gap: 10px;
    }
    .search-container {
        order: 3;
        width: 100%;
        margin-left: 0;
    }
    .search-form {
        width: 100%;
    }
    #searchInput {
        width: 100%;
    }
}

/* === Выпадающее меню (мгновенное появление) === */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #0B1C33;
    font-weight: 500;
    border-radius: 30px;
    transition: background-color 0.3s, color 0.3s;
}

/* === Исправление исчезновения выпадающего меню === */
.dropdown-content {
    position: absolute;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 16px;
    z-index: 100;
    top: 100%;
    left: 0;
    margin-top: 0;
    border: 1px solid #E5E7EB;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.15s, opacity 0.15s linear;
}

/* Псевдоэлемент, который "соединяет" кнопку и меню */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
}

.dropdown-content a {
    color: #0B1C33;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: #F9FAFB;
    color: #1F6E6C;
}

/* Адаптив для мобильных устройств */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
    }
    .dropdown-content {
        position: static;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        margin-top: 0;
    }
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* === Страница монографий  === */
.monographs-page {
    padding: 60px 0;
}

.monographs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.monograph-card {
    background: #F9FAFB;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
}

.monograph-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    background: #FFFFFF;
}

.monograph-image {
    width: 100%;
    height: 180px;
    background: #F9FAFB;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.monograph-image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;  /* фото не обрезается, сохраняет пропорции */
    display: block;
}

.monograph-card:hover .monograph-image img {
    transform: scale(1.03);
}

.monograph-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.monograph-authors {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1F6E6C;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.monograph-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0B1C33;
    margin-bottom: 10px;
    line-height: 1.3;
}

.monograph-publisher {
    font-size: 0.85rem;
    color: #4B5563;
    margin-bottom: 8px;
}

.monograph-year {
    font-size: 0.85rem;
    color: #1F6E6C;
    font-weight: 500;
    display: inline-block;
    margin-right: 10px;
}

.monograph-pages {
    font-size: 0.85rem;
    color: #6B7280;
    display: inline-block;
}

.useful-link {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #E5E7EB;
}

.useful-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #1F6E6C;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: background 0.3s;
}

.useful-link-btn:hover {
    background: #0e4e4c;
}

/* === Кнопка Наверх === */
.scroll-to-top {
    position: fixed;
    bottom: 400px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #1F6E6C;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top:hover {
    background: #0e4e4c;
    transform: translateY(-3px);
}

.scroll-to-top.show {
    display: flex;
}



.history-page {
    padding: 60px 0;
}

.history-page .section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}

.history-page .section-subtitle {
    font-size: 1.1rem;
    color: #6B7280;
    margin-bottom: 40px;
}

/* --- Аккордеоны (только для history.html) --- */
.history-accordion {
    margin-top: 40px;
}

.accordion-item {
    background: #FFFFFF;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #E5E7EB;
    transition: box-shadow 0.3s;
    overflow: hidden;
}

.accordion-item:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    background: #F9FAFB;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: #f0f2f5;
}

.accordion-period {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1F6E6C;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.accordion-header h2 {
    font-size: 1.4rem;
    margin: 0;
    color: #0B1C33;
    font-family: 'Georgia', serif;
}

.accordion-icon {
    font-size: 1.2rem;
    color: #1F6E6C;
    transition: transform 0.3s;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.accordion-content.open {
    transition: max-height 0.5s ease-in;
}

/* --- Внутреннее содержимое (общее для аккордеона и страниц без аккордеона) --- */
.history-inner,
.accordion-inner {
    display: flex;
    gap: 40px;
    padding: 20px 30px 30px 30px;
    align-items: flex-start;
    background: #FFFFFF;
}

.history-text,
.accordion-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
}

.history-text p,
.accordion-text p {
    margin-bottom: 15px;
}

.history-image-block,
.accordion-image {
    flex: 0.8;
    max-width: 400px;
}

.history-image-block img,
.accordion-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    object-fit: cover;
}

.history-image-block .photo-caption,
.accordion-image .photo-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #6B7280;
    font-style: italic;
    text-align: center;
}

/* --- Адаптив --- */
@media (max-width: 768px) {
    .history-inner,
    .accordion-inner {
        flex-direction: column;
        padding: 15px 20px 20px 20px;
    }

    .accordion-header {
        padding: 15px 20px;
    }

    .accordion-header h2 {
        font-size: 1.2rem;
    }

    .history-image-block,
    .accordion-image {
        max-width: 100%;
    }

    .history-page .section-title {
        font-size: 1.8rem;
    }}

   /* === Страница истории И.И. Воровича === */
.vorovich-page {
    padding: 60px 0;
}

.vorovich-timeline {
    margin-top: 40px;
}

.vorovich-section {
    background: #fff;
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s;
}

.vorovich-section:hover {
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.vorovich-section h2 {
    font-size: 1.5rem;
    font-family: 'Georgia', serif;
    color: #0B1C33;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #1F6E6C;
}

.vorovich-section-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.vorovich-section-image {
    flex: 0 0 300px;
}

.vorovich-section-image img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}

.image-caption {
    font-size: 0.85rem;
    color: #6B7280;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* === Страница Воровича === */
.vorovich-page {
    padding: 60px 0;
}

.vorovich-card {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.vorovich-image {
    text-align: center;
    margin-bottom: 30px;
}

.vorovich-image img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    object-fit: contain;   /* не обрезается */
    background: white;
}

.vorovich-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #6B7280;
    font-style: italic;
}

.vorovich-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
}

.vorovich-text h3 {
    font-size: 1.4rem;
    color: #0B1C33;
    margin: 25px 0 15px;
    font-family: 'Georgia', serif;
}

.vorovich-text p {
    margin-bottom: 15px;
}

.vorovich-text a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
}

.vorovich-text a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

.vorovich-text ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.vorovich-text li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .vorovich-card {
        padding: 20px;
    }
    .vorovich-image img {
        max-height: 300px;
    }
}

/* === Страница памяти === */
.memory-page {
    padding: 60px 0;
}

.memory-card {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.memory-image {
    text-align: center;
    margin-bottom: 30px;
}

.memory-photo {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    object-fit: contain;
    background: white;
}

.memory-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #6B7280;
    font-style: italic;
}

.memory-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
}

.memory-text h3 {
    font-size: 1.4rem;
    color: #0B1C33;
    margin: 25px 0 15px;
    font-family: 'Georgia', serif;
}

.memory-text p {
    margin-bottom: 15px;
}

.memory-text a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
}

.memory-text a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

.memory-text ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.memory-text li {
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .memory-card {
        padding: 20px;
    }
    .memory-photo {
        max-height: 300px;
    }
}

/* === Страница выпускников === */
.graduates-page {
    padding: 60px 0;
}

.graduates-card {
    background: #F9FAFB;
    border-radius: 24px;
    padding: 30px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-top: 30px;
}

.graduates-image {
    text-align: center;
    margin-bottom: 60px;
}

.graduates-photo {
    max-width: 300%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    object-fit: contain;
    background: white;
}

.graduates-caption {
    margin-top: 12px;
    font-size: 0.9rem;
    color: #6B7280;
    font-style: italic;
}

.graduates-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #2d3e50;
}

.graduates-text h3 {
    font-size: 1.4rem;
    color: #0B1C33;
    margin: 25px 0 15px;
    font-family: 'Georgia', serif;
}

.graduates-text p {
    margin-bottom: 15px;
}

.graduates-text a {
    color: #1F6E6C;
    text-decoration: none;
    border-bottom: 1px dotted #1F6E6C;
}

.graduates-text a:hover {
    color: #0e4e4c;
    border-bottom-color: #0e4e4c;
}

.graduates-text ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

.graduates-text li {
    margin-bottom: 8px;
}


@media (max-width: 768px) {
    .graduates-card {
        padding: 20px;
    }
    .graduates-photo {
        max-height: 300px;
    }
}

/* ================================
   МОБИЛЬНАЯ АДАПТАЦИЯ
   ================================ */

/* --- Общее --- */
@media (max-width: 768px) {

    /* Запрещаем горизонтальный скролл */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 0;
    }

    h2 {
        font-size: 1.8rem;
    }

    /* --- Шапка и меню --- */
    .header__inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        gap: 10px;
        position: relative;
    }

    .logo-container {
        flex: 1;
    }

    .logo-img {
        height: 40px;
    }

    .logo-text {
        font-size: 1rem;
    }

    /* Бургер-кнопка */
    .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 200;
    }

    .burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #0B1C33;
        border-radius: 2px;
        transition: all 0.3s;
    }

    /* Мобильное меню */
    .nav {
        display: none;
        flex-direction: column;
        gap: 5px;
        width: 100%;
        background: #fff;
        padding: 10px 0;
        border-top: 1px solid #E5E7EB;
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 10px 15px;
        border-radius: 8px;
        font-size: 1rem;
    }

    /* Выпадающее меню на мобильном */
    .dropdown {
        width: 100%;
    }

    .dropbtn {
        display: block;
        width: 100%;
        padding: 10px 15px;
    }

    .dropdown-content {
        position: static;
        visibility: visible;
        opacity: 1;
        box-shadow: none;
        border: none;
        border-left: 3px solid #1F6E6C;
        margin-left: 15px;
        border-radius: 0;
        display: none;
    }

    .dropdown.open .dropdown-content {
        display: block;
    }

    /* Поиск */
    .search-container {
        width: 100%;
        margin-left: 0;
        order: 3;
    }

    .search-form {
        width: 100%;
    }

    #searchInput {
        width: 100%;
        font-size: 1rem;
    }

    /* --- Главная страница (Hero) --- */
    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero .buttons {
        flex-direction: column;
        gap: 12px;
    }

    .btn {
        text-align: center;
    }

    /* --- О кафедре --- */
    .heritage__grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .heritage__photo {
        margin-top: 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .heritage-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- История (карточки) --- */
    .history__grid {
        grid-template-columns: 1fr;
    }

    /* --- Исследования --- */
    .science-grid {
        grid-template-columns: 1fr;
    }

    /* --- Галерея --- */
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    /* --- Карусель сотрудников --- */
    .teachers-carousel {
        padding: 0 15px;
    }

    .teachers-track {
        gap: 15px;
    }

    .teacher-card-link {
        flex: 0 0 220px;
    }

    /* --- Список сотрудников --- */
    .teachers-list-grid {
        grid-template-columns: 1fr;
    }

    .teacher-list-card {
        flex-direction: row;
        align-items: center;
    }

    /* --- Страница сотрудника --- */
    .teacher-profile {
        padding: 20px 15px;
    }

    .teacher-profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .teacher-profile-photo {
        width: 160px;
    }

    .teacher-profile-info h1 {
        font-size: 1.5rem;
    }

    .teacher-contact-row {
        justify-content: center;
        font-size: 0.9rem;
    }

    .teacher-accordion .accordion-header {
        padding: 14px 15px;
    }

    .teacher-accordion .accordion-title {
        font-size: 1rem;
    }

    .teacher-accordion .accordion-content {
        padding: 0 15px;
    }

    /* --- Новости --- */
    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-item {
        padding: 20px 15px;
    }

    .news-item-title {
        font-size: 1.4rem;
    }

    /* --- Монографии --- */
    .monographs-grid {
        grid-template-columns: 1fr;
    }

    /* --- Лабораторные работы --- */
    .works-grid {
        grid-template-columns: 1fr;
    }

    /* --- Футер --- */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-about {
        margin-right: 0;
    }

    .footer-column:nth-child(2) {
        margin-left: 0;
        padding-left: 0;
    }

    .footer-logo-link:first-child {
        margin-left: 0;
    }

    .footer-logo-link:first-child .footer-logo-title {
        margin-left: 0;
    }

    /* --- Кнопка наверх --- */
    .scroll-to-top {
        bottom: 20px;
        right: 15px;
    }

    /* --- Контакты --- */
    .contacts-card {
        padding: 25px 15px;
    }
}

/* --- Планшеты (768px - 1024px) --- */
@media (min-width: 769px) and (max-width: 1024px) {

    .heritage__grid {
        grid-template-columns: 1fr;
    }

    .heritage__photo {
        margin-top: 0;
    }

    .heritage-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .science-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .history__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .teachers-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* Десктоп — бургер скрыт */
.burger {
    display: none;
}

/* Мобильный — бургер виден */
@media (max-width: 768px) {
    .burger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        z-index: 200;
        flex-shrink: 0; /* чтобы не сжимался */
    }

    .burger span {
        display: block;
        width: 24px;
        height: 2px;
        background: #0B1C33;
        border-radius: 2px;
        transition: all 0.3s;
    }

    /* Меню скрыто по умолчанию на мобильном */
    .nav {
        display: none;
        flex-direction: column;
        gap: 5px;
        width: 100%;
        background: #fff;
        padding: 10px 0;
        border-top: 1px solid #E5E7EB;
        order: 4; /* идёт после поиска */
    }

    .nav.open {
        display: flex;
    }

    /* Поиск тоже переносим */
    .search-container {
        order: 3;
        width: 100%;
        margin-left: 0;
    }

    /* Шапка становится flex-wrap чтобы меню переносилось вниз */
    .header__inner {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        align-items: center;
    }

    /* Логотип занимает всё место между собой и бургером */
    .logo-container {
        flex: 1;
    }
}

