/* ============================================================
   СТРАНИЦА СТАТЕЙ — СТИЛИ В СТИЛЕ САЙТА
   ============================================================ */

/* ===== СТРАНИЦА СПИСКА СТАТЕЙ ===== */
.articles-page {
    max-width: 1200px;
    margin: 180px auto 40px;
    padding: 0 20px 40px;
    min-height: 60vh;
}

.articles-header {
    text-align: center;
    margin-bottom: 40px;
}
.articles-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4em;
    color: #1A1A2E;
    margin-bottom: 10px;
}
.articles-header h1 i {
    color: #ADD8E6;
    margin-right: 10px;
}
.articles-header p {
    font-size: 1.05em;
    color: #777;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ПОИСК ===== */
.articles-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}
.articles-search {
    position: relative;
    max-width: 400px;
    width: 100%;
}
.articles-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9090B0;
    font-size: 20px;
}
.articles-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1.5px solid #e4e0f0;
    border-radius: 25px;
    font-size: 14px;
    font-family: 'Open Sans', sans-serif;
    background: #faf8ff;
    outline: none;
    transition: border-color 0.2s;
}
.articles-search input:focus {
    border-color: #8B6FC4;
    background: #fff;
}

/* ===== СЕТКА СТАТЕЙ ===== */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    min-height: 200px;
}

.article-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0edf8;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
    border-color: #ADD8E6;
}

.article-card .article-cover {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f2ff, #fef0f4);
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-card .article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.article-card:hover .article-cover img {
    transform: scale(1.05);
}
.article-card .article-cover .cover-placeholder {
    font-size: 48px;
    color: #ADD8E6;
}

.article-card .article-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card .article-date {
    font-size: 12px;
    color: #9090B0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.article-card .article-date i {
    font-size: 14px;
}

.article-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15em;
    font-weight: 700;
    color: #1A1A2E;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-preview {
    font-size: 0.9em;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card .article-more {
    font-size: 13px;
    color: #8B6FC4;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}
.article-card:hover .article-more {
    color: #C9456A;
}

/* ===== ЗАГРУЗЧИК ===== */
.articles-loader {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9090B0;
}
.articles-loader i {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

/* ===== ПУСТОЕ СОСТОЯНИЕ ===== */
.no-articles {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9090B0;
}
.no-articles i {
    font-size: 48px;
    display: block;
    margin-bottom: 14px;
    color: #e4e0f0;
}
.no-articles p {
    font-size: 15px;
}

/* ===== КНОПКА "ЗАГРУЗИТЬ ЕЩЁ" ===== */
.articles-load-more {
    text-align: center;
    margin-top: 35px;
}
.load-more-btn {
    background: none;
    border: 1.5px solid #e4e0f0;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.load-more-btn:hover {
    border-color: #8B6FC4;
    color: #8B6FC4;
    background: #f5f2ff;
}

/* ============================================================
   СТРАНИЦА ОДНОЙ СТАТЬИ
   ============================================================ */
.article-page {
    max-width: 780px;
    margin: 180px auto 40px; !important;
    padding: 0 20px 60px;
    min-height: 60vh;
}

.article-single-header {
    text-align: center;
    margin-bottom: 40px;
}
.article-single-header .article-single-date {
    font-size: 14px;
    color: #9090B0;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.article-single-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2em;
    font-weight: 700;
    color: #1A1A2E;
    line-height: 1.3;
    margin-bottom: 20px;
}

.article-single-cover {
    width: 100%;
    max-height: 450px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.article-single-cover img {
    width: 100%;
    height: auto;
    display: block;
}

.article-single-content {
    font-size: 1.05em;
    line-height: 1.8;
    color: #333;
}
.article-single-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    color: #1A1A2E;
    margin: 32px 0 16px;
}
.article-single-content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3em;
    color: #1A1A2E;
    margin: 24px 0 12px;
}
.article-single-content p {
    margin-bottom: 18px;
}
.article-single-content ul,
.article-single-content ol {
    margin: 16px 0 18px 24px;
}
.article-single-content li {
    margin-bottom: 8px;
}
.article-single-content a {
    color: #8B6FC4;
    text-decoration: underline;
}
.article-single-content a:hover {
    color: #C9456A;
}
.article-single-content blockquote {
    border-left: 4px solid #ADD8E6;
    padding: 12px 20px;
    margin: 20px 0;
    background: #f8f8f8;
    border-radius: 0 10px 10px 0;
    color: #555;
    font-style: italic;
}
.article-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
}
.article-single-content code {
    background: #f5f2ff;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #8B6FC4;
}
.article-single-content pre {
    background: #1A1A2E;
    color: #fff;
    padding: 16px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}
.article-single-content pre code {
    background: none;
    color: #fff;
    padding: 0;
}

/* ===== НАВИГАЦИЯ НАЗАД ===== */
.article-back {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #f0edf8;
}
.article-back a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8B6FC4;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}
.article-back a:hover {
    color: #C9456A;
}

/* ===== ОШИБКА ===== */
.article-not-found {
    text-align: center;
    padding: 80px 20px;
    color: #9090B0;
}
.article-not-found i {
    font-size: 60px;
    color: #e4e0f0;
    display: block;
    margin-bottom: 20px;
}
.article-not-found h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5em;
    color: #1A1A2E;
    margin-bottom: 12px;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */
@media (max-width: 900px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .articles-page,
    .article-page {
        margin-top: 180px; !important;
        padding: 0 14px 30px;
    }
    .articles-header h1 {
        font-size: 1.8em;
    }
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .article-card .article-cover {
        height: 180px;
    }
    .article-single-header h1 {
        font-size: 1.6em;
    }
    .article-single-content {
        font-size: 1em;
        line-height: 1.7;
    }
    .article-single-content h2 {
        font-size: 1.4em;
    }
    .article-single-content h3 {
        font-size: 1.15em;
    }
}