/* Categories with Images Shortcode */
.categories-with-images-shortcode {
    margin: 2rem 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.category-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.category-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.05);
}

.category-content {
    padding: 1.5rem;
}

.category-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.category-title a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.category-title a:hover {
    color: #3498db;
}

.category-description {
    margin: 0 0 1rem 0;
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 0.9rem;
}

.post-count {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Category item (used in template functions) */
.category-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.category-item:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.category-item .category-image {
    flex: 0 0 80px;
    height: 80px;
}

.category-item .category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.category-item .category-content {
    flex: 1;
    padding: 0;
}

.category-item .category-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.category-item .category-description {
    margin: 0 0 0.5rem 0;
    font-size: 0.85rem;
}

.category-item .post-count {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .category-image {
        height: 150px;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-item {
        flex-direction: column;
        text-align: center;
    }
    
    .category-item .category-image {
        flex: none;
        width: 100px;
        height: 100px;
    }
}
