/* Основные стили */
body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #333;
    background-color: #f9f9f7;
    margin: 0;
    padding: 20px;
    text-rendering: optimizeLegibility;
}

article {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    padding: 3rem;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

/* Заголовки */
h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 1rem;
    margin-bottom: 1.8rem;
    font-weight: 600;
    line-height: 1.3;
}

h2 {
    font-size: 1.8rem;
    color: #34495e;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    color: #3a5169;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.2rem;
    color: #3a5169;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
}

/* Текст */
p {
    margin-bottom: 1.2rem;
    text-align: justify;
    hyphens: auto;
    font-size: 1.05rem;
}

/* Изображения */
figure {
    margin: 2rem auto;
    text-align: center;
}

img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

/* Подписи к изображениям */
figcaption {
    text-align: center;
    font-style: italic;
    color: #666;
    margin-top: 0.8rem;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Списки */
ol, ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.7rem;
    line-height: 1.6;
}

/* Научные названия */
.scientific-name {
    font-style: italic;
    color: #2980b9;
    font-family: 'Times New Roman', serif;
}

/* Формулы */
.formula {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin: 2rem 0;
    overflow-x: auto;
    text-align: center;
}

.formula-caption {
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    margin-top: 0.8rem;
    margin-bottom: 0;
}

.formula-legend {
    text-align: left;
    margin-top: 1rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
    color: #555;
}

/* Два изображения рядом */
.image-pair {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2%;
    margin: 2rem 0;
}

.image-pair figure {
    flex: 1 1 48%;
    min-width: 300px;
    margin: 0;
}

.image-pair figcaption {
    flex: 1 1 100%;
}

/* Ссылки */
a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
    border-bottom: 1px dotted #3498db;
}

a:hover {
    color: #2980b9;
    text-decoration: none;
    border-bottom: 1px solid #2980b9;
}

/* Методологические блоки */
.method {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid #3498db;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

.result {
    background-color: #f0f7fd;
    padding: 1.5rem;
    border-left: 4px solid #2980b9;
    margin: 1.5rem 0;
    border-radius: 0 4px 4px 0;
}

.conclusion {
    background-color: #f5f5f5;
    padding: 1.8rem;
    border-radius: 4px;
    margin: 2.5rem 0;
    border-left: 4px solid #2c3e50;
}

/* Адаптивность */
@media (max-width: 768px) {
    article {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .image-pair figure {
        flex: 1 1 100%;
    }
}

/* MathJax стили */
.MathJax {
    font-size: 1.1em !important;
    color: #2c3e50 !important;
}

mjx-container[jax="CHTML"] {
    outline: none;
}