/**
 * Стили для карточек подкатегорий
 * Subcategory Cards Plugin
 */

/* Контейнер карточек */
.scc-cards-container {
    display: grid;
    gap: 25px;
    margin: 30px 0;
    padding: 0;
}

/* Отдельная карточка */
.scc-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.scc-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    border-width: 2px;
}

/* Изображение категории */
.scc-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.scc-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.scc-card:hover .scc-card-image img {
    transform: scale(1.1);
}

.scc-card-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Контент карточки */
.scc-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.scc-card-title {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.scc-card-title a {
    color: #333333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.scc-card-title a:hover {
    color: #667eea;
}

.scc-card-description {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #666666;
    line-height: 1.6;
    flex: 1;
}

/* Количество записей */
.scc-card-count {
    display: inline-block;
    font-size: 0.875rem;
    color: #666666;
    font-weight: 500;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    position: relative;
    padding-left: 24px;
}

.scc-card-count::before {
    content: '📄';
    position: absolute;
    left: 0;
    top: 12px;
    font-size: 1rem;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .scc-cards-container[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .scc-cards-container[style*="grid-template-columns: repeat(5"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .scc-cards-container[style*="grid-template-columns: repeat(6"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .scc-cards-container[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .scc-cards-container[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .scc-cards-container[style*="grid-template-columns: repeat(5"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .scc-cards-container[style*="grid-template-columns: repeat(6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .scc-cards-container {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .scc-card-image {
        height: 200px;
    }
    
    .scc-card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .scc-card {
        padding: 15px;
    }
    
    .scc-card-image {
        height: 160px;
        margin-bottom: 12px;
    }
    
    .scc-card-title {
        font-size: 1rem;
    }
    
    .scc-card-description {
        font-size: 0.85rem;
    }
    
    .scc-card-count {
        font-size: 0.8rem;
    }
}

/* Анимация появления карточек */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scc-card {
    animation: fadeInUp 0.5s ease-out;
}

.scc-card:nth-child(1) { animation-delay: 0.05s; }
.scc-card:nth-child(2) { animation-delay: 0.1s; }
.scc-card:nth-child(3) { animation-delay: 0.15s; }
.scc-card:nth-child(4) { animation-delay: 0.2s; }
.scc-card:nth-child(5) { animation-delay: 0.25s; }
.scc-card:nth-child(6) { animation-delay: 0.3s; }


/* Улучшенная типографика */
.scc-card-title a {
    background-image: linear-gradient(to right, #667eea, #667eea);
    background-position: 0 100%;
    background-size: 0 2px;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

.scc-card-title a:hover {
    background-size: 100% 2px;
}

