/* calc/assets/css/blog_hub.css */

.hub-header {
    text-align: center;
    padding: 60px 20px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.hub-header h1 {
    font-size: 2.5rem;
    margin: 0 0 16px 0;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.hub-header p {
    font-size: 1.125rem;
    color: #64748b;
    margin: 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

.category-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #3b82f6; /* Дефолтный цвет */
}

/* Цвета категорий по индексу (чтобы было красочно) */
.category-card:nth-child(4n+1)::before { background-color: #f59e0b; }
.category-card:nth-child(4n+2)::before { background-color: #3b82f6; }
.category-card:nth-child(4n+3)::before { background-color: #8b5cf6; }
.category-card:nth-child(4n+4)::before { background-color: #10b981; }

.category-card:nth-child(4n+1) .icon-wrapper { background-color: #fef3c7; color: #f59e0b; }
.category-card:nth-child(4n+2) .icon-wrapper { background-color: #eff6ff; color: #3b82f6; }
.category-card:nth-child(4n+3) .icon-wrapper { background-color: #f5f3ff; color: #8b5cf6; }
.category-card:nth-child(4n+4) .icon-wrapper { background-color: #ecfdf5; color: #10b981; }

.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #0f172a;
}

.article-count {
    margin-top: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
}