/**
 * Стили для страницы категории
 */

/* Основной контейнер */
.site-main {
    padding: 40px 0;
}

/* Заголовок категории */
.category-header {
    text-align: center;
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(216, 180, 254, 0.2);
}

.category-title {
    margin-bottom: 20px;
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    font-size: 60px;
    font-weight: 700;
    line-height: 105%;
    opacity: 0;
    animation: fadeIn 0.8s ease 0.2s forwards;
}

.category-description {
    font-size: 1.125rem;
    color: #94a3b8;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 20px;
}

.category-meta {
    color: #64748b;
    font-size: 0.9rem;
}

/* Сетка статей */
.category-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    grid-auto-rows: 1fr; /* Все строки одинаковой высоты */
    gap: 40px;
    margin-bottom: 80px;
}

/* Карточка статьи */
.category-post-item {
    background: rgba(216, 180, 254, 0.05);
    border: 1px solid rgba(216, 180, 254, 0.1);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Занимает всю доступную высоту */
}

.category-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(252, 126, 50, 0.15);
    border-color: var(--border-color);
}

/* Изображение статьи */
.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-post-item:hover .post-image {
    transform: scale(1.05);
}

/* Контент статьи */
.post-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex: 1; /* Занимает оставшееся место */
}

/* Мета информация */
.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Заголовок статьи */
.post-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
}

.post-title a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* Краткое описание */
.post-excerpt {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Теги */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.post-tag {
    display: inline-block;
    background: rgba(216, 180, 254, 0.1);
    color: rgb(216, 180, 254);
    padding: 4px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.post-tag:hover {
    background: rgba(216, 180, 254, 0.2);
    color: #ffffff;
}

/* Ссылка "Читать далее" */
.read-more {
    margin-top: auto; /* Прижимает кнопку к низу карточки */
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more-link:hover {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    gap: 12px;
}

.read-more-link svg {
    transition: transform 0.3s ease;
}

.read-more-link:hover svg {
    transform: translateX(4px);
}

/* Пагинация */
.category-pagination {
    text-align: center;
    margin-top: 60px;
}

.category-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.category-pagination a,
.category-pagination .current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-pagination a {
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);;
    color: #ffffff;
    border: 1px solid var(--border-color);
}

.category-pagination a:hover {
    background: linear-gradient(180deg, #1A1A1F 0%, rgba(25, 25, 31, 0.8) 100%);
    color: #FFFFFF;
    border-color: var(--border-color);
}

.category-pagination .current {
    background: linear-gradient(270deg, #4785FF 25.54%, #B8A1E6 100%);
    color: #ffffff;
    border: 1px solid var(--border-color);
}

/* Состояние "Нет статей" */
.no-posts {
    text-align: center;
    padding: 80px 20px;
}

.no-posts-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.no-posts-description {
    font-size: 1.125rem;
    color: #94a3b8;
    margin-bottom: 40px;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(270deg, #4785FF 25.54%, #6f5b96 100%);
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--border-color);
}

/* Адаптивность */
@media (max-width: 992px) {
    .category-title {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .category-posts-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .post-content {
        padding: 25px;
    }
}
