/* ===================================
   Blog Page - Categories & Tags
   style-blog.css
=================================== */

/* --- Categories Section --- */
.categories-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.categories-section .section-header,
.tags-section .section-header {
    text-align: center;
    margin-bottom: 36px;
}

.categories-section .section-header h2,
.tags-section .section-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.categories-section .section-header p,
.tags-section .section-header p {
    color: #888;
    font-size: 0.9rem;
}

.categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 130px;
    padding: 24px 16px;
    background: #fff;
    border-radius: 16px;
    text-decoration: none;
    color: #1a1a2e;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.category-card:hover {
    border-color: var(--cat-color, #6366f1);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    color: #1a1a2e;
    text-decoration: none;
}

.category-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--cat-color, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.category-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.category-icon-fallback {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.category-card h3 {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

.category-card .post-count {
    font-size: 0.75rem;
    color: #aaa;
}

/* --- Tags Section --- */
.tags-section {
    padding: 60px 0;
    background: #fff;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 32px;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: #f1f3f5;
    color: #444;
    border-radius: 50px;
    text-decoration: none;
    font-size: calc(0.78rem * var(--tag-size, 1));
    font-weight: 500;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.tag-pill:hover {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
    transform: scale(1.05);
    text-decoration: none;
}

.tag-pill .tag-count {
    font-size: 0.7em;
    background: rgba(0,0,0,0.08);
    padding: 1px 7px;
    border-radius: 10px;
}

.tag-pill:hover .tag-count {
    background: rgba(255,255,255,0.2);
}

.tags-cta {
    text-align: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 28px;
    border: 2px solid #6366f1;
    color: #6366f1;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.btn-outline:hover {
    background: #6366f1;
    color: #fff;
    text-decoration: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .categories-section,
    .tags-section {
        padding: 40px 0;
    }

    .category-card {
        width: 100px;
        padding: 18px 12px;
    }

    .category-icon,
    .category-icon-fallback {
        width: 42px;
        height: 42px;
    }
}
