/* styles/abstract.css */
/* Стили для секции "Реферат" */
.abstract {
    line-height: 1.8;
    font-size: 1rem;
}

.abstract .toc {
    margin-top: 0rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.abstract .toc h2 {
    text-align: center;
    border-left: none;
    margin-bottom: 1rem;
    margin-top: -1rem;
    color: #333;
    font-weight: 600;
}

.abstract .toc ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.abstract .toc li {
    margin: 0.3rem 0;
}

.abstract .toc a {
    text-decoration: none;
    color: #3b82f6;
    transition: color 0.2s ease;
}

.abstract .toc a:hover {
    color: #1d4ed8;
}

/* Отступы для вложенных уровней */
.abstract .toc ul ul {
    padding-left: 1.2rem;
    border-left: 2px solid #e0e0e0;
    margin-top: 0.3rem;
}

.abstract .toc ul ul ul {
    padding-left: 1.2rem;
    border-left: 2px dashed #d0d0d0;
}

.abstract .toc ul ul ul ul {
    padding-left: 1.2rem;
    border-left: 1px dotted #c0c0c0;
}

.abstract .figure {
    display: block;          /* превращаем в блочный элемент */
    margin: 1.5rem auto;     /* авто отступ слева и справа → центрирование */
    max-width: 100%;         /* не больше ширины контейнера */
    height: auto;            /* сохраняем пропорции */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* опционально — тень */
}


.abstract h1,
.abstract h2,
.abstract h3,
.abstract h4,
.abstract h5 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #333;
    scroll-margin-top: var(--navbar-height);
}

.abstract h1 {
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.abstract h2 {
    font-size: 1.5rem;
    border-left: 4px solid #4facfe;
    padding-left: 1rem;
}

.abstract h3 {
    font-size: 1.3rem;
    border-left: 3px solid #43e97b;
    padding-left: 0.8rem;
}

.abstract h4 {
    font-size: 1.2rem;
    border-left: 2px solid #fa709a;
    padding-left: 0.6rem;
}

.abstract h5 {
    font-size: 1.1rem;
    font-style: italic;
}

.abstract p {
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
    text-indent: 1.25rem;
}

.abstract ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.abstract ol li {
    margin-bottom: 0.5rem;
}

.abstract .figure-caption,
.abstract .table-caption {
    text-align: center;
    font-style: italic;
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    color: #666;
}

.abstract .table-caption {
    margin-bottom: -0.5rem;
}

.abstract a[href^="#ref-"],
.abstract ol li a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.abstract a[href^="#ref-"]:hover,
.abstract ol li a:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    margin: 1rem 0;
}

.abstract .rating-table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    text-align: center;
}

.abstract .rating-table th, 
.abstract .rating-table td {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
}

.abstract .rating-table thead {
    background: linear-gradient(90deg, #667eea, #4facfe);
    color: white;
    font-weight: 600;
}

.abstract .rating-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.abstract .rating-table tbody tr:hover {
    background-color: #e0e7ff;
}

.abstract .rating-table td {
    color: #333;
}

.abstract .formula {
    text-align: center;
    overflow-x: auto;
    margin: 1rem 0;
}


/* Адаптивность */
@media (max-width: 768px) {
    .abstract {
        font-size: 0.95rem;
    }

    .abstract h1 {
        font-size: 1.5rem;
    }

    .abstract h2 {
        font-size: 1.3rem;
    }

    .abstract h3 {
        font-size: 1.1rem;
    }

    .abstract .toc {
        padding: 0.8rem 1rem;
    }

    .abstract .toc ul ul {
        padding-left: 0.8rem;
    }
}