/* static/css/style.css */

/* Стили для карусели */
.articles-carousel {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.carousel-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.carousel-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.article-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 25%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(102, 126, 234, 0.1);
    margin: 10px;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.article-card h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.article-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #888;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.views-count {
    background: #f8f9fa;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    color: #667eea;
}

.article-card .btn {
    align-self: flex-start;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid #667eea;
    color: #667eea;
    background: transparent;
    text-decoration: none;
}

.article-card .btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: transparent;
    color: white;
}

/* Стили для категорий */
.category-section {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 1rem;
}

.category-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
    display: inline-block;
}

.subcategory-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.subcategory-item {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.subcategory-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.3);
}

.subcategory-item h5 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.subcategory-item h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.subcategory-item .btn {
    display: inline-block;
    margin: 0.5rem 0.5rem 0 0;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.subcategory-item .btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Стили для пустых состояний */
.text-muted {
    color: #999;
    font-style: italic;
    padding: 2rem;
    text-align: center;
    background: #f8f9fa;
    border-radius: 10px;
}

.text-center p.lead {
    font-size: 1.25rem;
    color: #666;
    padding: 3rem;
    background: #f8f9fa;
    border-radius: 15px;
}

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

    .category-title {
        font-size: 1.75rem;
    }

    .subcategory-list {
        grid-template-columns: 1fr;
    }

    .article-card {
        padding: 1rem;
    }

    .subcategory-item {
        padding: 1.5rem;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-section {
    animation: fadeIn 0.6s ease-out;
}

.articles-carousel {
    animation: fadeIn 0.8s ease-out;
}

/* Дополнительные стили для карусели Owl */
.owl-carousel .owl-nav button.owl-prev,
.owl-carousel .owl-nav button.owl-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: white !important;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: #667eea !important;
    font-size: 20px !important;
    transition: all 0.3s ease;
}

.owl-carousel .owl-nav button.owl-prev {
    left: -20px;
}

.owl-carousel .owl-nav button.owl-next {
    right: -20px;
}

.owl-carousel .owl-nav button.owl-prev:hover,
.owl-carousel .owl-nav button.owl-next:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.owl-carousel .owl-dots {
    margin-top: 2rem;
}

.owl-carousel .owl-dot span {
    width: 10px;
    height: 10px;
    background: #ddd !important;
    transition: all 0.3s ease;
}

.owl-carousel .owl-dot.active span {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    width: 30px;
}