/* ===== СТИЛИ СТРАНИЦЫ "КАТЕГОРИИ СТАТЕЙ" ===== */

.categories-hero {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    border-radius: 25px;
    padding: 60px 40px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.categories-hero::before {
    content: '📚';
    position: absolute;
    font-size: 200px;
    opacity: 0.1;
    top: -50px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.categories-hero-title {
    font-size: 48px;
    font-weight: bold;
    margin: 0 0 15px 0;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.categories-hero-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin: 0;
    position: relative;
    z-index: 1;
}

.categories-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.category-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
    animation-fill-mode: both;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.category-item:nth-child(1) { animation-delay: 0.1s; }
.category-item:nth-child(2) { animation-delay: 0.2s; }
.category-item:nth-child(3) { animation-delay: 0.3s; }
.category-item:nth-child(4) { animation-delay: 0.4s; }
.category-item:nth-child(5) { animation-delay: 0.5s; }
.category-item:nth-child(6) { animation-delay: 0.6s; }

.category-item.active {
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.3);
}

.category-button {
    width: 100%;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border: none;
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
}

.category-button:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-left-color: #8B5CF6;
}

.category-button.active {
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    border-left-color: #5B21B6;
}

.category-button.active .category-info h3,
.category-button.active .category-info p,
.category-button.active .category-icon-text {
    color: white;
}

.category-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.category-button:hover .category-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.category-button.active .category-icon-wrapper {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.category-info h3 {
    font-size: 22px;
    font-weight: bold;
    color: #1F2937;
    margin: 0 0 5px 0;
    transition: color 0.3s ease;
}

.category-info p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    transition: color 0.3s ease;
}

.category-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.articles-count {
    background: rgba(139, 92, 246, 0.15);
    color: #8B5CF6;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-button.active .articles-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.category-arrow {
    font-size: 24px;
    color: #8B5CF6;
    transition: all 0.3s ease;
}

.category-button.active .category-arrow {
    color: white;
    transform: rotate(180deg);
}

.articles-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #f9fafb;
    padding: 0 30px;
}

.articles-panel.active {
    max-height: none;
    padding: 30px;
    border-top: 2px solid #ede9fe;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
    position: relative;
}

.article-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
    border-color: #8B5CF6;
}

.article-card:hover::before {
    transform: scaleY(1);
}

.article-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 15px 15px 0 0;
    margin: -15px -15px 20px -15px;
    position: relative;
}

.заглушка-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: linear-gradient(135deg, #8B5CF6, #6D28D9);
}

.article-content {
    padding: 0 25px 25px 25px;
}

.article-category {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
}

.article-title {
    font-size: 20px;
    font-weight: bold;
    color: #1F2937;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.article-excerpt {
    font-size: 15px;
    color: #6B7280;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.article-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #9CA3AF;
    flex-wrap: wrap;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-title {
    font-size: 24px;
    font-weight: bold;
    color: #1F2937;
    margin: 0 0 10px 0;
}

.empty-text {
    font-size: 16px;
    color: #6B7280;
    margin: 0;
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .categories-hero-title {
        font-size: 36px;
    }
    
    .categories-hero {
        padding: 40px 25px;
    }
    
    .category-button {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }
    
    .category-left {
        width: 100%;
    }
    
    .category-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .articles-panel.active {
        padding: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .categories-hero-title {
        font-size: 28px;
    }
    
    .categories-hero-subtitle {
        font-size: 16px;
    }
    
    .category-info h3 {
        font-size: 18px;
    }
    
    .category-icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}
