/* Стили для страницы реферата */

/* Общие стили для контента реферата */
.dissertation-content {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(58, 77, 112, 0.08);
}

.abstract-section {
    background: linear-gradient(135deg, #3a4d70 0%, #2c3e50 100%);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}

.abstract-section h2 {
    color: white;
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.content-section {
    padding: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.content-section h2 {
    color: #2c3e50;
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

/* Оглавление */
.toc-container {
    background-color: #f9fafb;
    border-radius: 6px;
    padding: 25px;
    border-left: 4px solid #3a4d70;
}

.toc-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toc-item {
    display: flex;
    flex-direction: column;
}

.toc-chapter {
    margin-bottom: 5px;
}

.toc-link {
    color: #3a4d70;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.toc-link:hover {
    color: #2c3e50;
    text-decoration: underline;
}

.toc-link:before {
    content: "📖";
    margin-right: 10px;
    font-size: 14px;
}

.toc-subitems {
    padding-left: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.toc-sublink {
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.toc-sublink:hover {
    color: #3a4d70;
    text-decoration: underline;
}



/* Основное содержание */
.main-content-section {
    padding: 30px;
}

.main-content-section section {
    margin-bottom: 40px;
    scroll-margin-top: 20px;
}

.main-content-section h2 {
    color: #2c3e50;
    font-size: 24px;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
}

.main-content-section h3 {
    color: #3a4d70;
    font-size: 18px;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.main-content-section h4 {
    color: #4a5568;
    font-size: 16px;
    margin: 20px 0 10px 0;
    font-weight: 600;
}

.main-content-section p {
    color: #2d3748;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.main-content-section ul, .main-content-section ol {
    margin: 15px 0;
    padding-left: 25px;
    color: #2d3748;
}

.main-content-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.main-content-section strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Ссылки на литературу */
.ref-link {
    color: #3a4d70;
    text-decoration: none;
    font-weight: 600;
    background-color: rgba(58, 77, 112, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.9em;
    vertical-align: super;
    line-height: 0;
}

.ref-link:hover {
    background-color: rgba(58, 77, 112, 0.2);
    text-decoration: none;
}

/* Список литературы */
#references {
    background-color: #f9fafb;

    margin-top: 30px;
}

#references h2 {
    color: #2c3e50;
    border-bottom: none;
    margin-top: 0;
}

.abstract-text {
    margin-bottom: 12px;
    padding-left: 20px;
    text-indent: 1.5em;
    color: #4a5568;
    line-height: 1.6;
}

.academic-link {
    color: #3a4d70;
    text-decoration: none;
    transition: color 0.2s ease;
}

.academic-link:hover {
    color: #2c3e50;
    text-decoration: underline;
}

/* Стили для академических ссылок в списке литературы */
.academic-link {
    color: #2c5282;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border-bottom: 1px dashed rgba(44, 82, 130, 0.3);
    padding-bottom: 1px;
}

.academic-link:hover {
    color: #1a365d;
    text-decoration: none;
    border-bottom: 1px solid #1a365d;
    background-color: rgba(237, 242, 247, 0.5);
}

.academic-link:visited {
    color: #553c9a;
}

/* Улучшение видимости ссылок в тексте */
.main-content-section a:not(.ref-link):not(.academic-link) {
    color: #2c5282;
    text-decoration: none;
    border-bottom: 1px dotted rgba(44, 82, 130, 0.4);
    transition: all 0.2s ease;
}

.main-content-section a:not(.ref-link):not(.academic-link):hover {
    color: #1a365d;
    border-bottom: 1px solid #1a365d;
}

/* Улучшение ссылок в оглавлении */
.toc-link, .toc-sublink {
    color: #2c5282;
}

.toc-link:hover, .toc-sublink:hover {
    color: #1a365d;
}

/* Цитирование */
blockquote {
    border-left: 4px solid #3a4d70;
    margin: 20px 0;
    padding: 10px 20px;
    background-color: #f8fafc;
    color: #4a5568;
    font-style: italic;
}

/* Верхнее меню для страницы реферата */
.main-menu {
    background: linear-gradient(135deg, #3a4d70 0%, #2c3e50 100%);
    padding: 15px 0;
    border-radius: 8px 8px 0 0;
    margin-top: 20px;
}

.menu-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.menu-button {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #4a6285;
    color: white;
    border: 1px solid #3a4d70;
    box-shadow: 0 2px 4px rgba(58, 77, 112, 0.2);
    min-width: 120px;
    text-align: center;
}

.menu-button:hover {
    background-color: #3a4d70;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(58, 77, 112, 0.3);
    color: white;
}

.menu-button.current {
    background-color: #5d7ca6;
    color: white;
    cursor: default;
}

/* Нижнее меню */
.footer-menu {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #3a4d70 0%, #2c3e50 100%);
    border-radius: 0 0 8px 8px;
    margin-top: 20px;
}

.footer-item {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background-color: #4a6285;
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid #3a4d70;
    font-weight: 600;
    font-size: 14px;
}

.footer-item:hover {
    background-color: #3a4d70;
    transform: translateY(-2px);
}

.footer-item.current {
    background-color: #5d7ca6;
    cursor: default;
}

/* Адаптивность */
@media (max-width: 768px) {
    .abstract-section h2 {
        font-size: 22px;
    }
    
    .content-section, .main-content-section {
        padding: 20px;
    }
    
    .toc-container {
        padding: 15px;
    }
    
    .toc-sublink {
        font-size: 13px;
    }
    
    .main-content-section h2 {
        font-size: 20px;
    }
    
    .main-content-section h3 {
        font-size: 16px;
    }
    
    .menu-container {
        flex-direction: column;
        align-items: center;
    }
    
    .menu-button {
        width: 90%;
        max-width: 300px;
    }
    
    .footer-menu {
        flex-wrap: wrap;
    }
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Подсветка текущего раздела */
.main-content-section section:target h2 {
    color: #2c3e50;
    animation: highlight 2s ease;
}

@keyframes highlight {
    0% { background-color: rgba(58, 77, 112, 0.1); }
    100% { background-color: transparent; }
}