/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ СТАТЬИ (article.html) ===== */

/* Базовые сбросы и настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.7;
    color: #333;
    background-color: #f8f9fa;
    font-size: 16px;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Типография */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.8rem;
    text-align: center;
}

h2 {
    font-size: 2.2rem;
    color: #597d89;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.8rem;
    color: #495057;
}

h4 {
    font-size: 1.4rem;
    color: #6c757d;
}

p {
    margin-bottom: 1.5rem;
    text-align: justify;
    hyphens: auto;
}

a {
    text-decoration: none;
    color: #597d89;
    transition: all 0.3s ease;
}

a:hover {
    color: #4a6a75;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #597d89;
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #4a6a75;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid #597d89;
    color: #597d89;
}

.btn-secondary:hover {
    background-color: #597d89;
    color: white;
}

/* Шапка сайта */
.header {
    background-color: #fff;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 15px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #597d89;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    font-weight: 600;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #4a6a75;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #597d89;
}

/* Подвал сайта */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav {
    display: flex;
    gap: 1.5rem;
}

.footer-nav a {
    color: #bdc3c7;
}

.footer-nav a:hover {
    color: #ecf0f1;
}

/* Хлебные крошки */
.breadcrumbs {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    padding: 1.2rem 0;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumbs a {
    color: #597d89;
}

.breadcrumbs a:hover {
    color: #4a6a75;
}

.breadcrumbs span {
    color: #6c757d;
    font-weight: 500;
}

/* ===== СТИЛИ СТРАНИЦЫ СТАТЬИ ===== */

.article-page {
    padding-top: 2rem;
    background: white;
    min-height: 100vh;
}

/* Заголовок статьи */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, #597d89 0%, #4a6a75 100%);
    color: white;
    padding: 0.6rem 1.8rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-header h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.article-excerpt {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem;
    font-style: italic;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.meta-item i {
    color: #597d89;
}

.article-hero-image {
    margin: 2rem auto;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.8rem;
    font-style: italic;
}

/* Оглавление */
.article-toc {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    border-left: 5px solid #597d89;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.article-toc h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.article-toc ol {
    list-style-type: none;
    counter-reset: toc-counter;
}

.article-toc li {
    counter-increment: toc-counter;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2.5rem;
}

.article-toc li::before {
    content: counter(toc-counter) ".";
    position: absolute;
    left: 0;
    font-weight: bold;
    color: #597d89;
    font-size: 1.1rem;
}

.article-toc a {
    color: #2c3e50;
    transition: color 0.3s ease;
    font-weight: 500;
}

.article-toc a:hover,
.article-toc a.active {
    color: #597d89;
}

/* Тело статьи */
.article-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-section {
    margin-bottom: 4rem;
}

.article-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #e9ecef;
}

.article-section h3 {
    color: #597d89;
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
}

.article-section p {
    margin-bottom: 1.5rem;
}

/* Выделенные блоки */
.content-highlight {
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
    padding: 2rem;
    border-left: 5px solid #597d89;
    border-radius: 8px;
    margin: 2.5rem 0;
}

.content-highlight.important {
    background: linear-gradient(135deg, #fff0f0 0%, #ffebee 100%);
    border-left-color: #e74c3c;
}

.content-highlight p {
    margin-bottom: 0;
    font-style: italic;
    font-weight: 500;
}

/* Цитаты */
.article-quote {
    border-left: 5px solid #597d89;
    padding: 2rem;
    margin: 2.5rem 0;
    font-style: italic;
    color: #555;
    background: #f8f9fa;
    border-radius: 0 8px 8px 0;
}

.article-quote p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-quote cite {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    color: #999;
    font-weight: 500;
}

.article-quote cite::before {
    content: "— ";
}

/* Сетка особенностей */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2.5rem 0;
}

.feature-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-item i {
    font-size: 3rem;
    color: #597d89;
    margin-bottom: 1.5rem;
}

.feature-item h4 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.feature-item p {
    font-size: 1rem;
    margin-bottom: 0;
    color: #666;
}

/* Таблицы сравнения */
.comparison-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 2.5rem 0;
    border: 1px solid #e9ecef;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    background: linear-gradient(135deg, #597d89 0%, #4a6a75 100%);
    color: white;
    padding: 1.8rem 1.5rem;
    font-weight: 600;
    gap: 1.5rem;
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr;
    padding: 1.8rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    gap: 1.5rem;
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: #f8f9fa;
}

.table-header > div,
.table-row > div {
    padding: 0 0.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.col-author strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Ключевые выводы */
.article-keypoints {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 3rem;
    border-radius: 12px;
    margin: 4rem 0;
    border-left: 5px solid #597d89;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.article-keypoints h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 1.8rem;
}

.article-keypoints ul {
    list-style-type: none;
}

.article-keypoints li {
    margin-bottom: 1.2rem;
    padding-left: 2.5rem;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-keypoints li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #597d89;
    font-weight: bold;
    font-size: 1.2rem;
}

/* SEO блок в статье */
.article-seo-block {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin: 3rem 0;
    border-left: 5px solid #597d89;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.article-seo-block h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.article-seo-block p {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.6;
}

.article-seo-block .btn {
    display: block;
    margin: 0 auto;
    max-width: 250px;
}

/* НАВИГАЦИЯ МЕЖДУ СТАТЬЯМИ - ИСПРАВЛЕННЫЙ БЛОК */
.article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 4rem 0;
}

.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    color: inherit;
    text-decoration: none;
    border: 1px solid #e9ecef;
}

.nav-prev:hover,
.nav-next:hover {
    background: #597d89;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Левая кнопка - стрелка СЛЕВА */
.nav-prev {
    text-align: left;
    flex-direction: row; /* Текст слева, стрелка справа? НЕТ - стрелка слева */
}

/* Правая кнопка - стрелка СПРАВА */
.nav-next {
    text-align: right;
    flex-direction: row; /* Обычное направление */
}

/* Для правой кнопки перемещаем стрелку в конец */
.nav-next .nav-content {
    order: 1; /* Текст становится первым */
}

.nav-next i {
    order: 2; /* Стрелка становится второй (справа) */
    margin-left: auto; /* Отталкиваем стрелку вправо */
}

.nav-content span {
    display: block;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.nav-prev:hover .nav-content span,
.nav-next:hover .nav-content span {
    color: rgba(255,255,255,0.8);
}

.nav-content strong {
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.4;
}

.nav-prev i,
.nav-next i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Призыв к действию в статье */
.article-cta {
    background: linear-gradient(135deg, #597d89 0%, #4a6a75 100%);
    color: white;
    padding: 4rem 3rem;
    border-radius: 16px;
    text-align: center;
    margin: 4rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.article-cta h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.article-cta p {
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-size: 1.2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.article-cta .btn {
    background: white;
    color: #2c3e50;
    border: 2px solid white;
    font-weight: 600;
    padding: 14px 35px;
    border-radius: 10px;
}

.article-cta .btn:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255,255,255,0.2);
}

.article-cta .btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.article-cta .btn-secondary:hover {
    background: white;
    color: #597d89;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 220px;
    text-align: center;
    flex: 1;
    max-width: 250px;
}

/* ===== АДАПТИВНОСТЬ ===== */

@media (max-width: 992px) {
    .article-header h1 {
        font-size: 2.2rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 1rem;
        text-align: center;
    }
    
    .table-header > div,
    .table-row > div {
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .article-excerpt {
        font-size: 1.1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .article-navigation {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* На мобильных возвращаем обычный порядок */
    .nav-prev,
    .nav-next {
        text-align: center;
        flex-direction: row;
    }
    
    .nav-next .nav-content {
        order: 0;
    }
    
    .nav-next i {
        order: 0;
        margin-left: 0;
    }
}

@media (max-width: 576px) {
    .article-body {
        font-size: 1rem;
    }
    
    .article-toc {
        padding: 1.5rem;
    }
    
    .article-section h2 {
        font-size: 1.5rem;
    }
    
    .article-cta {
        padding: 2rem 1.5rem;
    }
    
    .article-cta h3 {
        font-size: 1.4rem;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-nav {
        justify-content: center;
    }
}